|
|
|
@@ -29,16 +29,17 @@ |
|
|
|
<div class="ui mobile reversed stackable grid"> |
|
|
|
<div class="ui sixteen wide tablet sixteen wide computer column margin-bottom20 pad-botom maxheight" id='key_tag'> |
|
|
|
{{if .OrgTopics}} |
|
|
|
<a class="{{if eq $.Keyword "" }} tag_bg {{end}} tag_key ui small tag_lable topic omit" href="{{$.Link}}?" >{{$.i18n.Tr "org.all_org_topics"}}</span></a> |
|
|
|
<a class="{{if eq $.Keyword "" }} tag_bg {{end}} tag_key ui small tag_lable topic omit" href="{{$.Link}}?" onclick="iscontinueStatus()" id="tag_a">{{$.i18n.Tr "org.all_org_topics"}}</a> |
|
|
|
{{end}} |
|
|
|
|
|
|
|
{{range .OrgTopics}} |
|
|
|
{{if ne .Name ""}} |
|
|
|
<a class="{{if eq $.Keyword .Name }} tag_bg {{end}} tag_key ui small tag_lable topic omit" href="{{$.Link}}?q={{.Name}}" > |
|
|
|
<a class="{{if eq $.Keyword .Name }} tag_bg {{end}} tag_key ui small tag_lable topic omit" href="{{$.Link}}?q={{.Name}}" onclick="iscontinueStatus()"> |
|
|
|
{{.Name}} |
|
|
|
</a> |
|
|
|
{{end}} |
|
|
|
{{end}} |
|
|
|
|
|
|
|
{{if .OrgTopics}} |
|
|
|
<a class=" tag_key ui small tag_lable topic omit icon_a" onclick="isUnfold()" id="icon_btn" > |
|
|
|
<i class="ri-arrow-down-s-line" style="display:inline-block;vertical-align:top"></i> |
|
|
|
@@ -136,14 +137,38 @@ |
|
|
|
<script> |
|
|
|
|
|
|
|
function isUnfold(){ |
|
|
|
// var isTrue = document.getElementById("tag_a").getAttribute("data-tag") |
|
|
|
var isContain= document.querySelector("#key_tag").classList.contains("maxheight"); |
|
|
|
if(isContain){ |
|
|
|
if(isContain){ |
|
|
|
document.querySelector("#key_tag").classList.remove("maxheight"); |
|
|
|
document.getElementById("icon_btn").innerHTML="<i class=\"ri-arrow-up-s-line\" style=\"display:inline-block;vertical-align:top\"></i>   {{.i18n.Tr "org.fold"}}" |
|
|
|
localStorage.setItem("isunfold",true) |
|
|
|
}else{ |
|
|
|
document.querySelector("#key_tag").classList.add("maxheight"); |
|
|
|
document.getElementById("icon_btn").innerHTML="<i class=\"ri-arrow-down-s-line\" style=\"display:inline-block;vertical-align:top\"></i>   {{.i18n.Tr "org.unfold"}}" |
|
|
|
localStorage.setItem("isunfold",false) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
function isShowIconBtn(){ |
|
|
|
var key_height = document.getElementById("key_tag").offsetHeight |
|
|
|
var parent = document.getElementById("key_tag") |
|
|
|
var child = document.getElementById("icon_btn") |
|
|
|
if (key_height < 88){ |
|
|
|
parent.removeChild(child) |
|
|
|
} |
|
|
|
} |
|
|
|
function iscontinueStatus(){ |
|
|
|
var isunfold = localStorage.getItem("isunfold") |
|
|
|
if (isunfold == "true" || isunfold == true){ |
|
|
|
document.querySelector("#key_tag").classList.remove("maxheight"); |
|
|
|
document.getElementById("icon_btn").innerHTML="<i class=\"ri-arrow-up-s-line\" style=\"display:inline-block;vertical-align:top\"></i>   {{.i18n.Tr "org.fold"}}" |
|
|
|
}else{ |
|
|
|
document.querySelector("#key_tag").classList.add("maxheight"); |
|
|
|
document.getElementById("icon_btn").innerHTML="<i class=\"ri-arrow-down-s-line\" style=\"display:inline-block;vertical-align:top\"></i>   {{.i18n.Tr "org.unfold"}}" |
|
|
|
} |
|
|
|
} |
|
|
|
isShowIconBtn() |
|
|
|
iscontinueStatus() |
|
|
|
|
|
|
|
</script> |