- Commit
- fe35f1247de21a19dac98f566076deb1de6ddce5
- Parent
- e60aaef2752e8849fc57ffb38fc24139f097e886
- Author
- Pablo <pablo-escobar@riseup.net>
- Date
Minor tweak
Made it so that only the 10 first pictures in the gallery are preloaded in the index page
Yet another static page generator for photo galleries
Minor tweak
Made it so that only the 10 first pictures in the gallery are preloaded in the index page
1 files changed, 1 insertions, 1 deletions
Status | Name | Changes | Insertions | Deletions |
Modified | src/main.rs | 2 files changed | 1 | 1 |
diff --git a/src/main.rs b/src/main.rs @@ -119,7 +119,7 @@ fn render_index(pic_infos: &Vec) -> io::Result<()> { writeln!(f, "<title>{PAGE_TITLE}</title>")?; write_head(&mut f)?; - for pic in pic_infos { + for pic in &pic_infos[0..10] { writeln!( f, "<link rel=\"preload\" as=\"image\" href=\"/{THUMBS_PATH}/{name}.webp\">",