- Commit
- 5d2a5133a7997bbd4a0cf667a97f54917cb0b3c9
- Parent
- c3f58378e06e482e3af118810d605759c8f1c658
- Author
- Pablo <pablo-escobar@riseup.net>
- Date
Decreased the number of preloaded images from the gallery
Custum build of stapix for tikz.pablopie.xyz
Decreased the number of preloaded images from the gallery
1 file changed, 2 insertions, 1 deletion
Status | File Name | N° Changes | Insertions | Deletions |
Modified | src/main.rs | 3 | 2 | 1 |
diff --git a/src/main.rs b/src/main.rs @@ -262,7 +262,8 @@ fn render_index(pics: &Vec<GalleryEntry>) -> io::Result<()> { writeln!(f, "<title>{PAGE_TITLE}</title>")?; write_head(&mut f)?; - for pic in pics.iter().take(10) { + // Preload the first 2 pictures in the gallery + for pic in pics.iter().take(2) { writeln!( f, "<link rel=\"preload\" as=\"image\" href=\"{path}\">",