1 Star 0 Fork 7

keyzf / svgtofont

forked from 小弟调调 / svgtofont 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
index.ejs 4.77 KB
一键复制 编辑 原始数据 按行查看 历史
小弟调调 提交于 2018-09-18 02:05 . Support SVG Symbol file.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title><%=_title%></title>
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<%if (meta && Object.keys(meta).length > 0) { Object.keys(meta).forEach((metaName) => { %>
<meta name="<%=metaName%>" content="<%=meta[metaName]%>">
<%})}%>
<%if(favicon) {%>
<link rel="icon" type="image/x-icon" href="<%-favicon%>">
<%}%>
<%if(_type === 'font-class' && _link) {%>
<link rel="stylesheet" href="<%=_link%>" />
<%}%>
<style>
*{margin: 0;padding: 0;list-style: none;}
body { color: #696969; font: 12px/1.5 tahoma, arial, \5b8b\4f53, sans-serif; }
a { color: #333; text-decoration: underline; }
a:hover { color: rgb(9, 73, 209); }
.header { color: #333; text-align: center; padding: 80px 0 60px 0; min-height: 153px; font-size: 14px; }
.header .logo svg { height: 120px; width: 120px; }
.header h1 { font-size: 42px; padding: 26px 0 10px 0; }
.header sup {font-size: 14px; margin: 8px 0 0 8px; position: absolute; color: #7b7b7b; }
.info {
color: #999;
font-weight: normal;
max-width: 346px;
margin: 0 auto;
padding: 20px 0;
font-size: 14px;
}
.icons { max-width: 1190px; margin: 0 auto; }
.icons ul { text-align: center; }
.icons ul li {
vertical-align: top;
width: 120px;
display: inline-block;
text-align: center;
background-color: rgba(0,0,0,.02);
border-radius: 3px;
padding: 29px 0 10px 0;
margin-right: 10px;
margin-top: 10px;
transition: all 0.6s ease;
}
.icons ul li:hover { background-color: rgba(0,0,0,.06); }
.icons ul li:hover span { color: #3c75e4; opacity: 1; }
.icons ul li .unicode { color: #8c8c8c; opacity: 0.3; }
.icons ul li h4 {
font-weight: normal;
padding: 10px 0 5px 0;
display: block;
color: #8c8c8c;
font-size: 14px;
line-height: 12px;
opacity: 0.8;
}
.icons ul li:hover h4 { opacity: 1; }
.icons ul li svg { width: 24px; height: 24px; }
.icons ul li:hover { color: #3c75e4; }
.footer { text-align: center; padding: 10px 0 90px 0; }
.footer a { text-align: center; padding: 10px 0 90px 0; color: #696969;}
.footer a:hover { color: #0949d1; }
.links { text-align: center; padding: 50px 0 0 0; font-size: 14px; }
<%if(_type === 'font-class') {%>
.icons ul li.class-icon { font-size: 21px; line-height: 21px; padding-bottom: 20px; }
.icons ul li.class-icon p{ font-size: 12px; }
.icons ul li.class-icon [class^="<%=prefix%>-"]{ font-size: 26px; }
<%}%>
<%if(_type === 'unicode') {%>
.icons ul .unicode-icon span { display: block; }
.icons ul .unicode-icon h4 { font-size: 12px; }
@font-face {
font-family: "<%-_fontname%>";
src: url("<%-_fontname%>.eot");
/* IE9*/
src: url("<%-_fontname%>.eot#iefix") format("embedded-opentype"),
/* IE6-IE8 */
url("<%-_fontname%>.woff2?<%-(new Date()).getTime()%>") format("woff2"),
url("<%-_fontname%>.woff?<%-(new Date()).getTime()%>") format("woff"),
/* chrome, firefox */
url("<%-_fontname%>.ttf?<%-(new Date()).getTime()%>") format("truetype"),
/* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url("<%-_fontname%>.svg#<%-_fontname%>?<%-(new Date()).getTime()%>") format("svg");
/* iOS 4.1- */
}
.iconfont {
font-family: "<%-_fontname%>" !important;
font-size: 26px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
<%}%>
<%if(_type === 'symbol') {%>
.icons ul li.symbol {padding: 28px 10px 16px 10px; width: 100px;}
.icons ul li.symbol svg {width: 34px; height: 34px;}
.icons ul li.symbol h4 {font-size: 12px;}
<%}%>
</style>
</head>
<body>
<div class="header">
<%if(_logo) {%>
<div class="logo">
<a href="./"><%-_logo%></a>
</div>
<%}%>
<h1><%=_title%><sup><%-version%></sup></h1>
<div class="info">
<%-description || (meta && meta.description)%>
</div>
<p>
<%if(links && links.length > 0) { links.forEach((linkItem, index) => {%>
<a href="<%-linkItem.url%>"><%-linkItem.title%></a><%if(links.length-1 !== index){%> · <%}%>
<%})}%>
</p>
</div>
<div class="icons">
<ul>
<%-_IconHtml%>
</ul>
</div>
<p class="links">
<%if(links && links.length > 0) { links.forEach((linkItem, index) => {%>
<a href="<%-linkItem.url%>"><%-linkItem.title%></a><%if(links.length-1 !== index){%> · <%}%>
<%})}%>
</p>
<div class="footer">
<%-footerInfo%>
<div><a target="_blank" href="https://github.com/jaywcjlove/svgtofont">Created By svgtofont</a></div>
</div>
</body>
</html>
JavaScript
1
https://gitee.com/keyzf/svgtofont.git
git@gitee.com:keyzf/svgtofont.git
keyzf
svgtofont
svgtofont
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891