Hide footer when printing, typo fixes
This commit is contained in:
parent
b33f6fcd78
commit
c47776b92c
6
main.go
6
main.go
|
@ -49,13 +49,13 @@ func main() {
|
||||||
dir, relDir := getPhotoPaths(cfg)
|
dir, relDir := getPhotoPaths(cfg)
|
||||||
mux.Handle(dir, http.StripPrefix(dir, http.FileServer(http.Dir(relDir))))
|
mux.Handle(dir, http.StripPrefix(dir, http.FileServer(http.Dir(relDir))))
|
||||||
}
|
}
|
||||||
slog.Info(fmt.Sprintf("Starting go-resume server, listening on port %d", port))
|
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)
|
err = http.ListenAndServe(fmt.Sprintf("0.0.0.0:%d", *port), mux)
|
||||||
slog.Error(err.Error())
|
slog.Error(err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
func home(w http.ResponseWriter, r *http.Request) {
|
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"}
|
acceptedPages := []string{basePath, basePath + "light", basePath + "dark"}
|
||||||
if !slices.Contains(acceptedPages, r.URL.Path) {
|
if !slices.Contains(acceptedPages, r.URL.Path) {
|
||||||
http.NotFound(w, r)
|
http.NotFound(w, r)
|
||||||
|
|
|
@ -85,5 +85,9 @@ body {
|
||||||
display: none; }
|
display: none; }
|
||||||
.item {
|
.item {
|
||||||
page-break-inside: avoid; }
|
page-break-inside: avoid; }
|
||||||
|
.education {
|
||||||
|
page-break-before: always; }
|
||||||
html {
|
html {
|
||||||
color-adjust: exact; } }
|
color-adjust: exact; }
|
||||||
|
footer {
|
||||||
|
display: none; } }
|
||||||
|
|
|
@ -110,7 +110,13 @@ body {
|
||||||
.item {
|
.item {
|
||||||
page-break-inside: avoid;
|
page-break-inside: avoid;
|
||||||
}
|
}
|
||||||
|
.education {
|
||||||
|
page-break-before: always;
|
||||||
|
}
|
||||||
html {
|
html {
|
||||||
color-adjust: exact;
|
color-adjust: exact;
|
||||||
}
|
}
|
||||||
|
footer {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,8 +90,12 @@ body {
|
||||||
display: none; }
|
display: none; }
|
||||||
.item {
|
.item {
|
||||||
page-break-inside: avoid; }
|
page-break-inside: avoid; }
|
||||||
|
.education {
|
||||||
|
page-break-before: always; }
|
||||||
html {
|
html {
|
||||||
color-adjust: exact; } }
|
color-adjust: exact; }
|
||||||
|
footer {
|
||||||
|
display: none; } }
|
||||||
|
|
||||||
.tag:not(body).is-success {
|
.tag:not(body).is-success {
|
||||||
background-color: var(--section-title-color); }
|
background-color: var(--section-title-color); }
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
<script>function printPage() {
|
<script>function printPage() {
|
||||||
if ("{{ .Theme }}" == "dark") {
|
if ("{{ .Theme }}" == "dark") {
|
||||||
alert("{{ translate "print_dark" $lang }}")
|
alert("{{ translate "print_dark" $lang }}")
|
||||||
window.location.replace("/light")
|
window.location.replace("{{ .Basepath }}/light")
|
||||||
} else {
|
} else {
|
||||||
window.print();
|
window.print();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue