Skip to content

Commit 63f2afe

Browse files
committed
chore: vitepress, others
- use vitepress instead - update node.js - fix link
1 parent ef28c8b commit 63f2afe

27 files changed

+266
-444
lines changed

.github/workflows/nodejs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
strategy:
1717
matrix:
18-
node-version: [14.x]
18+
node-version: [16.x]
1919

2020
steps:
2121
- uses: actions/checkout@v2

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ yarn.lock
44

55
.idea
66

7-
docs/.vuepress/dist
7+
docs/.vitepress/dist
88

99
.DS_Store
1010

docs/.vuepress/components/Profile.vue docs/.vitepress/components/Profile.vue

-4
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,3 @@ export default {
104104
}
105105
}
106106
</script>
107-
108-
<style lang="scss" scoped>
109-
@import '../styles/profile.scss';
110-
</style>

docs/.vitepress/config.ts

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
export default {
2+
title: `Hack React`,
3+
description: `ミートアップやハンズオンでご紹介のあった資料を中心に記録しています。`,
4+
head: [
5+
[
6+
`script`,
7+
{},
8+
`(adsbygoogle = window.adsbygoogle || []).push({ google_ad_client: "ca-pub-7095980629133842", enable_page_level_ads: true });`
9+
],
10+
[
11+
`script`,
12+
{
13+
async: true,
14+
src: `//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js`
15+
}
16+
]
17+
],
18+
base: `/`,
19+
themeConfig: {
20+
repo: `jiyuujin/hack-react`,
21+
editLinks: false,
22+
docsDir: `docs`,
23+
navbar: [
24+
{
25+
text: `ハンズオン`,
26+
children: [
27+
`/index.md`,
28+
`/handson/pokemon.md`,
29+
`/handson/liff_vite.md`,
30+
`/handson/liff_nextjs.md`,
31+
`/handson/tests.md`
32+
]
33+
}
34+
],
35+
sidebarDepth: 3,
36+
sidebar: [
37+
{
38+
text: `はじめに`,
39+
items: [
40+
{ text: 'Pokemon アプリ', link: '/handson/pokemon.md' },
41+
{ text: 'Vite で LIFF アプリ', link: '/handson/liff_vite.md' },
42+
{ text: 'Next.js で LIFF アプリ', link: '/handson/liff_nextjs.md' },
43+
{ text: 'ユニットテスト', link: '/handson/tests.md' }
44+
]
45+
}
46+
]
47+
},
48+
markdown: {
49+
toc: { level: [1, 2] }
50+
},
51+
extendsMarkdown: (md) => {
52+
md.use(require('@nekohack/markdown-it-link-preview'))
53+
}
54+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/.vitepress/theme/custom.css

+187
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
:root {
2+
--vp-c-brand: #00d8ff;
3+
--vp-c-brand-light: #00d8ff;
4+
}
5+
6+
a:hover {
7+
color: #b5eef8 !important;
8+
}
9+
10+
.profile {
11+
padding: 1rem 0;
12+
max-width: 800px;
13+
margin: 40px auto;
14+
display: flex;
15+
align-items: center;
16+
justify-content: space-around;
17+
vertical-align: middle;
18+
background-color: #fefefe;
19+
border: 1px #ddd solid;
20+
border-radius: 8px;
21+
}
22+
23+
.profile-icon {
24+
margin: 0 auto;
25+
width: 40%;
26+
display: flex;
27+
align-items: center;
28+
justify-content: center;
29+
vertical-align: middle;
30+
max-width: 600px;
31+
}
32+
33+
.profile-icon_image {
34+
align-items: center;
35+
display: block;
36+
flex: none;
37+
justify-content: center;
38+
}
39+
40+
.profile-icon_image img {
41+
height: 120px;
42+
width: 120px;
43+
object-fit: cover;
44+
border-radius: 50%;
45+
}
46+
47+
.profile-info {
48+
width: 60%;
49+
}
50+
51+
.info-title {
52+
margin-bottom: 8px;
53+
align-items: center;
54+
flex-direction: row;
55+
flex-shrink: 1;
56+
min-width: 0;
57+
font-size: 1.4rem;
58+
color: #434343;
59+
}
60+
61+
.info-description {
62+
align-items: center;
63+
flex-direction: row;
64+
flex-shrink: 1;
65+
min-width: 0;
66+
font-size: 1rem;
67+
color: #434343;
68+
}
69+
70+
.info-social {
71+
display: flex;
72+
flex-direction: row;
73+
align-items: center;
74+
justify-content: flex-start;
75+
vertical-align: middle;
76+
list-style: none;
77+
padding: 0;
78+
margin: 0;
79+
}
80+
81+
.info-social li {
82+
padding: 0 4px;
83+
margin: 0;
84+
}
85+
86+
.info-social li a {
87+
color: #000;
88+
}
89+
90+
.info-social li a img {
91+
width: 32px;
92+
height: 32px;
93+
}
94+
95+
@media (max-width: 735px) {
96+
.profile {
97+
padding: 12px 8px;
98+
margin: 0 10px;
99+
flex-direction: column;
100+
}
101+
102+
.profile-icon {
103+
width: 100%;
104+
margin: 0;
105+
margin-bottom: 16px;
106+
}
107+
108+
.profile-info {
109+
text-align: center;
110+
width: 100%;
111+
}
112+
113+
.info-social {
114+
justify-content: center;
115+
}
116+
}
117+
118+
.link-preview {
119+
display: table;
120+
width: 100%;
121+
border: 1px solid #e6e6e6;
122+
border-radius: 4px;
123+
}
124+
125+
.link-preview__title {
126+
font-size: 16px;
127+
font-weight: 700;
128+
display: -webkit-box;
129+
overflow: hidden;
130+
margin-bottom: 8px;
131+
word-break: break-all;
132+
-webkit-box-orient: vertical;
133+
-webkit-line-clamp: 2;
134+
}
135+
136+
.link-preview__description {
137+
font-size: 12px;
138+
font-style: normal;
139+
line-height: 1.5;
140+
display: -webkit-box;
141+
overflow: hidden;
142+
max-height: 3em;
143+
margin-bottom: 4px;
144+
word-break: break-all;
145+
color: #787c7b;
146+
-webkit-box-orient: vertical;
147+
-webkit-line-clamp: 2;
148+
}
149+
150+
.link-preview__url {
151+
font-size: 12px;
152+
font-style: normal;
153+
line-height: 1.5;
154+
display: block;
155+
margin-bottom: 0;
156+
color: #222;
157+
}
158+
159+
.link-preview > a {
160+
display: table-cell;
161+
flex-direction: column;
162+
padding: 16px;
163+
cursor: pointer;
164+
vertical-align: middle;
165+
text-decoration: none;
166+
color: inherit;
167+
background-color: transparent;
168+
-webkit-box-orient: vertical;
169+
-webkit-box-direction: normal;
170+
-webkit-box-flex: 1;
171+
flex: 1;
172+
}
173+
174+
.link-preview__image {
175+
width: 225px;
176+
min-width: 220px;
177+
height: 150px;
178+
padding: 0;
179+
vertical-align: middle;
180+
border-left: 1px solid #f2f2f2;
181+
border-radius: 0 3px 3px 0;
182+
background-repeat: no-repeat;
183+
background-position: 50%;
184+
background-size: cover;
185+
-webkit-box-flex: 0;
186+
flex: 0;
187+
}

docs/.vitepress/theme/index.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import DefaultTheme from 'vitepress/theme'
2+
import Profile from '../components/Profile.vue'
3+
import HistoryTags from '../components/HistoryTags.vue'
4+
import './custom.css'
5+
6+
export default {
7+
...DefaultTheme,
8+
enhanceApp({ app }) {
9+
app.component('Profile', Profile)
10+
app.component('HistoryTags', HistoryTags)
11+
}
12+
}

docs/.vuepress/clientAppEnhance.ts

-36
This file was deleted.

0 commit comments

Comments
 (0)