diff options
author | FChannel0 <77419041+FChannel0@users.noreply.github.com> | 2021-08-20 01:35:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-20 01:35:26 -0700 |
commit | 502558e0bdaf67ca4c012fc1983f42430b8854cd (patch) | |
tree | d66b015274b962fedb28c52c0efaaa068368f2b1 /static/main.html | |
parent | 21917eb2ea72fe40d70c2c991e821aace5430c23 (diff) | |
parent | a497499817cbf72b295253e1a2bb1011d121ba28 (diff) |
Merge pull request #52 from KushBlazingJudah/development
Themes
Diffstat (limited to 'static/main.html')
-rw-r--r-- | static/main.html | 92 |
1 files changed, 18 insertions, 74 deletions
diff --git a/static/main.html b/static/main.html index 362b7b3..794a602 100644 --- a/static/main.html +++ b/static/main.html @@ -8,81 +8,13 @@ <meta property="og:locale" content="en_US" /> <meta property="og:type" content="website" /> <link rel="icon" type="image/png" href="/static/favicon.png"> - <style> - a, a:link, a:visited, a:hover, a:active { - text-decoration: none - } - - a:link, a:visited, a:active { - color: black; - } - - a:hover { - color: #de0808; - } - - body { - {{ if .Board.Restricted }} - background-color: #eef2fe; - color: black; - {{ else }} - background-color: #ffffee; - color: #820404 - {{ end }} - } - - .popup-box { - {{ if .Board.Restricted }} - border: 4px solid #d3caf0; - background-color: #eff5ff; - {{ else }} - border: 4px solid #f0e2d9; - background-color: #f9f9e0; - {{ end }} - } - - .box { - {{ if .Board.Restricted }} - background-color: #eff5ff; - {{ else }} - background-color: #f9f9e0; - {{ end }} - } - - .box-alt { - {{ if .Board.Restricted }} - background-color: #d3caf0; - {{ else }} - background-color: #f0e2d9; - {{ end }} - } - - .quote { - color: #789922; - } - - .post { - {{ if .Board.Restricted }} - background-color: #d5daf0; - {{ else }} - background-color: #f0e0d6; - {{ end }} - } - - :target > div > .post { - {{ if .Board.Restricted }} - background-color: #d6bad0; - {{ else }} - background-color: #f0c0b0; - {{ end }} - } - .tripcode { - color: #117743; - } - </style> + <link rel="stylesheet" type="text/css" href="/static/css/themes/default.css" title="default"> + {{ range .Themes }} + <link rel="alternate stylesheet" type="text/css" href="/static/css/themes/{{.}}.css" title="{{.}}"> + {{ end }} {{ template "header" . }} </head> - <body> + <body {{ if not .Board.Restricted }}class="nsfw"{{ end }} onload="applyTheme()"> <ul style="display: inline; padding:0;"> {{ $l := len .Boards }} <li style="display: inline;">[<a href="/">Home</a>]</li> @@ -108,12 +40,24 @@ {{ template "content" . }} {{ template "bottom" . }} + + <div style="float: right;"> + Theme: + <select id="themeSwitcher" onchange="setTheme(this.options[this.selectedIndex].value)"> + {{ range .Themes }} + <option value="{{.}}">{{.}}</option> + {{ end }} + </select> + </div> + <div align="center" style="width: 500px; margin:0 auto; margin-top: 50px;"> <a href="/">[Home]</a><a href="/static/rules.html">[Rules]</a><a href="/static/faq.html">[FAQ]</a> <p>All trademarks and copyrights on this page are owned by their respective parties.</p> </div> + + <script src="/static/js/themes.js"></script> +{{ template "script" . }} </body> </html> -{{ template "script" . }} {{ end }} |