diff --git a/static/img/home/portrait.png b/assets/img/home/portrait.png similarity index 100% rename from static/img/home/portrait.png rename to assets/img/home/portrait.png diff --git a/static/img/portfolio/learn-to-program/screenshot.png b/assets/img/portfolio/learn-to-program/screenshot.png similarity index 100% rename from static/img/portfolio/learn-to-program/screenshot.png rename to assets/img/portfolio/learn-to-program/screenshot.png diff --git a/static/img/portfolio/watch-together/screenshot.png b/assets/img/portfolio/watch-together/screenshot.png similarity index 100% rename from static/img/portfolio/watch-together/screenshot.png rename to assets/img/portfolio/watch-together/screenshot.png diff --git a/static/img/portfolio/youtube-music-desktop-player/screenshot.png b/assets/img/portfolio/youtube-music-desktop-player/screenshot.png similarity index 100% rename from static/img/portfolio/youtube-music-desktop-player/screenshot.png rename to assets/img/portfolio/youtube-music-desktop-player/screenshot.png diff --git a/static/img/posts/adventofctf/coin.jpeg b/assets/img/posts/adventofctf/coin.jpeg similarity index 100% rename from static/img/posts/adventofctf/coin.jpeg rename to assets/img/posts/adventofctf/coin.jpeg diff --git a/static/img/posts/adventofctf/scoreboard.jpeg b/assets/img/posts/adventofctf/scoreboard.jpeg similarity index 100% rename from static/img/posts/adventofctf/scoreboard.jpeg rename to assets/img/posts/adventofctf/scoreboard.jpeg diff --git a/static/img/writeups/adventofctf/2020/080b5d5fcaf13167d2e7e8871fdc8ded.png b/assets/img/writeups/adventofctf/2020/080b5d5fcaf13167d2e7e8871fdc8ded.png similarity index 100% rename from static/img/writeups/adventofctf/2020/080b5d5fcaf13167d2e7e8871fdc8ded.png rename to assets/img/writeups/adventofctf/2020/080b5d5fcaf13167d2e7e8871fdc8ded.png diff --git a/static/img/writeups/adventofctf/2020/16/ssti_graph.png b/assets/img/writeups/adventofctf/2020/16/ssti_graph.png similarity index 100% rename from static/img/writeups/adventofctf/2020/16/ssti_graph.png rename to assets/img/writeups/adventofctf/2020/16/ssti_graph.png diff --git a/static/img/writeups/adventofctf/2020/23/breakpoint.png b/assets/img/writeups/adventofctf/2020/23/breakpoint.png similarity index 100% rename from static/img/writeups/adventofctf/2020/23/breakpoint.png rename to assets/img/writeups/adventofctf/2020/23/breakpoint.png diff --git a/static/img/writeups/adventofctf/2020/23/websocket.png b/assets/img/writeups/adventofctf/2020/23/websocket.png similarity index 100% rename from static/img/writeups/adventofctf/2020/23/websocket.png rename to assets/img/writeups/adventofctf/2020/23/websocket.png diff --git a/static/img/writeups/adventofctf/2020/246397ca184f8b03ac8fecf50ee1051e.png b/assets/img/writeups/adventofctf/2020/246397ca184f8b03ac8fecf50ee1051e.png similarity index 100% rename from static/img/writeups/adventofctf/2020/246397ca184f8b03ac8fecf50ee1051e.png rename to assets/img/writeups/adventofctf/2020/246397ca184f8b03ac8fecf50ee1051e.png diff --git a/static/img/writeups/adventofctf/2020/24e9ce8f146f70b4189f1d2532a75208.png b/assets/img/writeups/adventofctf/2020/24e9ce8f146f70b4189f1d2532a75208.png similarity index 100% rename from static/img/writeups/adventofctf/2020/24e9ce8f146f70b4189f1d2532a75208.png rename to assets/img/writeups/adventofctf/2020/24e9ce8f146f70b4189f1d2532a75208.png diff --git a/static/img/writeups/adventofctf/2020/3542630bd0bb5141d94e4b40930bd69d.png b/assets/img/writeups/adventofctf/2020/3542630bd0bb5141d94e4b40930bd69d.png similarity index 100% rename from static/img/writeups/adventofctf/2020/3542630bd0bb5141d94e4b40930bd69d.png rename to assets/img/writeups/adventofctf/2020/3542630bd0bb5141d94e4b40930bd69d.png diff --git a/static/img/writeups/adventofctf/2020/3f12301d8715a1371d2d776d25ea6ab6.png b/assets/img/writeups/adventofctf/2020/3f12301d8715a1371d2d776d25ea6ab6.png similarity index 100% rename from static/img/writeups/adventofctf/2020/3f12301d8715a1371d2d776d25ea6ab6.png rename to assets/img/writeups/adventofctf/2020/3f12301d8715a1371d2d776d25ea6ab6.png diff --git a/static/img/writeups/adventofctf/2020/497784f7a3314f8aa5b8464432e30bbe.png b/assets/img/writeups/adventofctf/2020/497784f7a3314f8aa5b8464432e30bbe.png similarity index 100% rename from static/img/writeups/adventofctf/2020/497784f7a3314f8aa5b8464432e30bbe.png rename to assets/img/writeups/adventofctf/2020/497784f7a3314f8aa5b8464432e30bbe.png diff --git a/static/img/writeups/adventofctf/2020/4f5cc0afbb9e7ec6a57cdd68a92b9213.png b/assets/img/writeups/adventofctf/2020/4f5cc0afbb9e7ec6a57cdd68a92b9213.png similarity index 100% rename from static/img/writeups/adventofctf/2020/4f5cc0afbb9e7ec6a57cdd68a92b9213.png rename to assets/img/writeups/adventofctf/2020/4f5cc0afbb9e7ec6a57cdd68a92b9213.png diff --git a/static/img/writeups/adventofctf/2020/6c0810c1568645bcf58da67a1db6e3e7.png b/assets/img/writeups/adventofctf/2020/6c0810c1568645bcf58da67a1db6e3e7.png similarity index 100% rename from static/img/writeups/adventofctf/2020/6c0810c1568645bcf58da67a1db6e3e7.png rename to assets/img/writeups/adventofctf/2020/6c0810c1568645bcf58da67a1db6e3e7.png diff --git a/static/img/writeups/adventofctf/2020/8717d728f2de96beb8123c0cca28a728.png b/assets/img/writeups/adventofctf/2020/8717d728f2de96beb8123c0cca28a728.png similarity index 100% rename from static/img/writeups/adventofctf/2020/8717d728f2de96beb8123c0cca28a728.png rename to assets/img/writeups/adventofctf/2020/8717d728f2de96beb8123c0cca28a728.png diff --git a/static/img/writeups/adventofctf/2020/948b1eb046c96865a05808660ee99e10.png b/assets/img/writeups/adventofctf/2020/948b1eb046c96865a05808660ee99e10.png similarity index 100% rename from static/img/writeups/adventofctf/2020/948b1eb046c96865a05808660ee99e10.png rename to assets/img/writeups/adventofctf/2020/948b1eb046c96865a05808660ee99e10.png diff --git a/static/img/writeups/adventofctf/2020/973ded4b2381c28af6c24d3d670303c6.png b/assets/img/writeups/adventofctf/2020/973ded4b2381c28af6c24d3d670303c6.png similarity index 100% rename from static/img/writeups/adventofctf/2020/973ded4b2381c28af6c24d3d670303c6.png rename to assets/img/writeups/adventofctf/2020/973ded4b2381c28af6c24d3d670303c6.png diff --git a/static/img/writeups/adventofctf/2020/9c6afd807a15973b962cf3aee3dbe836.png b/assets/img/writeups/adventofctf/2020/9c6afd807a15973b962cf3aee3dbe836.png similarity index 100% rename from static/img/writeups/adventofctf/2020/9c6afd807a15973b962cf3aee3dbe836.png rename to assets/img/writeups/adventofctf/2020/9c6afd807a15973b962cf3aee3dbe836.png diff --git a/static/img/writeups/adventofctf/2020/9fac6046540f4972c60f458b94aacb1d.png b/assets/img/writeups/adventofctf/2020/9fac6046540f4972c60f458b94aacb1d.png similarity index 100% rename from static/img/writeups/adventofctf/2020/9fac6046540f4972c60f458b94aacb1d.png rename to assets/img/writeups/adventofctf/2020/9fac6046540f4972c60f458b94aacb1d.png diff --git a/static/img/writeups/adventofctf/2020/a4afd1fffb0b662d849a6907767f0625.png b/assets/img/writeups/adventofctf/2020/a4afd1fffb0b662d849a6907767f0625.png similarity index 100% rename from static/img/writeups/adventofctf/2020/a4afd1fffb0b662d849a6907767f0625.png rename to assets/img/writeups/adventofctf/2020/a4afd1fffb0b662d849a6907767f0625.png diff --git a/static/img/writeups/adventofctf/2020/advent_of_ctf_coming_soon.png b/assets/img/writeups/adventofctf/2020/advent_of_ctf_coming_soon.png similarity index 100% rename from static/img/writeups/adventofctf/2020/advent_of_ctf_coming_soon.png rename to assets/img/writeups/adventofctf/2020/advent_of_ctf_coming_soon.png diff --git a/static/img/writeups/adventofctf/2020/af3424cd215a6459494ae07eab33cb35.png b/assets/img/writeups/adventofctf/2020/af3424cd215a6459494ae07eab33cb35.png similarity index 100% rename from static/img/writeups/adventofctf/2020/af3424cd215a6459494ae07eab33cb35.png rename to assets/img/writeups/adventofctf/2020/af3424cd215a6459494ae07eab33cb35.png diff --git a/static/img/writeups/adventofctf/2020/b915cb528c4b3d6fc4644f73ba8b829d.png b/assets/img/writeups/adventofctf/2020/b915cb528c4b3d6fc4644f73ba8b829d.png similarity index 100% rename from static/img/writeups/adventofctf/2020/b915cb528c4b3d6fc4644f73ba8b829d.png rename to assets/img/writeups/adventofctf/2020/b915cb528c4b3d6fc4644f73ba8b829d.png diff --git a/static/img/writeups/adventofctf/2020/ba15475608ea3f8313825eec5dceac06.png b/assets/img/writeups/adventofctf/2020/ba15475608ea3f8313825eec5dceac06.png similarity index 100% rename from static/img/writeups/adventofctf/2020/ba15475608ea3f8313825eec5dceac06.png rename to assets/img/writeups/adventofctf/2020/ba15475608ea3f8313825eec5dceac06.png diff --git a/static/img/writeups/adventofctf/2020/be40bcd25e7487440a64b13cd32049b2.png b/assets/img/writeups/adventofctf/2020/be40bcd25e7487440a64b13cd32049b2.png similarity index 100% rename from static/img/writeups/adventofctf/2020/be40bcd25e7487440a64b13cd32049b2.png rename to assets/img/writeups/adventofctf/2020/be40bcd25e7487440a64b13cd32049b2.png diff --git a/static/img/writeups/adventofctf/2020/c1f93b6ee2e1cd25ea02f9a78c364b12.png b/assets/img/writeups/adventofctf/2020/c1f93b6ee2e1cd25ea02f9a78c364b12.png similarity index 100% rename from static/img/writeups/adventofctf/2020/c1f93b6ee2e1cd25ea02f9a78c364b12.png rename to assets/img/writeups/adventofctf/2020/c1f93b6ee2e1cd25ea02f9a78c364b12.png diff --git a/static/img/writeups/adventofctf/2020/c366d63edd4a35c9f8bea89e57401fef.png b/assets/img/writeups/adventofctf/2020/c366d63edd4a35c9f8bea89e57401fef.png similarity index 100% rename from static/img/writeups/adventofctf/2020/c366d63edd4a35c9f8bea89e57401fef.png rename to assets/img/writeups/adventofctf/2020/c366d63edd4a35c9f8bea89e57401fef.png diff --git a/static/img/writeups/adventofctf/2020/d80f13d1ab714f7864c2a9ef56c5f767.png b/assets/img/writeups/adventofctf/2020/d80f13d1ab714f7864c2a9ef56c5f767.png similarity index 100% rename from static/img/writeups/adventofctf/2020/d80f13d1ab714f7864c2a9ef56c5f767.png rename to assets/img/writeups/adventofctf/2020/d80f13d1ab714f7864c2a9ef56c5f767.png diff --git a/static/img/writeups/adventofctf/2020/da781419d6bf02d0a580e48414b9cbde.png b/assets/img/writeups/adventofctf/2020/da781419d6bf02d0a580e48414b9cbde.png similarity index 100% rename from static/img/writeups/adventofctf/2020/da781419d6bf02d0a580e48414b9cbde.png rename to assets/img/writeups/adventofctf/2020/da781419d6bf02d0a580e48414b9cbde.png diff --git a/static/img/writeups/adventofctf/2020/dd04640480d764ab09eea047cde749cd.png b/assets/img/writeups/adventofctf/2020/dd04640480d764ab09eea047cde749cd.png similarity index 100% rename from static/img/writeups/adventofctf/2020/dd04640480d764ab09eea047cde749cd.png rename to assets/img/writeups/adventofctf/2020/dd04640480d764ab09eea047cde749cd.png diff --git a/static/img/writeups/adventofctf/2020/f1d6ca5572e0c012239bcf4a8f797be1.png b/assets/img/writeups/adventofctf/2020/f1d6ca5572e0c012239bcf4a8f797be1.png similarity index 100% rename from static/img/writeups/adventofctf/2020/f1d6ca5572e0c012239bcf4a8f797be1.png rename to assets/img/writeups/adventofctf/2020/f1d6ca5572e0c012239bcf4a8f797be1.png diff --git a/static/img/writeups/adventofctf/2020/f90b2bf3f08ee628c09505ff309018ed.png b/assets/img/writeups/adventofctf/2020/f90b2bf3f08ee628c09505ff309018ed.png similarity index 100% rename from static/img/writeups/adventofctf/2020/f90b2bf3f08ee628c09505ff309018ed.png rename to assets/img/writeups/adventofctf/2020/f90b2bf3f08ee628c09505ff309018ed.png diff --git a/static/img/writeups/google-ctf/2021/beginners-quest/1/cctv.png b/assets/img/writeups/google-ctf/2021/beginners-quest/1/cctv.png similarity index 100% rename from static/img/writeups/google-ctf/2021/beginners-quest/1/cctv.png rename to assets/img/writeups/google-ctf/2021/beginners-quest/1/cctv.png diff --git a/static/img/writeups/google-ctf/2021/beginners-quest/1/cover.png b/assets/img/writeups/google-ctf/2021/beginners-quest/1/cover.png similarity index 100% rename from static/img/writeups/google-ctf/2021/beginners-quest/1/cover.png rename to assets/img/writeups/google-ctf/2021/beginners-quest/1/cover.png diff --git a/static/img/writeups/google-ctf/2021/beginners-quest/2/cover.png b/assets/img/writeups/google-ctf/2021/beginners-quest/2/cover.png similarity index 100% rename from static/img/writeups/google-ctf/2021/beginners-quest/2/cover.png rename to assets/img/writeups/google-ctf/2021/beginners-quest/2/cover.png diff --git a/static/img/writeups/google-ctf/2021/beginners-quest/2/gates/and.png b/assets/img/writeups/google-ctf/2021/beginners-quest/2/gates/and.png similarity index 100% rename from static/img/writeups/google-ctf/2021/beginners-quest/2/gates/and.png rename to assets/img/writeups/google-ctf/2021/beginners-quest/2/gates/and.png diff --git a/static/img/writeups/google-ctf/2021/beginners-quest/2/gates/nand.png b/assets/img/writeups/google-ctf/2021/beginners-quest/2/gates/nand.png similarity index 100% rename from static/img/writeups/google-ctf/2021/beginners-quest/2/gates/nand.png rename to assets/img/writeups/google-ctf/2021/beginners-quest/2/gates/nand.png diff --git a/static/img/writeups/google-ctf/2021/beginners-quest/2/gates/nor.png b/assets/img/writeups/google-ctf/2021/beginners-quest/2/gates/nor.png similarity index 100% rename from static/img/writeups/google-ctf/2021/beginners-quest/2/gates/nor.png rename to assets/img/writeups/google-ctf/2021/beginners-quest/2/gates/nor.png diff --git a/static/img/writeups/google-ctf/2021/beginners-quest/2/gates/not.png b/assets/img/writeups/google-ctf/2021/beginners-quest/2/gates/not.png similarity index 100% rename from static/img/writeups/google-ctf/2021/beginners-quest/2/gates/not.png rename to assets/img/writeups/google-ctf/2021/beginners-quest/2/gates/not.png diff --git a/static/img/writeups/google-ctf/2021/beginners-quest/2/gates/or.png b/assets/img/writeups/google-ctf/2021/beginners-quest/2/gates/or.png similarity index 100% rename from static/img/writeups/google-ctf/2021/beginners-quest/2/gates/or.png rename to assets/img/writeups/google-ctf/2021/beginners-quest/2/gates/or.png diff --git a/static/img/writeups/google-ctf/2021/beginners-quest/2/gates/xor.png b/assets/img/writeups/google-ctf/2021/beginners-quest/2/gates/xor.png similarity index 100% rename from static/img/writeups/google-ctf/2021/beginners-quest/2/gates/xor.png rename to assets/img/writeups/google-ctf/2021/beginners-quest/2/gates/xor.png diff --git a/static/img/writeups/google-ctf/2021/beginners-quest/2/logic-lock-solved.png b/assets/img/writeups/google-ctf/2021/beginners-quest/2/logic-lock-solved.png similarity index 100% rename from static/img/writeups/google-ctf/2021/beginners-quest/2/logic-lock-solved.png rename to assets/img/writeups/google-ctf/2021/beginners-quest/2/logic-lock-solved.png diff --git a/static/img/writeups/google-ctf/2021/beginners-quest/2/logic-lock.png b/assets/img/writeups/google-ctf/2021/beginners-quest/2/logic-lock.png similarity index 100% rename from static/img/writeups/google-ctf/2021/beginners-quest/2/logic-lock.png rename to assets/img/writeups/google-ctf/2021/beginners-quest/2/logic-lock.png diff --git a/static/img/writeups/google-ctf/2021/beginners-quest/3/cover.png b/assets/img/writeups/google-ctf/2021/beginners-quest/3/cover.png similarity index 100% rename from static/img/writeups/google-ctf/2021/beginners-quest/3/cover.png rename to assets/img/writeups/google-ctf/2021/beginners-quest/3/cover.png diff --git a/static/img/writeups/google-ctf/2021/beginners-quest/3/cover2.png b/assets/img/writeups/google-ctf/2021/beginners-quest/3/cover2.png similarity index 100% rename from static/img/writeups/google-ctf/2021/beginners-quest/3/cover2.png rename to assets/img/writeups/google-ctf/2021/beginners-quest/3/cover2.png diff --git a/static/img/writeups/google-ctf/2021/beginners-quest/3/flag.png b/assets/img/writeups/google-ctf/2021/beginners-quest/3/flag.png similarity index 100% rename from static/img/writeups/google-ctf/2021/beginners-quest/3/flag.png rename to assets/img/writeups/google-ctf/2021/beginners-quest/3/flag.png diff --git a/static/img/writeups/google-ctf/2021/beginners-quest/3/radar.png b/assets/img/writeups/google-ctf/2021/beginners-quest/3/radar.png similarity index 100% rename from static/img/writeups/google-ctf/2021/beginners-quest/3/radar.png rename to assets/img/writeups/google-ctf/2021/beginners-quest/3/radar.png diff --git a/static/img/writeups/google-ctf/2021/beginners-quest/4/cover.png b/assets/img/writeups/google-ctf/2021/beginners-quest/4/cover.png similarity index 100% rename from static/img/writeups/google-ctf/2021/beginners-quest/4/cover.png rename to assets/img/writeups/google-ctf/2021/beginners-quest/4/cover.png diff --git a/static/img/writeups/google-ctf/2021/beginners-quest/4/doc-functions.png b/assets/img/writeups/google-ctf/2021/beginners-quest/4/doc-functions.png similarity index 100% rename from static/img/writeups/google-ctf/2021/beginners-quest/4/doc-functions.png rename to assets/img/writeups/google-ctf/2021/beginners-quest/4/doc-functions.png diff --git a/static/img/writeups/google-ctf/2021/beginners-quest/4/doc-set-mask.png b/assets/img/writeups/google-ctf/2021/beginners-quest/4/doc-set-mask.png similarity index 100% rename from static/img/writeups/google-ctf/2021/beginners-quest/4/doc-set-mask.png rename to assets/img/writeups/google-ctf/2021/beginners-quest/4/doc-set-mask.png diff --git a/static/img/writeups/google-ctf/2021/beginners-quest/5/cover.png b/assets/img/writeups/google-ctf/2021/beginners-quest/5/cover.png similarity index 100% rename from static/img/writeups/google-ctf/2021/beginners-quest/5/cover.png rename to assets/img/writeups/google-ctf/2021/beginners-quest/5/cover.png diff --git a/static/img/writeups/google-ctf/2021/beginners-quest/6/cover.png b/assets/img/writeups/google-ctf/2021/beginners-quest/6/cover.png similarity index 100% rename from static/img/writeups/google-ctf/2021/beginners-quest/6/cover.png rename to assets/img/writeups/google-ctf/2021/beginners-quest/6/cover.png diff --git a/static/img/writeups/google-ctf/2021/beginners-quest/6/painting.jpg b/assets/img/writeups/google-ctf/2021/beginners-quest/6/painting.jpg similarity index 100% rename from static/img/writeups/google-ctf/2021/beginners-quest/6/painting.jpg rename to assets/img/writeups/google-ctf/2021/beginners-quest/6/painting.jpg diff --git a/static/img/writeups/google-ctf/2021/beginners-quest/6/piet.png b/assets/img/writeups/google-ctf/2021/beginners-quest/6/piet.png similarity index 100% rename from static/img/writeups/google-ctf/2021/beginners-quest/6/piet.png rename to assets/img/writeups/google-ctf/2021/beginners-quest/6/piet.png diff --git a/static/img/writeups/google-ctf/2021/beginners-quest/6/piet.ppm b/assets/img/writeups/google-ctf/2021/beginners-quest/6/piet.ppm similarity index 100% rename from static/img/writeups/google-ctf/2021/beginners-quest/6/piet.ppm rename to assets/img/writeups/google-ctf/2021/beginners-quest/6/piet.ppm diff --git a/static/img/writeups/google-ctf/2021/beginners-quest/7/cover.png b/assets/img/writeups/google-ctf/2021/beginners-quest/7/cover.png similarity index 100% rename from static/img/writeups/google-ctf/2021/beginners-quest/7/cover.png rename to assets/img/writeups/google-ctf/2021/beginners-quest/7/cover.png diff --git a/static/img/writeups/google-ctf/2021/beginners-quest/8/cover.png b/assets/img/writeups/google-ctf/2021/beginners-quest/8/cover.png similarity index 100% rename from static/img/writeups/google-ctf/2021/beginners-quest/8/cover.png rename to assets/img/writeups/google-ctf/2021/beginners-quest/8/cover.png diff --git a/static/img/writeups/google-ctf/2021/beginners-quest/8/hideandseek.png b/assets/img/writeups/google-ctf/2021/beginners-quest/8/hideandseek.png similarity index 100% rename from static/img/writeups/google-ctf/2021/beginners-quest/8/hideandseek.png rename to assets/img/writeups/google-ctf/2021/beginners-quest/8/hideandseek.png diff --git a/static/img/writeups/google-ctf/2021/beginners-quest/9/cover.png b/assets/img/writeups/google-ctf/2021/beginners-quest/9/cover.png similarity index 100% rename from static/img/writeups/google-ctf/2021/beginners-quest/9/cover.png rename to assets/img/writeups/google-ctf/2021/beginners-quest/9/cover.png diff --git a/assets/test.png b/assets/test.png new file mode 100644 index 0000000..295c0ec Binary files /dev/null and b/assets/test.png differ diff --git a/content/writeups/google-ctf/2021/beginners-quest/8.md b/content/writeups/google-ctf/2021/beginners-quest/8.md index 462523a..ba80ede 100644 --- a/content/writeups/google-ctf/2021/beginners-quest/8.md +++ b/content/writeups/google-ctf/2021/beginners-quest/8.md @@ -47,7 +47,7 @@ I see you are a person of many qualities. I must say I am impressed. One last th [attachment.zip](/files/writeups/google-ctf/2021/beginners-quest/8/attachment.zip) -{{< figure class="small" src="/img/writeups/google-ctf/2021/beginners-quest/8/hideandseek.png" title="hideandseek.png" >}} +{{< figure class="small" src="/img/writeups/google-ctf/2021/beginners-quest/8/hideandseek.png" title="hideandseek.png" raw=true >}} _Note: The image is supposed to look like half is missing._ diff --git a/themes/maik-blog/layouts/_default/list.html b/themes/maik-blog/layouts/_default/list.html index f9e4847..6600518 100644 --- a/themes/maik-blog/layouts/_default/list.html +++ b/themes/maik-blog/layouts/_default/list.html @@ -44,15 +44,7 @@ {{- if .Params.Cover }}
- {{- $img := imageConfig (printf "static/%s" .Params.Cover) }} - - {{- if .Params.UseRelativeCover }} - {{ .Title | plainify | default - {{- else }} - {{ .Title | plainify | default - {{- end }} + {{- partial "image.html" (dict "path" .Params.Cover "alt" (.Title | plainify)) }} {{- if .Params.CoverCaption }}
{{ .Params.CoverCaption | markdownify }}
diff --git a/themes/maik-blog/layouts/_default/single.html b/themes/maik-blog/layouts/_default/single.html index f8808a2..4d078b0 100644 --- a/themes/maik-blog/layouts/_default/single.html +++ b/themes/maik-blog/layouts/_default/single.html @@ -23,9 +23,9 @@
{{- end }} - {{ with .Params.Cover }} - - {{ end }} + {{- with .Params.Cover }} + {{- partial "image.html" (dict "path" . "alt" "" "class" "post-cover") }} + {{- end }}
{{ .Content }} diff --git a/themes/maik-blog/layouts/index.html b/themes/maik-blog/layouts/index.html index 4c82496..448c391 100644 --- a/themes/maik-blog/layouts/index.html +++ b/themes/maik-blog/layouts/index.html @@ -2,9 +2,7 @@
{{- if .Site.Params.Portrait.Path }} - {{- $img := imageConfig (printf "static/%s" .Site.Params.Portrait.Path) }} - {{ .Site.Params.Portrait.Alt }} + {{- partial "image.html" (dict "path" .Site.Params.Portrait.Path "alt" .Site.Params.Portrait.Alt "class" "circle" "style" (printf "max-width:%s" .Site.Params.Portrait.Size ))}} {{- end }}

{{ .Site.Title }}

diff --git a/themes/maik-blog/layouts/partials/image.html b/themes/maik-blog/layouts/partials/image.html new file mode 100644 index 0000000..df51c0e --- /dev/null +++ b/themes/maik-blog/layouts/partials/image.html @@ -0,0 +1,5 @@ +{{- $img := resources.Get .path }} +{{- $img = $img.Resize (printf "%dx%d webp" $img.Width $img.Height) }} +{{ .alt | default \ No newline at end of file diff --git a/themes/maik-blog/layouts/partials/logo.html b/themes/maik-blog/layouts/partials/logo.html index 31f2061..daa182b 100644 --- a/themes/maik-blog/layouts/partials/logo.html +++ b/themes/maik-blog/layouts/partials/logo.html @@ -2,7 +2,7 @@ style="text-decoration: none;"> {{- if .Params.Cover }}
- {{- $img := imageConfig (printf "static/%s" .Params.Cover) }} - - {{- if .Params.UseRelativeCover }} - {{ .Title | plainify | default - {{- else }} - {{ .Title | plainify | default - {{- end }} + {{- partial "image.html" (dict "path" .Params.Cover "alt" (.Title | plainify | default " ")) }} {{- if .Params.CoverCaption }}
{{ .Params.CoverCaption | markdownify }}
diff --git a/themes/maik-blog/layouts/portfolio/single.html b/themes/maik-blog/layouts/portfolio/single.html index b982104..b87be5a 100644 --- a/themes/maik-blog/layouts/portfolio/single.html +++ b/themes/maik-blog/layouts/portfolio/single.html @@ -35,9 +35,7 @@ {{- end }} {{- if .Params.Cover }} - {{ $img := imageConfig (printf "static/%s" .Params.Cover) }} - {{ .Title | plainify | default + {{- partial "image.html" (dict "path" .Params.Cover "alt" (.Title | plainify | default " ") "class" "portfolio-cover") }} {{- end }}
diff --git a/themes/maik-blog/layouts/posts/single.html b/themes/maik-blog/layouts/posts/single.html index cc79ec8..be38198 100644 --- a/themes/maik-blog/layouts/posts/single.html +++ b/themes/maik-blog/layouts/posts/single.html @@ -38,9 +38,7 @@ {{- end }} {{- if .Params.Cover }} - {{ $img := imageConfig (printf "static/%s" .Params.Cover) }} - {{ .Title | plainify | default + {{- partial "image.html" (dict "path" .Params.Cover "alt" (.Title | plainify | default " ") "class" "post-cover") }} {{- end }}
diff --git a/themes/maik-blog/layouts/shortcodes/figure.html b/themes/maik-blog/layouts/shortcodes/figure.html index 5979862..56754bf 100644 --- a/themes/maik-blog/layouts/shortcodes/figure.html +++ b/themes/maik-blog/layouts/shortcodes/figure.html @@ -3,10 +3,14 @@ {{- end -}} - {{ with .Get - + width="{{ .Get "width" | default $img.Width }}" height="{{ .Get "height" | default $img.Height }}" /> + {{- else }} + {{- partial "image.html" (dict "path" (.Get "src") "alt" (or (.Get "alt") (.Get "caption" | markdownify | plainify) | default " ") "width" (.Get "width") "height" (.Get "height")) }} + {{- end }} {{- if .Get "link" }}{{ end -}} {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}}
diff --git a/themes/maik-blog/layouts/shortcodes/image.html b/themes/maik-blog/layouts/shortcodes/image.html index e403564..4dce1a9 100644 --- a/themes/maik-blog/layouts/shortcodes/image.html +++ b/themes/maik-blog/layouts/shortcodes/image.html @@ -1,5 +1,3 @@ - {{ if .Get "src" }} - {{ . | plainify }} - {{ end }} \ No newline at end of file +{{- if .Get "src" }} +{{- partial "image.html" (dict "path" (.Get "src") "alt" (.Get "alt" | plainify | default " ") "style" (.Get "style" | safeCSS | default " ") )}} +{{- end }} \ No newline at end of file diff --git a/themes/maik-blog/layouts/writeups/list.html b/themes/maik-blog/layouts/writeups/list.html index c100948..3b7ef29 100644 --- a/themes/maik-blog/layouts/writeups/list.html +++ b/themes/maik-blog/layouts/writeups/list.html @@ -45,16 +45,7 @@ {{- if .Params.Cover }}
- {{- $img := imageConfig (printf "static/%s" .Params.Cover) }} - - {{- if .Params.UseRelativeCover }} - {{ .Title | plainify | default - {{- else }} - {{ .Title | plainify | default - {{- end }} + {{- partial "image.html" (dict "path" .Params.Cover "alt" (.Title | plainify)) }} {{- if .Params.CoverCaption }}
{{ .Params.CoverCaption | markdownify }}
diff --git a/themes/maik-blog/layouts/writeups/single.html b/themes/maik-blog/layouts/writeups/single.html index cc79ec8..be38198 100644 --- a/themes/maik-blog/layouts/writeups/single.html +++ b/themes/maik-blog/layouts/writeups/single.html @@ -38,9 +38,7 @@ {{- end }} {{- if .Params.Cover }} - {{ $img := imageConfig (printf "static/%s" .Params.Cover) }} - {{ .Title | plainify | default + {{- partial "image.html" (dict "path" .Params.Cover "alt" (.Title | plainify | default " ") "class" "post-cover") }} {{- end }}