Convert all images to webp when possible
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 400 KiB After Width: | Height: | Size: 400 KiB |
|
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 135 KiB |
|
Before Width: | Height: | Size: 382 KiB After Width: | Height: | Size: 382 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 512 KiB After Width: | Height: | Size: 512 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 143 KiB After Width: | Height: | Size: 143 KiB |
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 572 KiB After Width: | Height: | Size: 572 KiB |
|
Before Width: | Height: | Size: 499 KiB After Width: | Height: | Size: 499 KiB |
|
Before Width: | Height: | Size: 523 KiB After Width: | Height: | Size: 523 KiB |
|
Before Width: | Height: | Size: 522 KiB After Width: | Height: | Size: 522 KiB |
|
Before Width: | Height: | Size: 568 KiB After Width: | Height: | Size: 568 KiB |
|
Before Width: | Height: | Size: 540 KiB After Width: | Height: | Size: 540 KiB |
|
Before Width: | Height: | Size: 532 KiB After Width: | Height: | Size: 532 KiB |
|
Before Width: | Height: | Size: 553 KiB After Width: | Height: | Size: 553 KiB |
|
Before Width: | Height: | Size: 628 KiB After Width: | Height: | Size: 628 KiB |
|
Before Width: | Height: | Size: 560 KiB After Width: | Height: | Size: 560 KiB |
|
Before Width: | Height: | Size: 536 KiB After Width: | Height: | Size: 536 KiB |
|
Before Width: | Height: | Size: 594 KiB After Width: | Height: | Size: 594 KiB |
|
Before Width: | Height: | Size: 636 KiB After Width: | Height: | Size: 636 KiB |
|
Before Width: | Height: | Size: 314 KiB After Width: | Height: | Size: 314 KiB |
|
Before Width: | Height: | Size: 516 KiB After Width: | Height: | Size: 516 KiB |
|
Before Width: | Height: | Size: 546 KiB After Width: | Height: | Size: 546 KiB |
|
Before Width: | Height: | Size: 579 KiB After Width: | Height: | Size: 579 KiB |
|
Before Width: | Height: | Size: 558 KiB After Width: | Height: | Size: 558 KiB |
|
Before Width: | Height: | Size: 552 KiB After Width: | Height: | Size: 552 KiB |
|
Before Width: | Height: | Size: 559 KiB After Width: | Height: | Size: 559 KiB |
|
Before Width: | Height: | Size: 499 KiB After Width: | Height: | Size: 499 KiB |
|
Before Width: | Height: | Size: 536 KiB After Width: | Height: | Size: 536 KiB |
|
Before Width: | Height: | Size: 564 KiB After Width: | Height: | Size: 564 KiB |
|
Before Width: | Height: | Size: 515 KiB After Width: | Height: | Size: 515 KiB |
|
Before Width: | Height: | Size: 314 KiB After Width: | Height: | Size: 314 KiB |
|
Before Width: | Height: | Size: 348 KiB After Width: | Height: | Size: 348 KiB |
|
Before Width: | Height: | Size: 309 KiB After Width: | Height: | Size: 309 KiB |
|
Before Width: | Height: | Size: 371 KiB After Width: | Height: | Size: 371 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 909 KiB After Width: | Height: | Size: 909 KiB |
|
Before Width: | Height: | Size: 889 KiB After Width: | Height: | Size: 889 KiB |
|
Before Width: | Height: | Size: 243 KiB After Width: | Height: | Size: 243 KiB |
|
Before Width: | Height: | Size: 189 KiB After Width: | Height: | Size: 189 KiB |
|
Before Width: | Height: | Size: 407 KiB After Width: | Height: | Size: 407 KiB |
|
Before Width: | Height: | Size: 177 KiB After Width: | Height: | Size: 177 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 99 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 115 KiB After Width: | Height: | Size: 115 KiB |
|
After Width: | Height: | Size: 400 KiB |
@@ -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)
|
[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._
|
_Note: The image is supposed to look like half is missing._
|
||||||
|
|
||||||
|
|||||||
@@ -44,15 +44,7 @@
|
|||||||
|
|
||||||
{{- if .Params.Cover }}
|
{{- if .Params.Cover }}
|
||||||
<figure class="post-cover">
|
<figure class="post-cover">
|
||||||
{{- $img := imageConfig (printf "static/%s" .Params.Cover) }}
|
{{- partial "image.html" (dict "path" .Params.Cover "alt" (.Title | plainify)) }}
|
||||||
|
|
||||||
{{- if .Params.UseRelativeCover }}
|
|
||||||
<img src="{{ (printf "%s%s" .Permalink .Params.Cover ) }}" alt="{{ .Title | plainify | default " " }}"
|
|
||||||
width="{{ $img.Width }}" height="{{ $img.Height }}" />
|
|
||||||
{{- else }}
|
|
||||||
<img src="{{ .Params.Cover | absURL }}" alt="{{ .Title | plainify | default " " }}"
|
|
||||||
width="{{ $img.Width }}" height="{{ $img.Height }}" />
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- if .Params.CoverCaption }}
|
{{- if .Params.CoverCaption }}
|
||||||
<figcaption class="center">{{ .Params.CoverCaption | markdownify }}</figcaption>
|
<figcaption class="center">{{ .Params.CoverCaption | markdownify }}</figcaption>
|
||||||
|
|||||||
@@ -23,9 +23,9 @@
|
|||||||
<hr />
|
<hr />
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{ with .Params.Cover }}
|
{{- with .Params.Cover }}
|
||||||
<img src="/{{ . }}" class="post-cover" />
|
{{- partial "image.html" (dict "path" . "alt" "" "class" "post-cover") }}
|
||||||
{{ end }}
|
{{- end }}
|
||||||
|
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
|
|||||||
@@ -2,9 +2,7 @@
|
|||||||
<main role="main" style="">
|
<main role="main" style="">
|
||||||
<div>
|
<div>
|
||||||
{{- if .Site.Params.Portrait.Path }}
|
{{- if .Site.Params.Portrait.Path }}
|
||||||
{{- $img := imageConfig (printf "static/%s" .Site.Params.Portrait.Path) }}
|
{{- 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 ))}}
|
||||||
<img src="{{ .Site.Params.Portrait.Path }}" class="circle" alt="{{ .Site.Params.Portrait.Alt }}"
|
|
||||||
width="{{ $img.Width }}" height="{{ $img.Height }}" style="max-width:{{ .Site.Params.Portrait.Size }}" />
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
<h1>{{ .Site.Title }}</h1>
|
<h1>{{ .Site.Title }}</h1>
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{{- $img := resources.Get .path }}
|
||||||
|
{{- $img = $img.Resize (printf "%dx%d webp" $img.Width $img.Height) }}
|
||||||
|
<img src="{{ $img.Permalink }}" alt="{{ .alt | default " " }}" width="{{ .width | default $img.Width }}"
|
||||||
|
height="{{ .height | default $img.Height }}" {{- if .class}}class="{{ .class }}" {{end}}
|
||||||
|
{{- if .style}}style="{{ .style | safeCSS | default " " }}" {{end}} />
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
style="text-decoration: none;">
|
style="text-decoration: none;">
|
||||||
<div class="logo">
|
<div class="logo">
|
||||||
{{- if .Site.Params.Logo.path }}
|
{{- if .Site.Params.Logo.path }}
|
||||||
<img src="{{ .Site.Params.Logo.path }}" alt="{{ .Site.Params.Logo.alt }}" />
|
{{- partial "image.html" (dict "path" .Site.Params.Logo.path "alt" .Site.Params.Logo.alt) }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<span class="logo__mark">></span>
|
<span class="logo__mark">></span>
|
||||||
<span class="logo__text">{{- with .Site.Params.Logo.logoText }}{{ . }}{{ else }}$ cd /home/{{ end }}<span
|
<span class="logo__text">{{- with .Site.Params.Logo.logoText }}{{ . }}{{ else }}$ cd /home/{{ end }}<span
|
||||||
|
|||||||
@@ -16,8 +16,9 @@
|
|||||||
content="{{ if .IsHome }}{{ .Site.Params.homeSubtitle }}{{ else }}{{ .Params.description | plainify }}{{ end }}" />
|
content="{{ if .IsHome }}{{ .Site.Params.homeSubtitle }}{{ else }}{{ .Params.description | plainify }}{{ end }}" />
|
||||||
<meta property="og:url" content="{{ .Permalink }}" />
|
<meta property="og:url" content="{{ .Permalink }}" />
|
||||||
{{- with .Params.cover }}
|
{{- with .Params.cover }}
|
||||||
<meta property="og:image" content="{{ . | absURL }}" />
|
{{- $img := resources.Get . }}
|
||||||
{{- $img := imageConfig (printf "static/%s" .) }}
|
{{- $img = $img.Resize (printf "%dx%d png" $img.Width $img.Height) }}
|
||||||
|
<meta property="og:image" content="{{ $img.Permalink }}" />
|
||||||
<meta property="og:image:width" content="{{ $img.Width }}" />
|
<meta property="og:image:width" content="{{ $img.Width }}" />
|
||||||
<meta property="og:image:height" content="{{ $img.Height }}" />
|
<meta property="og:image:height" content="{{ $img.Height }}" />
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -49,7 +50,9 @@
|
|||||||
<!-- Twitter cards -->
|
<!-- Twitter cards -->
|
||||||
<meta name="twitter:card" content="summary_large_image" />
|
<meta name="twitter:card" content="summary_large_image" />
|
||||||
{{- if .Params.cover }}
|
{{- if .Params.cover }}
|
||||||
<meta name="twitter:image" content="{{ .Params.cover | absURL }}" />
|
{{- $img := resources.Get .Params.cover }}
|
||||||
|
{{- $img = $img.Resize (printf "%dx%d png" $img.Width $img.Height) }}
|
||||||
|
<meta name="twitter:image" content="{{ $img.Permalink }}" />
|
||||||
<meta name="twitter:image:alt" content="{{ .Params.title | plainify | default " " }}" />
|
<meta name="twitter:image:alt" content="{{ .Params.title | plainify | default " " }}" />
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<meta name="twitter:title" content="{{ .Title }}" />
|
<meta name="twitter:title" content="{{ .Title }}" />
|
||||||
|
|||||||
@@ -75,15 +75,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{{- if .Params.Cover }}
|
{{- if .Params.Cover }}
|
||||||
<figure class="portfolio-cover">
|
<figure class="portfolio-cover">
|
||||||
{{- $img := imageConfig (printf "static/%s" .Params.Cover) }}
|
{{- partial "image.html" (dict "path" .Params.Cover "alt" (.Title | plainify | default " ")) }}
|
||||||
|
|
||||||
{{- if .Params.UseRelativeCover }}
|
|
||||||
<img src="{{ (printf "%s%s" .Permalink .Params.Cover ) }}" alt="{{ .Title | plainify | default " " }}"
|
|
||||||
width="{{ $img.Width }}" height="{{ $img.Height }}" />
|
|
||||||
{{- else }}
|
|
||||||
<img src="{{ .Params.Cover | absURL }}" alt="{{ .Title | plainify | default " " }}"
|
|
||||||
width="{{ $img.Width }}" height="{{ $img.Height }}" />
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- if .Params.CoverCaption }}
|
{{- if .Params.CoverCaption }}
|
||||||
<figcaption class="center">{{ .Params.CoverCaption | markdownify }}</figcaption>
|
<figcaption class="center">{{ .Params.CoverCaption | markdownify }}</figcaption>
|
||||||
|
|||||||
@@ -35,9 +35,7 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if .Params.Cover }}
|
{{- if .Params.Cover }}
|
||||||
{{ $img := imageConfig (printf "static/%s" .Params.Cover) }}
|
{{- partial "image.html" (dict "path" .Params.Cover "alt" (.Title | plainify | default " ") "class" "portfolio-cover") }}
|
||||||
<img src="/{{ .Params.Cover }}" class="portfolio-cover" alt="{{ .Title | plainify | default " " }}"
|
|
||||||
width="{{ $img.Width }}" height="{{ $img.Height }}" />
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
<div class="portfolio-content">
|
<div class="portfolio-content">
|
||||||
|
|||||||
@@ -38,9 +38,7 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if .Params.Cover }}
|
{{- if .Params.Cover }}
|
||||||
{{ $img := imageConfig (printf "static/%s" .Params.Cover) }}
|
{{- partial "image.html" (dict "path" .Params.Cover "alt" (.Title | plainify | default " ") "class" "post-cover") }}
|
||||||
<img src="/{{ .Params.Cover }}" class="post-cover" alt="{{ .Title | plainify | default " " }}"
|
|
||||||
width="{{ $img.Width }}" height="{{ $img.Height }}" />
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
|
|||||||
@@ -3,10 +3,14 @@
|
|||||||
<a href="{{ .Get "link" }}" {{ with .Get "target" }} target="{{ . }}" {{ end }}{{ with .Get "rel" }} rel="{{ . }}"
|
<a href="{{ .Get "link" }}" {{ with .Get "target" }} target="{{ . }}" {{ end }}{{ with .Get "rel" }} rel="{{ . }}"
|
||||||
{{ end }}>
|
{{ end }}>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
<img src="{{ .Get "src" }}" {{- if or (.Get "alt") (.Get "caption") }}
|
{{- if eq (.Get "raw") true }}
|
||||||
|
{{- $img := resources.Get (.Get "src") }}
|
||||||
|
<img src="{{ $img.Permalink }}" {{- if or (.Get "alt") (.Get "caption") }}
|
||||||
alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify| plainify }}{{ end }}" {{- end -}}
|
alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify| plainify }}{{ end }}" {{- end -}}
|
||||||
{{- with .Get "width" }} width="{{ . }}" {{ end -}} {{- with .Get "height" }} height="{{ . }}" {{ end -}} />
|
width="{{ .Get "width" | default $img.Width }}" height="{{ .Get "height" | default $img.Height }}" />
|
||||||
<!-- Closing img tag -->
|
{{- 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" }}</a>{{ end -}}
|
{{- if .Get "link" }}</a>{{ end -}}
|
||||||
{{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}}
|
{{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}}
|
||||||
<figcaption>
|
<figcaption>
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
{{ if .Get "src" }}
|
{{- if .Get "src" }}
|
||||||
<img src="{{ .Get "src" | safeURL }}" {{ with .Get "alt" }} alt="{{ . | plainify }}" {{ end }}
|
{{- partial "image.html" (dict "path" (.Get "src") "alt" (.Get "alt" | plainify | default " ") "style" (.Get "style" | safeCSS | default " ") )}}
|
||||||
class="{{ with .Get "position"}}{{ . }}{{ else -}} left {{- end }}" {{ with .Get "style" }}
|
{{- end }}
|
||||||
style="{{ . | safeCSS }}" {{ end }} />
|
|
||||||
{{ end }}
|
|
||||||
@@ -45,16 +45,7 @@
|
|||||||
|
|
||||||
{{- if .Params.Cover }}
|
{{- if .Params.Cover }}
|
||||||
<figure class="post-cover">
|
<figure class="post-cover">
|
||||||
{{- $img := imageConfig (printf "static/%s" .Params.Cover) }}
|
{{- partial "image.html" (dict "path" .Params.Cover "alt" (.Title | plainify)) }}
|
||||||
|
|
||||||
{{- if .Params.UseRelativeCover }}
|
|
||||||
<img src="{{ (printf "%s%s" .Permalink .Params.Cover ) }}"
|
|
||||||
alt="{{ .Title | plainify | default " " }}" width="{{ $img.Width }}"
|
|
||||||
height="{{ $img.Height }}" />
|
|
||||||
{{- else }}
|
|
||||||
<img src="{{ .Params.Cover | absURL }}" alt="{{ .Title | plainify | default " " }}"
|
|
||||||
width="{{ $img.Width }}" height="{{ $img.Height }}" />
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- if .Params.CoverCaption }}
|
{{- if .Params.CoverCaption }}
|
||||||
<figcaption class="center">{{ .Params.CoverCaption | markdownify }}</figcaption>
|
<figcaption class="center">{{ .Params.CoverCaption | markdownify }}</figcaption>
|
||||||
|
|||||||
@@ -38,9 +38,7 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if .Params.Cover }}
|
{{- if .Params.Cover }}
|
||||||
{{ $img := imageConfig (printf "static/%s" .Params.Cover) }}
|
{{- partial "image.html" (dict "path" .Params.Cover "alt" (.Title | plainify | default " ") "class" "post-cover") }}
|
||||||
<img src="/{{ .Params.Cover }}" class="post-cover" alt="{{ .Title | plainify | default " " }}"
|
|
||||||
width="{{ $img.Width }}" height="{{ $img.Height }}" />
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
|
|||||||