Use error image in embed for error pages (and use an img_url variable)

This commit is contained in:
BBaoVanC 2021-09-25 14:59:08 -05:00
parent 9989c740cd
commit 36351cba70
1 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,6 @@
{{ $code := placeholder "http.error.status_code" }}
{{ $text := placeholder "http.error.status_text" }}
{{ $img_url := (printf "https://errors.boba.best/%s.jpg" $code) }}
<html>
<head>
<title>{{ $code }} {{ $text }}</title>
@ -9,18 +10,18 @@
<meta property="og:title" content="{{ $code }} {{ $text }}" />
<meta property="og:description" content="{{ $code }} {{ $text }}" />
<meta property="og:image" content="https://boba.best/img/boba_mochi.gif"/>
<meta property="og:image" content="{{ $img_url }}"/>
<meta property="og:site_name" content="boba.best" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:image" content="https://boba.best/img/boba_mochi.gif"/>
<meta name="twitter:image" content="{{ $img_url }}"/>
<meta name="twitter:title" content="{{ $code }} {{ $text }}" />
<meta name="twitter:description" content="{{ $code }} {{ $text }}" />
</head>
<body bgcolor="black" text="white">
<center>
<h1>{{ $code }} {{ $text }}</h1>
<img src='https://errors.boba.best/{{ $code }}.jpg' alt="cat" />
<img src='{{ $img_url }}' alt="cat" />
</center>
</body>
</html>