-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Layout.astro
201 lines (180 loc) · 5.04 KB
/
Layout.astro
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
---
export interface Props {
title: string;
}
const { title } = Astro.props;
import "@fontsource/pt-serif";
import { seo, author, book } from "../config.json";
---
<!doctype html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/png" href="/favicon.png" />
<link rel="canonical" href={seo.canonical} />
<meta name="generator" content={Astro.generator} />
<meta name="robots" content="index,follow" />
<meta name="googlebot" content="index,follow" />
<meta name="description" content={seo.description} />
<meta property="og:url" content={seo.canonical} />
<meta property="og:title" content={seo.title} />
<meta property="og:description" content={seo.description} />
<meta property="og:type" content="website" />
<meta property="og:image" content={seo.canonical + seo.image} />
<meta property="og:image:width" content="800" />
<meta property="og:image:height" content="600" />
<meta property="og:site_name" content={seo.title} />
<meta property="og:locale" content={seo.locale} />
<meta property="og:type" content="book" />
<meta property="book:author" content={author.name} />
<meta property="book:isbn" content={book.isbn} />
<meta property="book:release_date" content={book.releaseDate} />
<meta property="og:type" content="product" />
<meta property="product:price:amount" content={book.price} />
<meta property="product:price:currency" content={book.currency} />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content={seo.title} />
<meta name="twitter:description" content={seo.description} />
<title>{seo.title}</title>
<!-- Google tag (gtag.js) -->
<script
type="text/partytown"
async
src="https://www.googletagmanager.com/gtag/js?id=G-9FXFDTDRH4"></script>
<script type="text/partytown">
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "G-9FXFDTDRH4");
</script>
</head>
<body>
<slot />
<style lang="scss" is:global>
$book-theme-color: #f59e0b;
::selection {
background: $book-theme-color;
color: black;
}
.love {
display: inline-block;
position: relative;
top: 0.1em;
transform: scale(0.9);
animation: love 0.5s infinite linear alternate-reverse;
}
@keyframes love {
to {
transform: scale(1.1);
}
}
.book-container {
display: flex;
align-items: center;
justify-content: center;
perspective: 600px;
margin: 0 auto;
}
@keyframes initAnimation {
0% {
transform: rotateY(0deg);
}
100% {
transform: rotateY(-30deg);
}
}
.book {
width: 300px;
height: 480px;
position: relative;
transform-style: preserve-3d;
transform: rotateY(-30deg);
transition: 1s ease;
animation: 1s ease 0s 1 initAnimation;
}
.book:hover {
transform: rotateY(0deg);
}
.book > :first-child {
position: absolute;
top: 0;
left: 0;
background-color: red;
width: 300px;
height: 480px;
transform: translateZ(25px);
background-color: #01060f;
border-radius: 0 2px 2px 0;
box-shadow: 5px 5px 20px #666;
}
.book::before {
position: absolute;
content: " ";
background-color: blue;
left: 0;
top: 3px;
width: 48px;
height: 476px;
transform: translateX(272px) rotateY(90deg);
background: linear-gradient(
90deg,
#fff 0%,
#f9f9f9 5%,
#fff 10%,
#f9f9f9 15%,
#fff 20%,
#f9f9f9 25%,
#fff 30%,
#f9f9f9 35%,
#fff 40%,
#f9f9f9 45%,
#fff 50%,
#f9f9f9 55%,
#fff 60%,
#f9f9f9 65%,
#fff 70%,
#f9f9f9 75%,
#fff 80%,
#f9f9f9 85%,
#fff 90%,
#f9f9f9 95%,
#fff 100%
);
}
.book::after {
position: absolute;
top: 0;
left: 0;
content: " ";
width: 300px;
height: 480px;
transform: translateZ(-25px);
background-color: #01060f;
border-radius: 0 2px 2px 0;
box-shadow: -10px 0 50px 10px #666;
}
.ribbon {
position: absolute;
top: 0;
right: 0;
width: 150px;
height: 30px;
margin-right: -40px;
margin-top: 20px;
padding-top: 5px;
transform: rotate(45deg); /* Standard syntax */
}
.underline {
background: linear-gradient(
to top,
$book-theme-color 35%,
transparent 35%
);
text-decoration: none;
}
</style>
</body>
</html>