feat: update style

This commit is contained in:
changjun
2023-05-08 20:38:32 +08:00
parent 17210161ce
commit b4924388c1
6 changed files with 153 additions and 41 deletions

View File

@@ -1,7 +1,7 @@
/* layer: preflights */
*,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgba(0,0,0,0);--un-ring-shadow:0 0 rgba(0,0,0,0);--un-shadow-inset: ;--un-shadow:0 0 rgba(0,0,0,0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;}::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgba(0,0,0,0);--un-ring-shadow:0 0 rgba(0,0,0,0);--un-shadow-inset: ;--un-shadow:0 0 rgba(0,0,0,0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;}
/* layer: typography */
.prose :where(h1,h2,h3,h4,h5,h6):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-headings);font-weight:600;line-height:1.25;}.prose :where(a):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-links);text-decoration:underline;font-weight:500;}.prose :where(a code):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-links);}.prose :where(p,ul,ol,pre):not(:where(.not-prose,.not-prose *)){margin:1em 0;line-height:1.75;}.prose :where(blockquote):not(:where(.not-prose,.not-prose *)){margin:1em 0;padding-left:1em;font-style:none;border-left:.25em solid var(--un-prose-borders);}.prose :where(h1):not(:where(.not-prose,.not-prose *)){margin:1rem 0;font-size:2.25em;}.prose :where(h2):not(:where(.not-prose,.not-prose *)){margin:1.75em 0 .5em;font-size:1.75em;}.prose :where(h3):not(:where(.not-prose,.not-prose *)){margin:1.5em 0 .5em;font-size:1.375em;}.prose :where(h4):not(:where(.not-prose,.not-prose *)){margin:1em 0;font-size:1.125em;}.prose :where(img,video):not(:where(.not-prose,.not-prose *)){max-width:100%;}.prose :where(figure,picture):not(:where(.not-prose,.not-prose *)){margin:1em 0;}.prose :where(figcaption):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-captions);font-size:.875em;}.prose :where(code):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-code);font-size:.875em;font-weight:600;font-family:var(--un-prose-font-mono);}.prose :where(:not(pre) > code):not(:where(.not-prose,.not-prose *))::before,.prose :where(:not(pre) > code):not(:where(.not-prose,.not-prose *))::after{content:"`";}.prose :where(pre):not(:where(.not-prose,.not-prose *)){padding:1.25rem 1.5rem;overflow-x:auto;border-radius:.375rem;}.prose :where(pre,code):not(:where(.not-prose,.not-prose *)){white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;hyphens:none;background:transparent;}.prose :where(pre code):not(:where(.not-prose,.not-prose *)){font-weight:inherit;}.prose :where(ol,ul):not(:where(.not-prose,.not-prose *)){padding-left:1.25em;}.prose :where(ol):not(:where(.not-prose,.not-prose *)){list-style-type:decimal;}.prose :where(ol[type="A"]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-alpha;}.prose :where(ol[type="a"]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-alpha;}.prose :where(ol[type="A" s]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-alpha;}.prose :where(ol[type="a" s]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-alpha;}.prose :where(ol[type="I"]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-roman;}.prose :where(ol[type="i"]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-roman;}.prose :where(ol[type="I" s]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-roman;}.prose :where(ol[type="i" s]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-roman;}.prose :where(ol[type="1"]):not(:where(.not-prose,.not-prose *)){list-style-type:decimal;}.prose :where(ul):not(:where(.not-prose,.not-prose *)){list-style-type:disc;}.prose :where(ol > li):not(:where(.not-prose,.not-prose *))::marker,.prose :where(ul > li):not(:where(.not-prose,.not-prose *))::marker,.prose :where(summary):not(:where(.not-prose,.not-prose *))::marker{color:var(--un-prose-lists);}.prose :where(hr):not(:where(.not-prose,.not-prose *)){margin:2em 0;border:1px solid var(--un-prose-hr);}.prose :where(table):not(:where(.not-prose,.not-prose *)){display:block;margin:1em 0;border-collapse:collapse;overflow-x:auto;}.prose :where(tr):not(:where(.not-prose,.not-prose *)):nth-child(2n){background:var(--un-prose-bg-soft);}.prose :where(td,th):not(:where(.not-prose,.not-prose *)){border:1px solid var(--un-prose-borders);padding:.625em 1em;}.prose :where(abbr):not(:where(.not-prose,.not-prose *)){cursor:help;}.prose :where(kbd):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-code);border:1px solid;padding:.25rem .5rem;font-size:.875em;border-radius:.25rem;}.prose :where(details):not(:where(.not-prose,.not-prose *)){margin:1em 0;padding:1.25rem 1.5rem;background:var(--un-prose-bg-soft);}.prose :where(summary):not(:where(.not-prose,.not-prose *)){cursor:pointer;font-weight:600;}
.prose :where(h1,h2,h3,h4,h5,h6):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-headings);font-weight:600;line-height:1.25;}.prose :where(a):not(:where(.not-prose,.not-prose *)){color:var(--c-prose-links);text-decoration:none;font-weight:500;border-bottom:1px dashed currentColor;padding-bottom:2px;}.prose :where(a code):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-links);}.prose :where(p,ul,ol,pre):not(:where(.not-prose,.not-prose *)){margin:1em 0;line-height:1.75;}.prose :where(blockquote):not(:where(.not-prose,.not-prose *)){margin:1em 0;padding-left:1em;font-style:none;border-left:.2em solid var(--c-prose-borders);color:var(--c-blockquote);}.prose :where(h1):not(:where(.not-prose,.not-prose *)){margin:1rem 0;font-size:2.25em;color:var(--c-text-base);}.prose :where(h2):not(:where(.not-prose,.not-prose *)){margin:1.75em 0 .5em;font-size:1.75em;}.prose :where(h3):not(:where(.not-prose,.not-prose *)){margin:1.5em 0 .5em;font-size:1.375em;}.prose :where(h4):not(:where(.not-prose,.not-prose *)){margin:1em 0;font-size:1.125em;}.prose :where(img,video):not(:where(.not-prose,.not-prose *)){max-width:100%;}.prose :where(figure,picture):not(:where(.not-prose,.not-prose *)){margin:1em 0;}.prose :where(figcaption):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-captions);font-size:.875em;}.prose :where(code):not(:where(.not-prose,.not-prose *)){color:var(--c-prose-code);font-size:.875em;font-weight:400;font-family:var(--un-prose-font-mono);background:var(--c-prose-inline-bg-color) !important;padding:0.2rem 0.375rem;border-radius:0.25rem;}.prose :where(:not(pre) > code):not(:where(.not-prose,.not-prose *))::before,.prose :where(:not(pre) > code):not(:where(.not-prose,.not-prose *))::after{content:;}.prose :where(pre):not(:where(.not-prose,.not-prose *)){padding:1.25rem 1.5rem;overflow-x:auto;border-radius:.375rem;border:1px solid var(--c-prose-pre-border);background:var(--c-prose-pre-bg);}.prose :where(pre,code):not(:where(.not-prose,.not-prose *)){white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;hyphens:none;background:var(--c-prose-pre-bg);}.prose :where(pre code):not(:where(.not-prose,.not-prose *)){font-weight:inherit;}.prose :where(ol,ul):not(:where(.not-prose,.not-prose *)){padding-left:1.25em;}.prose :where(ol):not(:where(.not-prose,.not-prose *)){list-style-type:decimal;}.prose :where(ol[type="A"]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-alpha;}.prose :where(ol[type="a"]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-alpha;}.prose :where(ol[type="A" s]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-alpha;}.prose :where(ol[type="a" s]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-alpha;}.prose :where(ol[type="I"]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-roman;}.prose :where(ol[type="i"]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-roman;}.prose :where(ol[type="I" s]):not(:where(.not-prose,.not-prose *)){list-style-type:upper-roman;}.prose :where(ol[type="i" s]):not(:where(.not-prose,.not-prose *)){list-style-type:lower-roman;}.prose :where(ol[type="1"]):not(:where(.not-prose,.not-prose *)){list-style-type:decimal;}.prose :where(ul):not(:where(.not-prose,.not-prose *)){list-style-type:disc;}.prose :where(ol > li):not(:where(.not-prose,.not-prose *))::marker,.prose :where(ul > li):not(:where(.not-prose,.not-prose *))::marker,.prose :where(summary):not(:where(.not-prose,.not-prose *))::marker{color:var(--un-prose-lists);}.prose :where(hr):not(:where(.not-prose,.not-prose *)){margin:2em auto;border:none;width:48px;height:2px;background:var(--c-prose-hr);border-radius:24px;opacity:0.5;}.prose :where(table):not(:where(.not-prose,.not-prose *)){display:block;margin:1em 0;border-collapse:collapse;overflow-x:auto;}.prose :where(tr):not(:where(.not-prose,.not-prose *)):nth-child(2n){background:var(--un-prose-bg-soft);}.prose :where(td,th):not(:where(.not-prose,.not-prose *)){border:1px solid var(--un-prose-borders);padding:.625em 1em;}.prose :where(abbr):not(:where(.not-prose,.not-prose *)){cursor:help;}.prose :where(kbd):not(:where(.not-prose,.not-prose *)){color:var(--un-prose-code);border:1px solid;padding:.25rem .5rem;font-size:.875em;border-radius:.25rem;}.prose :where(details):not(:where(.not-prose,.not-prose *)){margin:1em 0;padding:1.25rem 1.5rem;background:var(--un-prose-bg-soft);}.prose :where(summary):not(:where(.not-prose,.not-prose *)){cursor:pointer;font-weight:600;}.prose :where(a):not(:where(.not-prose,.not-prose *)):hover{color:var(--c-prose-primary);}.prose :where(pre > code):not(:where(.not-prose,.not-prose *)){background:transparent !important;}
.prose{color:var(--un-prose-body);max-width:65ch;}
.prose-dark{--un-prose-body:#1b1b1b;--un-prose-headings:#0f0f0f;--un-prose-links:#0f0f0f;--un-prose-lists:#222222;--un-prose-hr:#323232;--un-prose-captions:#1f1f1f;--un-prose-code:#0f0f0f;--un-prose-borders:#323232;--un-prose-bg-soft:#3c3c3c;--un-prose-invert-body:#323232;--un-prose-invert-headings:#3c3c3c;--un-prose-invert-links:#3c3c3c;--un-prose-invert-lists:#1f1f1f;--un-prose-invert-hr:#1b1b1b;--un-prose-invert-captions:#222222;--un-prose-invert-code:#3c3c3c;--un-prose-invert-borders:#1b1b1b;--un-prose-invert-bg-soft:#181818;--un-prose-font-mono:ui-monospace,SFMono-Regular;}
@media (prefers-color-scheme: dark){
@@ -13,12 +13,19 @@
.smallText{font-size:0.875rem;line-height:1.25rem;}
.xLargeText{font-size:1.25rem;line-height:1.75rem;}
.xxLargeText{font-size:1.5rem;line-height:2rem;}
.link,
[link=""]{--un-text-opacity:1;color:rgba(34,34,34,var(--un-text-opacity));text-decoration:none;}
@media (prefers-color-scheme: dark){
.link,
[link=""]{--un-text-opacity:1;color:rgba(255,255,255,var(--un-text-opacity));}
}
/* layer: default */
.mx-auto{margin-left:auto;margin-right:auto;}
.mb-6{margin-bottom:1.5rem;}
.mt-2{margin-top:0.5rem;}
.my-2{margin-top:0.5rem;margin-bottom:0.5rem;}
.my-6{margin-top:1.5rem;margin-bottom:1.5rem;}
.mt-4{margin-top:1rem;}
.mt-6{margin-top:1.5rem;}
.box-border{box-sizing:border-box;}
.h-18{height:4.5rem;}
.max-w-prose{max-width:80ch;}
.w-18{width:4.5rem;}
@@ -35,21 +42,39 @@
.font-sans{font-family:ui-sans-serif,system-ui;}
.text-sm{font-size:0.875rem;line-height:1.25rem;}
.text-gray-300{--un-text-opacity:1;color:rgba(209,213,219,var(--un-text-opacity));}
.opacity-50{opacity:0.5;}
.opacity-60{opacity:0.6;}
.opacity-80{opacity:0.8;}
/* layer: my-style */
/* my style */
/* var */
:root {
--c-bg-base: #fff;
--c-text-base: #000
--c-text-base: #000;
--c-blockquote: #717171;
--c-prose-borders:#e4e4e7;
--c-prose-links: #000;
--c-prose-primary:#00dd83;
--c-prose-hr: #e4e4e7;
--c-prose-inline-bg-color:#f4f4f5;
--c-prose-code: #3f3f46;
--c-prose-pre-border: #e4e4e7;
--c-prose-pre-bg: #f4f4f5
}
@media(prefers-color-scheme: dark) {
:root {
--c-bg-base: rgb(17 17 17);
--c-text-base: #fff
--c-text-base: #fff;
--c-blockquote: #a1a1a1;
--c-prose-borders:#3f3f46;
--c-prose-links: #fff;
--c-prose-primary:#00dd83;
--c-prose-hr: #3f3f46;
--c-prose-inline-bg-color: #27272A;
--c-prose-code: #e4e4e7;
--c-prose-pre-border: #27272A;
--c-prose-pre-bg: #18181B
}
}

View File

@@ -30,9 +30,17 @@ body: The body of the article.
-->
<div id="elegantReader" class="animate-fade-in max-w-prose mx-auto font-sans [[text_size_class]]">
<p id="test" class="text-sm"></p>
<div class="flex flex-col items-center mt-6">
<div id="elegantReader" class="animate-fade-in max-w-prose px-8 py-3 mx-auto box-border font-sans [[text_size_class]]">
<article class="prose prose-dark dark:prose-light">
<h1>[[title]]</h1>
<p class="my-2 opacity-50">[[datetime_medium]]</p>
[[body]]
<p class="opacity-60 text-sm text-center">- THE END -</p>
</article>
<!-- <div class="flex flex-col items-center mt-6">
<img src="[[avatar_src]]" class="w-18 h-18 rounded-md" alt="">
<div class="flex mt-4 space-x-2">
<a href="[[preferred_link]]" class="text-gray-300" alt="original text" title="original text [[title]]">
@@ -45,38 +53,15 @@ body: The body of the article.
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><path fill="currentColor" d="M25 12h-5v2h5a1 1 0 0 1 1 1v2h-4a3.003 3.003 0 0 0-3 3v1a3.003 3.003 0 0 0 3 3h6v-9a3.003 3.003 0 0 0-3-3zm-3 10a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h4v3zm-6 2h2L12 7h-2L4 24h2l1.694-5h6.613zm-7.629-7l2.497-7.371h.266L13.63 17z"/></svg>
</div>
</div>
</div>
</div> -->
<article class="prose px-8 py-3 prose-dark dark:prose-light">
<h1>[[title]]</h1>
<p class="mt-2 opacity-80">[[datetime_medium]]</p>
[[body]]
</article>
<footer class="text-center flex flex-col mb-6">
<p class="opacity-60 text-sm">- THE END -</p>
<a href="[[feed_link]]" class="">[[byline]]</a>
<footer class="my-6 prose text-center">
<a href="[[feed_link]]">[[byline]]</a>
</footer>
</div>
<script type="text/javascript">
const textSizeEl = document.getElementById('textSize')
const elegantReaderEl = document.getElementById('elegantReader')
const testEl = document.getElementById('test')
const sizes = ['small', 'large', 'xLarge', 'xxLarge', 'medium']
let currentSize = 0
function toggleSize() {
const _className = `${sizes[currentSize]}Text`
testEl.innerHTML = `${_className}`
elegantReaderEl.classList.remove(_className)
currentSize = (currentSize + 1) % sizes.length
elegantReaderEl.classList.add(_className)
}
textSizeEl.addEventListener('click', toggleSize)
</script>
<script type="text/javascript"></script>

View File

@@ -3,13 +3,31 @@
/* var */
:root {
--c-bg-base: #fff;
--c-text-base: #000
--c-text-base: #000;
--c-blockquote: #717171;
--c-prose-borders:#e4e4e7;
--c-prose-links: #000;
--c-prose-primary:#00dd83;
--c-prose-hr: #e4e4e7;
--c-prose-inline-bg-color:#f4f4f5;
--c-prose-code: #3f3f46;
--c-prose-pre-border: #e4e4e7;
--c-prose-pre-bg: #f4f4f5
}
@media(prefers-color-scheme: dark) {
:root {
--c-bg-base: rgb(17 17 17);
--c-text-base: #fff
--c-text-base: #fff;
--c-blockquote: #a1a1a1;
--c-prose-borders:#3f3f46;
--c-prose-links: #fff;
--c-prose-primary:#00dd83;
--c-prose-hr: #3f3f46;
--c-prose-inline-bg-color: #27272A;
--c-prose-code: #e4e4e7;
--c-prose-pre-border: #27272A;
--c-prose-pre-bg: #18181B
}
}

View File

@@ -13,8 +13,10 @@
},
"devDependencies": {
"@antfu/eslint-config": "^0.38.5",
"@iconify-json/carbon": "^1.1.16",
"@types/node": "^18.16.3",
"@unocss/eslint-config": "^0.51.8",
"@unocss/preset-icons": "^0.51.12",
"clean-css": "^5.3.2",
"eslint": "^8.39.0",
"stylelint": "^15.6.0",

26
pnpm-lock.yaml generated
View File

@@ -4,12 +4,18 @@ devDependencies:
'@antfu/eslint-config':
specifier: ^0.38.5
version: 0.38.5(eslint@8.39.0)(typescript@5.0.4)
'@iconify-json/carbon':
specifier: ^1.1.16
version: 1.1.16
'@types/node':
specifier: ^18.16.3
version: 18.16.3
'@unocss/eslint-config':
specifier: ^0.51.8
version: 0.51.8(eslint@8.39.0)(typescript@5.0.4)
'@unocss/preset-icons':
specifier: ^0.51.12
version: 0.51.12
clean-css:
specifier: ^5.3.2
version: 5.3.2
@@ -460,6 +466,12 @@ packages:
resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==}
dev: true
/@iconify-json/carbon@1.1.16:
resolution: {integrity: sha512-AD8bcnRSGA0WfcGEass2FbA0sagrUzrpFx5WchuDy3uf7yKBWumdypdQK121DH321fQDl5+zZQ26T6gC9knwUQ==}
dependencies:
'@iconify/types': 2.0.0
dev: true
/@iconify/types@2.0.0:
resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==}
dev: true
@@ -771,6 +783,10 @@ packages:
unconfig: 0.3.7
dev: true
/@unocss/core@0.51.12:
resolution: {integrity: sha512-H8mLy6ZKu9nGZe5jlHhLPIVwh2G3cCDSBGl5aIZJFI1qpmDC+Zb3iueBGigNpX75IzkjaGKZiK1WUWq8TShjtA==}
dev: true
/@unocss/core@0.51.8:
resolution: {integrity: sha512-myHRKBphEN3h0OnsUhg2JaFKjFGfqF/jmmzZCCMNU5UmxbheZomXANNLYXVgEP6LHvd4xAF0DEzrOBcDPLf0HQ==}
dev: true
@@ -834,6 +850,16 @@ packages:
'@unocss/core': 0.51.8
dev: true
/@unocss/preset-icons@0.51.12:
resolution: {integrity: sha512-JdA3j9GhpwU6/VJMJjqZulYVdYAx2R86eXdlwZXVt7WYy/zWAF4au1iBI6+e5rp3V98yxFe+byWXqvn5aRUszg==}
dependencies:
'@iconify/utils': 2.1.5
'@unocss/core': 0.51.12
ofetch: 1.0.1
transitivePeerDependencies:
- supports-color
dev: true
/@unocss/preset-icons@0.51.8:
resolution: {integrity: sha512-qvHNsLYVJw6js+1+FNaNZm4qLTM+z4VnHHp1NNMtqHTMEOFUsxu+bAL6CIPkwja455F1GxyvYbHpB6eekSwNEA==}
dependencies:

View File

@@ -22,6 +22,9 @@ export default defineConfig({
shortcuts: [
[/^(.*)Text$/, ([,c]) => `text-${ARTICLE_TEXT[c]}`],
{
link: 'text-dark dark:text-white no-underline border-bottom-',
},
],
theme: {
@@ -43,12 +46,65 @@ export default defineConfig({
}),
presetAttributify(),
presetIcons({
scale: 1.2,
extraProperties: {
display: 'inline-block',
},
}),
presetTypography({
cssExtend: {
blockquote: {
'h1': {
color: 'var(--c-text-base)',
},
'a': {
'color': 'var(--c-prose-links)',
'text-decoration': 'none',
'border-bottom': '1px dashed currentColor',
'padding-bottom': '2px',
'font-weight': '500',
},
'a:hover': {
color: 'var(--c-prose-primary)',
},
'blockquote': {
'font-style': 'none',
'color': 'var(--c-blockquote)',
'border-left': '.2em solid var(--c-prose-borders)',
},
'hr': {
'width': '48px',
'height': '2px',
'background': 'var(--c-prose-hr)',
'border-radius': '24px',
'margin': '2em auto',
'border': 'none',
'opacity': '0.5',
},
'code': {
'color': 'var(--c-prose-code)',
'font-size': '.875em',
'font-family': 'var(--un-prose-font-mono)',
'background': 'var(--c-prose-inline-bg-color) !important',
'padding': '0.2rem 0.375rem',
'border-radius': '0.25rem',
'font-weight': 400,
},
'pre,code': {
background: 'var(--c-prose-pre-bg)',
},
'pre > code': {
background: 'transparent !important',
},
'pre': {
border: '1px solid var(--c-prose-pre-border)',
background: 'var(--c-prose-pre-bg)',
},
':not(pre) > code::before,:not(pre) > code::after': {
content: '',
},
},
}),