mirror of https://github.com/jpanther/congo.git
Compare commits
5 Commits
6c41d70e80
...
d7359f99f9
Author | SHA1 | Date |
---|---|---|
Wen Junhua | d7359f99f9 | |
James Panther | 82b5481914 | |
dependabot[bot] | d19572206a | |
Wen Junhua | 1b7361c50d | |
Wen Junhua | d225da3941 |
|
@ -81,6 +81,11 @@
|
||||||
type="image/webp"
|
type="image/webp"
|
||||||
/>
|
/>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ $orientation := 1 }}
|
||||||
|
{{ with .Exif }}
|
||||||
|
{{ $orientation = .Tags.Orientation }}
|
||||||
|
{{ end }}
|
||||||
|
{{ if eq $orientation 1 }}
|
||||||
<img
|
<img
|
||||||
src="{{ .RelPermalink }}"
|
src="{{ .RelPermalink }}"
|
||||||
width="{{ $width }}"
|
width="{{ $width }}"
|
||||||
|
@ -107,6 +112,34 @@
|
||||||
src="{{ (.Resize "660x").RelPermalink }}"
|
src="{{ (.Resize "660x").RelPermalink }}"
|
||||||
{{ end }}
|
{{ end }}
|
||||||
>
|
>
|
||||||
|
{{ else if (eq $orientation 8) }}
|
||||||
|
<img
|
||||||
|
src="{{ (.Resize "r90").RelPermalink }}"
|
||||||
|
width="{{ $width }}"
|
||||||
|
height="{{ $height }}"
|
||||||
|
{{ with $class }} class="{{ . }}" {{ end }}
|
||||||
|
{{ with $alt }} alt="{{ . }}" {{ end }}
|
||||||
|
{{ with $lazy }} loading="lazy" decoding="async" {{ end }}
|
||||||
|
{{ if lt .Width 660 }}
|
||||||
|
src="{{ .RelPermalink }}"
|
||||||
|
{{ else }}
|
||||||
|
srcset="
|
||||||
|
{{- (.Resize "330x r90").RelPermalink }} 330w,
|
||||||
|
{{- (.Resize "660x r90").RelPermalink }} 660w
|
||||||
|
{{ if gt .Width 1024 }}
|
||||||
|
,{{ (.Resize "1024x r90").RelPermalink }} 1024w
|
||||||
|
{{ else }}
|
||||||
|
,{{ .RelPermalink }} {{ .Width }}w
|
||||||
|
{{ end }}
|
||||||
|
{{ if gt .Width 1320 }}
|
||||||
|
,{{ (.Resize "1320x r90").RelPermalink }} 2x
|
||||||
|
{{ else }}
|
||||||
|
,{{ .RelPermalink }} {{ .Width }}w
|
||||||
|
{{ end }}"
|
||||||
|
src="{{ (.Resize "660x r90").RelPermalink }}"
|
||||||
|
{{ end }}
|
||||||
|
>
|
||||||
|
{{ end }}
|
||||||
</picture>
|
</picture>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
|
@ -15,7 +15,7 @@
|
||||||
"fuse.js": "^7.0.0",
|
"fuse.js": "^7.0.0",
|
||||||
"katex": "^0.16.9",
|
"katex": "^0.16.9",
|
||||||
"mermaid": "^10.6.1",
|
"mermaid": "^10.6.1",
|
||||||
"prettier": "^3.1.0",
|
"prettier": "^3.1.1",
|
||||||
"prettier-plugin-go-template": "^0.0.15",
|
"prettier-plugin-go-template": "^0.0.15",
|
||||||
"prettier-plugin-tailwindcss": "^0.5.9",
|
"prettier-plugin-tailwindcss": "^0.5.9",
|
||||||
"quicklink": "^2.3.0",
|
"quicklink": "^2.3.0",
|
||||||
|
@ -2333,9 +2333,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/prettier": {
|
"node_modules/prettier": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.1.tgz",
|
||||||
"integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==",
|
"integrity": "sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"prettier": "bin/prettier.cjs"
|
"prettier": "bin/prettier.cjs"
|
||||||
|
@ -4845,9 +4845,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"prettier": {
|
"prettier": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.1.tgz",
|
||||||
"integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==",
|
"integrity": "sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"prettier-plugin-go-template": {
|
"prettier-plugin-go-template": {
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
"fuse.js": "^7.0.0",
|
"fuse.js": "^7.0.0",
|
||||||
"katex": "^0.16.9",
|
"katex": "^0.16.9",
|
||||||
"mermaid": "^10.6.1",
|
"mermaid": "^10.6.1",
|
||||||
"prettier": "^3.1.0",
|
"prettier": "^3.1.1",
|
||||||
"prettier-plugin-go-template": "^0.0.15",
|
"prettier-plugin-go-template": "^0.0.15",
|
||||||
"prettier-plugin-tailwindcss": "^0.5.9",
|
"prettier-plugin-tailwindcss": "^0.5.9",
|
||||||
"quicklink": "^2.3.0",
|
"quicklink": "^2.3.0",
|
||||||
|
|
Loading…
Reference in New Issue