Compare commits
5 commits
d5f0151bb1
...
b541808f35
Author | SHA1 | Date | |
---|---|---|---|
Lilian Jónsdóttir | b541808f35 | ||
Lilian Jónsdóttir | 4bf5bb1bc6 | ||
Lilian Jónsdóttir | 31fbb3826e | ||
Lilian Jónsdóttir | 5b7256aeba | ||
Lilian Jónsdóttir | ec9700a138 |
|
@ -46,7 +46,10 @@ func Initialise() AppConfig {
|
|||
if cfg, err := loadConfig(); err == nil {
|
||||
app.ListenPort = cfg.Port
|
||||
app.UseCache = cfg.UseCache
|
||||
app.LogLevel = logLevelFromString(cfg.LogLevel)
|
||||
app.LogLevel, err = log.ParseLevel(cfg.LogLevel)
|
||||
if err != nil {
|
||||
app.LogLevel = defaults.LogLevel
|
||||
}
|
||||
} else {
|
||||
app.Logger.Print("Failed loading config from environment", "err", err)
|
||||
}
|
||||
|
@ -66,23 +69,3 @@ func loadConfig() (ConfigDatabase, error) {
|
|||
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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,10 +28,18 @@ a:hover {
|
|||
color: #999;
|
||||
}
|
||||
|
||||
a.back {
|
||||
a#back {
|
||||
color: #111;
|
||||
}
|
||||
|
||||
a.links {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
a.homelinks {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
#stuff {
|
||||
margin: 55px 150px 25px 150px;
|
||||
}
|
||||
|
@ -90,33 +98,39 @@ h2 {
|
|||
/* width specific settings */
|
||||
@media screen and (max-width: 1200px) {
|
||||
|
||||
#words,
|
||||
#bigwords {
|
||||
width: 90%;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 800px) {
|
||||
|
||||
#words,
|
||||
#bigwords {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#leftfooter {
|
||||
#leftfooter,
|
||||
#rightfooter {
|
||||
position: fixed;
|
||||
bottom: 10px;
|
||||
right: 10px;
|
||||
text-align: right;
|
||||
left: 0px;
|
||||
display: block;
|
||||
font-size: 2vw;
|
||||
}
|
||||
|
||||
#leftfooter {
|
||||
bottom: 10px;
|
||||
}
|
||||
|
||||
#rightfooter {
|
||||
position: fixed;
|
||||
bottom: 35px;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
#stuff {
|
||||
margin: 15px 50px 25px 50px;
|
||||
margin: 15px 25px 25px 25px;
|
||||
}
|
||||
|
||||
a.links {
|
||||
font-size: 5ev;
|
||||
}
|
||||
|
||||
a.homelinks {
|
||||
font-size: 7ev;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
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:
|
||||
Personal:
|
||||
- href: https://matrix.to/#/@celediel:burning.moe
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<br />
|
||||
<span id="words">
|
||||
{{ range (index .LinkMap "Pages")}}
|
||||
<a href="{{ .Href }}">{{ .Text }}</a><br />
|
||||
<a href="{{ .Href }}" class="homelinks">{{ .Text }}</a><br />
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end -}}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
{{- range $key, $value := .LinkMap }}
|
||||
<h4>{{ $key }}</h4>
|
||||
{{- range $value }}
|
||||
<a href="{{ .Href }}">
|
||||
<a href="{{ .Href }}" class="links">
|
||||
{{- if (ne .Icon "") }}
|
||||
<span class="iconify" data-icon="{{ .Icon }}"></span>
|
||||
{{ end }}
|
||||
|
@ -16,7 +16,7 @@
|
|||
{{- end }}
|
||||
{{ end -}}
|
||||
<br />
|
||||
<a href="/">
|
||||
<a href="/" id="back">
|
||||
<span class="iconify" data-icon="material-symbols:keyboard-arrow-left"></span>
|
||||
back
|
||||
</a>
|
||||
|
|
Loading…
Reference in a new issue