chore: init
This commit is contained in:
commit
44a611f3ec
|
@ -0,0 +1,2 @@
|
|||
node_modules
|
||||
dist
|
|
@ -0,0 +1,17 @@
|
|||
/* eslint-disable no-console */
|
||||
import { defineConfigWithTheme } from 'vitepress'
|
||||
import { getPostList } from './theme'
|
||||
import type { ThemeLinearConfig } from './theme'
|
||||
|
||||
const posts = getPostList()
|
||||
|
||||
export default defineConfigWithTheme<ThemeLinearConfig>({
|
||||
title: 'YIYANG SUN',
|
||||
description: 'Love for life and technology.',
|
||||
themeConfig: {
|
||||
links: [
|
||||
{ name: 'GitHub', link: 'https://github.com/syy11cn', icon: '/assets/images/github.svg' },
|
||||
],
|
||||
posts,
|
||||
},
|
||||
})
|
|
@ -0,0 +1 @@
|
|||
../../src
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--carbon" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path fill="#bbbbbb" fill-rule="evenodd" d="M16 2a14 14 0 0 0-4.43 27.28c.7.13 1-.3 1-.67v-2.38c-3.89.84-4.71-1.88-4.71-1.88a3.71 3.71 0 0 0-1.62-2.05c-1.27-.86.1-.85.1-.85a2.94 2.94 0 0 1 2.14 1.45a3 3 0 0 0 4.08 1.16a2.93 2.93 0 0 1 .88-1.87c-3.1-.36-6.37-1.56-6.37-6.92a5.4 5.4 0 0 1 1.44-3.76a5 5 0 0 1 .14-3.7s1.17-.38 3.85 1.43a13.3 13.3 0 0 1 7 0c2.67-1.81 3.84-1.43 3.84-1.43a5 5 0 0 1 .14 3.7a5.4 5.4 0 0 1 1.44 3.76c0 5.38-3.27 6.56-6.39 6.91a3.33 3.33 0 0 1 .95 2.59v3.84c0 .46.25.81 1 .67A14 14 0 0 0 16 2Z"></path></svg>
|
After Width: | Height: | Size: 757 B |
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
home: true
|
||||
---
|
||||
|
||||
# 111
|
||||
|
||||
```js
|
||||
a = 1
|
||||
```
|
||||
|
||||
$$
|
||||
1+2=3
|
||||
$$
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"name": "vitepress-theme-linear",
|
||||
"version": "0.0.0",
|
||||
"packageManager": "pnpm@6.32.6",
|
||||
"description": "Linear theme for vitepress.",
|
||||
"keywords": [],
|
||||
"license": "MIT",
|
||||
"author": "syy11cn",
|
||||
"scripts": {
|
||||
"dev:docs": "vitepress dev docs"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^0.21.1",
|
||||
"@types/node": "^17.0.27",
|
||||
"eslint": "^8.14.0",
|
||||
"typescript": "^4.6.3",
|
||||
"vitepress": "^0.22.3",
|
||||
"vue": "^3.2.33"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@antfu"
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,11 @@
|
|||
<script setup lang='ts'>
|
||||
import Header from './components/Header.vue'
|
||||
import PostList from './components/PostList.vue'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Header />
|
||||
<PostList />
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,5 @@
|
|||
<script setup lang='ts'></script>
|
||||
|
||||
<template />
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,58 @@
|
|||
<script setup lang='ts'>
|
||||
import { useData } from 'vitepress'
|
||||
import type { Link } from '../types'
|
||||
const data = useData()
|
||||
const links = data.site.value.themeConfig.links as Link[]
|
||||
const siteInfo = data.site.value
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<header>
|
||||
<a class="title" href="/">{{ siteInfo.title }}</a>
|
||||
<p class="sub-title">
|
||||
{{ siteInfo.description }}
|
||||
</p>
|
||||
<p>
|
||||
<a v-for="item in links" :key="item.name" :href="item.link">
|
||||
<img :src="item.icon" :alt="item.name">
|
||||
</a>
|
||||
</p>
|
||||
</header>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
header{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin: 5rem auto 5rem;
|
||||
}
|
||||
header > *:not(:last-child){
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
.title{
|
||||
letter-spacing: 6px;
|
||||
font-size: 1.6rem;
|
||||
color: #444;
|
||||
}
|
||||
.title:active{
|
||||
color: #444;
|
||||
}
|
||||
.sub-title{
|
||||
letter-spacing: 3px;
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
p{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
p a {
|
||||
padding: 0 0.5rem;
|
||||
height: 20px;
|
||||
object-fit: cover;
|
||||
}
|
||||
p a img{
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,12 @@
|
|||
<script setup lang='ts'>
|
||||
import { useData } from 'vitepress'
|
||||
const data = useData()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<!-- {{ data.site.value.themeConfig }} -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
|
@ -0,0 +1,17 @@
|
|||
import type { Theme } from 'vitepress'
|
||||
|
||||
import './styles/reset.css'
|
||||
import './styles/global.css'
|
||||
|
||||
import NotFound from './NotFound.vue'
|
||||
import Layout from './Layout.vue'
|
||||
|
||||
const theme: Theme = {
|
||||
Layout,
|
||||
NotFound,
|
||||
}
|
||||
|
||||
export default theme
|
||||
|
||||
export * from './types'
|
||||
export * from './utils'
|
|
@ -0,0 +1,18 @@
|
|||
* {
|
||||
font-weight: 400;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
html, body {
|
||||
font-family: "Roboto", "Helvetica Neue", "Hiragino Sans GB", "LiHei Pro", Arial, serif;
|
||||
text-rendering: optimizelegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
font-size: 10px;
|
||||
word-spacing: 1px;
|
||||
color: #666;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
a:active{
|
||||
color: #68b88e
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||
article, aside, canvas, details, embed,
|
||||
figure, figcaption, footer, header, hgroup,
|
||||
menu, nav, output, ruby, section, summary,
|
||||
time, mark, audio, video {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
vertical-align: baseline;
|
||||
text-decoration: none;
|
||||
}
|
||||
/* HTML5 display-role reset for older browsers */
|
||||
article, aside, details, figcaption, figure,
|
||||
footer, header, hgroup, menu, nav, section {
|
||||
display: block;
|
||||
}
|
||||
body {
|
||||
line-height: 1;
|
||||
}
|
||||
ol, ul {
|
||||
list-style: none;
|
||||
}
|
||||
blockquote, q {
|
||||
quotes: none;
|
||||
}
|
||||
blockquote:before, blockquote:after,
|
||||
q:before, q:after {
|
||||
content: '';
|
||||
content: none;
|
||||
}
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
import type { DefaultTheme } from 'vitepress'
|
||||
|
||||
export interface Link{
|
||||
link: string
|
||||
icon: string
|
||||
name: string
|
||||
}
|
||||
|
||||
export interface ThemeLinearConfig extends DefaultTheme.Config{
|
||||
links?: Link[]
|
||||
posts?: Post[]
|
||||
}
|
||||
|
||||
export interface Post{
|
||||
title: string
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
import type { Post } from '../types'
|
||||
|
||||
export function getPostList(): Post[] {
|
||||
return [{
|
||||
title: '111',
|
||||
}]
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "node",
|
||||
"target": "ES2015",
|
||||
"rootDir": "."
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue