Skip to content

Instantly share code, notes, and snippets.

@Mantyke
Last active June 25, 2022 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mantyke/13d02caace12d5911bf6c1ec3bc39722 to your computer and use it in GitHub Desktop.
Save Mantyke/13d02caace12d5911bf6c1ec3bc39722 to your computer and use it in GitHub Desktop.
by Mengru 修改部分代码自用
{{ define "main" }}
<style>
#test {
width: auto;
height: auto;
overflow: hidden !important;
}
#my-tags mark {
position: initial!important;
}
</style>
<div id="test"></div>
<script src="/js/tags-wall.js"></script>
<script>
Tags({
style: {
fn: Style1,
title: 'id',
animation: 0,
scale: 1,
randomScoreIfNoSetting: 1 // 如果是1,则如果未设置标签大小那么随机设置一个大小;否则使用默认大小5
},
text: `
FINAL FANTASY XIV/9/是玩家/https:&#47;&#47;ff14.link/
倾听感受思考/&#47;/FF14
钓鱼打牌赛鸟/&#47;/FF14
喜欢您来/10/想对您说
`,
rootDOM: document.getElementById('test')
})
/** 使用说明
* 1. 将 index.js 引入自己的页面
* 2. 在引入上述脚本的下方插入代码:
Tags({
style: {
fn: Style1,
title: '你的名字',
animation: 1 // 如果是1,则开启动画,否则不开启动画
scale: 1 // 放缩比例,即可调节标签和背景字的整体大小
},
text: `
<标签名>/<分数(0-10,决定标签大小)>/<标签类型>/<链接(点击标签会跳转到这个链接)>
...
`, // 可以写在单独的文件中,如果写在的文件中,需要像上方那样使用fetch请求文件
rootDOM: document.getElementById('目标载入dom的id')
})
*/
</script>
</script>
{{ end }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment