A clean, Markdown-based publishing platform made for writers. Write together, and build a community. https://writefreely.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

58 lines
1.8 KiB

  1. {{define "base"}}<!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. {{ template "head" . }}
  5. <link rel="stylesheet" type="text/css" href="{{.Host}}/css/{{.Theme}}.css" />
  6. <link rel="shortcut icon" href="{{.Host}}/favicon.ico" />
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  8. <meta name="application-name" content="{{.SiteName}}">
  9. <meta name="application-url" content="{{.Host}}">
  10. <meta property="og:site_name" content="{{.SiteName}}" />
  11. </head>
  12. <body {{template "body-attrs" .}}>
  13. <div id="overlay"></div>
  14. <header>
  15. <h2><a href="/">{{.SiteName}}</a></h2>
  16. {{if not .SingleUser}}
  17. <nav id="user-nav">
  18. <nav class="tabs">
  19. <a href="/about"{{if eq .Path "/about"}} class="selected"{{end}}>About</a>
  20. {{if and (not .SingleUser) .LocalTimeline}}<a href="/read"{{if eq .Path "/read"}} class="selected"{{end}}>Reader</a>{{end}}
  21. {{if and (not .SingleUser) (not .Username)}}<a href="/login"{{if eq .Path "/login"}} class="selected"{{end}}>Log in</a>{{end}}
  22. </nav>
  23. </nav>
  24. {{end}}
  25. </header>
  26. <div id="official-writing">
  27. {{ template "content" . }}
  28. </div>
  29. {{ template "footer" . }}
  30. {{if not .JSDisabled}}
  31. <script type="text/javascript">
  32. {{if .WebFonts}}
  33. try { // Google Fonts
  34. WebFontConfig = {
  35. custom: { families: [ 'Lora:400,700:latin', 'Open+Sans:400,700:latin' ], urls: [ '/css/fonts.css' ] }
  36. };
  37. (function() {
  38. var wf = document.createElement('script');
  39. wf.src = '/js/webfont.js';
  40. wf.type = 'text/javascript';
  41. wf.async = 'true';
  42. var s = document.getElementsByTagName('script')[0];
  43. s.parentNode.insertBefore(wf, s);
  44. })();
  45. } catch (e) { /* ¯\_(ツ)_/¯ */ }
  46. {{end}}
  47. </script>
  48. {{else}}
  49. {{if .WebFonts}}<link href="{{.Host}}/css/fonts.css" rel="stylesheet" type="text/css" />{{end}}
  50. {{end}}
  51. </body>
  52. </html>{{end}}
  53. {{define "body-attrs"}}{{end}}