This commit is contained in:
Hubert Chen 2022-11-16 21:35:08 +08:00
parent f56965c240
commit ffcf44eae4
10 changed files with 488 additions and 646 deletions

125
README.zh.md Normal file
View File

@ -0,0 +1,125 @@
<br />
<div align="center">
<a href="https://github.com/importantimport/urara">
<img src="https://github.com/importantimport/urara/raw/main/urara/hello-world/urara.webp" alt="urara" /></a>
</div>
<br />
<p align="center">
<a href="https://fff.js.org"><img src="https://img.shields.io/badge/%F0%9F%8C%9F%20F%20F%20F-0.2-yellow?style=flat" alt="fff" /></a>
<img src="https://img.shields.io/github/languages/top/importantimport/urara?color=%23ff3e00" alt="Language" />
<a href="https://github.com/importantimport/urara/blob/main/COPYING"><img src="https://img.shields.io/github/license/importantimport/urara?color=%23fff" alt="License" /></a>
<img src="https://app.fossa.com/api/projects/git%2Bgithub.com%2Fimportantimport%2Furara.svg?type=shield" alt="FOSSA Status" />
</p>
<p align="center">
<a href="https://urara-demo.netlify.app">🚀 演示</a>
/
<a href="https://urara-docs.netlify.app">📝 文檔</a>
/
<a href="https://github.com/importantimport/urara/discussions">💬 討論</a>
</p>
<p align="center">
<a href="https://github.com/importantimport/urara">English</a>
|
<span>正體中文</span>
</p>
## 🎉 現在就試試!
### 本地
```bash
npx degit importantimport/urara my-blog && cd my-blog # 在當前目錄創建一個名為 my-blog 的新項目
pnpm i # 如果你沒有安裝 pnpm運行npm i -g pnpm
```
### 遠端
[![Open in StackBlitz](https://img.shields.io/badge/-Open%20in%20StackBlitz-1374ef?style=for-the-badge&logo=Amp)](https://stackblitz.com/github/importantimport/urara) [![Use this template](https://img.shields.io/badge/-Use%20this%20Template-181717?style=for-the-badge&logo=GitHub)](https://github.com/importantimport/urara/generate) [![Deploy with Vercel](https://img.shields.io/badge/-Deploy%20with%20Vercel-1374ef?style=for-the-badge&logo=Vercel)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fimportantimport%2Furara&env=URARA_SITE_URL&envDescription=Site%20URL.&envLink=https%3A%2F%2Fexample.com&project-name=urara-blog&repository-name=urara-blog) [![Deploy to Netlify](https://img.shields.io/badge/-Deploy%20to%20Netlify-15847d?style=for-the-badge&logo=Netlify&logoColor=white)](https://app.netlify.com/start/deploy?repository=https%3A%2F%2Fgithub.com%2Fimportantimport%2Furara#URARA_SITE_URL=https://example.com&CUSTOM_LOGO=https://github.com/importantimport/urara/raw/main/urara/assets/any@512.png)
## ⚡️ 用法
### 開發
啟動開發服務器:
```bash
pnpm dev
```
### 構建
創建你的博客的產品版本:
```bash
pnpm build
```
你還可以使用 `pnpm preview` 預覽構建的網站。
### 文檔
如需完整文檔,請訪問 [urara-docs.netlify.app](https://urara-docs.netlify.app)
### 給這個項目一個 star
非常感謝!你的 ⭐ 會給我更多的動力來改進這個項目。
## ✨ 特徵
- 開箱即用的 **Atom feed** (WebSub), **Sitemap**, **PWA** (Web app manifest & ServiceWorker) 支持。
- 使用 daisyUI 呈現精美的界面設計和動畫,當然。
- 良好的 [IndieWeb](https://indieweb.org/) 兼容性 - 帶有 [microformats2](https://microformats.org/) 標記內容的多種帖子,通過 [webmentions.io](https://webmentions.io) API 展示 [Webmentions](https://webmention.org/)
- 不用擔心文章和圖像目錄 - 只需將它們放在一個文件夾下,它們就會 [在構建時自動複製](https://github.com/importantimport/urara/blob/main/urara.js).
- [評論組件](https://github.com/importantimport/urara/tree/main/src/lib/components/comments): Webmentions, Giscus, Utterances... 你可以使用不止一個。
## 📦️ 預捆綁
### TailwindCSS & PostCSS 插件
- [daisyUI](https://github.com/saadeghi/daisyui) - The most popular, free and open-source Tailwind CSS component library
- [Tailwind CSS Typography](https://github.com/tailwindlabs/tailwindcss-typography) - Beautiful typographic defaults for HTML you don't control.
- [Autoprefixer](https://github.com/postcss/autoprefixer) - Parse CSS and add vendor prefixes to rules by Can I Use
- [CSSNANO](https://github.com/cssnano/cssnano) - A modular minifier, built on top of the PostCSS ecosystem.
### Markdown 預處理器和語法高亮
- [MDsveX](https://github.com/pngwn/MDsveX) - A markdown preprocessor for Svelte.
- [Shiki Twoslash](https://github.com/shikijs/twoslash) - A beautiful Syntax Highlighter.
### Vite 插件
- [UnoCSS](https://github.com/unocss/unocss) - The instant on-demand atomic CSS engine.
- [VitePWA](https://github.com/antfu/vite-plugin-pwa) - Zero-config PWA for Vite
## 🚀 網站
- [./kwaa.dev](https://kwaa.dev) - [kwaa/blog](https://github.com/kwaa/blog)
- [Seviche.cc](https://seviche.cc) - [Sevichecc/Urara-Blog](https://github.com/Sevichecc/Urara-Blog)
和更多...
- [urara-blog - Discussions](https://github.com/importantimport/urara/discussions/2)
- [urara-blog - Topics](https://github.com/topics/urara-blog)
你在用 Urara 嗎? 在你的 repo 上添加 `urara-blog` 主題!
## 👥 貢獻
如果您有興趣為 Urara 做出貢獻,請在提交拉取請求之前閱讀[貢獻文檔](.github/CONTRIBUTING.md)。
## 📝 License
這項工作是免費的,它沒有任何保證。你可以在以下條款下重新發布和/或修改它:
Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar.
有關詳細信息,請參閱 [COPYING](COPYING) 文件。
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fimportantimport%2Furara.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fimportantimport%2Furara?ref=badge_large)
特別感謝 / 靈感來自於:
- [@michaeloliverx - Generate Posts List](https://github.com/pngwn/MDsveX/issues/294#issuecomment-907029639)
- [Kpouri](https://github.com/kpouri) 製作的圖標

View File

@ -13,7 +13,7 @@ import { parse, join } from 'path'
import { visit } from 'unist-util-visit'
import { toString } from 'mdast-util-to-string'
import Slugger from 'github-slugger'
// import remarkFFF from 'remark-fff'
import remarkFFF from 'remark-fff'
import remarkFootnotes from 'remark-footnotes'
// highlighter
@ -43,12 +43,6 @@ const remarkUraraFm =
})
data.fm.toc = toc
}
// Auto-read created & updated
if (!data.fm.created || !data.fm.updated) {
const { ctime, mtime } = statSync(new URL(`./urara${filepath}`, import.meta.url))
if (!data.fm.created) data.fm.created = ctime
if (!data.fm.updated) data.fm.updated = mtime
}
}
// Better type definitions needed
@ -97,7 +91,17 @@ export default defineConfig({
}
},
remarkPlugins: [
// [remarkFFF as any, { presets: ['hugo'], target: 'mdsvex' }],
[
remarkFFF as any,
{
presets: ['hugo'],
target: 'mdsvex',
autofill: {
provider: 'fs',
path: (path: string) => path.replace('/src/routes/', '/urara/')
}
}
],
remarkUraraFm,
remarkUraraSpoiler,
[remarkFootnotes, { inlineNotes: true }]

View File

@ -28,6 +28,7 @@
"@iconify-json/heroicons-outline": "^1.1.4",
"@iconify-json/heroicons-solid": "^1.1.5",
"@sveltejs/adapter-auto": "next",
"@sveltejs/adapter-netlify": "1.0.0-next.84",
"@sveltejs/adapter-node": "next",
"@sveltejs/adapter-static": "next",
"@sveltejs/kit": "1.0.0-next.535",
@ -35,20 +36,20 @@
"@types/node": "^18.11.9",
"@types/unist": "^2.0.6",
"@types/workbox-build": "^5.0.1",
"@typescript-eslint/eslint-plugin": "^5.42.1",
"@typescript-eslint/parser": "^5.42.1",
"@typescript-eslint/eslint-plugin": "^5.43.0",
"@typescript-eslint/parser": "^5.43.0",
"@vite-pwa/sveltekit": "^0.0.1",
"autoprefixer": "^10.4.13",
"chalk": "^5.1.2",
"chokidar": "^3.5.3",
"cross-env": "^7.0.3",
"cssnano": "^5.1.14",
"daisyui": "^2.39.0",
"daisyui": "^2.40.1",
"eslint": "^8.27.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-svelte3": "^4.0.0",
"fenceparser": "2.0.0",
"fff-flavored-frontmatter": "~0.4.0",
"fff-flavored-frontmatter": "~0.4.1",
"github-slugger": "^2.0.0",
"mdast-util-to-string": "^3.1.0",
"mdsvex": "^0.10.6",
@ -60,18 +61,18 @@
"rehype-external-links": "^1.0.1",
"rehype-slug": "^5.1.0",
"remark": "^14.0.2",
"remark-fff": "~0.4.0",
"remark-fff": "~0.4.1",
"remark-footnotes": "~2.0.0",
"shiki-twoslash": "^3.1.0",
"svelte": "3.51.0",
"svelte-check": "^2.9.2",
"svelte-preprocess": "^4.10.7",
"tailwindcss": "^3.2.3",
"tailwindcss": "^3.2.4",
"tslib": "^2.4.1",
"typescript": "^4.8.4",
"typescript": "^4.9.3",
"unist-util-visit": "^4.1.1",
"unocss": "^0.46.4",
"vite": "^3.2.3",
"unocss": "^0.46.5",
"vite": "^3.2.4",
"vite-plugin-pwa": "^0.13.3",
"workbox-window": "^6.5.4"
},

File diff suppressed because it is too large Load Diff

View File

@ -75,7 +75,7 @@
</div>
<ul
tabindex="0"
class="flex shadow-2xl menu dropdown-content bg-base-100 text-base-content rounded-box w-52 p-2 gap-2 overflow-y-auto max-h-[21.5rem]"
class="flex flex-nowrap shadow-2xl menu dropdown-content bg-base-100 text-base-content rounded-box w-52 p-2 gap-2 overflow-y-auto max-h-[21.5rem]"
class:hidden={!pin}>
{#each theme as { name, text }}
<button
@ -86,7 +86,7 @@
}}
class:border-2={currentTheme === name}
class:border-primary={currentTheme === name}
class="btn btn-ghost hover:bg-primary group rounded-lg flex bg-base-100 p-2 transition-all">
class="btn btn-ghost w-full hover:bg-primary group rounded-lg flex bg-base-100 p-2 transition-all">
<p class="flex-1 text-left text-base-content group-hover:text-primary-content transition-color">
{text ?? name}
</p>

View File

@ -49,11 +49,11 @@
{#each nav as { text, link, children }}
{#if link && !children}
<li>
<a sveltekit:prefetch class:font-bold={link === path} href={link}>{text}</a>
<a sveltekit:prefetch class="!rounded-btn" class:font-bold={link === path} href={link}>{text}</a>
</li>
{:else if children}
<li tabindex="0">
<span class:font-bold={children.some(({ link }) => link === path)} class="gap-1">
<span class:font-bold={children.some(({ link }) => link === path)} class="!rounded-btn gap-1">
{text}
<span class="i-heroicons-solid-chevron-down -mr-1" />
</span>

View File

@ -10,7 +10,7 @@
href={prev.path}
class:image-full={prev['image']}
class:md:rounded-r-box={next && !next['image']}
class="flex-1 card group rounded-none before:!rounded-none">
class="flex-1 card group rounded-none before:!rounded-none overflow-hidden">
{#if prev['image']}
<figure class="!block">
<Image
@ -37,7 +37,7 @@
href={next.path}
class:image-full={next['image']}
class:md:rounded-l-box={prev && !prev['image']}
class="flex-1 card group rounded-none before:!rounded-none">
class="flex-1 card group rounded-none before:!rounded-none overflow-hidden">
{#if next['image']}
<figure class="!block">
<Image

View File

@ -18,15 +18,15 @@
{site.author.name}
</a>
<span class:hidden={preview} class="opacity-50">/</span>
<a href={post.path} class="swap hover:swap-active u-url u-uid">
<a href={post.path} class="u-url u-uid swap group/time">
<time
class="swap-off font-semibold opacity-75 duration-500 ease-in-out mr-auto dt-published"
class="group-hover/time:opacity-0 font-semibold opacity-75 duration-500 ease-in-out mr-auto dt-published"
datetime={jsonPublished}
itemprop="datePublished">
{stringPublished}
</time>
<time
class="swap-on font-semibold text-primary duration-500 ease-in-out mr-auto dt-updated"
class="opacity-0 group-hover/time:opacity-100 font-semibold text-primary duration-500 ease-in-out mr-auto dt-updated"
datetime={jsonUpdated}
itemprop="dateModified">
{stringUpdated}

View File

@ -18,7 +18,7 @@ tags:
给手机刷系统,例如 [Lineage OS](https://lineageos.org/) [Sailfish OS](https://sailfishos.org/) [Kaleidoscope OS](https://github.com/Project-Kaleidoscope)
现在能刷机的 [s10e](https://baike.baidu.com/item/三星Galaxy%20S10e/23298784) 换到 [iPhone SE 2020](https://zh.m.wikipedia.org/zh-hans/IPhone_SE_(第二代)) 了,[Xperia 1](https://zh.m.wikipedia.org/wiki/Sony_Xperia_1) 还没有解 [BL 锁](https://source.android.com/docs/core/architecture/bootloader/locking_unlocking),估计也没什么机会刷机了
现在能刷机的 [s10e](https://baike.baidu.com/item/三星Galaxy%20S10e/23298784) 换到 [iPhone SE 2020](https://zh.m.wikipedia.org/zh-hans/IPhone_SE_(第二代)) 了,[Xperia 1](https://www.sony-asia.com/electronics/smartphones/xperia-1) 还没有解 [BL 锁](https://source.android.com/docs/core/architecture/bootloader/locking_unlocking),估计也没什么机会刷机了
会用 Linux ~~不过十分容易碰见bug~~

View File

@ -1,7 +1,7 @@
---
title: '2022 下半年的总结'
created: 2022-11-06
updated: 2022-11-14
updated: 2022-11-16
image: /talk/page111/flowers.jpg
tags:
- 闲聊
@ -86,4 +86,26 @@ esp8266 这块开发板还是在三月初看网上 WIFI 杀手的视频买的,
然后我又找到了 [自制 HomeKit 智能开关](https://www.jianshu.com/p/9cf083830edf) 这篇教程,这篇教程使用的是 [RavenSystem](https://github.com/RavenSystem/) 的另一个项目 [Home Accessory Architect](https://github.com/RavenSystem/haa/),成功安装,不过这个也有点坑,刷写后需要进入网页端配置,要手动输入 json 文件,配置过程还需要连接 GitHub 来下载资源文件,且后面需要修改 WIFI 网络只能清除重新刷入再重新配置
这个部分后面也是会出一份单独的教程,感觉这里写的又有点多了
这个部分后面也是会出一份单独的教程,感觉这里写的又有点多了
### 电子设备
今年是我近几年来更换过最多设备的一年了,似乎主力设备都给换了一遍
#### 办公设备
便携设备从搭载 [Windows](https://www.microsoft.com/windows/) 的 [YogaBook](https://www.lenovo.com/il/yoga-book/) 换到搭载 [Chrome OS](https://www.google.com/chromebook/chrome-os/) 的 [Chromebook Duet](https://www.lenovo.com/il/laptops/lenovo/student-chromebooks/Lenovo-CT-X636/),上面也说过了,就不再重复了,内闪存配置没变,体验是好了那么一些
#### 手机
手机在这段时间内换的可多了,从入学我爸给钱我买的 [s10e](https://baike.baidu.com/item/三星Galaxy%20S10e/23298784),再到 s10e 刷 [Lineage OS](https://lineageos.org/) 导致没信号又求我爸给钱买了台港版的 [x10m2](https://www.sony-asia.com/electronics/smartphones/xperia-10m2),虽然这都已经是去年的事了
后面在圣诞节的时候 [Sailfish OS](https://sailfishos.org/) 开启了买一送一活动,差不多等于打半价,于是我又与一位 [Jolla-Sailfish OS 中文交流群] 的网友合伙买了 Sailfish OS 的安卓支持,折腾一段时间后发现可以日用,但是使用起来并不舒服,就又找了 [Sjll](https://forum.xda-developers.com/m/sjll.8321130/) 的 [Unofficial Lineages OS](https://forum.xda-developers.com/t/rom-unofficial-lineageos-18-1-for-xperia-10-ii-gcam-performance.4219081/) 刷着用了,虽说后面索尼也给这台机子推送了 Android 12 固件,但依然改变不了索尼低端机子难用的事实 😥
后面 x10m2 就直接被我挂咸鱼了,不过等了许久并没有人接盘,但有一位日版 x1 卖家有意向与我换机想了想就换了665 换 855 不亏
其实仔细想想还是要感谢这位卖家,甚至当时还是一块钱互拍换的机,要是卖家突然反水我机子也就没了
后续拿到了 x1 用,给我的第一个感觉就是 **大****清晰**,当时的 s10e 算小号机5.8 寸 1080P 的屏幕一下子换到 6.5 寸 4k 屏幕,那个震撼感没有体验过的人绝对不知道是什么感觉,从稍微靠近一点就能看到像素到用放大镜才能看见像素的体验,真的...
||好吧有点吹过头了||