1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-17 11:55:31 -04:00

Google AMP support & switch to NPM builds (#14)

This commit is contained in:
2019-11-19 15:23:16 -05:00
committed by GitHub
parent d42a00247f
commit d6ad47c57b
30 changed files with 463 additions and 136 deletions

View File

@@ -7,7 +7,7 @@
{{- $maxWidth := 910 -}}
{{- $setWidth := 0 -}}
{{- if .Get "width" }}
{{- if .Get "width" -}}
{{- $setWidth = (int (.Get "width")) -}}
{{- $retinaWidth := (mul $setWidth 2) -}}
@@ -24,7 +24,7 @@
{{- $image := .Scratch.Get "image" -}}
{{- $origRatio := (div (float $image.Height) $image.Width) }}
{{- $origRatio := (div (float $image.Height) $image.Width) -}}
{{- $displayWidth := $setWidth -}}
{{- $displayHeight := (math.Ceil (mul $origRatio $setWidth)) -}}