Skip to content

Commit

Permalink
Merge pull request #666 from chengzhongxue/main
Browse files Browse the repository at this point in the history
适配豆瓣插件
  • Loading branch information
chengzhongxue authored Feb 19, 2024
2 parents 52e1e57 + 4da05eb commit 38e7622
Show file tree
Hide file tree
Showing 12 changed files with 746 additions and 13 deletions.
31 changes: 31 additions & 0 deletions settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1593,6 +1593,37 @@ spec:
label: 按钮跳转连链接
placeholder: 请输入跳转 url

- group: douban
label: 豆瓣
formSchema:
- $formkit: attachment
name: backgroundImg
label: 背景图
value: https://liuzhihang.com/upload/moments.png
placeholder: 请输入图片地址
- $formkit: text
name: smallTitle
label: 小标题
value: 电影
- $formkit: text
name: bigTitle
label: 大标题
value: 静下来慢慢感受着,流淌的故事。
- $formkit: text
name: detail
label: 描述
value: 跟 hao 用心体会电影的魅力
- $formkit: text
name: buttonTitle
label: 按钮标题
value: 感受更多
- $formkit: url
name: buttonUrl
validation: url
value: https://www.douban.com/search?cat=1002&q=%E6%9C%80%E6%96%B0%E7%94%B5%E5%BD%B1
label: 按钮跳转连链接
placeholder: 请输入跳转 url

- group: link
label: 友链
formSchema:
Expand Down
219 changes: 213 additions & 6 deletions templates/assets/icon/demo_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,60 @@ <h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" targ
<div class="content unicode" style="display: block;">
<ul class="icon_lists dib-box">

<li class="dib">
<span class="icon haofont">&#xeac6;</span>
<div class="name">图书</div>
<div class="code-name">&amp;#xeac6;</div>
</li>

<li class="dib">
<span class="icon haofont">&#xe65b;</span>
<div class="name">舞台剧</div>
<div class="code-name">&amp;#xe65b;</div>
</li>

<li class="dib">
<span class="icon haofont">&#xe65c;</span>
<div class="name">音乐</div>
<div class="code-name">&amp;#xe65c;</div>
</li>

<li class="dib">
<span class="icon haofont">&#xe8a1;</span>
<div class="name">游戏</div>
<div class="code-name">&amp;#xe8a1;</div>
</li>

<li class="dib">
<span class="icon haofont">&#xe62b;</span>
<div class="name">电影</div>
<div class="code-name">&amp;#xe62b;</div>
</li>

<li class="dib">
<span class="icon haofont">&#xe9a1;</span>
<div class="name">星,星星,星形,半星,实星</div>
<div class="code-name">&amp;#xe9a1;</div>
</li>

<li class="dib">
<span class="icon haofont">&#xe9a2;</span>
<div class="name">星,星星,星形,半星,实星</div>
<div class="code-name">&amp;#xe9a2;</div>
</li>

<li class="dib">
<span class="icon haofont">&#xe9a3;</span>
<div class="name">星,星星,星形,半星</div>
<div class="code-name">&amp;#xe9a3;</div>
</li>

<li class="dib">
<span class="icon haofont">&#xe612;</span>
<div class="name">困困鱼</div>
<div class="code-name">&amp;#xe612;</div>
</li>

<li class="dib">
<span class="icon haofont">&#xe821;</span>
<div class="name">moon-clear-fill</div>
Expand Down Expand Up @@ -1092,12 +1146,12 @@ <h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</co
<pre><code class="language-css"
>@font-face {
font-family: 'haofont';
src: url('iconfont.eot?t=1699854542133'); /* IE9 */
src: url('iconfont.eot?t=1699854542133#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('iconfont.woff2?t=1699854542133') format('woff2'),
url('iconfont.woff?t=1699854542133') format('woff'),
url('iconfont.ttf?t=1699854542133') format('truetype'),
url('iconfont.svg?t=1699854542133#haofont') format('svg');
src: url('iconfont.eot?t=1708243411223'); /* IE9 */
src: url('iconfont.eot?t=1708243411223#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('iconfont.woff2?t=1708243411223') format('woff2'),
url('iconfont.woff?t=1708243411223') format('woff'),
url('iconfont.ttf?t=1708243411223') format('truetype'),
url('iconfont.svg?t=1708243411223#haofont') format('svg');
}
</code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
Expand All @@ -1123,6 +1177,87 @@ <h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面
<div class="content font-class">
<ul class="icon_lists dib-box">

<li class="dib">
<span class="icon haofont hao-icon-tushu"></span>
<div class="name">
图书
</div>
<div class="code-name">.hao-icon-tushu
</div>
</li>

<li class="dib">
<span class="icon haofont hao-icon-screen"></span>
<div class="name">
舞台剧
</div>
<div class="code-name">.hao-icon-screen
</div>
</li>

<li class="dib">
<span class="icon haofont hao-icon-yinle"></span>
<div class="name">
音乐
</div>
<div class="code-name">.hao-icon-yinle
</div>
</li>

<li class="dib">
<span class="icon haofont hao-icon-youxi"></span>
<div class="name">
游戏
</div>
<div class="code-name">.hao-icon-youxi
</div>
</li>

<li class="dib">
<span class="icon haofont hao-icon-dianying"></span>
<div class="name">
电影
</div>
<div class="code-name">.hao-icon-dianying
</div>
</li>

<li class="dib">
<span class="icon haofont hao-icon-star-full"></span>
<div class="name">
星,星星,星形,半星,实星
</div>
<div class="code-name">.hao-icon-star-full
</div>
</li>

<li class="dib">
<span class="icon haofont hao-icon-star"></span>
<div class="name">
星,星星,星形,半星,实星
</div>
<div class="code-name">.hao-icon-star
</div>
</li>

<li class="dib">
<span class="icon haofont hao-icon-star-half"></span>
<div class="name">
星,星星,星形,半星
</div>
<div class="code-name">.hao-icon-star-half
</div>
</li>

<li class="dib">
<span class="icon haofont hao-icon-baibanwenjian-daochu"></span>
<div class="name">
困困鱼
</div>
<div class="code-name">.hao-icon-baibanwenjian-daochu
</div>
</li>

<li class="dib">
<span class="icon haofont hao-icon-moon-clear-fill"></span>
<div class="name">
Expand Down Expand Up @@ -2680,6 +2815,78 @@ <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h
<div class="content symbol">
<ul class="icon_lists dib-box">

<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#hao-icon-tushu"></use>
</svg>
<div class="name">图书</div>
<div class="code-name">#hao-icon-tushu</div>
</li>

<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#hao-icon-screen"></use>
</svg>
<div class="name">舞台剧</div>
<div class="code-name">#hao-icon-screen</div>
</li>

<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#hao-icon-yinle"></use>
</svg>
<div class="name">音乐</div>
<div class="code-name">#hao-icon-yinle</div>
</li>

<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#hao-icon-youxi"></use>
</svg>
<div class="name">游戏</div>
<div class="code-name">#hao-icon-youxi</div>
</li>

<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#hao-icon-dianying"></use>
</svg>
<div class="name">电影</div>
<div class="code-name">#hao-icon-dianying</div>
</li>

<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#hao-icon-star-full"></use>
</svg>
<div class="name">星,星星,星形,半星,实星</div>
<div class="code-name">#hao-icon-star-full</div>
</li>

<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#hao-icon-star"></use>
</svg>
<div class="name">星,星星,星形,半星,实星</div>
<div class="code-name">#hao-icon-star</div>
</li>

<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#hao-icon-star-half"></use>
</svg>
<div class="name">星,星星,星形,半星</div>
<div class="code-name">#hao-icon-star-half</div>
</li>

<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#hao-icon-baibanwenjian-daochu"></use>
</svg>
<div class="name">困困鱼</div>
<div class="code-name">#hao-icon-baibanwenjian-daochu</div>
</li>

<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#hao-icon-moon-clear-fill"></use>
Expand Down
48 changes: 42 additions & 6 deletions templates/assets/icon/iconfont.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@font-face {
font-family: "haofont"; /* Project id 4159149 */
src: url('iconfont.eot?t=1699854542133'); /* IE9 */
src: url('iconfont.eot?t=1699854542133#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('iconfont.woff2?t=1699854542133') format('woff2'),
url('iconfont.woff?t=1699854542133') format('woff'),
url('iconfont.ttf?t=1699854542133') format('truetype'),
url('iconfont.svg?t=1699854542133#haofont') format('svg');
src: url('iconfont.eot?t=1708243411223'); /* IE9 */
src: url('iconfont.eot?t=1708243411223#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('iconfont.woff2?t=1708243411223') format('woff2'),
url('iconfont.woff?t=1708243411223') format('woff'),
url('iconfont.ttf?t=1708243411223') format('truetype'),
url('iconfont.svg?t=1708243411223#haofont') format('svg');
}

.haofont {
Expand All @@ -16,6 +16,42 @@
-moz-osx-font-smoothing: grayscale;
}

.hao-icon-tushu:before {
content: "\eac6";
}

.hao-icon-screen:before {
content: "\e65b";
}

.hao-icon-yinle:before {
content: "\e65c";
}

.hao-icon-youxi:before {
content: "\e8a1";
}

.hao-icon-dianying:before {
content: "\e62b";
}

.hao-icon-star-full:before {
content: "\e9a1";
}

.hao-icon-star:before {
content: "\e9a2";
}

.hao-icon-star-half:before {
content: "\e9a3";
}

.hao-icon-baibanwenjian-daochu:before {
content: "\e612";
}

.hao-icon-moon-clear-fill:before {
content: "\e821";
}
Expand Down
Binary file modified templates/assets/icon/iconfont.eot
Binary file not shown.
2 changes: 1 addition & 1 deletion templates/assets/icon/iconfont.js

Large diffs are not rendered by default.

Loading

0 comments on commit 38e7622

Please sign in to comment.