Compare commits

..

5 commits

Author SHA1 Message Date
Lilian Jónsdóttir b541808f35 css tweaks
mobile layout is bad if there are too many links on a page
need fix
2024-01-24 18:12:54 -08:00
Lilian Jónsdóttir 4bf5bb1bc6 just change everything at 1200px wide 2024-01-24 18:03:41 -08:00
Lilian Jónsdóttir 31fbb3826e turns out I forgot how css works 2024-01-24 18:02:15 -08:00
Lilian Jónsdóttir 5b7256aeba tweak about summary yet again 2024-01-24 18:01:52 -08:00
Lilian Jónsdóttir ec9700a138 turns out log already does that
I gotta quit writing code before looking at docs ffs
2024-01-24 17:21:47 -08:00
5 changed files with 36 additions and 39 deletions

View file

@ -46,7 +46,10 @@ func Initialise() AppConfig {
if cfg, err := loadConfig(); err == nil { if cfg, err := loadConfig(); err == nil {
app.ListenPort = cfg.Port app.ListenPort = cfg.Port
app.UseCache = cfg.UseCache app.UseCache = cfg.UseCache
app.LogLevel = logLevelFromString(cfg.LogLevel) app.LogLevel, err = log.ParseLevel(cfg.LogLevel)
if err != nil {
app.LogLevel = defaults.LogLevel
}
} else { } else {
app.Logger.Print("Failed loading config from environment", "err", err) app.Logger.Print("Failed loading config from environment", "err", err)
} }
@ -66,23 +69,3 @@ func loadConfig() (ConfigDatabase, error) {
return cfg, nil return cfg, nil
} }
} }
// logLevelFromString turns a string like "warn" into a log.Level like log.WarnLevel
func logLevelFromString(level string) log.Level {
switch level {
case "debug":
return log.DebugLevel
case "info":
return log.InfoLevel
case "warn":
return log.WarnLevel
case "error":
return log.ErrorLevel
case "fatal":
return log.FatalLevel
case "none":
return math.MaxInt32
default:
return defaults.LogLevel
}
}

View file

@ -28,10 +28,18 @@ a:hover {
color: #999; color: #999;
} }
a.back { a#back {
color: #111; color: #111;
} }
a.links {
font-size: 1.1em;
}
a.homelinks {
font-size: 1.3em;
}
#stuff { #stuff {
margin: 55px 150px 25px 150px; margin: 55px 150px 25px 150px;
} }
@ -90,33 +98,39 @@ h2 {
/* width specific settings */ /* width specific settings */
@media screen and (max-width: 1200px) { @media screen and (max-width: 1200px) {
#words,
#bigwords {
width: 90%;
}
}
@media screen and (max-width: 800px) {
#words, #words,
#bigwords { #bigwords {
width: 100%; width: 100%;
} }
#leftfooter { #leftfooter,
#rightfooter {
position: fixed; position: fixed;
bottom: 10px;
right: 10px; right: 10px;
text-align: right; text-align: right;
left: 0px;
display: block;
font-size: 2vw;
}
#leftfooter {
bottom: 10px;
} }
#rightfooter { #rightfooter {
position: fixed;
bottom: 35px; bottom: 35px;
right: 10px;
} }
#stuff { #stuff {
margin: 15px 50px 25px 50px; margin: 15px 25px 25px 25px;
} }
a.links {
font-size: 5ev;
}
a.homelinks {
font-size: 7ev;
}
} }

View file

@ -1,5 +1,5 @@
StringMap: StringMap:
about: she/her; 1989; queer anarchist; lover of music, games, books, free software, history, fog, mountains, and forests; self-taught, aspiring developer and sysadmin about: she/her; 1989; queer anarchist; self-taught, aspiring developer and sysadmin; lover of music, games, books, free software, history, fog, mountains, and forests;
LinkMap: LinkMap:
Personal: Personal:
- href: https://matrix.to/#/@celediel:burning.moe - href: https://matrix.to/#/@celediel:burning.moe

View file

@ -12,7 +12,7 @@
<br /> <br />
<span id="words"> <span id="words">
{{ range (index .LinkMap "Pages")}} {{ range (index .LinkMap "Pages")}}
<a href="{{ .Href }}">{{ .Text }}</a><br /> <a href="{{ .Href }}" class="homelinks">{{ .Text }}</a><br />
{{ end }} {{ end }}
</span> </span>
{{ end -}} {{ end -}}

View file

@ -7,7 +7,7 @@
{{- range $key, $value := .LinkMap }} {{- range $key, $value := .LinkMap }}
<h4>{{ $key }}</h4> <h4>{{ $key }}</h4>
{{- range $value }} {{- range $value }}
<a href="{{ .Href }}"> <a href="{{ .Href }}" class="links">
{{- if (ne .Icon "") }} {{- if (ne .Icon "") }}
<span class="iconify" data-icon="{{ .Icon }}"></span> <span class="iconify" data-icon="{{ .Icon }}"></span>
{{ end }} {{ end }}
@ -16,7 +16,7 @@
{{- end }} {{- end }}
{{ end -}} {{ end -}}
<br /> <br />
<a href="/"> <a href="/" id="back">
<span class="iconify" data-icon="material-symbols:keyboard-arrow-left"></span> <span class="iconify" data-icon="material-symbols:keyboard-arrow-left"></span>
back back
</a> </a>