返回 oh-my-ppt
preview.html
1 <!DOCTYPE html>
2 <html lang="zh-CN">
3 <head>
4 <meta charset="UTF-8" />
5 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6 <title>Catppuccin 拿铁 · catppuccin-latte</title>
7 <style>
8 * { box-sizing: border-box; margin: 0; padding: 0; }
9 html, body {
10 width: 100%; height: 100%; overflow: hidden;
11 background: #0f1117;
12 display: flex; align-items: center; justify-content: center;
13 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
14 }
15 .slide {
16 width: min(100vw, calc(100vh * 16 / 9));
17 aspect-ratio: 16 / 9;
18 background: #eff1f5;
19 position: relative;
20 overflow: hidden;
21 }
22 .bg-circle {
23 position: absolute;
24 border-radius: 50%;
25 opacity: 0.12;
26 }
27 .bg-c1 {
28 width: 40%; height: 70%;
29 background: #1e66f5;
30 right: -10%; top: -15%;
31 border-radius: 40% 60% 55% 45%;
32 }
33 .bg-c2 {
34 width: 30%; height: 50%;
35 background: #179299;
36 left: -5%; bottom: -10%;
37 border-radius: 55% 45% 50% 50%;
38 }
39 .header {
40 position: absolute;
41 top: 7%; left: 7%; right: 7%;
42 display: flex;
43 justify-content: space-between;
44 align-items: flex-start;
45 }
46 .category {
47 font-size: clamp(7px, 0.75vw, 10px);
48 color: #5c5f77;
49 letter-spacing: 0.2em;
50 text-transform: uppercase;
51 font-weight: 600;
52 background: rgba(255,255,255,0.6);
53 padding: 4px 12px;
54 border-radius: 20px;
55 }
56 .code-deco {
57 background: rgba(255,255,255,0.7);
58 border-radius: 10px;
59 padding: 8px 14px;
60 font-family: "SF Mono", "Consolas", monospace;
61 font-size: clamp(7px, 0.75vw, 10px);
62 color: #1e66f5;
63 line-height: 1.6;
64 }
65 .code-deco .kw { color: #179299; }
66 .code-deco .str { color: #4c4f69; }
67 .center-content {
68 position: absolute;
69 top: 50%; left: 7%;
70 transform: translateY(-50%);
71 }
72 h1 {
73 font-size: clamp(30px, 5vw, 60px);
74 font-weight: 700;
75 color: #4c4f69;
76 line-height: 1.1;
77 }
78 .en-name {
79 font-size: clamp(10px, 1.2vw, 15px);
80 color: #5c5f77;
81 font-weight: 400;
82 margin-top: 2%;
83 }
84 .desc {
85 font-size: clamp(9px, 1vw, 13px);
86 color: #5c5f77;
87 line-height: 1.7;
88 margin-top: 4%;
89 max-width: 55%;
90 }
91 .tags {
92 display: flex; gap: 8px; margin-top: 5%;
93 flex-wrap: wrap;
94 }
95 .tags span {
96 font-size: clamp(7px, 0.7vw, 9px);
97 color: #4c4f69;
98 background: rgba(255,255,255,0.6);
99 padding: 4px 12px;
100 border-radius: 20px;
101 font-weight: 500;
102 }
103 .palette {
104 position: absolute;
105 bottom: 7%; left: 7%;
106 display: flex; gap: 8px; align-items: center;
107 }
108 .palette span {
109 width: clamp(12px, 1.4vw, 20px);
110 height: clamp(12px, 1.4vw, 20px);
111 border-radius: 8px;
112 background: var(--c);
113 box-shadow: 0 2px 8px rgba(76,79,105,0.15);
114 }
115 .footer-label {
116 position: absolute;
117 bottom: 7%; right: 7%;
118 font-size: clamp(7px, 0.7vw, 9px);
119 color: #5c5f77;
120 opacity: 0.5;
121 letter-spacing: 0.1em;
122 }
123 .card-preview {
124 position: absolute;
125 right: 7%;
126 top: 50%;
127 transform: translateY(-50%);
128 width: 28%;
129 background: rgba(255,255,255,0.75);
130 border-radius: 16px;
131 padding: 8%;
132 box-shadow: 0 8px 32px rgba(76,79,105,0.1);
133 }
134 .card-bar {
135 height: 4px;
136 border-radius: 2px;
137 margin-bottom: 10px;
138 }
139 .card-bar.b1 { background: #1e66f5; width: 70%; }
140 .card-bar.b2 { background: #179299; width: 50%; }
141 .card-bar.b3 { background: #5c5f77; width: 85%; opacity: 0.3; }
142 .card-bar.b4 { background: #1e66f5; width: 40%; opacity: 0.2; }
143 .card-dots {
144 display: flex; gap: 5px; margin-bottom: 10px;
145 }
146 .card-dots span {
147 width: 8px; height: 8px; border-radius: 50%;
148 background: var(--c);
149 }
150 @media (max-aspect-ratio: 16/9) {
151 .slide { width: min(100vw, calc(100vh * 16 / 9)); height: auto; }
152 }
153 @media (min-aspect-ratio: 16/9) {
154 .slide { height: min(100vh, calc(100vw * 9 / 16)); width: auto; }
155 }
156 </style>
157 </head>
158 <body>
159 <main class="slide" aria-label="Catppuccin 拿铁 style preview">
160 <div class="bg-circle bg-c1"></div>
161 <div class="bg-circle bg-c2"></div>
162 <div class="header">
163 <div class="category">浅色 · 沉静</div>
164 <div class="code-deco">
165 <span class="kw">const</span> theme = <span class="str">'latte'</span><br />
166 <span class="kw">import</span> { <span class="str">warmth</span> }
167 </div>
168 </div>
169 <div class="center-content">
170 <h1>Catppuccin 拿铁</h1>
171 <div class="en-name">拿铁浅底映粉彩,开发者的午后该有这样的温柔</div>
172 <p class="desc">温暖柔和的开发者主题,适合长时间的技术分享与团队交流</p>
173 <div class="tags">
174 <span>技术分享</span>
175 <span>开源项目</span>
176 <span>团队 Review</span>
177 </div>
178 </div>
179 <div class="card-preview">
180 <div class="card-dots">
181 <span style="--c:#1e66f5"></span>
182 <span style="--c:#179299"></span>
183 <span style="--c:#4c4f69"></span>
184 </div>
185 <div class="card-bar b1"></div>
186 <div class="card-bar b2"></div>
187 <div class="card-bar b3"></div>
188 <div class="card-bar b4"></div>
189 </div>
190 <div class="palette">
191 <span style="--c:#4c4f69"></span>
192 <span style="--c:#5c5f77"></span>
193 <span style="--c:#1e66f5"></span>
194 <span style="--c:#179299"></span>
195 <span style="--c:#eff1f5; border: 1px solid #ccd0da"></span>
196 </div>
197 <div class="footer-label">catppuccin-latte</div>
198 </main>
199 </body>
200 </html>
200 lines HTML