Skip to content

Commit 83989a4

Browse files
committed
style: format with prettier and prettier-tailwind plugin
1 parent 9440b6b commit 83989a4

File tree

14 files changed

+136
-27
lines changed

14 files changed

+136
-27
lines changed

.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"plugins": ["prettier-plugin-tailwindcss"]
3+
}

app/app.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="flex flex-col h-screen">
2+
<div class="flex h-screen flex-col">
33
<!-- header, topbar -->
44
<Header />
55
<Topbar />

app/assets/styles/sphinx-preview.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@
9292

9393
/* // external links */
9494
/* a[href^="http"]::after { */
95-
/* content: url("/icons/icons8-external-link-16.png"); */
96-
/* display: inline-block; */
95+
/* content: url("/icons/icons8-external-link-16.png"); */
96+
/* display: inline-block; */
9797
/* } */
9898

9999
/* ================================================================================ */
@@ -114,7 +114,7 @@
114114
padding: 5px;
115115

116116
/* &::after { */
117-
/* content: url(/icons/icons8-error-16.png); */
117+
/* content: url(/icons/icons8-error-16.png); */
118118
/* } */
119119
}
120120

app/assets/templates/sample.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ Or, literal block with syntax highlighting:
3737
```javascript
3838
for (let i = 0; i < 3; i++) {
3939
// shows 0, then 1, then 2
40-
alert(i)
40+
alert(i);
4141
}
4242
```

app/components/Editor.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<textarea
1515
ref="textarea"
1616
v-model="previewStore.files[props.filename]"
17-
class="textarea w-full min-h-full font-mono focus:outline-0 text-slate-700 dark:text-slate-300"
17+
class="textarea min-h-full w-full font-mono text-slate-700 focus:outline-0 dark:text-slate-300"
1818
placeholder="Every journey begins with a first step"
1919
/>
2020
</template>

app/components/Footer.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<footer
3-
class="border-t border-slate-300 py-2 px-6 flex gap-4 text-sm justify-between text-slate-500"
3+
class="flex justify-between gap-4 border-t border-slate-300 px-6 py-2 text-sm text-slate-500"
44
>
55
<span
66
>🚀 Do you want to try Sphinx as service?
@@ -15,7 +15,7 @@
1515
Made with <Icon name="prime:heart" /> by
1616
<a href="https://documatt.com" target="_blank" class="link">Documatt</a>
1717

18-
<div class="inline-flex gap-1.5 ml-4">
18+
<div class="ml-4 inline-flex gap-1.5">
1919
<a href="https://www.youtube.com/@Documatt" target="_blank"
2020
><Icon name="fa-brands:youtube"
2121
/></a>

app/components/Header.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
<template>
22
<header
3-
class="bg-[#f8fafc] dark:bg-slate-800 py-1 px-6 flex gap-20 justify-between items-center border-b border-t border-slate-300 text-slate-500 dark:text-slate-400"
3+
class="flex items-center justify-between gap-20 border-t border-b border-slate-300 bg-[#f8fafc] px-6 py-1 text-slate-500 dark:bg-slate-800 dark:text-slate-400"
44
>
55
<!-- Left-side logo and motto -->
6-
<div class="flex gap-2 items-center">
6+
<div class="flex items-center gap-2">
77
<a href="https://documatt.com">
88
<NuxtImg
99
src="/images/documatt-logo.svg"
1010
alt="Documatt logo"
1111
class="h-[0.7lh]"
1212
/>
1313
</a>
14-
<h1 class="font-bold text-sm">
14+
<h1 class="text-sm font-bold">
1515
reStructuredText and Markdown live preview
1616
</h1>
1717
</div>
1818

1919
<!-- Righ-side buttons -->
2020

21-
<div class="text-sm flex gap-2 items-center">
21+
<div class="flex items-center gap-2 text-sm">
2222
<!-- More functions? Try Documatt -->
2323

2424
More functions?
2525
<a href="https://documatt.com" target="_blank">
2626
<button
27-
class="btn btn-outline border-accent text-gray-100 hover:bg-primary hover:text-slate-200 bg-accent"
27+
class="btn btn-outline border-accent hover:bg-primary bg-accent text-gray-100 hover:text-slate-200"
2828
>
2929
Try Documatt
3030
<Icon name="prime:arrow-right" />

app/components/Preview/RenderTab.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PreviewState />
44

55
<!-- Preview -->
6-
<div class="overflow-auto h-full" title="HTML preview of markup">
6+
<div class="h-full overflow-auto" title="HTML preview of markup">
77
<!-- eslint-disable-next-line vue/no-v-html -->
88
<div class="sphinx-preview pointer-events-none" v-html="sanitizedHtml" />
99
</div>

app/components/Preview/SourceTab.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const props = defineProps<{ source: string | undefined }>();
33
</script>
44

55
<template>
6-
<div class="font-mono overflow-auto h-full whitespace-pre-wrap">
6+
<div class="h-full overflow-auto font-mono whitespace-pre-wrap">
77
{{ props.source }}
88
</div>
99
</template>

app/components/Preview/State.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div
33
v-if="previewStore.state == PreviewStates.Booting"
44
role="alert"
5-
class="alert alert-outline alert-info mb-4 text-secondary"
5+
class="alert alert-outline alert-info text-secondary mb-4"
66
>
77
<span class="loading loading-spinner loading-xs"></span>
88
<span>Sphinx in your browser is starting. Please wait.</span>

0 commit comments

Comments
 (0)