-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.pug
executable file
·104 lines (84 loc) · 4.76 KB
/
index.pug
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
- var link = 'dom-to-image'
- var title = '簡單的網頁截圖功能 – DOM to Image'
- var description = '簡單的網頁截圖功能 – DOM to Image'
<!DOCTYPE html>
html(lang="zh-Hant")
head
meta(charset="UTF-8")
meta(name="viewport", content="width=device-width, initial-scale=1.0")
meta(http-equiv="X-UA-Compatible", content="ie=edge")
title #{title} - August - Let's Write
link(rel="canonical", href=`https://www.letswrite.tw/${link}/`)
meta(property="og:url", content=`https://letswritetw.github.io/letswrite-${link}/`)
meta(property="fb:app_id", content="911000986339138")
meta(property="og:type", content="website")
meta(property="og:site_name", content="Let's Write")
meta(property="og:title", content=`${title} - Augustus - Let's Write`)
meta(itemprop="name", content=`${title} - Augustus - Let's Write`)
meta(name="description", content=description)
meta(property="og:description", content=description)
meta(itemprop="description", content=description)
meta(itemprop="image", content=`https://letswritetw.github.io/letswrite-${link}/fb.jpg`)
meta(property="og:image", content=`https://letswritetw.github.io/letswrite-${link}/fb.jpg`)
meta(property="og:image:width", content="1200")
meta(property="og:image:height", content="630")
meta(property="og:image:alt", content=title)
link(rel="shortcut icon", href="https://letswritetw.github.io/letswritetw/dist/img/logo_512.png")
//- css
script(src="https://cdn.tailwindcss.com")
link(rel="stylesheet", href="dist/style.min.css", media="screen")
script.
tailwind.config = {
theme: {
extend: {
colors: {
main: '#42A6F7',
mainHover: '#167FFF'
}
}
}
}
// Google Tag Manager
script.
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-PGQ9WQT');
body.bg-neutral-800.text-white
// Google Tag Manager (noscript)
noscript
iframe(src="https://www.googletagmanager.com/ns.html?id=GTM-PGQ9WQT", height="0", width="0", style="display:none;visibility:hidden")
#app.container.mx-auto.p-8
.text-center
h1.mb-4.font-bold.text-4xl=title
p 筆記文:
a(class="text-main hover:text-mainHover", href=`https://www.letswrite.tw/${link}/`) Let's Write
hr.my-8.mx-auto.max-w-3xl.border-t.border-gray-500.border-dashed
// Section 1
.mx-auto.max-w-3xl
section#section1.p-4.bg-neutral-900.border.border-gray-200.rounded-xl
h3.mb-2.font-bold.text-xl Section 1
p Lorem, ipsum dolor sit amet consectetur adipisicing elit. Dolore, repellat voluptatem! Veritatis debitis voluptas perspiciatis expedita, numquam iure totam ratione quo officia sapiente quia similique dolorum, recusandae laudantium nostrum inventore.
.mx-auto.my-4.p-4.max-w-3xl.text-center
a(id="capture1", class="px-6 py-2 leading-none bg-transparent border border-main rounded-xl text-lg text-main hover:bg-main hover:text-white transition-colors", href="") 截圖 Section 1
hr.my-8.mx-auto.max-w-3xl.border-t.border-gray-500.border-dashed
// Section 2
.mx-auto.max-w-3xl
section#section2.p-4.bg-neutral-900.border.border-gray-200.rounded-xl
h3.mb-2.font-bold.text-xl Section 2
p Lorem, ipsum dolor sit amet consectetur adipisicing elit. Dolore, repellat voluptatem! Veritatis debitis voluptas perspiciatis expedita, numquam iure totam ratione quo officia sapiente quia similique dolorum, recusandae laudantium nostrum inventore.
.grid.grid-cols-3.gap-3.my-2
div
img.rounded-xl(src="dist/img1.jpeg", alt="假圖1")
div
img.rounded-xl(src="dist/img2.jpeg", alt="假圖2")
div
img.rounded-xl(src="dist/img3.jpeg", alt="假圖3")
.mx-auto.my-4.p-4.max-w-3xl.text-center
a(id="capture2", class="px-6 py-2 leading-none bg-transparent border border-main rounded-xl text-lg text-main hover:bg-main hover:text-white transition-colors", href="") 截圖 Section 2
hr.my-8.mx-auto.max-w-3xl.border-t.border-gray-500.border-dashed
p.text-center 引用資源:
a(class="text-main hover:text-mainHover", href="https://github.com/tsayen/dom-to-image", rel="noopener noreferrer", target="_blank") DOM to Image
script(src="https://cdnjs.cloudflare.com/ajax/libs/dom-to-image/2.6.0/dom-to-image.min.js")
script(src="dist/main.min.js")