tikz-gallery-generator

Custum build of stapix for tikz.pablopie.xyz

Commit
6f6871e7928419ef2cb2965711349f7bca3dc3fe
Parent
64f4f7920e71d9366b2f77632017bfaec597e76e
Author
Pablo <pablo-escobar@riseup.net>
Date

Factored out some more HTML attributes and paths

Diffstat

1 file changed, 6 insertions, 3 deletions

Status File Name N° Changes Insertions Deletions
Modified src/main.rs 9 6 3
diff --git a/src/main.rs b/src/main.rs
@@ -15,8 +15,11 @@ const PHOTOS_PATH:  &str = "assets/photos";
 const THUMBS_PATH:  &str = "assets/thumbs";
 const FAVICON_PATH: &str = "assets/favicon.ico";
 const ICON_PATH:    &str = "assets/icon.svg";
+const STYLES_PATH:  &str = "styles.css";
 
 const PAGE_TITLE: &str = "Pablo&apos;s Photo Gallery";
+const AUTHOR: &str = "Pablo";
+const LICENSE: &str = "GPLv3";
 
 /// WebP image quality
 const IMAGE_QUALITY: f32 = 50.0;
@@ -298,14 +301,14 @@ fn write_head(f: &mut File) -> io::Result<()> {
         f,
         "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">"
     )?;
-    writeln!(f, "<meta name=\"author\" content=\"Pablo\">")?;
-    writeln!(f, "<meta name=\"copyright\" content=\"GPLv2\">")?;
+    writeln!(f, "<meta name=\"author\" content=\"{AUTHOR}\">")?;
+    writeln!(f, "<meta name=\"copyright\" content=\"{LICENSE}\">")?;
     writeln!(
         f,
         "<meta content=\"text/html; charset=utf-8\" http-equiv=\"content-type\">"
     )?;
     writeln!(f, "<link rel=\"icon\" href=\"/{FAVICON_PATH}\" type=\"image/x-icon\" sizes=\"16x16 24x24 32x32\">")?;
-    writeln!(f, "<link rel=\"stylesheet\" href=\"/styles.css\">")
+    writeln!(f, "<link rel=\"stylesheet\" href=\"/{STYLES_PATH}\">")
 }
 
 /// Prints a HTML comment with GPL licensing info