Skip to content

Commit 1e67b98

Browse files
authored
Merge pull request #330 from db-ui/fix-generation-index-html
fix: issue with generated icon preview
2 parents b5f0eb2 + dd56cef commit 1e67b98

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

src/generate-icon-fonts/svg-to-font.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const svgToFont = async (
4141
},
4242
website: {
4343
index: "font-class",
44-
template: path.resolve(generateIconFontsDir, "templates/template.ejs"),
44+
template: path.resolve(generateIconFontsDir, "templates/index.njk"),
4545
links: [{ title: "", url: "" }],
4646
},
4747
styleTemplates: path.resolve(generateIconFontsDir, "styles"),
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>{{ _title }}</title>
6+
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
7+
<link rel="stylesheet" href="index.css" />
8+
<style>
9+
*{margin: 0;padding: 0;list-style: none;}
10+
body { color: #242629; font: 12px/1.5 tahoma, arial, \5b8b\4f53, sans-serif; }
11+
12+
.icons { padding: 16px; margin: 0 auto; }
13+
.icons ul { text-align: center; display: grid; gap: 16px; grid-template-columns: repeat(8, 1fr); }
14+
.icons ul li {
15+
text-align: center;
16+
border-radius: 4px;
17+
border: 1px solid #242629;
18+
}
19+
20+
.icons ul li.class-icon { font-size: 24px; line-height: 24px; padding: 16px; }
21+
.icons ul li.class-icon p{ font-size: 12px; line-height: 20px;
22+
overflow-wrap: anywhere; }
23+
</style>
24+
</head>
25+
26+
<body>
27+
28+
<div class="icons">
29+
<ul>
30+
{{ _IconHtml|safe }}
31+
</ul>
32+
</div>
33+
</body>
34+
35+
</html>

0 commit comments

Comments
 (0)