├── 400.png ├── public ├── l.png ├── r.png ├── view.png ├── favicon.ico ├── home.webp ├── profile.webp ├── fonts │ └── CascadiaCode.woff2 └── favicon.svg ├── 400-lighthouse.png ├── src ├── components │ ├── blog │ │ ├── kbd.astro │ │ ├── collapse.astro │ │ ├── diff.astro │ │ ├── success.astro │ │ ├── info.astro │ │ ├── error.astro │ │ └── warning.astro │ ├── FormattedDate.astro │ ├── page │ │ ├── LinkThere.astro │ │ ├── TimeLine.astro │ │ └── LinkCard.astro │ ├── CommentTwikoo.astro │ ├── ProfileCardMenu.astro │ ├── HeaderMenu.astro │ ├── ProfileCard.astro │ ├── BaseHead.astro │ ├── License.astro │ ├── ProjectJS.astro │ ├── EnvelopeCard.astro │ ├── Footer.astro │ ├── BaseCard.astro │ ├── CommentWaline.astro │ ├── Header.astro │ ├── Content.astro │ ├── ThemeIcon.astro │ ├── ProfileCardFooter.astro │ └── ProjectCard.astro ├── env.d.ts ├── consts.ts ├── pages │ ├── rss.xml.js │ ├── blog │ │ ├── [...slug].astro │ │ ├── tag │ │ │ └── [tag] │ │ │ │ └── [...page].astro │ │ └── [...page].astro │ ├── project.mdx │ ├── about.mdx │ └── index.mdx ├── content │ ├── config.ts │ └── blog │ │ ├── using-mdx copy.mdx │ │ ├── using-mdx.mdx │ │ ├── How-to-customize-code-box.mdx │ │ ├── frosti-mdx.mdx │ │ └── markdown-style-guide.md ├── layouts │ └── BaseLayout.astro ├── scripts │ └── copybutton.mjs └── styles │ ├── global.scss │ └── waline.scss ├── tsconfig.json ├── .vscode ├── extensions.json └── launch.json ├── .gitignore ├── tailwind.config.js ├── astro.config.mjs ├── package.json ├── categories.txt ├── CHANGELOG.md ├── README.zh-CN.md ├── README.md └── LICENSE /400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XenocodeRCE/blog/main/400.png -------------------------------------------------------------------------------- /public/l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XenocodeRCE/blog/main/public/l.png -------------------------------------------------------------------------------- /public/r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XenocodeRCE/blog/main/public/r.png -------------------------------------------------------------------------------- /public/view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XenocodeRCE/blog/main/public/view.png -------------------------------------------------------------------------------- /400-lighthouse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XenocodeRCE/blog/main/400-lighthouse.png -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XenocodeRCE/blog/main/public/favicon.ico -------------------------------------------------------------------------------- /public/home.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XenocodeRCE/blog/main/public/home.webp -------------------------------------------------------------------------------- /public/profile.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XenocodeRCE/blog/main/public/profile.webp -------------------------------------------------------------------------------- /src/components/blog/kbd.astro: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | --- 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /public/fonts/CascadiaCode.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XenocodeRCE/blog/main/public/fonts/CascadiaCode.woff2 -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "astro/tsconfigs/base", 3 | "compilerOptions": { 4 | "strictNullChecks": true 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["astro-build.astro-vscode", "unifiedjs.vscode-mdx"], 3 | "unwantedRecommendations": [] 4 | } 5 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "command": "./node_modules/.bin/astro dev", 6 | "name": "Development server", 7 | "request": "launch", 8 | "type": "node-terminal" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # build output 2 | dist/ 3 | # generated types 4 | .astro/ 5 | 6 | # dependencies 7 | node_modules/ 8 | 9 | # logs 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | pnpm-debug.log* 14 | 15 | 16 | # environment variables 17 | .env 18 | .env.production 19 | 20 | # macOS-specific files 21 | .DS_Store 22 | -------------------------------------------------------------------------------- /src/components/blog/collapse.astro: -------------------------------------------------------------------------------- 1 | --- 2 | const { title } = Astro.props; 3 | --- 4 | 5 |
9 |
{title}
10 |
11 |
12 | -------------------------------------------------------------------------------- /src/components/FormattedDate.astro: -------------------------------------------------------------------------------- 1 | --- 2 | interface Props { 3 | date: Date; 4 | } 5 | 6 | const { date } = Astro.props; 7 | --- 8 | 9 | 18 | -------------------------------------------------------------------------------- /src/components/blog/diff.astro: -------------------------------------------------------------------------------- 1 | --- 2 | const { r, l } = Astro.props; 3 | --- 4 | 5 |
6 |
7 | daisy 8 |
9 |
10 | daisy 11 |
12 |
13 |
14 | -------------------------------------------------------------------------------- /src/consts.ts: -------------------------------------------------------------------------------- 1 | // Place any global data in this file. 2 | // You can import this data from anywhere in your site by using the `import` keyword. 3 | 4 | export const SITE_TITLE = 'Astro Blog'; 5 | export const SITE_DESCRIPTION = 'Welcome to my website!'; 6 | export const USER_NICKNAME = 'EveSunMaple'; 7 | export const USER_DESCRIPTION = 'a student'; 8 | export const TRANSITION_API = true; 9 | -------------------------------------------------------------------------------- /src/pages/rss.xml.js: -------------------------------------------------------------------------------- 1 | import rss from '@astrojs/rss'; 2 | import { getCollection } from 'astro:content'; 3 | import { SITE_TITLE, SITE_DESCRIPTION } from '../consts'; 4 | 5 | export async function GET(context) { 6 | const posts = await getCollection('blog'); 7 | return rss({ 8 | title: SITE_TITLE, 9 | description: SITE_DESCRIPTION, 10 | site: context.site, 11 | items: posts.map((post) => ({ 12 | ...post.data, 13 | link: `/blog/${post.slug}/`, 14 | })), 15 | }); 16 | } 17 | -------------------------------------------------------------------------------- /src/components/blog/success.astro: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | --- 4 | 5 | 19 | -------------------------------------------------------------------------------- /src/components/blog/info.astro: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | --- 4 | 5 | 19 | -------------------------------------------------------------------------------- /src/components/blog/error.astro: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | --- 4 | 5 | 20 | -------------------------------------------------------------------------------- /src/components/page/LinkThere.astro: -------------------------------------------------------------------------------- 1 | --- 2 | const { desc, url, className, target = "_blank" } = Astro.props; 3 | --- 4 | 5 | 19 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'], 4 | theme: { 5 | extend: {}, 6 | }, 7 | plugins: [require("daisyui")], 8 | daisyui: { 9 | themes: true, // true: all themes | false: only light + dark | array: specific themes like this ["light", "dark", "cupcake"] 10 | darkTheme: "dark", // name of one of the included themes for dark mode 11 | logs: false, // Shows info about daisyUI version and used config in the console when building your CSS 12 | } 13 | } -------------------------------------------------------------------------------- /src/components/CommentTwikoo.astro: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | --- 4 | 5 |
6 | -------------------------------------------------------------------------------- /src/components/blog/warning.astro: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | --- 4 | 5 | 20 | -------------------------------------------------------------------------------- /src/content/config.ts: -------------------------------------------------------------------------------- 1 | import { defineCollection, z } from 'astro:content'; 2 | 3 | const blog = defineCollection({ 4 | type: 'content', 5 | // Type-check frontmatter using a schema 6 | schema: z.object({ 7 | title: z.string(), 8 | description: z.string(), 9 | pubDate: z.coerce.date(), 10 | updated: z.coerce.date().optional(), 11 | image: z.string().optional(), 12 | badge: z.string().optional(), 13 | tags: z.array(z.string()).refine(items => new Set(items).size === items.length, { 14 | message: 'tags must be unique', 15 | }).optional(), 16 | }), 17 | }); 18 | 19 | export const collections = { blog }; 20 | -------------------------------------------------------------------------------- /src/components/ProfileCardMenu.astro: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | -------------------------------------------------------------------------------- /public/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | -------------------------------------------------------------------------------- /src/components/page/TimeLine.astro: -------------------------------------------------------------------------------- 1 | --- 2 | const { time, check = false, left = false } = Astro.props; 3 | --- 4 | 5 |
{time}
6 |
7 | 17 |
18 |
19 | -------------------------------------------------------------------------------- /src/components/HeaderMenu.astro: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | --- 4 | 5 | 23 | -------------------------------------------------------------------------------- /src/components/ProfileCard.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import { Image } from "astro:assets"; 3 | import Menu from "../components/ProfileCardMenu.astro" 4 | import Footer from "../components/ProfileCardFooter.astro" 5 | import { SITE_TITLE, SITE_DESCRIPTION, USER_NICKNAME, USER_DESCRIPTION, TRANSITION_API } from "../consts"; 6 | const { 7 | name, 8 | desc, 9 | includeSidebar = true, 10 | } = Astro.props; 11 | --- 12 | 13 |
14 |
15 | 16 | Profile image 24 |
25 |
26 |
27 | 28 |
29 |
-------------------------------------------------------------------------------- /src/pages/blog/[...slug].astro: -------------------------------------------------------------------------------- 1 | --- 2 | import BaseLayout from "../../layouts/BaseLayout.astro"; 3 | import BaseCard from "../../components/BaseCard.astro"; 4 | import { type CollectionEntry, getCollection } from "astro:content"; 5 | 6 | export async function getStaticPaths() { 7 | const posts = await getCollection("blog"); 8 | return posts.map((post) => ({ 9 | params: { slug: post.slug }, 10 | props: post, 11 | })); 12 | } 13 | type Props = CollectionEntry<"blog">; 14 | 15 | const post = Astro.props; 16 | const { Content } = await post.render(); 17 | --- 18 | 19 | 20 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/content/blog/using-mdx copy.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: '测试文档' 3 | description: '这是一个用于测试的Markdown文档' 4 | pubDate: 'Jul 02 2024' 5 | image: https://saroprock.oss-cn-hangzhou.aliyuncs.com/img/%E8%83%8C%E5%8C%85%E9%97%AE%E9%A2%98.png 6 | tags: 7 | - tag 8 | --- 9 | 10 | ## 标题 11 | 12 | Markdown支持多级标题,使用 `#` 符号表示。一个 `#` 表示一级标题,两个 `#` 表示二级标题,以此类推。 13 | 14 | ### 三级标题 15 | 16 | 这是一个三级标题。 17 | 18 | ## 列表 19 | 20 | ### 无序列表 21 | 22 | - 项目一 23 | - 项目二 24 | - 项目三 25 | 26 | ### 有序列表 27 | 28 | 1. 第一项 29 | 2. 第二项 30 | 3. 第三项 31 | 32 | ## 格式化文本 33 | 34 | 你可以使用**加粗**和*斜体*来格式化文本。 35 | 36 | **加粗示例** 37 | 38 | *斜体示例* 39 | 40 | ~~删除线示例~~ 41 | 42 | ## 链接 43 | 44 | [这是一个链接](https://www.example.com) 45 | 46 | ## 图片 47 | 48 | ![这是一个示例图片](https://www.example.com/image.jpg) 49 | 50 | ## 代码 51 | 52 | 你可以在文档中插入代码片段: 53 | 54 | ```python 55 | def hello_world(): 56 | print("Hello, world!") 57 | ``` -------------------------------------------------------------------------------- /astro.config.mjs: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'astro/config'; 2 | import mdx from '@astrojs/mdx'; 3 | import sitemap from '@astrojs/sitemap'; 4 | import tailwind from "@astrojs/tailwind"; 5 | import remarkMath from 'remark-math'; 6 | import rehypeKatex from 'rehype-katex'; 7 | import playformCompress from "@playform/compress"; 8 | import pagefind from "astro-pagefind"; 9 | 10 | // https://astro.build/config 11 | export default defineConfig({ 12 | site: 'https://www.saroprock.com', 13 | style: { 14 | scss: { 15 | includePaths: ['./src/styles'] 16 | } 17 | }, 18 | integrations: [mdx(), sitemap(), tailwind(), playformCompress(), pagefind()], 19 | markdown: { 20 | shikiConfig: { 21 | themes: { 22 | light: 'github-light', 23 | dark: 'github-dark', 24 | }, 25 | }, 26 | remarkPlugins: [remarkMath], 27 | rehypePlugins: [rehypeKatex] 28 | }, 29 | }); -------------------------------------------------------------------------------- /src/components/page/LinkCard.astro: -------------------------------------------------------------------------------- 1 | --- 2 | const { title, img, desc, url, badge, target = "_blank" } = Astro.props; 3 | import { Image } from "astro:assets"; 4 | --- 5 | 6 | 33 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "frosti", 3 | "type": "module", 4 | "version": "2.3.1", 5 | "scripts": { 6 | "dev": "astro dev", 7 | "start": "astro dev", 8 | "build": "astro build", 9 | "preview": "astro preview", 10 | "astro": "astro" 11 | }, 12 | "dependencies": { 13 | "@astrojs/check": "^0.7.0", 14 | "@astrojs/mdx": "^2.3.1", 15 | "@astrojs/rss": "^4.0.7", 16 | "@astrojs/sitemap": "^3.1.6", 17 | "@astrojs/tailwind": "^5.1.0", 18 | "@playform/compress": "^0.0.13", 19 | "astro": "^4.11.5", 20 | "astro-pagefind": "^1.5.0", 21 | "dayjs": "^1.11.11", 22 | "katex": "^0.16.11", 23 | "pagefind": "^1.1.0", 24 | "prismjs": "^1.29.0", 25 | "rehype-external-links": "^3.0.0", 26 | "rehype-katex": "^7.0.0", 27 | "remark-math": "^6.0.0", 28 | "sass": "^1.77.8", 29 | "shiki": "^1.10.3", 30 | "twikoo": "^1.6.38", 31 | "typescript": "^5.5.3" 32 | }, 33 | "devDependencies": { 34 | "daisyui": "^4.12.10", 35 | "tailwindcss": "^3.4.4" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/components/BaseHead.astro: -------------------------------------------------------------------------------- 1 | --- 2 | // Import the global.css file here so that it is included on 3 | // all pages through the use of the component. 4 | import "../styles/global.scss"; 5 | import "../styles/waline.scss"; 6 | import ThemeIcon from "./ThemeIcon.astro"; 7 | interface Props { 8 | title: string; 9 | description: string; 10 | image?: string; 11 | } 12 | 13 | const canonicalURL = new URL(Astro.url.pathname, Astro.site); 14 | 15 | const { title, description, image } = Astro.props; 16 | --- 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | {title} 26 | 27 | {image && } 28 | 29 | 30 | 31 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/components/License.astro: -------------------------------------------------------------------------------- 1 | --- 2 | const { title, url, badge, tags } = Astro.props; 3 | --- 4 | 5 |
6 | 35 |
36 | -------------------------------------------------------------------------------- /src/components/ProjectJS.astro: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | --- 4 | 5 | 39 | -------------------------------------------------------------------------------- /src/content/blog/using-mdx.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Using MDX' 3 | description: 'Lorem ipsum dolor sit amet' 4 | pubDate: 'Jul 02 2022' 5 | image: https://saroprock.oss-cn-hangzhou.aliyuncs.com/img/%E8%83%8C%E5%8C%85%E9%97%AE%E9%A2%98.png 6 | --- 7 | 8 | This theme comes with the [@astrojs/mdx](https://docs.astro.build/en/guides/integrations-guide/mdx/) integration installed and configured in your `astro.config.mjs` config file. If you prefer not to use MDX, you can disable support by removing the integration from your config file. 9 | 10 | ## Why MDX? 11 | 12 | MDX is a special flavor of Markdown that supports embedded JavaScript & JSX syntax. This unlocks the ability to [mix JavaScript and UI Components into your Markdown content](https://docs.astro.build/en/guides/markdown-content/#mdx-features) for things like interactive charts or alerts. 13 | 14 | If you have existing content authored in MDX, this integration will hopefully make migrating to Astro a breeze. 15 | 16 | ## Example 17 | 18 | Here is how you import and use a UI component inside of MDX. 19 | When you open this page in the browser, you should see the clickable button below. 20 | 21 | ## More Links 22 | 23 | - [MDX Syntax Documentation](https://mdxjs.com/docs/what-is-mdx) 24 | - [Astro Usage Documentation](https://docs.astro.build/en/guides/markdown-content/#markdown-and-mdx-pages) 25 | - **Note:** [Client Directives](https://docs.astro.build/en/reference/directives-reference/#client-directives) are still required to create interactive components. Otherwise, all components in your MDX will render as static HTML (no JavaScript) by default. 26 | -------------------------------------------------------------------------------- /src/pages/blog/tag/[tag]/[...page].astro: -------------------------------------------------------------------------------- 1 | --- 2 | import EnvelopeCard from "../../../../components/EnvelopeCard.astro"; 3 | import BaseLayout from "../../../../layouts/BaseLayout.astro"; 4 | import BaseCard from "../../../../components/BaseCard.astro"; 5 | import Footer from "../../../../components/Footer.astro"; 6 | import { getCollection } from "astro:content"; 7 | import FormattedDate from "../../../../components/FormattedDate.astro"; 8 | 9 | export async function getStaticPaths({ paginate }) { 10 | const all_posts = await getCollection("blog"); 11 | const all_tags = all_posts.flatMap((post) => { 12 | return post.data.tags || []; 13 | }); 14 | 15 | return all_tags.flatMap((tag) => { 16 | const filtred_posts = all_posts.filter((post) => { 17 | return post.data.tags?.includes(tag); 18 | }); 19 | return paginate(filtred_posts, { 20 | params: { tag }, 21 | pageSize: 5, 22 | }); 23 | }); 24 | } 25 | const { page } = Astro.props; 26 | const params = Astro.params; 27 | --- 28 | 29 | 30 | 31 |

{"Blog - " + params.tag}

32 |
33 |
34 |
35 | { 36 | page.data.map((post) => ( 37 | 47 | )) 48 | } 49 |
50 |
51 | -------------------------------------------------------------------------------- /src/content/blog/How-to-customize-code-box.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: How to customize code box 3 | description: Create more components with mdx! 4 | pubDate: 07 18 2024 5 | image: https://saroprock.oss-cn-hangzhou.aliyuncs.com/img/diary-968592_1280.jpg 6 | tags: 7 | - Frosti 8 | - Blog 9 | - Project 10 | --- 11 | 12 | import Collapse from "../../components/blog/collapse.astro"; 13 | import Diff from "../../components/blog/diff.astro"; 14 | import Error from "../../components/blog/error.astro"; 15 | import Info from "../../components/blog/info.astro"; 16 | import Kbd from "../../components/blog/kbd.astro"; 17 | import Success from "../../components/blog/success.astro"; 18 | import Warning from "../../components/blog/warning.astro"; 19 | import TimeLine from "../../components/page/TimeLine.astro"; 20 | import LinkCard from "../../components/page/LinkCard.astro"; 21 | 22 | ## 添加行号 23 | 24 | 此方法仅在 `Shiki` 中可用, `Prism` 无法通过 CSS 直接生成行号。 25 | 26 | 在 `v2.2.1` 更新后默认添加行号。 27 | 28 | 在 `src\styles\global.scss` 中添加以下内容: 29 | 30 | ```scss 31 | pre .line { 32 | counter-increment: line; 33 | padding-left: 2.5em; 34 | } 35 | 36 | pre :not(:last-child).line::before { 37 | content: counter(line); 38 | position: absolute; 39 | left: 0; 40 | width: 3em; 41 | text-align: right; 42 | margin-right: 10px; 43 | color: #888; 44 | } 45 | ``` 46 | 47 | ## 改变主题 48 | 49 | Frosti 使用 `Shiki` 来渲染代码框, `Shiki` 已经提供了足够多的主题,不推荐使用 `Prism`。 50 | 51 | 有关于 `Shiki` 的主题详见:https://shiki.style/themes 52 | 53 | 在 `astro.config.mjs` 中修改内容: 54 | 55 | ```js 56 | markdown: { 57 | shikiConfig: { 58 | themes: { 59 | light: 'github-light', 60 | dark: 'github-dark', 61 | }, 62 | }, 63 | }, 64 | ``` -------------------------------------------------------------------------------- /src/components/EnvelopeCard.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import { Image } from "astro:assets"; 3 | import dayjs from "dayjs"; 4 | const { 5 | title, 6 | image, 7 | desc, 8 | pubDate, 9 | url, 10 | badge, 11 | tags, 12 | target = "_blank", 13 | } = Astro.props; 14 | const tag_url = url.split("/").slice(0, -1).join("/") + "/tag"; 15 | const displayDate = dayjs(pubDate).format("ddd MMM DD YYYY"); 16 | --- 17 | 18 |
19 |
20 | { 21 | image && ( 22 | {title} 30 | ) 31 | } 32 |
33 |
34 |
35 | 36 | {title} 37 | 38 |
{desc}
39 |
40 | {displayDate &&
{displayDate}
} 41 | {badge &&
{badge}
} 42 |
43 | Tag: 44 | { 45 | tags && 46 | tags.map((tag) => ( 47 | <> 48 | 52 | {tag} 53 | 54 | 55 | 56 | )) 57 | } 58 |
59 |
60 |
61 |
62 |
63 | -------------------------------------------------------------------------------- /src/pages/project.mdx: -------------------------------------------------------------------------------- 1 | import BaseLayout from "../layouts/BaseLayout.astro"; 2 | import BaseCard from "../components/BaseCard.astro"; 3 | import error from "../components/blog/error.astro"; 4 | import info from "../components/blog/info.astro"; 5 | import success from "../components/blog/success.astro"; 6 | import warn from "../components/blog/warning.astro"; 7 | import TimeLine from "../components/page/TimeLine.astro"; 8 | import LinkCard from "../components/page/LinkCard.astro"; 9 | import ProjectCard from "../components/ProjectCard.astro"; 10 | import ProjectJS from "../components/ProjectJS.astro" 11 | 12 | 13 | 14 | # Project 15 | 16 | --- 17 | 18 | 19 | 26 | 33 | 40 | 47 | 48 | -------------------------------------------------------------------------------- /src/components/Footer.astro: -------------------------------------------------------------------------------- 1 | --- 2 | const today = new Date(); 3 | --- 4 | 5 |
6 | 29 | 40 |
41 | -------------------------------------------------------------------------------- /src/layouts/BaseLayout.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import "/node_modules/katex/dist/katex.min.css"; 3 | import Profile from "../components/ProfileCard.astro"; 4 | import BaseHead from "../components/BaseHead.astro"; 5 | import Header from "../components/Header.astro"; 6 | import Footer from "../components/Footer.astro"; 7 | import ThemeIcon from "../components/ThemeIcon.astro"; 8 | import Content from "../components/Content.astro"; 9 | import { ViewTransitions } from "astro:transitions"; 10 | import { 11 | SITE_TITLE, 12 | SITE_DESCRIPTION, 13 | USER_NICKNAME, 14 | USER_DESCRIPTION, 15 | TRANSITION_API, 16 | } from "../consts"; 17 | const { 18 | image, 19 | site_title = SITE_TITLE, 20 | site_description = SITE_DESCRIPTION, 21 | user_name = USER_NICKNAME, 22 | user_description = USER_DESCRIPTION, 23 | includeSidebar = true, 24 | PageID, 25 | } = Astro.props; 26 | --- 27 | 28 | 29 | Frosti 30 | 31 | 32 | 33 | {TRANSITION_API && } 34 | 35 | 36 | 37 |
38 |
39 |
40 | { 41 | includeSidebar && ( 42 | 43 | ) 44 | } 45 |
46 |
47 |
48 | 49 |
50 |
51 |
52 |
53 |
54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /categories.txt: -------------------------------------------------------------------------------- 1 | 2 | D:\Frosti 3 | ├── 400.png 4 | ├── astro.config.mjs 5 | ├── categories.txt 6 | ├── CHANGELOG.md 7 | ├── LICENSE 8 | ├── node_modules 9 | | ├── @astrojs 10 | ├── package-lock.json 11 | ├── package.json 12 | ├── pnpm-lock.yaml 13 | ├── public 14 | | ├── favicon.ico 15 | | ├── favicon.svg 16 | | ├── fonts 17 | | | └── CascadiaCode.woff2 18 | | ├── home.webp 19 | | ├── profile.webp 20 | | └── view.png 21 | ├── README.md 22 | ├── src 23 | | ├── components 24 | | | ├── BaseCard.astro 25 | | | ├── BaseHead.astro 26 | | | ├── blog 27 | | | | ├── error.astro 28 | | | | ├── info.astro 29 | | | | ├── success.astro 30 | | | | └── warning.astro 31 | | | ├── Comment.astro 32 | | | ├── EnvelopeCard.astro 33 | | | ├── Footer.astro 34 | | | ├── FormattedDate.astro 35 | | | ├── Header.astro 36 | | | ├── HeaderLink.astro 37 | | | ├── License.astro 38 | | | ├── page 39 | | | | ├── LinkCard.astro 40 | | | | ├── LinkThere.astro 41 | | | | └── TimeLine.astro 42 | | | ├── ProfileCard.astro 43 | | | ├── ProfileCardFooter.astro 44 | | | ├── ProfileCardMenu.astro 45 | | | ├── ProjectCard.astro 46 | | | ├── ProjectJS.astro 47 | | | └── ThemeIcon.astro 48 | | ├── consts.ts 49 | | ├── content 50 | | | ├── blog 51 | | | | ├── markdown-style-guide.md 52 | | | | └── using-mdx.mdx 53 | | | └── config.ts 54 | | ├── env.d.ts 55 | | ├── layouts 56 | | | └── BaseLayout.astro 57 | | ├── pages 58 | | | ├── about.mdx 59 | | | ├── blog 60 | | | | ├── tag 61 | | | | ├── [...page].astro 62 | | | | └── [...slug].astro 63 | | | ├── friend.mdx 64 | | | ├── frosti.mdx 65 | | | ├── index.mdx 66 | | | ├── project.mdx 67 | | | └── rss.xml.js 68 | | ├── scripts 69 | | | ├── copybutton.mjs 70 | | | └── time.mjs 71 | | └── styles 72 | | ├── global.scss 73 | | └── waline.scss 74 | ├── tailwind.config.js 75 | └── tsconfig.json 76 | 77 | directory: 16 file: 57 symboliclink: 15 78 | 79 | 80 | 81 |  82 | -------------------------------------------------------------------------------- /src/components/BaseCard.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import { Image } from "astro:assets"; 3 | import License from "../components/License.astro"; 4 | import CommentWaline from "./CommentWaline.astro"; 5 | import CommentTwikoo from "./CommentTwikoo.astro"; 6 | import dayjs from "dayjs"; 7 | const { 8 | title, 9 | image, 10 | pubDate, 11 | badge, 12 | tags, 13 | isBlog, 14 | url = decodeURIComponent(Astro.url.toString()), 15 | } = Astro.props; 16 | const tag_url = url.split("/").slice(0, -1).join("/") + "/tag"; 17 | const displayDate = dayjs(pubDate).format("ddd MMM DD YYYY"); 18 | --- 19 | 20 |
21 | { 22 | image && ( 23 | {title} 32 | ) 33 | } 34 |
35 | { 36 | isBlog && ( 37 | <> 38 |

{title}

39 |
40 | {displayDate && ( 41 |
{displayDate}
42 | )} 43 | {badge &&
{badge}
} 44 |
45 | Tag: 46 | {tags && 47 | tags.map((tag) => ( 48 | <> 49 | 53 | {tag} 54 | 55 | 56 | 57 | ))} 58 |
59 |
60 |
61 | 62 | ) 63 | } 64 | 65 | { 66 | isBlog && ( 67 | <> 68 | 69 | 70 | 71 | ) 72 | } 73 |
74 |
75 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | ## [1.0.3] - 2024-5-29 4 | 5 | ### Refactored 6 | 7 | - 修复了一些在 **Accessibility** 上的问题 8 | - 优化了部分内容,速度更快了 9 | 10 | ## [1.0.4] - 2024-5-30 11 | 12 | ### Refactored 13 | 14 | - 优化了部分内容,评分 **395** 15 | - 修改了 README 16 | 17 | ## [1.1.0] - 2024-6-2 18 | 19 | ### Features 20 | 21 | - 新增 `ProjectCard` 22 | - 完善了 Project 页面 23 | 24 | ### Refactored 25 | 26 | - 取消了头图的懒加载,删去了莫名其妙的 br 27 | 28 | ## [1.1.1] - 2024-6-2 29 | 30 | ### Refactored 31 | 32 | - 优化链接样式,在 `pagespeed.web` 获得 400 分 33 | 34 | ## [1.1.2] - 2024-6-12 35 | 36 | ### Features 37 | 38 | - 新增 `busuanzi` 计数器 39 | 40 | ## [1.2.0] - 2024-6-16 41 | 42 | ### Features 43 | 44 | - `css` 已经改为 `scss` 45 | - 自定义了 `waline` 的样式 46 | - 完善了 `Footnotes` 的样式 47 | - 添加图标 48 | 49 | ## [1.2.1] - 2024-6-28 50 | 51 | ### Features 52 | 53 | - 爆改 `scss` 文件,基本上改成了 `Tailwind` 54 | - 修改了 `footer` 的样式 55 | 56 | ### Refactored 57 | 58 | - 微调了部分组件的样式 59 | - 微调了文章样式 60 | - 删去了不必要的友链 61 | 62 | ## [2.0.0] - 2024-7-8 63 | 64 | ### Features 65 | 66 | - `Lighthouse` 400 67 | - 文本压缩……启动!! 68 | - 页脚修改……返璞归真 69 | 70 | ### Refactored 71 | 72 | - 删除 `busuanzi` 计数器 73 | 74 | ### Fix 75 | 76 | - 修复了文章内标签跳转的问题 77 | 78 | ## [2.1.0] - 2024-7-9 79 | 80 | ### Features 81 | 82 | - 新增搜索功能 83 | 84 | ### Refactored 85 | 86 | - 微调页脚 87 | - 微调导航栏 88 | 89 | ## [2.1.1] - 2024-7-9 90 | 91 | ### Fix 92 | 93 | - 修复了不能跳转的问题(原因未知) 94 | 95 | ## [2.1.2] - 2024-7-10 96 | 97 | ### Features 98 | 99 | - (半成品)添加 `twikoo` 评论 100 | - 一些组件,将在 2.2.0 总结 101 | 102 | ### Refactored 103 | 104 | - 完善了搜索的黑夜模式 105 | 106 | ## [2.2.0] - 2024-7-13 107 | 108 | ### Features 109 | 110 | - 添加目录功能!(终于加了) 111 | - 添加了一篇指导文章 112 | - 添加了新的组件 113 | 114 | ### Refactored 115 | 116 | - 修改了行距 117 | 118 | ### Fix 119 | 120 | - 修复了在手机屏幕下页脚显示不全的问题 121 | 122 | ## [2.3.0] - 2024-7-18 123 | 124 | ### Features 125 | 126 | - 添加了代码框的行号 127 | - 提交了如何修改代码框主题的教程 128 | 129 | ### Refactored 130 | 131 | - 修改了 `astro.config.mjs` 现在代码框样式完全了 132 | 133 | ## [2.3.1] - 2024-7-19 134 | 135 | ## Fix 136 | 137 | - 修复了 `astro.config.mjs` 中的问题(我填错了位置了) 138 | - 完善了白天的代码框样式 139 | -------------------------------------------------------------------------------- /src/components/CommentWaline.astro: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | --- 4 | 5 |
6 | 10 |
11 |
12 |
13 | 67 | -------------------------------------------------------------------------------- /src/pages/blog/[...page].astro: -------------------------------------------------------------------------------- 1 | --- 2 | import EnvelopeCard from "../../components/EnvelopeCard.astro"; 3 | import BaseLayout from "../../layouts/BaseLayout.astro"; 4 | import BaseCard from "../../components/BaseCard.astro"; 5 | import { getCollection } from "astro:content"; 6 | import Search from "astro-pagefind/components/Search"; 7 | 8 | export async function getStaticPaths({ paginate }) { 9 | const posts = await getCollection("blog"); 10 | posts.sort((a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf()); 11 | return paginate(posts, { pageSize: 5 }); 12 | } 13 | 14 | const { page } = Astro.props; 15 | --- 16 | 17 | 18 | 19 | 24 | 25 |
26 |
27 | { 28 | page.data.map((post) => ( 29 | 39 | )) 40 | } 41 |
42 |
43 |
44 | { 45 | page.url.prev ? ( 46 | 47 | {" "} 48 | 55 | 56 | {" "} 57 | Recent posts 58 | 59 | ) : ( 60 |
61 | ) 62 | } 63 | { 64 | page.url.next ? ( 65 | 66 | Older Posts{" "} 67 | 74 | {" "} 75 | 76 | 77 | 78 | ) : ( 79 |
80 | ) 81 | } 82 |
83 | 84 | -------------------------------------------------------------------------------- /src/components/Header.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import Menu from "../components/HeaderMenu.astro"; 3 | import { SITE_TITLE } from "../consts"; 4 | --- 5 | 6 | 54 | -------------------------------------------------------------------------------- /src/pages/about.mdx: -------------------------------------------------------------------------------- 1 | import BaseLayout from "../layouts/BaseLayout.astro"; 2 | import BaseCard from "../components/BaseCard.astro"; 3 | import error from "../components/blog/error.astro"; 4 | import info from "../components/blog/info.astro"; 5 | import success from "../components/blog/success.astro"; 6 | import warn from "../components/blog/warning.astro"; 7 | import TimeLine from "../components/page/TimeLine.astro"; 8 | import LinkCard from "../components/page/LinkCard.astro"; 9 | 10 | 11 | 12 | # About Frosti 13 | 14 | --- 15 | 16 | ## Brief introduction 17 | 18 | Frosti is a static blog template created by EveSunMaple using Astro, designed to replace bloated Hexo. The author is only a high school student, and there are many imperfections in this template that need to be modified. If you are interested, please visit the Github repository. 19 | 20 | ## TimeLine 21 | 22 |
    23 |
  • 24 | 25 | Project creation, building the prototype. 26 | 27 |
    28 |
  • 29 |
  • 30 |
    31 | 32 | Basic page construction completed, add comment system. 33 | 34 |
    35 |
  • 36 |
  • 37 |
    38 | 39 | First large-scale article testing. 40 | 41 |
    42 |
  • 43 |
  • 44 |
    45 | 46 | Using Tailwind CSS and daisyUI. 47 | 48 |
    49 |
  • 50 |
  • 51 |
    52 | 53 | Add Code Copy Button. 54 | 55 |
    56 |
  • 57 |
  • 58 |
    59 | 60 | Add Mathematical Formula Renderer(rehypeKatex). 61 | 62 |
    63 |
  • 64 |
  • 65 |
    66 | 67 | Add README, add components, release version 1.0.0! 68 | 69 |
    70 |
  • 71 |
  • 72 |
    73 | 74 | Add Table of Contents. 75 | 76 |
  • 77 |
78 |
79 |
-------------------------------------------------------------------------------- /src/scripts/copybutton.mjs: -------------------------------------------------------------------------------- 1 | document.addEventListener('astro:page-load', () => { 2 | var codeBlocks = document.querySelectorAll('pre'); 3 | codeBlocks.forEach(function (codeBlock) { 4 | 5 | var container = document.createElement('div'); 6 | container.className = 'code-container'; 7 | 8 | var copyButton = document.createElement('button'); 9 | copyButton.className = 'copy'; 10 | copyButton.title = 'Copy Button'; 11 | copyButton.innerHTML = ' '; 12 | copyButton.style.width = '30px'; 13 | copyButton.style.height = '30px'; 14 | copyButton.style.borderRadius = '4px'; 15 | copyButton.style.border = 'none'; 16 | copyButton.style.zIndex = 100; 17 | 18 | container.appendChild(copyButton); 19 | codeBlock.parentNode.insertBefore(container, codeBlock); 20 | 21 | container.style.position = 'relative'; 22 | 23 | copyButton.style.position = 'absolute'; 24 | copyButton.style.top = '15px'; 25 | copyButton.style.right = '15px'; 26 | 27 | copyButton.addEventListener('click', function () { 28 | var code = codeBlock.textContent; 29 | navigator.clipboard.writeText(code).then(function () { 30 | console.log('复制成功'); 31 | copyButton.innerHTML = ' '; 32 | setTimeout(() => { 33 | copyButton.innerHTML = ' '; 34 | }, 1500); 35 | }, function (err) { 36 | console.error('复制失败', err); 37 | }); 38 | }); 39 | }); 40 | }); 41 | -------------------------------------------------------------------------------- /src/components/Content.astro: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | --- 4 | 5 |
9 |
10 |
14 | 43 |
44 | 45 | 88 | -------------------------------------------------------------------------------- /src/components/ThemeIcon.astro: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | --- 4 | 5 |
9 | 31 |
32 | 33 | 81 | -------------------------------------------------------------------------------- /README.zh-CN.md: -------------------------------------------------------------------------------- 1 | # 🧊 Frosti 2 | 3 | **一个简洁、优雅、快速的静态博客模板!使用 [Astro](https://astro.build/) 开发!** 4 | 5 | [**🖥️ Frosti Demo**](https://frosti.saroprock.com)   /   [**🌏 中文 README**](https://github.com/EveSunMaple/Frosti/blob/main/README.zh-CN.md)   /   [**❤️My Blog**](https://www.saroprock.com) 6 | 7 | > [!NOTE] 8 | > 更好的阅读体验请前往 -> https://frosti.saroprock.com 9 | 10 | ## 🖥️ 预览 11 | 12 | ![view](https://frosti.saroprock.com/view.png) 13 | 14 | ## ⏲️ 性能 15 | 16 | ![speed](./400-lighthouse.png) 17 | ![speed](./400.png) 18 | 19 | ## ✨ 特点 20 | 21 | - ✅ 灯塔 400 22 | - ✅ 视图过渡动画 23 | - ✅ 文章目录支持 24 | - ✅ 你可以搜索你的文章 25 | - ✅ **白天** / **黑夜** 模式可用 26 | - ✅ 为丰富文章内容提供的各种组件 27 | - 多样的 Alert 28 | - 代码框复制按钮 29 | - 更多 [daisyUI](https://daisyui.com/) 支持的内容…… 30 | - ✅ 为丰富页面内容提供的各种组件 31 | - 时间线组件 32 | - 友链卡片组件 33 | - ✅ 使用 [Waline](https://waline.js.org/) 搭建的评论系统 34 | - ✅ 使用 [Tailwind CSS](https://tailwindcss.com/) 与 [daisyUI](https://daisyui.com/) 构建的漂亮页面 35 | 36 | > [!NOTE] 37 | > 评论系统需自己配置,详见 [Waline](https://waline.js.org/) 更改 `src\components\Comment.astro` 38 | 39 | ## 🚀 项目结构 40 | 41 | ```sh 42 | \Frosti 43 | ├── 400.png 44 | ├── astro.config.mjs 45 | ├── categories.txt 46 | ├── CHANGELOG.md 47 | ├── LICENSE 48 | ├── package-lock.json 49 | ├── package.json 50 | ├── pnpm-lock.yaml 51 | ├── public 52 | | ├── favicon.ico 53 | | ├── favicon.svg 54 | | ├── fonts 55 | | | └── CascadiaCode.woff2 56 | | ├── home.webp 57 | | ├── profile.webp 58 | | └── view.png 59 | ├── README.md 60 | ├── src 61 | | ├── components 62 | | | ├── BaseCard.astro 63 | | | ├── BaseHead.astro 64 | | | ├── blog 65 | | | | ├── error.astro 66 | | | | ├── info.astro 67 | | | | ├── success.astro 68 | | | | └── warning.astro 69 | | | ├── Comment.astro 70 | | | ├── Content.astro 71 | | | ├── EnvelopeCard.astro 72 | | | ├── Footer.astro 73 | | | ├── FormattedDate.astro 74 | | | ├── Header.astro 75 | | | ├── HeaderMenu.astro 76 | | | ├── License.astro 77 | | | ├── page 78 | | | | ├── LinkCard.astro 79 | | | | ├── LinkThere.astro 80 | | | | └── TimeLine.astro 81 | | | ├── ProfileCard.astro 82 | | | ├── ProfileCardFooter.astro 83 | | | ├── ProfileCardMenu.astro 84 | | | ├── ProjectCard.astro 85 | | | ├── ProjectJS.astro 86 | | | └── ThemeIcon.astro 87 | | ├── consts.ts 88 | | ├── content 89 | | | ├── blog 90 | | | | ├── markdown-style-guide.md 91 | | | | └── using-mdx.mdx 92 | | | └── config.ts 93 | | ├── env.d.ts 94 | | ├── layouts 95 | | | └── BaseLayout.astro 96 | | ├── pages 97 | | | ├── about.mdx 98 | | | ├── blog 99 | | | | ├── tag 100 | | | | ├── [...page].astro 101 | | | | └── [...slug].astro 102 | | | ├── friend.mdx 103 | | | ├── frosti.mdx 104 | | | ├── index.mdx 105 | | | ├── project.mdx 106 | | | └── rss.xml.js 107 | | ├── scripts 108 | | | ├── copybutton.mjs 109 | | | └── time.mjs 110 | | └── styles 111 | | ├── global.scss 112 | | └── waline.scss 113 | ├── tailwind.config.js 114 | └── tsconfig.json 115 | ``` 116 | 117 | ## ✒️ 文章信息 118 | 119 | | 名称 | 含义 | 是否必要 | 120 | | :---------: | :------: | :------: | 121 | | title | 文章标题 | 是 | 122 | | description | 文章简介 | 是 | 123 | | pubDate | 文章日期 | 是 | 124 | | image | 文章封面 | 否 | 125 | | tags | 文章标签 | 否 | 126 | | badge | 文章徽标 | 否 | 127 | 128 | ## ⬇️ 使用方法 129 | 130 | 通过将 `--template` 参数传递给 `create astro` 命令来使用 Frosti ! 131 | 132 | ```sh 133 | npm create astro@latest -- --template EveSunMaple/Frosti 134 | ``` 135 | 136 | ## 🎯 计划 137 | 138 | - [x] 添加目录(已做好但没有写 CSS ) ~~(Jul 13 2024)~~ 139 | - [x] 添加时间线组件 ~~(Apr 21, 2024)~~ 140 | - [x] 添加友链组件 ~~(Apr 21, 2024)~~ 141 | 142 | ## 👀 问题 143 | 144 | - [x] ~~`global.css` 过于混乱~~ 145 | - [x] ~~**白天** / **黑夜** 模式目前无法实现缓动~~ `足够了🛠️` 146 | - [x] ~~网站评分还没有到达 400 分~~ `已经达成✨` 147 | 148 | ## 🎉 感谢 149 | 150 | @[Saicaca](https://github.com/saicaca) 他的启迪是我制作此主题的主要原因 151 | 152 | @[WRXinYue](https://github.com/WRXinYue) 在我前期入门时帮助了我很多 153 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 🧊 Frosti 2 | 3 | **A clean, elegant, and fast static blog template! Developed with [Astro](https://astro.build/)!** 4 | 5 | [**🖥️ Frosti Demo**](https://frosti.saroprock.com)   /   [**🌏 中文 README**](https://github.com/EveSunMaple/Frosti/blob/main/README.zh-CN.md)   /   [**❤️My Blog**](https://www.saroprock.com) 6 | 7 | > [!NOTE] 8 | > For a better reading experience, please visit -> https://frosti.saroprock.com 9 | 10 | ## 🖥️ Preview 11 | 12 | ![view](https://frosti.saroprock.com/view.png) 13 | 14 | ## ⏲️ performance 15 | 16 | ![speed](./400-lighthouse.png) 17 | ![speed](./400.png) 18 | 19 | ## ✨ Features 20 | 21 | - ✅ Lighthouse 400 22 | - ✅ Blog content support 23 | - ✅ View transition animations 24 | - ✅ You can search your articles 25 | - ✅ **Light** / **Dark** mode available 26 | - ✅ Various components for enriching article content 27 | - Diverse alerts 28 | - Code block copy buttons 29 | - More content supported by [daisyUI](https://daisyui.com/)…… 30 | - ✅ Various components for enriching page content 31 | - Timeline component 32 | - Friends card component 33 | - ✅ Comment system built with [Waline](https://waline.js.org/) 34 | - ✅ Beautiful pages built with [Tailwind CSS](https://tailwindcss.com/) and [daisyUI](https://daisyui.com/) 35 | 36 | > [!NOTE] 37 | > The comment system needs to be configured by oneself, please refer to [Waline](https://waline.js.org/) Change `src\components\Comment.astro`. 38 | 39 | ## 🚀 Project Structure 40 | 41 | ```sh 42 | \Frosti 43 | ├── 400.png 44 | ├── astro.config.mjs 45 | ├── categories.txt 46 | ├── CHANGELOG.md 47 | ├── LICENSE 48 | ├── package-lock.json 49 | ├── package.json 50 | ├── pnpm-lock.yaml 51 | ├── public 52 | | ├── favicon.ico 53 | | ├── favicon.svg 54 | | ├── fonts 55 | | | └── CascadiaCode.woff2 56 | | ├── home.webp 57 | | ├── profile.webp 58 | | └── view.png 59 | ├── README.md 60 | ├── src 61 | | ├── components 62 | | | ├── BaseCard.astro 63 | | | ├── BaseHead.astro 64 | | | ├── blog 65 | | | | ├── error.astro 66 | | | | ├── info.astro 67 | | | | ├── success.astro 68 | | | | └── warning.astro 69 | | | ├── Content.astro 70 | | | ├── Comment.astro 71 | | | ├── EnvelopeCard.astro 72 | | | ├── Footer.astro 73 | | | ├── FormattedDate.astro 74 | | | ├── Header.astro 75 | | | ├── HeaderMenu.astro 76 | | | ├── License.astro 77 | | | ├── page 78 | | | | ├── LinkCard.astro 79 | | | | ├── LinkThere.astro 80 | | | | └── TimeLine.astro 81 | | | ├── ProfileCard.astro 82 | | | ├── ProfileCardFooter.astro 83 | | | ├── ProfileCardMenu.astro 84 | | | ├── ProjectCard.astro 85 | | | ├── ProjectJS.astro 86 | | | └── ThemeIcon.astro 87 | | ├── consts.ts 88 | | ├── content 89 | | | ├── blog 90 | | | | ├── markdown-style-guide.md 91 | | | | └── using-mdx.mdx 92 | | | └── config.ts 93 | | ├── env.d.ts 94 | | ├── layouts 95 | | | └── BaseLayout.astro 96 | | ├── pages 97 | | | ├── about.mdx 98 | | | ├── blog 99 | | | | ├── tag 100 | | | | ├── [...page].astro 101 | | | | └── [...slug].astro 102 | | | ├── friend.mdx 103 | | | ├── frosti.mdx 104 | | | ├── index.mdx 105 | | | ├── project.mdx 106 | | | └── rss.xml.js 107 | | ├── scripts 108 | | | ├── copybutton.mjs 109 | | | └── time.mjs 110 | | └── styles 111 | | ├── global.scss 112 | | └── waline.scss 113 | ├── tailwind.config.js 114 | └── tsconfig.json 115 | ``` 116 | 117 | ## ✒️ Article Information 118 | 119 | | Name | Meaning | Mandatory | 120 | | :---------: | :-----------------: | :-------: | 121 | | title | Article title | Yes | 122 | | description | Article description | Yes | 123 | | pubDate | Article date | Yes | 124 | | image | Article cover | No | 125 | | tags | Article tags | No | 126 | | badge | Article badge | No | 127 | 128 | ## ⬇️ Usage 129 | 130 | Use Frosti by passing the `--template` parameter to the `create astro` command! 131 | 132 | ```sh 133 | npm create astro@latest -- --template EveSunMaple/Frosti 134 | ``` 135 | 136 | ## 🎯 Plans 137 | 138 | - [x] Add table of contents (done but CSS not written yet) ~~(Jul 13 2024)~~ 139 | - [x] Add timeline component ~~(Apr 21, 2024)~~ 140 | - [x] Add friends component ~~(Apr 21, 2024)~~ 141 | 142 | ## 👀 Issues 143 | 144 | - [x] ~~`global.css` is too messy~~ 145 | - [x] ~~**Light** / **Dark** mode transition ~~currently not implemented~~ `ENOUGH🛠️` 146 | - [x] ~~Website score has not reached 400 points yet~~ `GET IT✨` 147 | 148 | ## 🎉 Thanks 149 | 150 | @[Saicaca](https://github.com/saicaca) His inspiration was the main reason for me to create this theme. 151 | 152 | @[WRXinYue](https://github.com/WRXinYue) Helped me a lot when I was first starting out. 153 | -------------------------------------------------------------------------------- /src/components/ProfileCardFooter.astro: -------------------------------------------------------------------------------- 1 | 102 | -------------------------------------------------------------------------------- /src/content/blog/frosti-mdx.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Using mdx in Frosti 3 | description: Create more components with mdx! 4 | pubDate: 07 12 2024 5 | image: https://saroprock.oss-cn-hangzhou.aliyuncs.com/img/diary-968592_1280.jpg 6 | tags: 7 | - Frosti 8 | - Blog 9 | - Project 10 | --- 11 | 12 | import Collapse from "../../components/blog/collapse.astro"; 13 | import Diff from "../../components/blog/diff.astro"; 14 | import Error from "../../components/blog/error.astro"; 15 | import Info from "../../components/blog/info.astro"; 16 | import Kbd from "../../components/blog/kbd.astro"; 17 | import Success from "../../components/blog/success.astro"; 18 | import Warning from "../../components/blog/warning.astro"; 19 | import TimeLine from "../../components/page/TimeLine.astro"; 20 | import LinkCard from "../../components/page/LinkCard.astro"; 21 | 22 | ## Preface 23 | 24 | This article describes how to use the components provided by Frosti in `mdx` to realize the functions that can't be realized by normal `md`. 25 | 26 | ## Main text 27 | 28 | ### Getting started 29 | 30 | First you need to create an `mdx` file, which is as simple as changing the extension to `.mdx`. 31 | 32 | ### Introducing 33 | 34 | The components provided by Frosti are placed in the `/blog` and `/page` folders. Write something in the document properties (frontmatter): 35 | 36 | ```js 37 | import Collapse from "../../components/blog/collapse.astro"; 38 | import Diff from "../../components/blog/diff.astro"; 39 | import Error from "../../components/blog/error.astro"; 40 | import Info from "../../components/blog/info.astro"; 41 | import Kbd from "../../components/blog/kbd.astro"; 42 | import Success from "../../components/blog/success.astro"; 43 | import Warning from "../../components/blog/warning.astro"; 44 | import TimeLine from "../../components/page/TimeLine.astro"; 45 | import LinkCard from "../../components/page/LinkCard.astro"; 46 | ``` 47 | 48 | ### Example 49 | 50 | #### Collapse 51 | 52 | This is the hidden content! 53 | 54 | ```js 55 | This is the hidden content! 56 | ``` 57 | 58 | #### Diff 59 | 60 | 61 | 62 | ```js 63 | 64 | ``` 65 | 66 | #### Error 67 | 68 | Maybe something went wrong? 69 | 70 | ```js 71 | Maybe something went wrong? 72 | ``` 73 | 74 | #### Warning 75 | 76 | Hey! Watch out for potholes! 77 | 78 | ```js 79 | Hey! Watch out for potholes! 80 | ``` 81 | 82 | #### Message 83 | 84 | It's just a message. 85 | 86 | ```js 87 | It's just a message. 88 | ``` 89 | 90 | #### Success 91 | 92 | Congratulations on your successful deployment! 93 | 94 | ```js 95 | Congratulations on your successful deployment! 96 | ``` 97 | 98 | #### Kbd 99 | 100 | Ctrl + C to copy the text. 101 | 102 | ```js 103 | Ctrl + C to copy the text. 104 | ``` 105 | 106 | #### TimeLine 107 | 108 |
    109 |
  • 110 | 111 | Frosti project launched! 112 | 113 |
    114 |
  • 115 |
  • 116 |
    117 | 118 | Using Tailwind CSS and daisyUI. 119 | 120 |
    121 |
  • 122 |
  • 123 |
    124 | 125 | Frosti releases the first version! 126 | 127 |
    128 |
  • 129 |
  • 130 |
    131 | 132 | Stay tuned! 133 | 134 |
  • 135 |
136 | 137 | ```js 138 |
    139 |
  • 140 | 141 | Frosti project launched! 142 | 143 |
    144 |
  • 145 |
  • 146 |
    147 | 148 | Using Tailwind CSS and daisyUI. 149 | 150 |
    151 |
  • 152 |
  • 153 |
    154 | 155 | Frosti releases the first version! 156 | 157 |
    158 |
  • 159 |
  • 160 |
    161 | 162 | Stay tuned! 163 | 164 |
  • 165 |
166 | ``` 167 | 168 | #### LinkCard 169 | 170 | 176 | 177 | ```js 178 | 184 | ``` -------------------------------------------------------------------------------- /src/pages/index.mdx: -------------------------------------------------------------------------------- 1 | import BaseLayout from "../layouts/BaseLayout.astro"; 2 | import BaseCard from "../components/BaseCard.astro"; 3 | import error from "../components/blog/error.astro"; 4 | import info from "../components/blog/info.astro"; 5 | import success from "../components/blog/success.astro"; 6 | import warn from "../components/blog/warning.astro"; 7 | import TimeLine from "../components/page/TimeLine.astro"; 8 | import LinkCard from "../components/page/LinkCard.astro"; 9 | 10 | 11 | 12 |
13 |
14 | # Hi there! 👋 15 | 16 | This is the Frosti theme 17 | 18 | A clean, elegant, and fast static blog template 19 |
20 |
21 |
22 | 23 | 24 | # 🧊 Frosti Introduction 25 | 26 | --- 27 | 28 | **Presenting Frosti: Your Cool Companion for Static Blogging** 29 | 30 | In search of a static blog template that's as sleek as it is speedy? Look no further than Frosti! Developed with Astro, Frosti offers a seamless and stylish solution for bloggers who value both aesthetics and performance. 31 | 32 | ## Key Features: 33 | 34 | - **Simplicity:** Frosti boasts a minimalist design that keeps your content front and center. 35 | - **Speed:** With lightning-fast loading times, Frosti ensures your readers won't be left twiddling their thumbs. 36 | - **Day/Night Modes:** Enjoy your reading experience in both light and dark modes for optimal comfort. 37 | - **Component Rich:** Frosti comes packed with a variety of components to enhance your articles and pages. 38 | - **Comment System:** Engage with your readers effortlessly thanks to the built-in comment system powered by [Waline](https://waline.js.org/). 39 | - **Stylish Design:** Crafted with the elegance of [Tailwind CSS](https://tailwindcss.com/) and the charm of [daisyUI](https://daisyui.com/), Frosti offers visually stunning pages that captivate your audience. 40 | 41 | ## Project Structure: 42 | 43 | ```sh 44 | \Frosti 45 | ├── 400.png 46 | ├── astro.config.mjs 47 | ├── categories.txt 48 | ├── CHANGELOG.md 49 | ├── LICENSE 50 | ├── package-lock.json 51 | ├── package.json 52 | ├── pnpm-lock.yaml 53 | ├── public 54 | | ├── favicon.ico 55 | | ├── favicon.svg 56 | | ├── fonts 57 | | | └── CascadiaCode.woff2 58 | | ├── home.webp 59 | | ├── profile.webp 60 | | └── view.png 61 | ├── README.md 62 | ├── src 63 | | ├── components 64 | | | ├── BaseCard.astro 65 | | | ├── BaseHead.astro 66 | | | ├── blog 67 | | | | ├── error.astro 68 | | | | ├── info.astro 69 | | | | ├── success.astro 70 | | | | └── warning.astro 71 | | | ├── Comment.astro 72 | | | ├── EnvelopeCard.astro 73 | | | ├── Footer.astro 74 | | | ├── FormattedDate.astro 75 | | | ├── Header.astro 76 | | | ├── HeaderMenu.astro 77 | | | ├── License.astro 78 | | | ├── page 79 | | | | ├── LinkCard.astro 80 | | | | ├── LinkThere.astro 81 | | | | └── TimeLine.astro 82 | | | ├── ProfileCard.astro 83 | | | ├── ProfileCardFooter.astro 84 | | | ├── ProfileCardMenu.astro 85 | | | ├── ProjectCard.astro 86 | | | ├── ProjectJS.astro 87 | | | └── ThemeIcon.astro 88 | | ├── consts.ts 89 | | ├── content 90 | | | ├── blog 91 | | | | ├── markdown-style-guide.md 92 | | | | └── using-mdx.mdx 93 | | | └── config.ts 94 | | ├── env.d.ts 95 | | ├── layouts 96 | | | └── BaseLayout.astro 97 | | ├── pages 98 | | | ├── about.mdx 99 | | | ├── blog 100 | | | | ├── tag 101 | | | | ├── [...page].astro 102 | | | | └── [...slug].astro 103 | | | ├── friend.mdx 104 | | | ├── frosti.mdx 105 | | | ├── index.mdx 106 | | | ├── project.mdx 107 | | | └── rss.xml.js 108 | | ├── scripts 109 | | | ├── copybutton.mjs 110 | | | └── time.mjs 111 | | └── styles 112 | | ├── global.scss 113 | | └── waline.scss 114 | ├── tailwind.config.js 115 | └── tsconfig.json 116 | ``` 117 | 118 | ## How to Use: 119 | 120 | Getting started with Frosti couldn't be easier! Simply use the `--template` parameter with the `create astro` command: 121 | 122 | ```bash 123 | npm create astro@latest -- --template EveSunMaple/Frosti 124 | ``` 125 | 126 | ## Future Plans: 127 | 128 | While Frosti is already an impressive template, the developers have exciting plans for its future development: 129 | 130 | - **Table of Contents:** Enhance navigation with a table of contents feature. 131 | - **Timeline Component:** Add a timeline component for showcasing chronological content. 132 | - **Friends Link Component:** Foster community engagement with a friends link component. 133 | 134 | ## Acknowledgments: 135 | 136 | Frosti owes its existence to the contributions and inspiration from: 137 | 138 | - **@[Saicaca](https://github.com/saicaca):** Whose insights were instrumental in the creation of this theme. 139 | - **@[WRXinYue](https://github.com/WRXinYue):** For invaluable assistance during the early stages of development. 140 | 141 | Whether you're a seasoned blogger or just dipping your toes into the world of blogging, Frosti provides the perfect platform to share your thoughts with the world. Try Frosti today and take your blogging experience to new heights! 142 | 143 |
-------------------------------------------------------------------------------- /src/components/ProjectCard.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import { Image } from "astro:assets"; 3 | import dayjs from "dayjs"; 4 | const { title, image, desc, url, target = "_blank" } = Astro.props; 5 | --- 6 | 7 |
8 |
9 | { 10 | image && ( 11 | {title} 20 | ) 21 | } 22 |
23 |
24 |
25 | 26 | {title} 27 | 28 |
{desc}
29 |
30 | 41 | 45 | 46 | 67 | 68 | 87 | 88 | 104 | 108 |
109 | 113 |
114 |
115 |
-------------------------------------------------------------------------------- /src/content/blog/markdown-style-guide.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Markdown Style Guide' 3 | description: 'Here is a sample of some basic Markdown syntax that can be used when writing Markdown content in Astro.' 4 | pubDate: 'Jul 01 2024' 5 | image: '/home.webp' 6 | tags: 7 | - Makrdown 8 | badge: Guide 9 | --- 10 | 11 | Here is a sample of some basic Markdown syntax that can be used when writing Markdown content in Astro. 12 | 13 | ## Headings 14 | 15 | The following HTML `

`—`

` elements represent six levels of section headings. `

` is the highest section level while `

` is the lowest. 16 | 17 | # H1 18 | 19 | ## H2 20 | 21 | ### H3 22 | 23 | #### H4 24 | 25 | ##### H5 26 | 27 | ###### H6 28 | 29 | ## Paragraph 30 | 31 | Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat. 32 | 33 | Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat. 34 | 35 | ## Images 36 | 37 | #### Syntax 38 | 39 | ```markdown mockup-code 40 | ![Alt text](./full/or/relative/path/of/image) 41 | ``` 42 | 43 | #### Output 44 | 45 | ![blog placeholder](/home.webp) 46 | 47 | ## Blockquotes 48 | 49 | The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations. 50 | 51 | ### Blockquote without attribution 52 | 53 | #### Syntax 54 | 55 | ```markdown 56 | > Tiam, ad mint andaepu dandae nostion secatur sequo quae. 57 | > **Note** that you can use _Markdown syntax_ within a blockquote. 58 | ``` 59 | 60 | #### Output 61 | 62 | > Tiam, ad mint andaepu dandae nostion secatur sequo quae. 63 | > **Note** that you can use _Markdown syntax_ within a blockquote. 64 | 65 | ### Blockquote with attribution 66 | 67 | #### Syntax 68 | 69 | ```markdown 70 | > Don't communicate by sharing memory, share memory by communicating.
71 | > — Rob Pike[^1] 72 | ``` 73 | 74 | #### Output 75 | 76 | > Don't communicate by sharing memory, share memory by communicating.
77 | > — Rob Pike[^1] 78 | 79 | [^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015. 80 | 81 | ## Tables 82 | 83 | #### Syntax 84 | 85 | ```markdown 86 | | Italics | Bold | Code | 87 | | --------- | -------- | ------ | 88 | | _italics_ | **bold** | `code` | 89 | ``` 90 | 91 | #### Output 92 | 93 | | Italics | Bold | Code | 94 | | --------- | -------- | ------ | 95 | | _italics_ | **bold** | `code` | 96 | 97 | ## Code Blocks 98 | 99 | #### Syntax 100 | 101 | we can use 3 backticks ``` in new line and write snippet and close with 3 backticks on new line and to highlight language specific syntac, write one word of language name after first 3 backticks, for eg. html, javascript, css, markdown, typescript, txt, bash 102 | 103 | ````markdown 104 | ```cpp 105 | #include 106 | using namespace std; 107 | const int N = 1e5 + 5; 108 | int n, k, a[N]; 109 | long long ans; 110 | vector v[N]; 111 | int main() 112 | { 113 | scanf("%d%d", &n, &k); 114 | for (int i = 1; i <= n; i++) 115 | { 116 | scanf("%d", &a[i]); 117 | v[i % k].push_back(a[i]); 118 | } 119 | for (int i = 0; i < k; i++) 120 | sort(v[i].rbegin(), v[i].rend()); 121 | for (int i = 0; i < k; i++) 122 | { 123 | for (int j = 0; j + 1 < v[i].size(); j += 2) 124 | { 125 | ans += v[i][j] + v[i][j + 1]; 126 | } 127 | } 128 | printf("%lld\n", ans); 129 | return 0; 130 | } 131 | ``` 132 | ```` 133 | 134 | Output 135 | 136 | ```cpp 137 | #include 138 | using namespace std; 139 | const int N = 1e5 + 5; 140 | int n, k, a[N]; 141 | long long ans; 142 | vector v[N]; 143 | int main() 144 | { 145 | scanf("%d%d", &n, &k); 146 | for (int i = 1; i <= n; i++) 147 | { 148 | scanf("%d", &a[i]); 149 | v[i % k].push_back(a[i]); 150 | } 151 | for (int i = 0; i < k; i++) 152 | sort(v[i].rbegin(), v[i].rend()); 153 | for (int i = 0; i < k; i++) 154 | { 155 | for (int j = 0; j + 1 < v[i].size(); j += 2) 156 | { 157 | ans += v[i][j] + v[i][j + 1]; 158 | } 159 | } 160 | printf("%lld\n", ans); 161 | return 0; 162 | } 163 | ``` 164 | 165 | ## List Types 166 | 167 | ### Ordered List 168 | 169 | #### Syntax 170 | 171 | ```markdown 172 | 1. First item 173 | 2. Second item 174 | 3. Third item 175 | ``` 176 | 177 | #### Output 178 | 179 | 1. First item 180 | 2. Second item 181 | 3. Third item 182 | 183 | ### Unordered List 184 | 185 | #### Syntax 186 | 187 | ```markdown 188 | - List item 189 | - Another item 190 | - And another item 191 | ``` 192 | 193 | #### Output 194 | 195 | - List item 196 | - Another item 197 | - And another item 198 | 199 | ### Nested list 200 | 201 | #### Syntax 202 | 203 | ```markdown 204 | - Fruit 205 | - Apple 206 | - Orange 207 | - Banana 208 | - Dairy 209 | - Milk 210 | - Cheese 211 | ``` 212 | 213 | #### Output 214 | 215 | - Fruit 216 | - Apple 217 | - Orange 218 | - Banana 219 | - Dairy 220 | - Milk 221 | - Cheese 222 | 223 | ## Other Elements — abbr, sub, sup, kbd, mark 224 | 225 | #### Syntax 226 | 227 | ```markdown 228 | GIF is a bitmap image format. 229 | 230 | H2O 231 | 232 | Xn + Yn = Zn 233 | 234 | Press CTRL+ALT+Delete to end the session. 235 | 236 | Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. 237 | ``` 238 | 239 | #### Output 240 | 241 | GIF is a bitmap image format. 242 | 243 | H2O 244 | 245 | Xn + Yn = Zn 246 | 247 | Press CTRL+ALT+Delete to end the session. 248 | 249 | Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. 250 | -------------------------------------------------------------------------------- /src/styles/global.scss: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | /* HTML and Body Styles */ 6 | html { 7 | @apply scroll-smooth; 8 | } 9 | .astro-code, 10 | .astro-code span { 11 | background-color: oklch(var(--b2)) !important; 12 | } 13 | html[data-theme="dracula"] { 14 | --pagefind-ui-primary: oklch(var(--nc)); 15 | --pagefind-ui-text: oklch(var(--nc)); 16 | --pagefind-ui-background: oklch(var(--b1)); 17 | --pagefind-ui-border: oklch(var(--n)); 18 | --pagefind-ui-tag: oklch(var(--b1)); .astro-code, 19 | .astro-code span { 20 | color: var(--shiki-dark) !important; 21 | background-color: var(--shiki-dark-bg) !important; 22 | font-style: var(--shiki-dark-font-style) !important; 23 | font-weight: var(--shiki-dark-font-weight) !important; 24 | text-decoration: var(--shiki-dark-text-decoration) !important; 25 | } 26 | } 27 | 28 | body { 29 | @apply m-0 p-0 text-left bg-cover text-xl leading-7; 30 | background-size: 100% 600px; 31 | } 32 | 33 | @media (max-width: 720px) { 34 | body { 35 | @apply text-lg; 36 | } 37 | } 38 | 39 | /* Font Face */ 40 | @font-face { 41 | font-family: 'Cascadia'; 42 | src: url('/fonts/CascadiaCode.woff2') format('woff2'); 43 | font-weight: 700; 44 | font-style: normal; 45 | font-display: swap; 46 | } 47 | 48 | /* Text Styles */ 49 | p, 50 | ol, 51 | ul { 52 | @apply m-2 leading-normal; 53 | } 54 | 55 | ol { 56 | @apply pl-[40px] list-decimal; 57 | } 58 | 59 | ul { 60 | @apply pl-[40px] list-disc; 61 | } 62 | 63 | li::marker, 64 | .toc-number { 65 | color: oklch(var(--a)); 66 | } 67 | 68 | .level-1, 69 | .level-2, 70 | .level-3, 71 | .level-4, 72 | .level-5, 73 | .level-6 { 74 | @apply btn btn-ghost; 75 | } 76 | 77 | #content-box li, #content-box ul{ 78 | @apply list-none m-0 p-0; 79 | } 80 | 81 | thead { 82 | color: oklch(var(--s)); 83 | } 84 | 85 | textarea, 86 | input { 87 | @apply text-base; 88 | } 89 | 90 | /* Headings */ 91 | h1, 92 | h2, 93 | h3, 94 | h4, 95 | h5, 96 | h6 { 97 | @apply m-2 mb-1; 98 | text-shadow: 0.01em -0.01em #fff, -0.01em 0.01em #999, -0.1em 0.1em 5px #80808080; 99 | } 100 | 101 | h1 { 102 | @apply text-5xl; 103 | } 104 | 105 | h2 { 106 | @apply text-4xl; 107 | } 108 | 109 | h3 { 110 | @apply text-3xl; 111 | } 112 | 113 | h4 { 114 | @apply text-2xl; 115 | } 116 | 117 | h5 { 118 | @apply text-xl; 119 | } 120 | 121 | /* Strong and Bold Text */ 122 | strong, 123 | b { 124 | @apply font-bold m-2; 125 | } 126 | 127 | em { 128 | @apply m-2; 129 | } 130 | 131 | /* Links */ 132 | .link-card a, 133 | a { 134 | @apply relative no-underline; 135 | } 136 | 137 | .main-card p a, 138 | .main-card li a { 139 | color: oklch(var(--p)); 140 | @apply underline; 141 | } 142 | 143 | /* Table Styles */ 144 | table { 145 | @apply border-collapse m-2; 146 | } 147 | 148 | table tr { 149 | @apply h-10 border-0 border-gray-300; 150 | border-color: oklch(var(--nc)); 151 | } 152 | 153 | /* Image Styles */ 154 | img { 155 | @apply rounded-lg; 156 | } 157 | 158 | /* Code and Preformatted Text */ 159 | code { 160 | font-family: 'Cascadia'; 161 | @apply text-sm p-[2px_5px] rounded-sm; 162 | } 163 | 164 | pre { 165 | font-family: 'Cascadia'; 166 | @apply text-sm p-6 m-2 mockup-code; 167 | } 168 | 169 | blockquote { 170 | @apply alert; 171 | } 172 | 173 | pre>code { 174 | all: unset; 175 | } 176 | 177 | /* Miscellaneous Styles */ 178 | footer { 179 | @apply relative top-7 rounded-xl; 180 | } 181 | 182 | .footer { 183 | @apply gap-0 items-start; 184 | } 185 | 186 | .alert { 187 | @apply m-2 w-auto; 188 | } 189 | 190 | hr { 191 | border: 0; 192 | color: oklch(var(--bc)); 193 | background: linear-gradient(currentColor, currentColor) no-repeat center; 194 | background-size: calc(100% - 1.5em - 6px) 1px; 195 | display: flex; 196 | justify-content: space-between; 197 | height: 50px; 198 | } 199 | 200 | .sr-only { 201 | @apply border-0 p-0 m-0 absolute h-[1px] w-[1px] overflow-hidden; 202 | clip: rect(1px 1px 1px 1px); 203 | clip-path: inset(50%); 204 | @apply whitespace-nowrap; 205 | } 206 | 207 | /* Layout and Positioning */ 208 | .main { 209 | @apply fixed w-full h-full p-0 left-1/2 transform -translate-x-1/2 flex items-start max-w-screen-2xl; 210 | } 211 | 212 | .navbar { 213 | @apply fixed p-0 w-full transform -translate-y-full text-center z-50 transition-transform z-50; 214 | } 215 | 216 | .navbar-title { 217 | @apply no-underline; 218 | } 219 | 220 | .profile { 221 | @apply relative p-[20px_10px_20px_60px]; 222 | } 223 | 224 | .background { 225 | @apply relative box-border p-[20px_60px_20px_20px] w-full h-full max-h-full overflow-auto bg-transparent; 226 | } 227 | 228 | .base-background, 229 | .envelope-background { 230 | @apply -mt-8; 231 | } 232 | 233 | .envelope-back { 234 | @apply mt-8 relative w-full h-[200px] min-h-[200px] overflow-hidden; 235 | } 236 | 237 | .envelope-image { 238 | @apply absolute right-0 w-2/5 h-full rounded-3xl; 239 | } 240 | 241 | .envelope-image img { 242 | @apply w-full h-full object-cover; 243 | } 244 | 245 | .envelope-card { 246 | @apply absolute left-0 w-4/5 h-full rounded-3xl overflow-hidden; 247 | } 248 | 249 | .envelope-info { 250 | @apply relative w-full h-full overflow-hidden whitespace-nowrap text-ellipsis z-50; 251 | } 252 | 253 | .envelope-title { 254 | @apply text-5xl overflow-hidden text-ellipsis whitespace-nowrap; 255 | text-shadow: 0.01em -0.01em #fff, -0.01em 0.01em #999, -0.1em 0.1em 5px #80808080; 256 | } 257 | 258 | .desc { 259 | @apply p-[30px_30px_0_30px] -mt-8 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap; 260 | } 261 | 262 | .back-card { 263 | @apply mt-8 relative left-1/2 transform -translate-x-1/2 overflow-hidden; 264 | } 265 | 266 | .main-card { 267 | @apply relative leading-6 z-10 p-8; 268 | } 269 | 270 | .card-img { 271 | @apply relative top-0 -mb-[30%] z-10; 272 | } 273 | 274 | /*.card-img:hover { 275 | @apply -mb-[40px] cursor-pointer; 276 | }*/ 277 | 278 | .license-card { 279 | @apply relative w-full -m-5 p-5 overflow-hidden; 280 | } 281 | 282 | .license-card svg { 283 | @apply absolute right-[10%] top-2/4 transform translate-y-2/4 w-[200px] h-[200px]; 284 | } 285 | 286 | .license-title { 287 | @apply font-bold; 288 | } 289 | 290 | .profile-card { 291 | @apply w-[300px] min-w-[300px] transition-transform; 292 | } 293 | 294 | .profile-picture { 295 | @apply text-center; 296 | } 297 | 298 | .profile-picture img { 299 | @apply w-[200px] h-[200px]; 300 | } 301 | 302 | .profile-info { 303 | @apply relative text-base; 304 | } 305 | 306 | .profile-name { 307 | @apply text-2xl text-center; 308 | } 309 | 310 | .profile-desc { 311 | @apply text-base text-center; 312 | } 313 | 314 | .head-menu { 315 | @apply fixed -translate-y-full transition-transform hidden w-full z-10; 316 | } 317 | 318 | .head-menu.open { 319 | @apply translate-y-[60px]; 320 | } 321 | 322 | .sidebtn { 323 | @apply translate-x-0 transition-transform; 324 | } 325 | 326 | .clock { 327 | @apply max-sm:absolute max-sm:-translate-x-[200%]; 328 | } 329 | 330 | .profile { 331 | @apply max-md:absolute; 332 | } 333 | 334 | .background { 335 | @apply max-md:relative max-md:p-[80px_10px_10px_10px]; 336 | } 337 | 338 | .profile-card { 339 | @apply max-md:-translate-x-[200%]; 340 | } 341 | 342 | .navbar { 343 | @apply max-md:translate-y-0; 344 | } 345 | 346 | .head-menu { 347 | @apply max-md:block; 348 | } 349 | 350 | .sidebtn { 351 | @apply max-md:translate-x-[200%]; 352 | } 353 | 354 | .menu-item { 355 | @apply inline-block no-underline bg-transparent border-none cursor-pointer w-full font-bold text-[1.45em] text-center; 356 | } 357 | 358 | .social-icons { 359 | @apply text-center; 360 | } 361 | 362 | .social-icon { 363 | @apply rounded-[10px] inline-block m-[0_5px] leading-[30px] w-[30px] text-xl no-underline; 364 | } 365 | 366 | .next-btn { 367 | @apply flex justify-between; 368 | } 369 | 370 | .base-btn { 371 | @apply flex items-center; 372 | } 373 | 374 | #btn-theme { 375 | @apply fixed w-[50px] h-[50px] right-[20px] p-[10px] border-0 cursor-pointer rounded-[5px]; 376 | } 377 | 378 | #content-box { 379 | @apply right-[20px] bottom-48; 380 | } 381 | 382 | .show { 383 | @apply translate-x-[0%]; 384 | } 385 | 386 | .hide { 387 | @apply translate-x-[200%]; 388 | } 389 | 390 | .info { 391 | @apply overflow-hidden whitespace-nowrap text-ellipsis m-2; 392 | } 393 | 394 | pre .line { 395 | counter-increment: line; 396 | padding-left: 2.5em; 397 | } 398 | 399 | pre :not(:last-child).line::before { 400 | content: counter(line); 401 | position: absolute; 402 | left: 0; 403 | width: 3em; 404 | text-align: right; 405 | margin-right: 10px; 406 | color: #888; 407 | } -------------------------------------------------------------------------------- /src/styles/waline.scss: -------------------------------------------------------------------------------- 1 | :root { 2 | --waline-font-size: 1rem; 3 | --waline-white: oklch(var(--b1)); 4 | --waline-light-grey: #999; 5 | --waline-dark-grey: #666; 6 | --waline-theme-color: oklch(var(--bc)); 7 | --waline-active-color: oklch(var(--nc)); 8 | --waline-color: oklch(var(--bc)); 9 | --waline-bg-color: oklch(var(--b1)); 10 | --waline-bg-color-light: #f8f8f8; 11 | --waline-bg-color-hover: #f0f0f0; 12 | --waline-border-color: #ddd; 13 | --waline-disable-bg-color: #f8f8f8; 14 | --waline-disable-color: #000; 15 | --waline-code-bg-color: #282c34; 16 | --waline-bq-color: #f0f0f0; 17 | --waline-avatar-size: 3.25rem; 18 | --waline-m-avatar-size: calc(var(--waline-avatar-size) * 9 / 13); 19 | --waline-badge-color: #3498db; 20 | --waline-badge-font-size: 0.75em; 21 | --waline-info-bg-color: #f8f8f8; 22 | --waline-info-color: #999; 23 | --waline-info-font-size: 0.625em; 24 | --waline-border: 1px solid var(--waline-border-color); 25 | --waline-avatar-radius: 50%; 26 | --waline-box-shadow: none 27 | } 28 | 29 | [data-waline] { 30 | font-size: var(--waline-font-size); 31 | text-align: start 32 | } 33 | 34 | [dir=rtl] [data-waline] { 35 | direction: rtl 36 | } 37 | 38 | [data-waline] * { 39 | box-sizing: content-box; 40 | line-height: 1.75 41 | } 42 | 43 | [data-waline] p { 44 | color: var(--waline-color) 45 | } 46 | 47 | [data-waline] a { 48 | position: relative; 49 | display: inline-block; 50 | color: var(--waline-theme-color); 51 | text-decoration: none; 52 | word-break: break-word; 53 | cursor: pointer 54 | } 55 | 56 | [data-waline] a:hover { 57 | color: var(--waline-active-color) 58 | } 59 | 60 | [data-waline] img { 61 | max-width: 100%; 62 | max-height: 400px; 63 | border: none 64 | } 65 | 66 | [data-waline] hr { 67 | margin: .825em 0; 68 | border-style: dashed; 69 | border-color: var(--waline-bg-color-light) 70 | } 71 | 72 | [data-waline] code, 73 | [data-waline] pre { 74 | margin: 0; 75 | padding: .2em .4em; 76 | border-radius: 3px; 77 | background: var(--waline-bg-color-light); 78 | font-size: 85% 79 | } 80 | 81 | [data-waline] pre { 82 | overflow: auto; 83 | padding: 10px; 84 | line-height: 1.45 85 | } 86 | 87 | [data-waline] pre::-webkit-scrollbar { 88 | width: 6px; 89 | height: 6px 90 | } 91 | 92 | [data-waline] pre::-webkit-scrollbar-track-piece:horizontal { 93 | -webkit-border-radius: 6px; 94 | border-radius: 6px; 95 | background: rgba(0, 0, 0, .1) 96 | } 97 | 98 | [data-waline] pre::-webkit-scrollbar-thumb:horizontal { 99 | width: 6px; 100 | -webkit-border-radius: 6px; 101 | border-radius: 6px; 102 | background: var(--waline-theme-color) 103 | } 104 | 105 | [data-waline] pre code { 106 | padding: 0; 107 | background: rgba(0, 0, 0, 0); 108 | color: var(--waline-color); 109 | white-space: pre-wrap; 110 | word-break: keep-all 111 | } 112 | 113 | [data-waline] blockquote { 114 | margin: .5em 0; 115 | padding: .5em 0 .5em 1em; 116 | border-inline-start: 8px solid var(--waline-bq-color); 117 | color: var(--waline-dark-grey) 118 | } 119 | 120 | [data-waline] blockquote>p { 121 | margin: 0 122 | } 123 | 124 | [data-waline] ol, 125 | [data-waline] ul { 126 | margin-inline-start: 1.25em; 127 | padding: 0 128 | } 129 | 130 | [data-waline] input[type=checkbox], 131 | [data-waline] input[type=radio] { 132 | display: inline-block; 133 | vertical-align: middle; 134 | margin-top: -2px 135 | } 136 | 137 | .wl-btn { 138 | display: inline-block; 139 | vertical-align: middle; 140 | min-width: 2.5em; 141 | margin-bottom: 0; 142 | border: 1px solid var(--waline-border-color); 143 | border-radius: .5em; 144 | background: rgba(0, 0, 0, 0); 145 | color: var(--waline-color); 146 | font-weight: 400; 147 | font-size: .75em; 148 | line-height: 1.5; 149 | text-align: center; 150 | white-space: nowrap; 151 | cursor: pointer; 152 | user-select: none; 153 | transition-duration: .4s; 154 | touch-action: manipulation 155 | } 156 | 157 | .wl-btn:hover, 158 | .wl-btn:active { 159 | border-color: var(--waline-theme-color); 160 | color: var(--waline-theme-color) 161 | } 162 | 163 | .wl-btn:disabled { 164 | border-color: var(--waline-border-color); 165 | background: var(--waline-disable-bg-color); 166 | color: var(--waline-disable-color); 167 | cursor: not-allowed 168 | } 169 | 170 | .wl-btn.primary { 171 | border-color: var(--waline-theme-color); 172 | background: var(--waline-theme-color); 173 | color: var(--waline-white) 174 | } 175 | 176 | .wl-btn.primary:hover, 177 | .wl-btn.primary:active { 178 | border-color: var(--waline-active-color); 179 | background: var(--waline-active-color); 180 | color: var(--waline-white) 181 | } 182 | 183 | .wl-btn.primary:disabled { 184 | border-color: var(--waline-border-color); 185 | background: var(--waline-disable-bg-color); 186 | color: var(--waline-disable-color); 187 | cursor: not-allowed 188 | } 189 | 190 | .wl-loading { 191 | text-align: center 192 | } 193 | 194 | .wl-loading svg { 195 | margin: 0 auto 196 | } 197 | 198 | .wl-comment { 199 | position: relative; 200 | display: flex; 201 | margin-bottom: .75em 202 | } 203 | 204 | .wl-close { 205 | position: absolute; 206 | top: -4px; 207 | inset-inline-end: -4px; 208 | padding: 0; 209 | border: none; 210 | background: rgba(0, 0, 0, 0); 211 | line-height: 1; 212 | cursor: pointer 213 | } 214 | 215 | .wl-login-info { 216 | max-width: 80px; 217 | margin-top: .75em; 218 | text-align: center 219 | } 220 | 221 | .wl-logout-btn { 222 | position: absolute; 223 | top: -10px; 224 | inset-inline-end: -10px; 225 | padding: 3px; 226 | border: none; 227 | background: rgba(0, 0, 0, 0); 228 | line-height: 0; 229 | cursor: pointer 230 | } 231 | 232 | .wl-avatar { 233 | position: relative; 234 | width: var(--waline-avatar-size); 235 | height: var(--waline-avatar-size); 236 | margin: 0 auto; 237 | border: var(--waline-border); 238 | border-radius: var(--waline-avatar-radius) 239 | } 240 | 241 | @media(max-width: 720px) { 242 | .wl-avatar { 243 | width: var(--waline-m-avatar-size); 244 | height: var(--waline-m-avatar-size) 245 | } 246 | } 247 | 248 | .wl-avatar img { 249 | width: 100%; 250 | height: 100%; 251 | border-radius: var(--waline-avatar-radius) 252 | } 253 | 254 | .wl-login-nick { 255 | display: block; 256 | color: var(--waline-theme-color); 257 | font-size: .75em; 258 | word-break: break-all 259 | } 260 | 261 | .wl-panel { 262 | position: relative; 263 | flex-shrink: 1; 264 | width: 100%; 265 | border-radius: .75em; 266 | } 267 | 268 | .wl-header { 269 | display: flex; 270 | padding: 0 4px; 271 | border-top-left-radius: .75em; 272 | border-top-right-radius: .75em 273 | } 274 | 275 | @media(max-width: 580px) { 276 | .wl-header { 277 | display: block 278 | } 279 | } 280 | 281 | .wl-header label { 282 | min-width: 40px; 283 | padding: .75em .5em; 284 | color: var(--waline-color); 285 | font-size: .75em; 286 | text-align: center 287 | } 288 | 289 | .wl-header input { 290 | flex: 1; 291 | width: 0; 292 | padding: .5em; 293 | background: rgba(0, 0, 0, 0); 294 | font-size: .625em; 295 | resize: none; 296 | z-index: 1000; 297 | } 298 | 299 | .wl-header-item { 300 | display: flex; 301 | flex: 1 302 | } 303 | 304 | @media(max-width: 580px) { 305 | .wl-header-item:not(:last-child) { 306 | border-bottom: 2px dashed var(--waline-border-color) 307 | } 308 | } 309 | 310 | .wl-header-1 .wl-header-item { 311 | width: 100% 312 | } 313 | 314 | .wl-header-2 .wl-header-item { 315 | width: 50% 316 | } 317 | 318 | @media(max-width: 580px) { 319 | .wl-header-2 .wl-header-item { 320 | flex: 0; 321 | width: 100% 322 | } 323 | } 324 | 325 | .wl-header-3 .wl-header-item { 326 | width: 33.33% 327 | } 328 | 329 | @media(max-width: 580px) { 330 | .wl-header-3 .wl-header-item { 331 | width: 100% 332 | } 333 | } 334 | 335 | .wl-editor { 336 | position: relative; 337 | width: calc(100% - 1em); 338 | padding: 0; 339 | min-height: 8.75em; 340 | margin: .75em .5em; 341 | border-radius: .5em; 342 | background: rgba(0, 0, 0, 0); 343 | font-size: .875em; 344 | resize: vertical 345 | } 346 | 347 | .wl-editor, 348 | .wl-input { 349 | max-width: 100%; 350 | border: none; 351 | color: var(--waline-color); 352 | outline: none; 353 | transition: all .25s ease 354 | } 355 | 356 | .wl-editor:focus, 357 | .wl-input:focus { 358 | background: var(--waline-bg-color-light) 359 | } 360 | 361 | .wl-preview { 362 | padding: 0 .5em .5em 363 | } 364 | 365 | .wl-preview h4 { 366 | margin: .25em; 367 | font-weight: bold; 368 | font-size: .9375em 369 | } 370 | 371 | .wl-preview .wl-content { 372 | min-height: 1.25em; 373 | padding: .25em; 374 | word-break: break-word; 375 | hyphens: auto 376 | } 377 | 378 | .wl-preview .wl-content>*:first-child { 379 | margin-top: 0 380 | } 381 | 382 | .wl-preview .wl-content>*:last-child { 383 | margin-bottom: 0 384 | } 385 | 386 | .wl-footer { 387 | position: relative; 388 | display: flex; 389 | flex-wrap: wrap; 390 | margin: .5em .75em 391 | } 392 | 393 | .wl-actions { 394 | display: flex; 395 | flex: 2; 396 | align-items: center 397 | } 398 | 399 | .wl-action { 400 | display: inline-flex; 401 | align-items: center; 402 | justify-content: center; 403 | width: 1.5em; 404 | height: 1.5em; 405 | margin: 2px; 406 | padding: 0; 407 | border: none; 408 | background: rgba(0, 0, 0, 0); 409 | color: var(--waline-color); 410 | font-size: 16px; 411 | cursor: pointer 412 | } 413 | 414 | .wl-action:hover { 415 | color: var(--waline-theme-color) 416 | } 417 | 418 | .wl-action.active { 419 | color: var(--waline-active-color) 420 | } 421 | 422 | #wl-image-upload { 423 | display: none 424 | } 425 | 426 | #wl-image-upload:focus+label { 427 | color: var(--waline-color) 428 | } 429 | 430 | #wl-image-upload:focus-visible+label { 431 | outline: -webkit-focus-ring-color auto 1px 432 | } 433 | 434 | .wl-info { 435 | display: flex; 436 | flex: 3; 437 | align-items: center; 438 | justify-content: flex-end 439 | } 440 | 441 | .wl-info .wl-text-number { 442 | color: var(--waline-info-color); 443 | font-size: .75em 444 | } 445 | 446 | .wl-info .wl-text-number .illegal { 447 | color: red 448 | } 449 | 450 | .wl-info button { 451 | margin-inline-start: .75em 452 | } 453 | 454 | .wl-info button svg { 455 | display: block; 456 | margin: 0 auto; 457 | line-height: 18px 458 | } 459 | 460 | .wl-emoji-popup { 461 | position: absolute; 462 | top: 100%; 463 | inset-inline-start: 1.25em; 464 | z-index: 10; 465 | display: none; 466 | width: 100%; 467 | max-width: 526px; 468 | border: var(--waline-border); 469 | border-radius: 6px; 470 | background: var(--waline-bg-color); 471 | box-shadow: var(--waline-box-shadow) 472 | } 473 | 474 | .wl-emoji-popup.display { 475 | display: block 476 | } 477 | 478 | .wl-emoji-popup button { 479 | display: inline-block; 480 | vertical-align: middle; 481 | width: 2em; 482 | margin: .125em; 483 | padding: 0; 484 | border-width: 0; 485 | background: rgba(0, 0, 0, 0); 486 | font-size: inherit; 487 | line-height: 2; 488 | text-align: center; 489 | cursor: pointer 490 | } 491 | 492 | .wl-emoji-popup button:hover { 493 | background: var(--waline-bg-color-hover) 494 | } 495 | 496 | .wl-emoji-popup .wl-emoji { 497 | display: inline-block; 498 | vertical-align: middle; 499 | max-width: 1.5em; 500 | max-height: 1.5em 501 | } 502 | 503 | .wl-emoji-popup .wl-tab-wrapper { 504 | overflow-y: auto; 505 | max-height: 145px; 506 | padding: .5em 507 | } 508 | 509 | .wl-emoji-popup .wl-tab-wrapper::-webkit-scrollbar { 510 | width: 6px; 511 | height: 6px 512 | } 513 | 514 | .wl-emoji-popup .wl-tab-wrapper::-webkit-scrollbar-track-piece:vertical { 515 | -webkit-border-radius: 6px; 516 | border-radius: 6px; 517 | background: rgba(0, 0, 0, .1) 518 | } 519 | 520 | .wl-emoji-popup .wl-tab-wrapper::-webkit-scrollbar-thumb:vertical { 521 | width: 6px; 522 | -webkit-border-radius: 6px; 523 | border-radius: 6px; 524 | background: var(--waline-theme-color) 525 | } 526 | 527 | .wl-emoji-popup .wl-tabs { 528 | position: relative; 529 | overflow-x: auto; 530 | padding: 0 6px; 531 | white-space: nowrap 532 | } 533 | 534 | .wl-emoji-popup .wl-tabs::before { 535 | content: " "; 536 | position: absolute; 537 | top: 0; 538 | right: 0; 539 | left: 0; 540 | z-index: 2; 541 | height: 1px; 542 | background: var(--waline-border-color) 543 | } 544 | 545 | .wl-emoji-popup .wl-tabs::-webkit-scrollbar { 546 | width: 6px; 547 | height: 6px 548 | } 549 | 550 | .wl-emoji-popup .wl-tabs::-webkit-scrollbar-track-piece:horizontal { 551 | -webkit-border-radius: 6px; 552 | border-radius: 6px; 553 | background: rgba(0, 0, 0, .1) 554 | } 555 | 556 | .wl-emoji-popup .wl-tabs::-webkit-scrollbar-thumb:horizontal { 557 | height: 6px; 558 | -webkit-border-radius: 6px; 559 | border-radius: 6px; 560 | background: var(--waline-theme-color) 561 | } 562 | 563 | .wl-emoji-popup .wl-tab { 564 | position: relative; 565 | margin: 0; 566 | padding: 0 .5em 567 | } 568 | 569 | .wl-emoji-popup .wl-tab.active { 570 | z-index: 3; 571 | border: 1px solid var(--waline-border-color); 572 | border-top-width: 0; 573 | border-bottom-right-radius: 6px; 574 | border-bottom-left-radius: 6px; 575 | background: var(--waline-bg-color) 576 | } 577 | 578 | .wl-gif-popup { 579 | position: absolute; 580 | top: 100%; 581 | inset-inline-start: 1.25em; 582 | z-index: 10; 583 | width: calc(100% - 3em); 584 | padding: .75em .75em .25em; 585 | border: var(--waline-border); 586 | border-radius: 6px; 587 | background: var(--waline-bg-color); 588 | box-shadow: var(--waline-box-shadow); 589 | opacity: 0; 590 | visibility: hidden; 591 | transition: transform .2s ease-out, opacity .2s ease-out; 592 | transform: scale(0.9, 0.9); 593 | transform-origin: 0 0 594 | } 595 | 596 | .wl-gif-popup.display { 597 | opacity: 1; 598 | visibility: visible; 599 | transform: none 600 | } 601 | 602 | .wl-gif-popup input { 603 | box-sizing: border-box; 604 | width: 100%; 605 | margin-bottom: 10px; 606 | padding: 3px 5px; 607 | border: var(--waline-border) 608 | } 609 | 610 | .wl-gif-popup img { 611 | display: block; 612 | box-sizing: border-box; 613 | width: 100%; 614 | border-width: 2px; 615 | border-style: solid; 616 | border-color: oklch(var(--b1)); 617 | cursor: pointer 618 | } 619 | 620 | .wl-gif-popup img:hover { 621 | border-color: var(--waline-theme-color); 622 | border-radius: 2px 623 | } 624 | 625 | .wl-gallery { 626 | display: flex; 627 | overflow-y: auto; 628 | max-height: 80vh 629 | } 630 | 631 | .wl-gallery-column { 632 | display: flex; 633 | flex: 1; 634 | flex-direction: column; 635 | height: -webkit-max-content; 636 | height: -moz-max-content; 637 | height: max-content 638 | } 639 | 640 | .wl-cards .wl-user { 641 | --avatar-size: var(--waline-avatar-size); 642 | position: relative; 643 | margin-inline-end: .75em 644 | } 645 | 646 | @media(max-width: 720px) { 647 | .wl-cards .wl-user { 648 | --avatar-size: var(--waline-m-avatar-size) 649 | } 650 | } 651 | 652 | .wl-cards .wl-user .wl-user-avatar { 653 | width: var(--avatar-size); 654 | height: var(--avatar-size); 655 | border-radius: var(--waline-avatar-radius); 656 | box-shadow: var(--waline-box-shadow) 657 | } 658 | 659 | .wl-cards .wl-user .verified-icon { 660 | position: absolute; 661 | top: calc(var(--avatar-size)*3/4); 662 | inset-inline-start: calc(var(--avatar-size)*3/4); 663 | border-radius: 50%; 664 | background: var(--waline-bg-color); 665 | box-shadow: var(--waline-box-shadow) 666 | } 667 | 668 | .wl-card-item { 669 | position: relative; 670 | display: flex; 671 | padding: .5em 672 | } 673 | 674 | .wl-card-item .wl-card-item { 675 | padding-inline-end: 0 676 | } 677 | 678 | .wl-card { 679 | flex: 1; 680 | width: 0; 681 | padding-bottom: .5em; 682 | border-bottom: 1px dashed var(--waline-border-color) 683 | } 684 | 685 | .wl-card:first-child { 686 | margin-inline-start: 1em 687 | } 688 | 689 | .wl-card-item:last-child>.wl-card { 690 | border-bottom: none 691 | } 692 | 693 | .wl-card .wl-nick svg { 694 | position: relative; 695 | bottom: -0.125em; 696 | line-height: 1 697 | } 698 | 699 | .wl-card .wl-head { 700 | overflow: hidden; 701 | line-height: 1.5 702 | } 703 | 704 | .wl-card .wl-head .wl-nick { 705 | position: relative; 706 | display: inline-block; 707 | margin-inline-end: .5em; 708 | font-weight: bold; 709 | font-size: .875em; 710 | line-height: 1; 711 | text-decoration: none 712 | } 713 | 714 | .wl-card span.wl-nick { 715 | color: var(--waline-dark-grey) 716 | } 717 | 718 | .wl-card .wl-badge { 719 | display: inline-block; 720 | margin-inline-end: 1em; 721 | padding: 0 .3em; 722 | border: 1px solid var(--waline-badge-color); 723 | border-radius: 4px; 724 | color: var(--waline-badge-color); 725 | font-size: var(--waline-badge-font-size) 726 | } 727 | 728 | .wl-card .wl-time { 729 | margin-inline-end: .875em; 730 | color: var(--waline-info-color); 731 | font-size: .75em 732 | } 733 | 734 | .wl-card .wl-meta { 735 | position: relative; 736 | line-height: 1 737 | } 738 | 739 | .wl-card .wl-meta>span { 740 | display: inline-block; 741 | margin-inline-end: .25em; 742 | padding: 2px 4px; 743 | border-radius: .2em; 744 | background: var(--waline-info-bg-color); 745 | color: var(--waline-info-color); 746 | font-size: var(--waline-info-font-size); 747 | line-height: 1.5 748 | } 749 | 750 | .wl-card .wl-meta>span:empty { 751 | display: none 752 | } 753 | 754 | .wl-card .wl-comment-actions { 755 | float: right; 756 | line-height: 1 757 | } 758 | 759 | [dir=rtl] .wl-card .wl-comment-actions { 760 | float: left 761 | } 762 | 763 | .wl-card .wl-delete, 764 | .wl-card .wl-like, 765 | .wl-card .wl-reply, 766 | .wl-card .wl-edit { 767 | display: inline-flex; 768 | align-items: center; 769 | border: none; 770 | background: rgba(0, 0, 0, 0); 771 | color: var(--waline-color); 772 | line-height: 1; 773 | cursor: pointer; 774 | transition: color .2s ease 775 | } 776 | 777 | .wl-card .wl-delete:hover, 778 | .wl-card .wl-like:hover, 779 | .wl-card .wl-reply:hover, 780 | .wl-card .wl-edit:hover { 781 | color: var(--waline-theme-color) 782 | } 783 | 784 | .wl-card .wl-delete.active, 785 | .wl-card .wl-like.active, 786 | .wl-card .wl-reply.active, 787 | .wl-card .wl-edit.active { 788 | color: var(--waline-active-color) 789 | } 790 | 791 | .wl-card .wl-content { 792 | position: relative; 793 | margin-bottom: .75em; 794 | padding-top: .625em; 795 | font-size: .875em; 796 | line-height: 2; 797 | word-wrap: break-word 798 | } 799 | 800 | .wl-card .wl-content.expand { 801 | overflow: hidden; 802 | max-height: 8em; 803 | cursor: pointer 804 | } 805 | 806 | .wl-card .wl-content.expand::before { 807 | content: ""; 808 | position: absolute; 809 | top: 0; 810 | bottom: 3.15em; 811 | inset-inline-start: 0; 812 | z-index: 999; 813 | display: block; 814 | width: 100%; 815 | background: linear-gradient(180deg, #000, rgba(255, 255, 255, 0.9)) 816 | } 817 | 818 | .wl-card .wl-content.expand::after { 819 | content: attr(data-expand); 820 | position: absolute; 821 | bottom: 0; 822 | inset-inline-start: 0; 823 | z-index: 999; 824 | display: block; 825 | width: 100%; 826 | height: 3.15em; 827 | background: rgba(255, 255, 255, .9); 828 | color: #828586; 829 | line-height: 3.15em; 830 | text-align: center 831 | } 832 | 833 | .wl-card .wl-content>*:first-child { 834 | margin-top: 0 835 | } 836 | 837 | .wl-card .wl-content>*:last-child { 838 | margin-bottom: 0 839 | } 840 | 841 | .wl-card .wl-admin-actions { 842 | margin: 8px 0; 843 | font-size: 12px; 844 | text-align: right 845 | } 846 | 847 | .wl-card .wl-comment-status { 848 | margin: 0 8px 849 | } 850 | 851 | .wl-card .wl-comment-status .wl-btn { 852 | border-radius: 0 853 | } 854 | 855 | .wl-card .wl-comment-status .wl-btn:first-child { 856 | border-inline-end: 0; 857 | border-radius: .5em 0 0 .5em 858 | } 859 | 860 | .wl-card .wl-comment-status .wl-btn:last-child { 861 | border-inline-start: 0; 862 | border-radius: 0 .5em .5em 0 863 | } 864 | 865 | .wl-card .wl-quote { 866 | border-inline-start: 1px dashed rgba(237, 237, 237, .5) 867 | } 868 | 869 | .wl-card .wl-quote .wl-user { 870 | --avatar-size: var(--waline-m-avatar-size) 871 | } 872 | 873 | .wl-close-icon { 874 | color: var(--waline-border-color) 875 | } 876 | 877 | .wl-content .vemoji, 878 | .wl-content .wl-emoji { 879 | display: inline-block; 880 | vertical-align: baseline; 881 | height: 1.25em; 882 | margin: -0.125em .25em 883 | } 884 | 885 | .wl-content .wl-tex { 886 | background: var(--waline-info-bg-color); 887 | color: var(--waline-info-color) 888 | } 889 | 890 | .wl-content span.wl-tex { 891 | display: inline-block; 892 | margin-inline-end: .25em; 893 | padding: 2px 4px; 894 | border-radius: .2em; 895 | font-size: var(--waline-info-font-size); 896 | line-height: 1.5 897 | } 898 | 899 | .wl-content p.wl-tex { 900 | text-align: center 901 | } 902 | 903 | .wl-content .katex-display { 904 | overflow: auto hidden; 905 | -webkit-overflow-scrolling: touch; 906 | padding-top: .2em; 907 | padding-bottom: .2em 908 | } 909 | 910 | .wl-content .katex-display::-webkit-scrollbar { 911 | height: 3px 912 | } 913 | 914 | .wl-content .katex-error { 915 | color: red 916 | } 917 | 918 | .wl-count { 919 | flex: 1; 920 | font-weight: bold; 921 | font-size: 1.25em 922 | } 923 | 924 | .wl-empty { 925 | overflow: auto; 926 | padding: 1.25em; 927 | color: var(--waline-color); 928 | text-align: center 929 | } 930 | 931 | .wl-operation { 932 | text-align: center 933 | } 934 | 935 | .wl-operation button { 936 | margin: 1em 0 937 | } 938 | 939 | .wl-power { 940 | padding: .5em 0; 941 | color: var(--waline-light-grey); 942 | font-size: var(--waline-info-font-size); 943 | text-align: end 944 | } 945 | 946 | .wl-meta-head { 947 | display: flex; 948 | flex-direction: row; 949 | align-items: center; 950 | padding: .375em 951 | } 952 | 953 | .wl-sort { 954 | margin: 0; 955 | list-style-type: none 956 | } 957 | 958 | .wl-sort li { 959 | display: inline-block; 960 | color: var(--waline-info-color); 961 | font-size: .75em; 962 | cursor: pointer 963 | } 964 | 965 | .wl-sort li.active { 966 | color: var(--waline-theme-color) 967 | } 968 | 969 | .wl-sort li+li { 970 | margin-inline-start: 1em 971 | } 972 | 973 | .wl-reaction { 974 | overflow: auto hidden; 975 | margin-bottom: 1.75em; 976 | text-align: center 977 | } 978 | 979 | .wl-reaction img { 980 | width: 100%; 981 | height: 100%; 982 | transition: all 250ms ease-in-out 983 | } 984 | 985 | .wl-reaction-title { 986 | margin: 16px auto; 987 | font-weight: bold; 988 | font-size: 18px 989 | } 990 | 991 | .wl-reaction-list { 992 | display: flex; 993 | flex-direction: row; 994 | gap: 16px; 995 | justify-content: center; 996 | margin: 0; 997 | padding: 8px; 998 | list-style-type: none 999 | } 1000 | 1001 | @media(max-width: 580px) { 1002 | .wl-reaction-list { 1003 | gap: 12px 1004 | } 1005 | } 1006 | 1007 | [data-waline] .wl-reaction-list { 1008 | margin-inline-start: 0 1009 | } 1010 | 1011 | .wl-reaction-item { 1012 | display: flex; 1013 | flex-direction: column; 1014 | align-items: center; 1015 | cursor: pointer 1016 | } 1017 | 1018 | .wl-reaction-item:hover img, 1019 | .wl-reaction-item.active img { 1020 | transform: scale(1.15) 1021 | } 1022 | 1023 | .wl-reaction-img { 1024 | position: relative; 1025 | width: 42px; 1026 | height: 42px 1027 | } 1028 | 1029 | @media(max-width: 580px) { 1030 | .wl-reaction-img { 1031 | width: 32px; 1032 | height: 32px 1033 | } 1034 | } 1035 | 1036 | .wl-reaction-loading { 1037 | position: absolute; 1038 | top: -4px; 1039 | inset-inline-end: -5px; 1040 | width: 18px; 1041 | height: 18px; 1042 | color: var(--waline-theme-color) 1043 | } 1044 | 1045 | .wl-reaction-votes { 1046 | position: absolute; 1047 | top: -9px; 1048 | inset-inline-end: -9px; 1049 | min-width: 1em; 1050 | padding: 2px; 1051 | border: 1px solid var(--waline-theme-color); 1052 | border-radius: 1em; 1053 | background: var(--waline-bg-color); 1054 | color: var(--waline-theme-color); 1055 | font-weight: 700; 1056 | font-size: .75em; 1057 | line-height: 1 1058 | } 1059 | 1060 | .wl-reaction-item.active .wl-reaction-votes { 1061 | background: var(--waline-theme-color); 1062 | color: var(--waline-bg-color) 1063 | } 1064 | 1065 | .wl-reaction-text { 1066 | font-size: .875em 1067 | } 1068 | 1069 | .wl-reaction-item.active .wl-reaction-text { 1070 | color: var(--waline-theme-color) 1071 | } 1072 | 1073 | .wl-content pre, 1074 | .wl-content pre[class*=language-] { 1075 | overflow: auto; 1076 | margin: .75rem 0; 1077 | padding: 1rem 1.25rem; 1078 | border-radius: 6px; 1079 | background: var(--waline-code-bg-color); 1080 | line-height: 1.4 1081 | } 1082 | 1083 | .wl-content pre code, 1084 | .wl-content pre[class*=language-] code { 1085 | padding: 0; 1086 | border-radius: 0; 1087 | background: rgba(0, 0, 0, 0) !important; 1088 | color: #bbb; 1089 | direction: ltr 1090 | } 1091 | 1092 | .wl-content code[class*=language-], 1093 | .wl-content pre[class*=language-] { 1094 | background: none; 1095 | color: #ccc; 1096 | font-size: 1em; 1097 | font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace; 1098 | text-align: left; 1099 | white-space: pre; 1100 | word-spacing: normal; 1101 | word-wrap: normal; 1102 | word-break: normal; 1103 | tab-size: 4; 1104 | hyphens: none 1105 | } 1106 | 1107 | .wl-content pre[class*=language-] { 1108 | overflow: auto 1109 | } 1110 | 1111 | .wl-content :not(pre)>code[class*=language-], 1112 | .wl-content pre[class*=language-] { 1113 | background: #2d2d2d 1114 | } 1115 | 1116 | .wl-content :not(pre)>code[class*=language-] { 1117 | padding: .1em; 1118 | border-radius: .3em; 1119 | white-space: normal 1120 | } 1121 | 1122 | .wl-content .token.comment, 1123 | .wl-content .token.block-comment, 1124 | .wl-content .token.prolog, 1125 | .wl-content .token.doctype, 1126 | .wl-content .token.cdata { 1127 | color: #999 1128 | } 1129 | 1130 | .wl-content .token.punctuation { 1131 | color: #ccc 1132 | } 1133 | 1134 | .wl-content .token.tag, 1135 | .wl-content .token.attr-name, 1136 | .wl-content .token.namespace, 1137 | .wl-content .token.deleted { 1138 | color: #e2777a 1139 | } 1140 | 1141 | .wl-content .token.function-name { 1142 | color: #6196cc 1143 | } 1144 | 1145 | .wl-content .token.boolean, 1146 | .wl-content .token.number, 1147 | .wl-content .token.function { 1148 | color: #f08d49 1149 | } 1150 | 1151 | .wl-content .token.property, 1152 | .wl-content .token.class-name, 1153 | .wl-content .token.constant, 1154 | .wl-content .token.symbol { 1155 | color: #f8c555 1156 | } 1157 | 1158 | .wl-content .token.selector, 1159 | .wl-content .token.important, 1160 | .wl-content .token.atrule, 1161 | .wl-content .token.keyword, 1162 | .wl-content .token.builtin { 1163 | color: #cc99cd 1164 | } 1165 | 1166 | .wl-content .token.string, 1167 | .wl-content .token.char, 1168 | .wl-content .token.attr-value, 1169 | .wl-content .token.regex, 1170 | .wl-content .token.variable { 1171 | color: #7ec699 1172 | } 1173 | 1174 | .wl-content .token.operator, 1175 | .wl-content .token.entity, 1176 | .wl-content .token.url { 1177 | color: #67cdcc 1178 | } 1179 | 1180 | .wl-content .token.important, 1181 | .wl-content .token.bold { 1182 | font-weight: bold 1183 | } 1184 | 1185 | .wl-content .token.italic { 1186 | font-style: italic 1187 | } 1188 | 1189 | .wl-content .token.entity { 1190 | cursor: help 1191 | } 1192 | 1193 | .wl-content .token.inserted { 1194 | color: green 1195 | } 1196 | 1197 | .wl-recent-item p { 1198 | display: inline 1199 | } 1200 | 1201 | .wl-user-list { 1202 | padding: 0; 1203 | list-style: none 1204 | } 1205 | 1206 | .wl-user-list a, 1207 | .wl-user-list a:hover, 1208 | .wl-user-list a:visited { 1209 | color: var(--waline-color); 1210 | text-decoration: none 1211 | } 1212 | 1213 | .wl-user-list .wl-user-avatar { 1214 | position: relative; 1215 | display: inline-block; 1216 | overflow: hidden; 1217 | margin-inline-end: 10px; 1218 | border-radius: 4px; 1219 | line-height: 0 1220 | } 1221 | 1222 | .wl-user-list .wl-user-avatar>img { 1223 | width: var(--waline-user-avatar-size, 48px); 1224 | height: var(--waline-user-avatar-size, 48px) 1225 | } 1226 | 1227 | .wl-user-list .wl-user-badge { 1228 | position: absolute; 1229 | bottom: 0; 1230 | inset-inline-end: 0; 1231 | min-width: .7em; 1232 | height: 1.5em; 1233 | padding: 0 .4em; 1234 | border-radius: 4px; 1235 | background: var(--waline-info-bg-color); 1236 | color: var(--waline-info-color); 1237 | font-weight: bold; 1238 | font-size: 10px; 1239 | line-height: 1.5em; 1240 | text-align: center 1241 | } 1242 | 1243 | .wl-user-list .wl-user-item { 1244 | margin: 10px 0 1245 | } 1246 | 1247 | .wl-user-list .wl-user-item:nth-child(1) .wl-user-badge { 1248 | background: var(--waline-rank-gold-bg-color, #fa3939); 1249 | color: var(--waline-white); 1250 | font-weight: bold 1251 | } 1252 | 1253 | .wl-user-list .wl-user-item:nth-child(2) .wl-user-badge { 1254 | background: var(--waline-rank-silver-bg-color, #fb811c); 1255 | color: var(--waline-white); 1256 | font-weight: bold 1257 | } 1258 | 1259 | .wl-user-list .wl-user-item:nth-child(3) .wl-user-badge { 1260 | background: var(--waline-rank-copper-bg-color, #feb207); 1261 | color: var(--waline-white) 1262 | } 1263 | 1264 | .wl-user-list .wl-user-meta { 1265 | display: inline-block; 1266 | vertical-align: top 1267 | } 1268 | 1269 | .wl-user-list .wl-badge { 1270 | display: inline-block; 1271 | vertical-align: text-top; 1272 | margin-inline-start: .5em; 1273 | padding: 0 .3em; 1274 | border: 1px solid var(--waline-badge-color); 1275 | border-radius: 4px; 1276 | color: var(--waline-badge-color); 1277 | font-size: var(--waline-badge-font-size) 1278 | } 1279 | 1280 | .wl-user-wall { 1281 | padding: 0; 1282 | list-style: none 1283 | } 1284 | 1285 | .wl-user-wall .wl-user-badge, 1286 | .wl-user-wall .wl-user-meta { 1287 | display: none 1288 | } 1289 | 1290 | .wl-user-wall .wl-user-item { 1291 | position: relative; 1292 | display: inline-block; 1293 | transition: transform ease-in-out .2s 1294 | } 1295 | 1296 | .wl-user-wall .wl-user-item::before, 1297 | .wl-user-wall .wl-user-item::after { 1298 | position: absolute; 1299 | bottom: 100%; 1300 | left: 50%; 1301 | z-index: 10; 1302 | opacity: 0; 1303 | pointer-events: none; 1304 | transition: all .18s ease-out .18s; 1305 | transform: translate(-50%, 4px); 1306 | transform-origin: top 1307 | } 1308 | 1309 | .wl-user-wall .wl-user-item::before { 1310 | content: ""; 1311 | width: 0; 1312 | height: 0; 1313 | border: 5px solid rgba(0, 0, 0, 0); 1314 | border-top-color: rgba(16, 16, 16, .95) 1315 | } 1316 | 1317 | .wl-user-wall .wl-user-item::after { 1318 | content: attr(aria-label); 1319 | margin-bottom: 10px; 1320 | padding: .5em 1em; 1321 | border-radius: 2px; 1322 | background: rgba(16, 16, 16, .95); 1323 | color: oklch(var(--b1)); 1324 | font-size: 12px; 1325 | white-space: nowrap 1326 | } 1327 | 1328 | .wl-user-wall .wl-user-item:hover { 1329 | transform: scale(1.1) 1330 | } 1331 | 1332 | .wl-user-wall .wl-user-item:hover::before, 1333 | .wl-user-wall .wl-user-item:hover::after { 1334 | opacity: 1; 1335 | pointer-events: none; 1336 | transform: translate(-50%, 0) 1337 | } 1338 | 1339 | .wl-user-wall .wl-user-item img { 1340 | width: var(--waline-user-avatar-size, 48px); 1341 | height: var(--waline-user-avatar-size, 48px) 1342 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . --------------------------------------------------------------------------------