| @@ -200,27 +200,7 @@ var _hmt = _hmt || []; | |||
| <div class="ui top secondary stackable main menu following bar dark"> | |||
| {{template "base/head_navbar" .}} | |||
| </div><!-- end bar --> | |||
| <!-- {{if not .IsCourse}} --> | |||
| <div class="notic_content" id ="notic_content" style="display: block; position: relative"> | |||
| <diV class="ui container"> | |||
| <marquee behavior="scroll" direction="left"> | |||
| {{range .notices.Notices}} | |||
| <a href={{.Link}} class="a_width"> | |||
| {{if eq .Visible 1}} | |||
| <i class="ri-arrow-right-s-line"></i> | |||
| {{.Title}} | |||
| {{end}} | |||
| </a> | |||
| {{end}} | |||
| </marquee> | |||
| <div class="item right" style="position:absolute;right: 1px;top:0px;"> | |||
| <i class="ri-close-fill x_icon" onclick="closeNoice()"></i> | |||
| </div> | |||
| </diV> | |||
| </div> | |||
| <!-- {{end}} --> | |||
| {{template "base/head_notice" .}} | |||
| {{end}} | |||
| {{/* | |||
| </div> | |||
| @@ -245,14 +225,13 @@ var _hmt = _hmt || []; | |||
| isNewNotice=false; | |||
| } | |||
| let isShowNoticeTag = false; | |||
| let notices= "{{.notices.Notices}}" | |||
| 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){ | |||
| document.getElementById("notic_content").style.display='block' | |||
| @@ -269,7 +248,8 @@ var _hmt = _hmt || []; | |||
| document.getElementById("notic_content").style.display='none' | |||
| } | |||
| } | |||
| if(!("{{.IsCourse}}" == true || "{{.IsCourse}}" =='true')) { | |||
| // isShowNotice(); | |||
| isShowNotice(); | |||
| } | |||
| </script> | |||
| @@ -201,14 +201,7 @@ 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" style="display: none;"> | |||
| <a href={{.notice.Link}} class="a_width"> | |||
| <marquee behavior="scroll" direction="left"> | |||
| {{.notice.Title}} | |||
| </marquee> | |||
| </a> | |||
| <i class="ri-close-fill x_icon" onclick="closeNoice()"></i> | |||
| </div> | |||
| {{template "base/head_notice" .}} | |||
| {{end}} | |||
| {{/* | |||
| </div> | |||
| @@ -232,7 +225,15 @@ var _hmt = _hmt || []; | |||
| }else{ | |||
| 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 (isShowNoticeTag){ | |||
| if(isNewNotice){ | |||
| document.getElementById("notic_content").style.display='block' | |||
| }else{ | |||
| @@ -248,6 +249,7 @@ var _hmt = _hmt || []; | |||
| document.getElementById("notic_content").style.display='none' | |||
| } | |||
| } | |||
| if(!("{{.IsCourse}}" == true || "{{.IsCourse}}" =='true')) { | |||
| isShowNotice(); | |||
| } | |||
| @@ -205,14 +205,7 @@ var _hmt = _hmt || []; | |||
| <div class="ui top secondary stackable main menu following bar dark"> | |||
| {{template "base/head_navbar" .}} | |||
| </div><!-- end bar --> | |||
| <div class="notic_content" id ="notic_content" style="display: none;" > | |||
| <a href={{.notice.Link}} class="a_width"> | |||
| <marquee behavior="scroll" direction="left"> | |||
| {{.notice.Title}} | |||
| </marquee> | |||
| </a> | |||
| <i class="ri-close-fill x_icon" onclick="closeNoice()"></i> | |||
| </div> | |||
| {{template "base/head_notice" .}} | |||
| {{end}} | |||
| {{/* | |||
| </div> | |||
| @@ -236,7 +229,15 @@ var _hmt = _hmt || []; | |||
| }else{ | |||
| 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 (isShowNoticeTag){ | |||
| if(isNewNotice){ | |||
| document.getElementById("notic_content").style.display='block' | |||
| }else{ | |||
| @@ -252,6 +253,7 @@ var _hmt = _hmt || []; | |||
| document.getElementById("notic_content").style.display='none' | |||
| } | |||
| } | |||
| if(!("{{.IsCourse}}" == true || "{{.IsCourse}}" =='true')) { | |||
| isShowNotice(); | |||
| } | |||
| @@ -0,0 +1,23 @@ | |||
| {{if not .IsCourse}} | |||
| {{ if .notices}} | |||
| <div class="notic_content" id ="notic_content" style="display: block; position: relative"> | |||
| <diV class="ui container"> | |||
| <marquee behavior="scroll" direction="left"> | |||
| {{range .notices.Notices}} | |||
| <a href={{.Link}} class="a_width"> | |||
| {{if eq .Visible 1}} | |||
| <i class="ri-arrow-right-s-line"></i> | |||
| {{.Title}} | |||
| {{end}} | |||
| </a> | |||
| {{end}} | |||
| </marquee> | |||
| <div class="item right" style="position:absolute;right: 1px;top:0px;"> | |||
| <i class="ri-close-fill x_icon" onclick="closeNoice()"></i> | |||
| </div> | |||
| </diV> | |||
| </div> | |||
| {{end}} | |||
| {{end}} | |||
| @@ -201,14 +201,7 @@ 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" style="display: none;" > | |||
| <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> | |||
| {{template "base/head_notice" .}} | |||
| {{end}} | |||
| {{/* | |||
| </div> | |||
| @@ -233,7 +226,15 @@ var _hmt = _hmt || []; | |||
| }else{ | |||
| 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 (isShowNoticeTag){ | |||
| if(isNewNotice){ | |||
| document.getElementById("notic_content").style.display='block' | |||
| }else{ | |||
| @@ -249,6 +250,7 @@ var _hmt = _hmt || []; | |||
| document.getElementById("notic_content").style.display='none' | |||
| } | |||
| } | |||
| if(!("{{.IsCourse}}" == true || "{{.IsCourse}}" =='true')) { | |||
| isShowNotice(); | |||
| } | |||