Hide footer when printing, typo fixes

This commit is contained in:
Jarno Rankinen 2024-02-10 23:25:06 +02:00
parent b33f6fcd78
commit c47776b92c
5 changed files with 20 additions and 6 deletions

View File

@ -49,13 +49,13 @@ func main() {
dir, relDir := getPhotoPaths(cfg)
mux.Handle(dir, http.StripPrefix(dir, http.FileServer(http.Dir(relDir))))
}
slog.Info(fmt.Sprintf("Starting go-resume server, listening on port %d", port))
err = http.ListenAndServe(fmt.Sprintf("0.0.0.0:%d", port), mux)
slog.Info(fmt.Sprintf("Starting go-resume server, listening on port %d", *port))
err = http.ListenAndServe(fmt.Sprintf("0.0.0.0:%d", *port), mux)
slog.Error(err.Error())
}
func home(w http.ResponseWriter, r *http.Request) {
slog.Info(fmt.Sprintf("Client: %s Request: &s ", r.Header.Get("X-Forwarded-For"), r.URL.Path))
slog.Info(fmt.Sprintf("Client: %s Request: %s ", r.Header.Get("X-Forwarded-For"), r.URL.Path))
acceptedPages := []string{basePath, basePath + "light", basePath + "dark"}
if !slices.Contains(acceptedPages, r.URL.Path) {
http.NotFound(w, r)

View File

@ -85,5 +85,9 @@ body {
display: none; }
.item {
page-break-inside: avoid; }
.education {
page-break-before: always; }
html {
color-adjust: exact; } }
color-adjust: exact; }
footer {
display: none; } }

View File

@ -110,7 +110,13 @@ body {
.item {
page-break-inside: avoid;
}
.education {
page-break-before: always;
}
html {
color-adjust: exact;
}
footer {
display: none;
}
}

View File

@ -90,8 +90,12 @@ body {
display: none; }
.item {
page-break-inside: avoid; }
.education {
page-break-before: always; }
html {
color-adjust: exact; } }
color-adjust: exact; }
footer {
display: none; } }
.tag:not(body).is-success {
background-color: var(--section-title-color); }

View File

@ -25,7 +25,7 @@
<script>function printPage() {
if ("{{ .Theme }}" == "dark") {
alert("{{ translate "print_dark" $lang }}")
window.location.replace("/light")
window.location.replace("{{ .Basepath }}/light")
} else {
window.print();
}