Browse Source

Merge pull request 'fix-1250 修改样式,没有标签时折叠按钮不显示' (#1610) from fix-1250 into V20220314

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/1610
Reviewed-by: zhoupzh <zhoupzh@pcl.ac.cn>
tags/V1.22.3.1^2
zhoupzh 3 years ago
parent
commit
6726cb6153
2 changed files with 29 additions and 17 deletions
  1. +18
    -15
      templates/org/home.tmpl
  2. +11
    -2
      web_src/less/openi.less

+ 18
- 15
templates/org/home.tmpl View File

@@ -1,3 +1,4 @@

{{template "base/head" .}}
<div class="organization profile">
{{/* overflow: auto is the clearfix - this avoids the image going beyond
@@ -26,7 +27,7 @@
<div class="ui sixteen wide computer column">
<div class="ui mobile reversed stackable grid">
<div class="ui sixteen wide tablet sixteen wide computer column margin-top20 pad-botom maxheight" id='key_tag'>
<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>
{{end}}
@@ -38,9 +39,12 @@
</a>
{{end}}
{{end}}
</div>
<div style="width: 100%;margin:5px 5px 10px;">
<a class="text-right" onclick="isUnfold()" id="icon_btn"><i class="ri-arrow-down-s-line" style="display:inline-block;vertical-align:top"></i>&nbsp{{.i18n.Tr "org.unfold"}}</a>
{{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>
&nbsp{{.i18n.Tr "org.unfold"}}
</a>
{{end}}
</div>
</div>
@@ -131,16 +135,15 @@

<script>

function isUnfold(){
var isContain= document.querySelector("#key_tag").classList.contains("maxheight");
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> &nbsp {{.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> &nbsp {{.i18n.Tr "org.unfold"}}"


function isUnfold(){
var isContain= document.querySelector("#key_tag").classList.contains("maxheight");
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> &nbsp {{.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> &nbsp {{.i18n.Tr "org.unfold"}}"
}
}
}
</script>

+ 11
- 2
web_src/less/openi.less View File

@@ -759,8 +759,8 @@ display: block;
background-color: #0366D6 !important;
color:#FFFFFF !important;
}
.margin-top20{
margin-top: 20px;
.margin-bottom20{
margin-bottom: 20px;
}
.maxheight{
max-height: 88px;
@@ -768,4 +768,13 @@ display: block;
}
.pad-botom{
padding-bottom:0px !important;
}
.icon_a{
position: absolute;
right: 0;
bottom: .2em;
background: #FFF;
border: none !important;
color: #0366d6 !important;
box-shadow: -15px 0px 10px #fff;
}

Loading…
Cancel
Save