mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-15 11:12:54 +02:00
chore: unbind unocss shortcut
This commit is contained in:
parent
203d0f367b
commit
5f3d9bc3c2
11 changed files with 15 additions and 19 deletions
|
@ -19,7 +19,7 @@ const marginBottom = {
|
|||
---
|
||||
|
||||
<header class="mb-10.625 lg:fixed">
|
||||
<h1 class={`${marginBottom} text-8 c-primary font-bold font-title lg:text-9 w-75% lg:w-full`}>
|
||||
<h1 class={`${marginBottom} text-8 c-primary font-bold font-title lg:(text-9 w-full) w-75%`}>
|
||||
<!-- Fix text cropping issues during view transition on ios by adding a div tag -->
|
||||
<div
|
||||
class="box-content inline-block pr-1.25"
|
||||
|
@ -33,7 +33,7 @@ const marginBottom = {
|
|||
</h1>
|
||||
|
||||
{headerSubtitle && (
|
||||
<h2 class="w-75% text-balance text-3.5 c-secondary font-navbar lg:text-4">
|
||||
<h2 class="w-75% text-balance text-3.5 c-secondary font-navbar lg:(w-full text-4)">
|
||||
{headerSubtitle}
|
||||
</h2>
|
||||
)}
|
||||
|
|
|
@ -46,7 +46,7 @@ function getPostPath(post: Post) {
|
|||
|
||||
{/* mobile post time */}
|
||||
<div
|
||||
class="uno-mobile-time"
|
||||
class="mb-5.625 text-3.5 leading-6.875 font-time lg:(hidden)"
|
||||
transition:name={`time-${post.data.abbrlink || post.slug}-${lang}`}
|
||||
data-disable-transition-on-theme
|
||||
>
|
||||
|
@ -58,7 +58,7 @@ function getPostPath(post: Post) {
|
|||
|
||||
{/* desktop post time */}
|
||||
<div
|
||||
class="uno-desktop-time"
|
||||
class="mb-5.625 hidden text-3.65 leading-6.875 font-time lg:(ml-2.5 inline)"
|
||||
transition:name={`time-${post.data.abbrlink || post.slug}`}
|
||||
data-disable-transition-on-theme
|
||||
>
|
||||
|
|
|
@ -22,7 +22,7 @@ const nextUrl = useSupportedLangs
|
|||
|
||||
<a
|
||||
href={nextUrl}
|
||||
class="uno-button"
|
||||
class="aspect-square w-4 c-secondary active:scale-90 hover:c-primary"
|
||||
aria-label="Switch website language"
|
||||
>
|
||||
<svg
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<button
|
||||
aria-label="Switch light/dark theme"
|
||||
class="button-theme-toggle w-4.2 uno-button"
|
||||
class="button-theme-toggle aspect-square w-4.2 c-secondary active:scale-90 hover:c-primary"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
lang: ja
|
||||
---
|
||||
|
||||
Retypeset は [Astro](https://astro.build/) フレームワークをベースにした静的ブログテーマで、[Typography](https://astro-theme-typography.vercel.app/) からインスピレーションを得ています。新しい視覚的標準を確立し、すべてのページのレイアウトを再考することで、紙の本のような読書体験を提供し、タイポグラフィの美しさを蘇らせます。細部へのこだわりと、洗練された空間デザインが特徴です。
|
||||
Retypeset は[Astro](https://astro.build/)フレームワークをベースにした静的ブログテーマで、[Typography](https://astro-theme-typography.vercel.app/)からインスピレーションを得ています。新しい視覚的標準を確立し、すべてのページのレイアウトを再考することで、紙の本のような読書体験を提供し、タイポグラフィの美しさを蘇らせます。細部へのこだわりと、洗練された空間デザインが特徴です。
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
lang: zh-tw
|
||||
---
|
||||
|
||||
Retypeset 是一款基於 [Astro](https://astro.build/) 框架的靜態博客主題,設計靈感來自 [Typography](https://astro-theme-typography.vercel.app/)。本主題通過建立全新的視覺規範,對所有頁面進行重新編排,打造紙質書頁般的閱讀體驗,再現版式之美。所見皆為細節,方寸盡顯優雅。
|
||||
Retypeset 是一款基於[Astro](https://astro.build/)框架的靜態博客主題,設計靈感來自[Typography](https://astro-theme-typography.vercel.app/)。本主題通過建立全新的視覺規範,對所有頁面進行重新編排,打造紙質書頁般的閱讀體驗,再現版式之美。所見皆為細節,方寸盡顯優雅。
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
lang: zh
|
||||
---
|
||||
|
||||
Retypeset 是一款基于 [Astro](https://astro.build/) 框架的静态博客主题,设计灵感来自 [Typography](https://astro-theme-typography.vercel.app/)。本主题通过建立全新的视觉规范,对所有页面进行重新编排,打造纸质书页般的阅读体验,再现版式之美。所见皆为细节,方寸尽显优雅。
|
||||
Retypeset 是一款基于[Astro](https://astro.build/)框架的静态博客主题,设计灵感来自[Typography](https://astro-theme-typography.vercel.app/)。本主题通过建立全新的视觉规范,对所有页面进行重新编排,打造纸质书页般的阅读体验,再现版式之美。所见皆为细节,方寸尽显优雅。
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
---
|
||||
import type { CollectionEntry } from 'astro:content'
|
||||
import Comments from '@/components/Comments/index.astro'
|
||||
import PostDate from '@/components/PostDate.astro'
|
||||
import { allLocales, defaultLocale } from '@/config'
|
||||
|
@ -19,7 +20,7 @@ export async function getStaticPaths() {
|
|||
const slugToLangs: Record<string, string[]> = {}
|
||||
|
||||
// 填充映射
|
||||
posts.forEach((post) => {
|
||||
posts.forEach((post: CollectionEntry<'posts'>) => {
|
||||
const slug = post.data.abbrlink || post.slug
|
||||
const lang = post.data.lang || defaultLocale
|
||||
|
||||
|
@ -55,7 +56,7 @@ export async function getStaticPaths() {
|
|||
const paths: PathItem[] = []
|
||||
|
||||
// 默认语言的文章页面 (没有语言前缀)
|
||||
posts.forEach((post) => {
|
||||
posts.forEach((post: CollectionEntry<'posts'>) => {
|
||||
if (import.meta.env.DEV || !post.data.draft) {
|
||||
const slug = post.data.abbrlink || post.slug
|
||||
const postLang = post.data.lang || defaultLocale
|
||||
|
@ -77,7 +78,7 @@ export async function getStaticPaths() {
|
|||
// 更多语言的文章页面 (有语言前缀)
|
||||
allLocales.forEach((lang: string) => {
|
||||
if (lang !== defaultLocale) {
|
||||
posts.forEach((post) => {
|
||||
posts.forEach((post: CollectionEntry<'posts'>) => {
|
||||
if ((import.meta.env.DEV || !post.data.draft) && (post.data.lang === lang || post.data.lang === '')) {
|
||||
const slug = post.data.abbrlink || post.slug
|
||||
paths.push({
|
||||
|
|
|
@ -68,7 +68,7 @@ function getTagUrl(tagName: string): string {
|
|||
href={getTagUrl(tagName)}
|
||||
class={`uno-tags-style ${
|
||||
tag === tagName
|
||||
? 'uno-tag-active'
|
||||
? 'border-secondary/75 text-primary'
|
||||
: ''
|
||||
}`}
|
||||
>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
margin-block-end:0 !important
|
||||
}
|
||||
.heti a {
|
||||
--at-apply: 'uno-article-underline';
|
||||
--at-apply: 'underline mx-0.25em decoration-secondary/25 font-medium underline-0.075em underline-offset-0.2em hover:(c-primary decoration-secondary/75 transition)';
|
||||
}
|
||||
.heti blockquote {
|
||||
margin-block-start:12px;
|
||||
|
|
|
@ -33,14 +33,9 @@ export default defineConfig({
|
|||
},
|
||||
},
|
||||
shortcuts: {
|
||||
'uno-article-underline': 'underline mx-0.25em decoration-secondary/25 font-medium underline-0.075em underline-offset-0.2em hover:(c-primary decoration-secondary/75 transition)',
|
||||
'uno-tags-style': 'inline-block whitespace-nowrap border border-secondary/25 rounded-full px-3.2 py-0.7 c-secondary transition-colors hover:(border-secondary/75 text-primary)',
|
||||
'uno-tag-active': 'border-secondary/75 text-primary',
|
||||
'uno-decorative-line': 'h-0.25 w-10 bg-secondary opacity-25',
|
||||
'uno-mobile-time': 'mb-5.625 text-3.5 leading-6.875 font-time lg:(hidden)',
|
||||
'uno-desktop-time': 'mb-5.625 hidden text-3.65 leading-6.875 font-time lg:(ml-2.5 inline)',
|
||||
'uno-tags-wrapper': 'mt-4.375 w-95% flex flex-wrap gap-3',
|
||||
'uno-button': 'aspect-square w-4 c-secondary active:scale-90 hover:c-primary',
|
||||
},
|
||||
rules: [
|
||||
['scrollbar-hidden', {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue