| @@ -201,12 +201,15 @@ var _hmt = _hmt || []; | |||||
| {{template "base/head_navbar" .}} | {{template "base/head_navbar" .}} | ||||
| </div><!-- end bar --> | </div><!-- end bar --> | ||||
| <!-- {{if not .IsCourse}} --> | <!-- {{if not .IsCourse}} --> | ||||
| <div class="notic_content" id ="notic_content" style="display: none;"> | |||||
| <div class="notic_content" id ="notic_content" style="display: block;"> | |||||
| <marquee behavior="scroll" direction="left"> | <marquee behavior="scroll" direction="left"> | ||||
| <a href={{.notice.Link}} class="a_width"> | <a href={{.notice.Link}} class="a_width"> | ||||
| <i class="ri-arrow-right-s-line"></i> | |||||
| {{.notice.Title}} | |||||
| {{range .notices.Notices}} | |||||
| <i class="ri-arrow-right-s-line"></i> | |||||
| {{.Title}} | |||||
| {{end}} | |||||
| </a> | </a> | ||||
| </marquee> | </marquee> | ||||
| @@ -236,7 +239,16 @@ var _hmt = _hmt || []; | |||||
| }else{ | }else{ | ||||
| isNewNotice=false; | isNewNotice=false; | ||||
| } | } | ||||
| if (JSON.parse("{{.notice.Visible}}")){ | |||||
| let isShowNoticeTag = false; | |||||
| let notices= "{{.notices.Notices}}" | |||||
| for (i =0;i<notices.length;i++){ | |||||
| if (notices[i].Visible==1){ | |||||
| isShowNoticeTag =true; | |||||
| break; | |||||
| } | |||||
| } | |||||
| // if (JSON.parse("{{.notice.Visible}}")){ | |||||
| if (isShowNoticeTag){ | |||||
| if(isNewNotice){ | if(isNewNotice){ | ||||
| document.getElementById("notic_content").style.display='block' | document.getElementById("notic_content").style.display='block' | ||||
| }else{ | }else{ | ||||
| @@ -253,6 +265,6 @@ var _hmt = _hmt || []; | |||||
| } | } | ||||
| } | } | ||||
| if(!("{{.IsCourse}}" == true || "{{.IsCourse}}" =='true')) { | if(!("{{.IsCourse}}" == true || "{{.IsCourse}}" =='true')) { | ||||
| isShowNotice(); | |||||
| // isShowNotice(); | |||||
| } | } | ||||
| </script> | </script> | ||||