A clean, Markdown-based publishing platform made for writers. Write together, and build a community. https://writefreely.org
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 
 

118 行
5.3 KiB

  1. {{define "user-navigation"}}
  2. <header class="{{if .SingleUser}}singleuser{{else}}multiuser{{end}}">
  3. <nav id="full-nav">
  4. {{if .SingleUser}}
  5. <nav id="user-nav">
  6. <nav class="dropdown-nav">
  7. <ul><li><a href="/" title="View blog" class="title">{{.SiteName}}</a> <img class="ic-18dp" src="/img/ic_down_arrow_dark@2x.png" />
  8. <ul>
  9. {{if .IsAdmin}}<li><a href="/admin">Admin dashboard</a></li>{{end}}
  10. <li><a href="/me/settings">Account settings</a></li>
  11. <li><a href="/me/import">Import posts</a></li>
  12. <li><a href="/me/export">Export</a></li>
  13. <li class="separator"><hr /></li>
  14. <li><a href="/me/logout">Log out</a></li>
  15. </ul></li>
  16. </ul>
  17. </nav>
  18. <nav class="tabs">
  19. <a href="/me/c/{{.Username}}" {{if and (hasPrefix .Path "/me/c/") (hasSuffix .Path .Username)}}class="selected"{{end}}>Customize</a>
  20. <a href="/me/c/{{.Username}}/stats" {{if hasSuffix .Path "/stats"}}class="selected"{{end}}>Stats</a>
  21. <a href="/me/c/{{.Username}}/subscribers" {{if hasSuffix .Path "/subscribers"}}class="selected"{{end}}>Subscribers</a>
  22. <a href="/me/posts/"{{if eq .Path "/me/posts/"}} class="selected"{{end}}>Drafts</a>
  23. </nav>
  24. </nav>
  25. <div class="right-side">
  26. <a class="simple-btn" href="/me/new">New Post</a>
  27. </div>
  28. {{else}}
  29. <div class="left-side">
  30. <h1><a href="/" title="Return to editor">{{.SiteName}}</a></h1>
  31. </div>
  32. <nav id="user-nav">
  33. {{if .Username}}
  34. <nav class="dropdown-nav">
  35. <ul><li class="has-submenu"><a>{{.Username}}</a> <img class="ic-18dp" src="/img/ic_down_arrow_dark@2x.png" /><ul>
  36. {{if .IsAdmin}}<li><a href="/admin">Admin dashboard</a></li>{{end}}
  37. <li><a href="/me/settings">Account settings</a></li>
  38. <li><a href="/me/import">Import posts</a></li>
  39. <li><a href="/me/export">Export</a></li>
  40. {{if .CanInvite}}<li><a href="/me/invites">Invite people</a></li>{{end}}
  41. <li class="separator"><hr /></li>
  42. <li><a href="/me/logout">Log out</a></li>
  43. </ul></li>
  44. </ul>
  45. </nav>
  46. {{end}}
  47. <nav class="tabs">
  48. {{if .SimpleNav}}
  49. {{ if not .SingleUser }}
  50. {{if and (and .LocalTimeline .CanViewReader) .Chorus}}<a href="/"{{if eq .Path "/"}} class="selected"{{end}}>Home</a>{{end}}
  51. {{ end }}
  52. <a href="/about">About</a>
  53. {{ if not .SingleUser }}
  54. {{ if .Username }}
  55. {{if gt .MaxBlogs 1}}<a href="/me/c/"{{if eq .Path "/me/c/"}} class="selected"{{end}}>Blogs</a>{{end}}
  56. {{if and .Chorus (eq .MaxBlogs 1)}}<a href="/{{.Username}}/"{{if eq .Path (printf "/%s/" .Username)}} class="selected"{{end}}>My Posts</a>{{end}}
  57. {{if not .DisableDrafts}}<a href="/me/posts/"{{if eq .Path "/me/posts/"}} class="selected"{{end}}>Drafts</a>{{end}}
  58. {{ end }}
  59. {{if and (and .LocalTimeline .CanViewReader) (not .Chorus)}}<a href="/read">Reader</a>{{end}}
  60. {{if and (and (and .Chorus .OpenRegistration) (not .Username)) (or (not .Private) (ne .Landing ""))}}<a href="/signup"{{if eq .Path "/signup"}} class="selected"{{end}}>Sign up</a>{{end}}
  61. {{if .Username}}<a href="/me/logout">Log out</a>{{else}}<a href="/login">Log in</a>{{end}}
  62. {{ end }}
  63. {{else}}
  64. <a href="/me/c/"{{if eq .Path "/me/c/"}} class="selected"{{end}}>Blogs</a>
  65. {{if not .DisableDrafts}}<a href="/me/posts/"{{if eq .Path "/me/posts/"}} class="selected"{{end}}>Drafts</a>{{end}}
  66. {{if and (and .LocalTimeline .CanViewReader) (not .Chorus)}}<a href="/read">Reader</a>{{end}}
  67. {{end}}
  68. </nav>
  69. </nav>
  70. {{if .Username}}
  71. <div class="right-side">
  72. <a class="simple-btn" href="/{{if .CollAlias}}#{{.CollAlias}}{{end}}">New Post</a>
  73. </div>
  74. {{end}}
  75. {{end}}
  76. </nav>
  77. </header>
  78. {{end}}
  79. {{define "header"}}<!DOCTYPE HTML>
  80. <html>
  81. <head>
  82. <meta charset="utf-8">
  83. <title>{{.PageTitle}} {{if .Separator}}{{.Separator}}{{else}}&mdash;{{end}} {{.SiteName}}</title>
  84. <link rel="stylesheet" type="text/css" href="/css/write.css" />
  85. {{if .CustomCSS}}<link rel="stylesheet" type="text/css" href="/local/custom.css" />{{end}}
  86. <link rel="shortcut icon" href="/favicon.ico" />
  87. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  88. <meta name="theme-color" content="#888888" />
  89. <meta name="apple-mobile-web-app-title" content="{{.SiteName}}">
  90. <link rel="apple-touch-icon" sizes="152x152" href="/img/touch-icon-152.png">
  91. <link rel="apple-touch-icon" sizes="167x167" href="/img/touch-icon-167.png">
  92. <link rel="apple-touch-icon" sizes="180x180" href="/img/touch-icon-180.png">
  93. </head>
  94. <body id="me">
  95. {{template "user-navigation" .}}
  96. <div id="official-writing">
  97. {{end}}
  98. {{define "admin-header"}}
  99. <header class="admin">
  100. <h1>Admin</h1>
  101. <nav id="admin" class="pager">
  102. <a href="/admin" {{if eq .Path "/admin"}}class="selected"{{end}}>Dashboard</a>
  103. <a href="/admin/settings" {{if eq .Path "/admin/settings"}}class="selected"{{end}}>Settings</a>
  104. {{if not .SingleUser}}
  105. <a href="/admin/users" {{if eq .Path "/admin/users"}}class="selected"{{end}}>Users</a>
  106. <a href="/admin/pages" {{if eq .Path "/admin/pages"}}class="selected"{{end}}>Pages</a>
  107. {{if .UpdateChecks}}<a href="/admin/updates" {{if eq .Path "/admin/updates"}}class="selected"{{end}}>Updates{{if .UpdateAvailable}}<span class="blip">!</span>{{end}}</a>{{end}}
  108. {{end}}
  109. {{if not .Forest}}
  110. <a href="/admin/monitor" {{if eq .Path "/admin/monitor"}}class="selected"{{end}}>Monitor</a>
  111. {{end}}
  112. </nav>
  113. </header>
  114. {{end}}