[i=s] 本帖最后由 千梦 于 2018-10-15 17:18 编辑 <br /><br /><div id=main_20181015230001></div> <!--这后面的数值为当前的年月日时分秒,秒数随意--> <script> (function () { var root = document.getElementById("main_20181015230001") //生成系统 var TagGroup = function (comVar, tags, htmlTag, className, className2, htmlTag2="a") { this.comVar = comVar this.tags = tags this.htmlTag = htmlTag this.htmlTag2 = htmlTag2 this.className = className this.className2 = className2 } TagGroup.prototype.create = function(){ var _this = this return { view: function () { return _this.tags.map(function (value, index) { return m(_this.htmlTag, { class: _this.comVar == index ? _this.className + ' ' + _this.className2 : _this.className, onclick: function () { _this.comVar = index }, }, m(_this.htmlTag2,value)) }) } } } TagGroup.prototype.page = function(contents,tagName=""){ var _this = this return { view:function(){ return _this.tags.map(function(value,index){ return m(tagName,{style:_this.comVar == index ? "" : "display:none"},contents[index]) }) } } } var 列表 = new TagGroup("",["欢迎词与寄语","社区地图","最新活动"],"li","li","gn-is-active","a[style=text-decoration:none]") var 列表内容 = [ m("",m.trust(`欢迎小可爱加入技术宅社区~这是迎新大队可爱的千梦君有任何问题都可以艾特或者私信我[attach]491270[/attach]`)), m("",m.trust(`技术宅社区违规处理办法【2018版 试行】【导航】社区地图 - 版块一览表「迎新大队」登记审核办公室◇◆◇◆这里是可以刷任务刷回复的地方◆◇◆◇升级技术宅社区懒人用户租[attach]491268[/attach]◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣`)), m("",m.trust(`<①)>⑧<国庆♪活动总贴◀◀◀◀◀◀◀◀◀◀◀◀◀◀◀◀◀◀◀▶▶▶▶▶▶▶▶▶▶▶▶▶▶▶▶▶▶▶◀◀◀◀◀◀◀◀◀◀◀◀◀◀◀◀◀◀◀▶▶▶▶▶▶▶▶▶▶▶▶▶▶▶▶▶▶▶`)), ] var home = function () { return { view: function () { return m("", [ m("section.gn-hero.gn-is-danger", [ m(".gn-hero-body", [ m(".gn-has-text-centered", [ m("h1[style=font-size:28px].gn-title", "欢迎加入技术宅社区♪(・ω・)ノ"), m("h2.gn-subtitle", "迎新大队:@千梦") ]) ]), m(".gn-hero-footer", [ m("nav.gn-tabs.gn-is-boxed.gn-is-fullwidth", [ m("", m("ul[style=margin:0;padding:0]", [ /* m("li.gn-is-active", m("a[style=text-decoration:none]", "欢迎词与寄语")), m("li", m("a[style=text-decoration:none]", "最新活动")), m("li", m("a[style=text-decoration:none]", "社区地图")), m("li", m("a[style=text-decoration:none]", "社区介绍")), */ m(列表.create()) ])) ]) ]) ]), m("gn-section",[ m(列表.page(列表内容)) ]) ]) } } } m.mount(root, home) })() </script>
[i=s] 本帖最后由 千梦 于 2018-9-19 11:11 编辑 <br /><br /><div id=main_20180907230001></div> <!--这后面的数值为当前的年月日时分秒,秒数随意--> <script> (function () { var root = document.getElementById("main_20180907230001") //生成系统 var TagGroup = function (comVar, tags, htmlTag, className, className2, htmlTag2="a") { this.comVar = comVar this.tags = tags this.htmlTag = htmlTag this.htmlTag2 = htmlTag2 this.className = className this.className2 = className2 } TagGroup.prototype.create = function(){ var _this = this return { view: function () { return _this.tags.map(function (value, index) { return m(_this.htmlTag, { class: _this.comVar == index ? _this.className + ' ' + _this.className2 : _this.className, onclick: function () { _this.comVar = index }, }, m(_this.htmlTag2,value)) }) } } } TagGroup.prototype.page = function(contents,tagName=""){ var _this = this return { view:function(){ return _this.tags.map(function(value,index){ return m(tagName,{style:_this.comVar == index ? "" : "display:none"},contents[index]) }) } } } var 列表 = new TagGroup("",["欢迎词与寄语","社区地图","最新活动"],"li","li","gn-is-active","a[style=text-decoration:none]") var 列表内容 = [ m("",m.trust(`不知道说什么还没想好`)), m("",m.trust(`不知道说什么还没想好`)), m("",m.trust(`不知道说什么还没想好`)), ] var home = function () { return { view: function () { return m("", [ m("section.gn-hero.gn-is-danger", [ m(".gn-hero-body", [ m(".gn-has-text-centered", [ m("h1[style=font-size:28px].gn-title", "欢迎加入技术宅社区♪(・ω・)ノ"), m("h2.gn-subtitle", "迎新大队:@千梦") ]) ]), m(".gn-hero-footer", [ m("nav.gn-tabs.gn-is-boxed.gn-is-fullwidth", [ m("", m("ul[style=margin:0;padding:0]", [ /* m("li.gn-is-active", m("a[style=text-decoration:none]", "欢迎词与寄语")), m("li", m("a[style=text-decoration:none]", "最新活动")), m("li", m("a[style=text-decoration:none]", "社区地图")), m("li", m("a[style=text-decoration:none]", "社区介绍")), */ m(列表.create()) ])) ]) ]) ]), m("gn-section",[ m(列表.page(列表内容)) ]) ]) } } } m.mount(root, home) })() </script>
[i=s] 本帖最后由 千梦 于 2018-2-1 16:16 编辑 收藏的干货 积分策略调整说明 https://www.gn00.com/forum.php?m ... 443&fromuid=1569243 (出处: 技术宅社区) 【How To 上手跳音】看图贴音乐ver.2【1.27更新】 https://www.gn00.com/forum.php?m ... 672&fromuid=1569243 (出处: 技术宅社区)