diff options
| author | Mitch Riedstra <mitch@riedstra.us> | 2020-11-21 01:13:16 -0500 |
|---|---|---|
| committer | Mitch Riedstra <mitch@riedstra.us> | 2020-11-21 01:13:16 -0500 |
| commit | 4ed57528379c9d1ac0f5bc77b95439bbba3d4488 (patch) | |
| tree | df607f257e8836da69c0b9c9e8ef840c2acadff1 /cmd/web/css.go | |
| parent | 78712527eed66929b8147e04d18f000dcb7dfff6 (diff) | |
| download | steam-export-4ed57528379c9d1ac0f5bc77b95439bbba3d4488.tar.gz steam-export-4ed57528379c9d1ac0f5bc77b95439bbba3d4488.tar.xz | |
Initial version of a web interface
Diffstat (limited to 'cmd/web/css.go')
| -rw-r--r-- | cmd/web/css.go | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/cmd/web/css.go b/cmd/web/css.go new file mode 100644 index 0000000..3b772de --- /dev/null +++ b/cmd/web/css.go @@ -0,0 +1,80 @@ +package main + +import ( + "net/http" +) + +func cssHandler(w http.ResponseWriter, r *http.Request){ + w.Header().Add("Content-type", "text/css") + _, err := w.Write([]byte(` +nav { + border-bottom: 3px solid #000; + padding-bottom: 10px; +} +a { + text-decoration: none; + color: #268bd2; +} +a:visited { + color: #d22653; +} +a:hover { + text-decoration: underline; +} +pre code { + line-height: 1.1; + overflow: auto; +} + +code { + color: #9672d5; + font-size: .8em; + font-family: "Roboto Mono", "Monaco", "Lucida Console", "DejaVu Sans Mono", +"monospace"; +} + +pre code { + color: #000; + background-color: #FFFFEA; + display: block; + padding: 10px; + border: 1px solid; +} + +blockquote { + border-left: 4px solid #aaa; + padding-left: 1em; +} + +body { + margin: 40px auto; + max-width: 80%; + line-height: 1.6; + font-size: 1em; + color: #444; + padding: 0 10px; + /* Added because some browsers don't default to white */ + background-color: #fff; +} + +img { + width: 100%; + height: auto; +} + +h1,h2,h3 { + line-height: 1.2 +} + +@media screen and (min-width: 1200px) { + body { + max-width: 960px; + } +} + +`)) + + if err != nil { + Logger.Printf("While sending css: %s", err) + } +} |
