github.com/Azareal/Gosora@v0.0.0-20210729070923-553e66b59003/templates/header.html (about)

     1  <!doctype html>
     2  <html{{if .Header.IsoCode}} lang="{{.Header.IsoCode}}"{{end}}>
     3  	<head>
     4  		<title>{{.Title}} | {{.Header.Site.Name}}</title>
     5  		{{range .Header.Stylesheets}}
     6  		<link href="{{.Name}}"rel="stylesheet"type="text/css"{{if .Hash}}integrity="sha256-{{.Hash}}"{{end}}>{{end}}
     7  		{{range .Header.PreScriptsAsync}}
     8  		<script async src="{{.Name}}"{{if .Hash}}integrity="sha256-{{.Hash}}"{{end}}></script>{{end}}
     9  		{{if .CurrentUser.Loggedin}}<meta property="x-mem"content="1">{{end}}
    10  		<script src="{{res "init.js"}}"></script>
    11  		{{range .Header.ScriptsAsync}}
    12  		<script async src="{{.Name}}"{{if .Hash}}integrity="sha256-{{.Hash}}"{{end}}></script>{{end}}
    13  		<script src="{{res "jquery-3.1.1.min.js"}}"></script>
    14  		{{range .Header.Scripts}}
    15  		<script src="{{.Name}}"{{if .Hash}}integrity="sha256-{{.Hash}}"{{end}}></script>{{end}}
    16  		<meta name="viewport"content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no">
    17  		{{if .Header.MetaDesc}}<meta name="description"content="{{.Header.MetaDesc}}">{{end}}
    18  		{{/** TODO: Have page / forum / topic level tags and descriptions below as-well **/}}
    19  		<meta property="og:type"content="website">
    20  		<meta property="og:site_name"content="{{.Header.Site.Name}}">
    21  		<meta property="og:title"content="{{.Title}} | {{.Header.Site.Name}}">
    22  		<meta name="twitter:title"content="{{.Title}} | {{.Header.Site.Name}}">
    23  		{{if .OGDesc}}<meta property="og:description"content="{{.OGDesc}}">
    24  		<meta property="twitter:description"content="{{.OGDesc}}">{{end}}
    25  		{{if .GoogSiteVerify}}<meta name="google-site-verification"content="{{.GoogSiteVerify}}">{{end}}
    26  		<link rel="search"type="application/opensearchdescription+xml"title="{{.Header.Site.Name}}"href="/opensearch.xml">
    27  	</head>
    28  	<body>
    29  		{{/**{{if not .CurrentUser.IsSuperMod}}<style>.supermod_only { display: none !important; }</style>{{end}}**/}}{{flush}}
    30  		<div id="container"class="container">
    31  		{{/**<!--<div class="navrow">-->**/}}
    32  			<div class="left_of_nav">{{dock "leftOfNav" .Header }}</div>
    33  			<nav class="nav">
    34  				<div class="move_left">
    35  				<div class="move_right">
    36  				<ul id="main_menu"class="zone_{{.Header.Zone}}">{{/** TODO: Have the theme control whether the long or short form of the name is used **/}}
    37  					<li id="menu_overview"class="menu_left"><a href="/"rel="home">{{if eq .Header.Theme.Name "nox"}}{{.Header.Site.Name}}{{else}}{{.Header.Site.ShortName}}{{end}}</a></li>
    38  					{{dock "topMenu" .Header }}
    39  					<li class="menu_left menu_hamburger"title="{{lang "menu_hamburger_tooltip"}}"><a></a></li>
    40  				</ul>
    41  				</div>
    42  				</div><div style="clear:both;"></div>
    43  			</nav>
    44  			<div class="right_of_nav">{{/**<!--{{dock "rightOfNav" .Header }}-->**/}}
    45  {{/** TODO: Make this a separate template and load it via the theme docks, here for now so we can rapidly prototype the Nox theme **/}}
    46  {{if eq .Header.Theme.Name "nox"}}
    47  <div class="user_box">
    48  	<a href="{{.CurrentUser.Link}}"><img alt="Avatar"src="{{.CurrentUser.MicroAvatar}}"></a>
    49  	<div class="option_box">
    50  		<a href="{{.CurrentUser.Link}}"class="username">{{.CurrentUser.Name}}</a>
    51  		<span class="alerts">{{lang "alerts.no_alerts_short"}}</span>
    52  	</div>
    53  </div>
    54  {{end}}
    55  			</div>
    56  		{{/**<!--</div>-->**/}}
    57  			<div class="midRow">
    58  				<div class="midLeft"></div>
    59  				<div id="back"class="zone_{{.Header.Zone}}{{if hasWidgets "rightSidebar" .Header }} shrink_main{{end}}">
    60  					<div id="main">
    61  						<div class="alertbox initial_alertbox">{{range .Header.NoticeList}}
    62  				{{template "notice.html" . }}{{end}}
    63  						</div>