Skip to content

Commit

Permalink
blist-satre: Try to make theme work with baseurl prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
manics committed Jul 3, 2024
1 parent b9f6d9d commit 53f52e4
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 23 deletions.
36 changes: 18 additions & 18 deletions themes/blist-satre/assets/css/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,46 +10,46 @@ body {
font-family: "Inter";
font-style: normal;
font-weight: 300;
src: url("/fonts/inter-v3-latin-300.eot"); /* IE9 Compat Modes */
src: url("../fonts/inter-v3-latin-300.eot"); /* IE9 Compat Modes */
src: local(""),
url("/fonts/inter-v3-latin-300.eot?#iefix") format("embedded-opentype"),
/* IE6-IE8 */ url("/fonts/inter-v3-latin-300.woff2") format("woff2"),
/* Super Modern Browsers */ url("/fonts/inter-v3-latin-300.woff")
url("../fonts/inter-v3-latin-300.eot?#iefix") format("embedded-opentype"),
/* IE6-IE8 */ url("../fonts/inter-v3-latin-300.woff2") format("woff2"),
/* Super Modern Browsers */ url("../fonts/inter-v3-latin-300.woff")
format("woff"),
/* Modern Browsers */ url("/fonts/inter-v3-latin-300.ttf")
/* Modern Browsers */ url("../fonts/inter-v3-latin-300.ttf")
format("truetype"),
/* Safari, Android, iOS */ url("/fonts/inter-v3-latin-300.svg#Inter")
/* Safari, Android, iOS */ url("../fonts/inter-v3-latin-300.svg#Inter")
format("svg"); /* Legacy iOS */
}
/* inter-500 - latin */
@font-face {
font-family: "Inter";
font-style: normal;
font-weight: 500;
src: url("/fonts/inter-v3-latin-500.eot"); /* IE9 Compat Modes */
src: url("../fonts/inter-v3-latin-500.eot"); /* IE9 Compat Modes */
src: local(""),
url("/fonts/inter-v3-latin-500.eot?#iefix") format("embedded-opentype"),
/* IE6-IE8 */ url("/fonts/inter-v3-latin-500.woff2") format("woff2"),
/* Super Modern Browsers */ url("/fonts/inter-v3-latin-500.woff")
url("../fonts/inter-v3-latin-500.eot?#iefix") format("embedded-opentype"),
/* IE6-IE8 */ url("../fonts/inter-v3-latin-500.woff2") format("woff2"),
/* Super Modern Browsers */ url("../fonts/inter-v3-latin-500.woff")
format("woff"),
/* Modern Browsers */ url("/fonts/inter-v3-latin-500.ttf")
/* Modern Browsers */ url("../fonts/inter-v3-latin-500.ttf")
format("truetype"),
/* Safari, Android, iOS */ url("/fonts/inter-v3-latin-500.svg#Inter")
/* Safari, Android, iOS */ url("../fonts/inter-v3-latin-500.svg#Inter")
format("svg"); /* Legacy iOS */
}
/* inter-700 - latin */
@font-face {
font-family: "Inter";
font-style: normal;
font-weight: 700;
src: url("/fonts/inter-v3-latin-700.eot"); /* IE9 Compat Modes */
src: url("../fonts/inter-v3-latin-700.eot"); /* IE9 Compat Modes */
src: local(""),
url("/fonts/inter-v3-latin-700.eot?#iefix") format("embedded-opentype"),
/* IE6-IE8 */ url("/fonts/inter-v3-latin-700.woff2") format("woff2"),
/* Super Modern Browsers */ url("/fonts/inter-v3-latin-700.woff")
url("../fonts/inter-v3-latin-700.eot?#iefix") format("embedded-opentype"),
/* IE6-IE8 */ url("../fonts/inter-v3-latin-700.woff2") format("woff2"),
/* Super Modern Browsers */ url("../fonts/inter-v3-latin-700.woff")
format("woff"),
/* Modern Browsers */ url("/fonts/inter-v3-latin-700.ttf")
/* Modern Browsers */ url("../fonts/inter-v3-latin-700.ttf")
format("truetype"),
/* Safari, Android, iOS */ url("/fonts/inter-v3-latin-700.svg#Inter")
/* Safari, Android, iOS */ url("../fonts/inter-v3-latin-700.svg#Inter")
format("svg"); /* Legacy iOS */
}
4 changes: 3 additions & 1 deletion themes/blist-satre/layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{{ if (and .Params.thumbnail (not (or .Site.Params.hidePageThumbnail .Params.hidePageThumbnail)) ) }}
<div class="relative max-w-5xl mx-auto px-4">
<img src="{{ .Params.thumbnail }}" class="rounded-lg shadow-sm w-full object-contain" />
<img src="{{ .Params.thumbnail | relURL }}" class="rounded-lg shadow-sm w-full object-contain" />
{{ if not (or (or .Site.Params.hideMeta .Params.hideMeta) false) }}
<div class="absolute top-4 right-8 rounded shadow bg-white text-gray-900 dark:bg-gray-900 dark:text-white px-2 py-0.5">
{{ $datestr }}
Expand All @@ -26,12 +26,14 @@ <h5 class="text-sm flex items-center flex-wrap">
<line x1="4" y1="11" x2="20" y2="11" />
<rect x="8" y="15" width="2" height="2" />
</svg>
{{ if not .Date.IsZero }}
{{ $datestr | i18n "postedOnDate" }}
{{ if ne $datestr $lastmodstr }}
&nbsp{{ $lastmodstr | i18n "lastModified" }}</h5><h5 class="text-sm flex items-center flex-wrap">
{{ else }}
&nbsp;&bull;&nbsp;
{{ end }}
{{ end }}
<svg xmlns="http://www.w3.org/2000/svg" class="mr-1" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
<circle cx="12" cy="12" r="9" />
Expand Down
2 changes: 1 addition & 1 deletion themes/blist-satre/layouts/partials/blog-card.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<a href="{{ .Permalink }}">
{{ if .Params.thumbnail }}
<div class="relative">
<img src="{{ .Params.thumbnail }}" alt="{{ .Params.title }}" class="rounded-lg shadow-sm w-full h-52 object-cover" />
<img src="{{ .Params.thumbnail | relURL }}" alt="{{ .Params.title }}" class="rounded-lg shadow-sm w-full h-52 object-cover" />
{{ if not (or (or .Site.Params.hideMeta .Params.hideMeta) false) }}
<div class="absolute top-4 right-4 rounded shadow bg-white text-gray-900 dark:bg-gray-900 dark:text-white text-sm px-2 py-0.5">
{{ partial "date.html" (dict "date" .Date "language" $.Page.Language "format" "short") }}
Expand Down
2 changes: 1 addition & 1 deletion themes/blist-satre/layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />

<link rel="icon" href="{{ if (isset .Site.Params "favicon") }}{{ .Site.Params.favicon }}{{ else }}/favicon.ico{{ end }}">
<link rel="icon" href="{{ if (isset .Site.Params "favicon") }}{{ .Site.Params.favicon | relURL }}{{ else }}/favicon.ico{{ end }}">

<title>
{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ site.Title }}
Expand Down
2 changes: 1 addition & 1 deletion themes/blist-satre/layouts/partials/header.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<header class="container flex justify-between md:justify-between gap-4 flex-wrap p-6 mx-auto relative">
<a href="{{ .Site.Home.Permalink }}" class="capitalize font-extrabold text-2xl">
{{ if .Site.Params.logo }}
<img src="{{ .Site.Params.logo }}" alt="{{ .Site.Title }}" class="h-8 max-w-full" />
<img src="{{ .Site.Params.logo | relURL }}" alt="{{ .Site.Title }}" class="h-8 max-w-full" />
{{ else }}
{{ .Site.Title }}
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion themes/blist-satre/layouts/partials/intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<h1 class="text-4xl font-bold mb-4">{{ .Site.Params.introTitle | safeHTML}}</h1>
<p class="font-light text-lg">{{ .Site.Params.introSubtitle | safeHTML}}</p>
</div>
<img class="rounded-lg shadow-sm" src="{{ .Site.Params.introPhoto }}" alt="{{ .Site.Title }}" />
<img class="rounded-lg shadow-sm" src="{{ .Site.Params.introPhoto | relURL }}" alt="{{ .Site.Title }}" />
</div>
</section>

0 comments on commit 53f52e4

Please sign in to comment.