@@ -195,39 +195,57 @@ var _hmt = _hmt || []; | |||
<noscript>{{.i18n.Tr "enable_javascript"}}</noscript> | |||
{{template "custom/body_inner_pre" .}} | |||
{{if not .PageIsInstall}} | |||
<div class="ui top secondary stackable main menu following bar dark"> | |||
{{template "base/head_navbar" .}} | |||
</div><!-- end bar --> | |||
{{.title}} | |||
<!-- {{if .notice}} | |||
<div class="notic_content" id ="notic_content" > | |||
【更新公告】接口登记反馈 | |||
<i class="icon icon-octicon x_icon" onclick="closeNoice()">{{svg "octicon-x" 16}}</i> | |||
</div> | |||
{{end}} --> | |||
<div class="notic_content" id ="notic_content" > | |||
<a href={{.notice.Link}} class="a_width"> | |||
<marquee behavior="scroll" direction="left"> | |||
{{.notice.Title}} | |||
</marquee> | |||
</a> | |||
<i class="icon icon-octicon x_icon" onclick="closeNoice()">{{svg "octicon-x" 16}}</i> | |||
</div> | |||
{{end}} | |||
{{/* | |||
</div> | |||
</body> | |||
</html> | |||
*/}} | |||
<style> | |||
.notic_content{ | |||
height: 50px; | |||
vertical-align: middle; | |||
text-align: center; | |||
line-height: 50px; | |||
background: #E5F4F4 | |||
} | |||
.x_icon{ | |||
float: right; | |||
margin-right: 15px !important; | |||
} | |||
</style> | |||
<script> | |||
function closeNoice(){ | |||
$("#notic_content").css('display','none'); | |||
document.getElementById("notic_content").style.display='none' | |||
localStorage.setItem("isCloseNotice",true) | |||
} | |||
function isShowNotice(){ | |||
var current_notice = localStorage.getItem("notice") | |||
if (current_notice != "{{.notice.CommitId}}"){ | |||
localStorage.setItem('notice',"{{.notice.CommitId}}"); | |||
isNewNotice=true; | |||
localStorage.setItem("isCloseNotice",false) | |||
}else{ | |||
isNewNotice=false; | |||
} | |||
if ("{{.notice.Visible}}"){ | |||
if(isNewNotice){ | |||
document.getElementById("notic_content").style.display='block' | |||
}else{ | |||
isCloseNotice = localStorage.getItem("isCloseNotice") | |||
if (JSON.parse(isCloseNotice)){ | |||
document.getElementById("notic_content").style.display='none' | |||
}else{ | |||
document.getElementById("notic_content").style.display='block' | |||
} | |||
} | |||
}else{ | |||
document.getElementById("notic_content").style.display='none' | |||
} | |||
} | |||
isShowNotice(); | |||
</script> |
@@ -200,9 +200,52 @@ var _hmt = _hmt || []; | |||
<div class="ui top secondary stackable main menu following bar dark"> | |||
{{template "base/head_navbar_fluid" .}} | |||
</div><!-- end bar --> | |||
<div class="notic_content" id ="notic_content" > | |||
<a href={{.notice.Link}} class="a_width"> | |||
<marquee behavior="scroll" direction="left"> | |||
{{.notice.Title}} | |||
</marquee> | |||
</a> | |||
<i class="icon icon-octicon x_icon" onclick="closeNoice()">{{svg "octicon-x" 16}}</i> | |||
</div> | |||
{{end}} | |||
{{/* | |||
</div> | |||
</body> | |||
</html> | |||
*/}} | |||
<script> | |||
function closeNoice(){ | |||
document.getElementById("notic_content").style.display='none' | |||
localStorage.setItem("isCloseNotice",true) | |||
} | |||
function isShowNotice(){ | |||
var current_notice = localStorage.getItem("notice") | |||
if (current_notice != "{{.notice.CommitId}}"){ | |||
localStorage.setItem('notice',"{{.notice.CommitId}}"); | |||
isNewNotice=true; | |||
localStorage.setItem("isCloseNotice",false) | |||
}else{ | |||
isNewNotice=false; | |||
} | |||
if ("{{.notice.Visible}}"){ | |||
if(isNewNotice){ | |||
document.getElementById("notic_content").style.display='block' | |||
}else{ | |||
isCloseNotice = localStorage.getItem("isCloseNotice") | |||
if (JSON.parse(isCloseNotice)){ | |||
document.getElementById("notic_content").style.display='none' | |||
}else{ | |||
document.getElementById("notic_content").style.display='block' | |||
} | |||
} | |||
}else{ | |||
document.getElementById("notic_content").style.display='none' | |||
} | |||
} | |||
isShowNotice(); | |||
</script> |
@@ -200,10 +200,53 @@ var _hmt = _hmt || []; | |||
<div class="ui top secondary stackable main menu following bar dark"> | |||
{{template "base/head_navbar_pro" .}} | |||
</div><!-- end bar --> | |||
<div class="notic_content" id ="notic_content" > | |||
<a href={{.notice.Link}} class="a_width"> | |||
<marquee behavior="scroll" direction="left"> | |||
【更新公告】{{.notice.Title}} | |||
</marquee> | |||
</a> | |||
<i class="icon icon-octicon x_icon" onclick="closeNoice()">{{svg "octicon-x" 16}}</i> | |||
</div> | |||
{{end}} | |||
{{/* | |||
</div> | |||
</body> | |||
</html> | |||
*/}} | |||
<script> | |||
function closeNoice(){ | |||
document.getElementById("notic_content").style.display='none' | |||
localStorage.setItem("isCloseNotice",true) | |||
} | |||
function isShowNotice(){ | |||
var current_notice = localStorage.getItem("notice") | |||
if (current_notice != "{{.notice.CommitId}}"){ | |||
localStorage.setItem('notice',"{{.notice.CommitId}}"); | |||
isNewNotice=true; | |||
localStorage.setItem("isCloseNotice",false) | |||
}else{ | |||
isNewNotice=false; | |||
} | |||
if ("{{.notice.Visible}}"){ | |||
if(isNewNotice){ | |||
document.getElementById("notic_content").style.display='block' | |||
}else{ | |||
isCloseNotice = localStorage.getItem("isCloseNotice") | |||
if (JSON.parse(isCloseNotice)){ | |||
document.getElementById("notic_content").style.display='none' | |||
}else{ | |||
document.getElementById("notic_content").style.display='block' | |||
} | |||
} | |||
}else{ | |||
document.getElementById("notic_content").style.display='none' | |||
} | |||
} | |||
isShowNotice(); | |||
</script> |
@@ -588,4 +588,19 @@ display: block; | |||
.tutorial_icon{ | |||
vertical-align: middle; | |||
margin-right: 0.75em; | |||
} | |||
.notic_content{ | |||
height: 50px; | |||
vertical-align: middle; | |||
text-align: center; | |||
line-height: 50px; | |||
background: #E5F4F4 | |||
} | |||
.x_icon{ | |||
float: right; | |||
margin-right: 15px !important; | |||
} | |||
.a_width{ | |||
width: 50%; | |||
display:inline-block | |||
} |