commit fb9bd284ead1d56c230a214fa1922734e955c94d
parent 8afbee4a4cdc2a95a0128a6babfa5391724509d2
Auteur: Selve <selve@asteride.xyz>
Date: Thu, 26 Oct 2023 15:58:51 -0400
[gen] inclusion de la feuille de style dans le html
Diffstat:
3 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/construire.sh b/construire.sh
@@ -55,14 +55,6 @@ robots.txt() {
awk -f "$DOS_LIB/general.awk" -f "$DOS_LIB/robots.awk" >"$dst"
}
-style() {
- special="style.special.cp"
- dst="${special%.special.cp}.css"
- plus_jeune "$DOS_DST/$1/$dst" "$DOS_SRC/$special" || return 0
- echo "$DOS_SRC/$special -> $DOS_DST/$1/$dst"
- cp "$DOS_SRC/$special" "$DOS_DST/$1/$dst"
-}
-
# recréer la hiérarchie de dossiers
hierarchie() {
for d in $(find "$DOS_SRC/"* -type d)
@@ -148,7 +140,6 @@ http() {
gen_final "http" "html" "html"
humans "http"
sitemap.txt "http"
- style "http"
compresser "$DOS_DST/http"
}
@@ -161,7 +152,6 @@ https() {
gen_final "https" "html" "html"
humans "https"
sitemap.txt "https"
- style "https"
compresser "$DOS_DST/https"
}
diff --git a/lib/pres/html.awk b/lib/pres/html.awk
@@ -2,6 +2,7 @@
BEGIN {
racine = "/~selve/"
+ f_css = "lib/style.css"
}
function intervalle() {
@@ -28,8 +29,12 @@ function doc_ouv(META, ETQ) {
<meta name=\"author\" content=\"" auteur "\">\n\
<meta name=\"robots\" content=\"index,follow\">\n\
<meta name=\"viewport\" content=\"width=device-width,initial-scale=1.0\">\n\
- <link rel=\"stylesheet\" type=\"text/css\" href=\"/~selve/style.css\">\n\
<link rel=\"icon\" href=\"data:;base64,iVBORw0KGgo=\">\n\
+ <style>\n")
+ while ((getline ligne < f_css) > 0)
+ ramasser("\t\t" ligne "\n")
+ close(f_css)
+ ramasser("\t</style>\n\
</head>\n\
<body>\n\
<main>\n")
diff --git a/src/style.special.cp b/lib/style.css