mirror of
https://github.com/yanislav-igonin/micrach
synced 2025-04-20 03:40:33 +03:00
lint
This commit is contained in:
parent
b43e1f431e
commit
c60989630e
@ -1,7 +1,7 @@
|
|||||||
{{ define "captcha" }}
|
{{ define "captcha" }}
|
||||||
<div class="captcha-container text-center">
|
<div class="captcha-container text-center">
|
||||||
<img src="/captcha/{{ . }}" alt="Captcha">
|
<img src="/captcha/{{ . }}" alt="Captcha">
|
||||||
</div>
|
</div>
|
||||||
<input class="form-control" type="hidden" name="captchaId" value="{{ . }}">
|
<input class="form-control" type="hidden" name="captchaId" value="{{ . }}">
|
||||||
<input class="form-control" id="postCaptcha" type="tel" pattern="\d+" placeholder="Captcha" name="captcha">
|
<input class="form-control" id="postCaptcha" type="tel" pattern="\d+" placeholder="Captcha" name="captcha">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
{{ define "footer" }}
|
{{ define "footer" }}
|
||||||
<footer class="py-4">
|
<footer class="py-4">
|
||||||
<div class="container text-center">
|
<div class="container text-center">
|
||||||
<a href="https://github.com/yanislav-igonin/micrach" target="blank">
|
<a href="https://github.com/yanislav-igonin/micrach" target="blank">
|
||||||
<img src="/static/images/github-icon.png" alt="GitHub icon">
|
<img src="/static/images/github-icon.png" alt="GitHub icon">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{{ define "header" }}
|
{{ define "header" }}
|
||||||
|
|
||||||
{{ if . }}
|
{{ if . }}
|
||||||
<a href="/" class="thread-title-link">
|
<a href="/" class="thread-title-link">
|
||||||
<h1 class="display-1 text-center thread-title">
|
<h1 class="display-1 text-center thread-title">
|
||||||
{{ if ne . "" }}
|
{{ if ne . "" }}
|
||||||
{{ . }}
|
{{ . }}
|
||||||
@ -9,9 +9,9 @@
|
|||||||
Welcome to Micrach
|
Welcome to Micrach
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</h1>
|
</h1>
|
||||||
</a>
|
</a>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<h1 class="display-1 text-center">Welcome to Micrach</h1>
|
<h1 class="display-1 text-center">Welcome to Micrach</h1>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{{ define "pagiantion" }}
|
{{ define "pagiantion" }}
|
||||||
<nav aria-label="Page navigation">
|
<nav aria-label="Page navigation">
|
||||||
<ul id="pagesList" class="pagination justify-content-center">
|
<ul id="pagesList" class="pagination justify-content-center">
|
||||||
{{ $ActivePage := .Page }}
|
{{ $ActivePage := .Page }}
|
||||||
{{ range $i := Iterate .PagesCount }}
|
{{ range $i := Iterate .PagesCount }}
|
||||||
@ -8,5 +8,5 @@
|
|||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{{ define "post-form" }}
|
{{ define "post-form" }}
|
||||||
<div class="d-flex justify-content-center">
|
<div class="d-flex justify-content-center">
|
||||||
|
|
||||||
<div class="col col-lg-6 col-md-8">
|
<div class="col col-lg-6 col-md-8">
|
||||||
{{ if eq .FirstPostID 0 }}
|
{{ if eq .FirstPostID 0 }}
|
||||||
@ -42,5 +42,5 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{{ define "post" }}
|
{{ define "post" }}
|
||||||
<div class="post-container mb-4">
|
<div class="post-container mb-4">
|
||||||
{{ $filesLength := len .Files }}
|
{{ $filesLength := len .Files }}
|
||||||
{{ if gt $filesLength 0 }}
|
{{ if gt $filesLength 0 }}
|
||||||
<div class="files-container">
|
<div class="files-container">
|
||||||
@ -16,5 +16,5 @@
|
|||||||
<div class="p-2">
|
<div class="p-2">
|
||||||
<p class="card-text line-break text-break">{{.Text}}</p>
|
<p class="card-text line-break text-break">{{.Text}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
@ -1,5 +1,5 @@
|
|||||||
{{ define "thread-card" }}
|
{{ define "thread-card" }}
|
||||||
<div class="col col-sm-6 col-md-4 col-lg-3">
|
<div class="col col-sm-6 col-md-4 col-lg-3">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
{{ $length := len .Files }}
|
{{ $length := len .Files }}
|
||||||
{{ if gt $length 0 }}
|
{{ if gt $length 0 }}
|
||||||
@ -22,5 +22,5 @@
|
|||||||
<a href="/{{.ID}}" class="btn btn-outline-primary">Open</a>
|
<a href="/{{.ID}}" class="btn btn-outline-primary">Open</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -1,31 +1,31 @@
|
|||||||
{{ define "meta-tags-dynamic" }}
|
{{ define "meta-tags-dynamic" }}
|
||||||
|
|
||||||
{{ $SeoImageUrl := "" }}
|
{{ $SeoImageUrl := "" }}
|
||||||
{{ if .Files }}
|
{{ if .Files }}
|
||||||
{{ $FirstFile := index .Files 0 }}
|
{{ $FirstFile := index .Files 0 }}
|
||||||
{{ $SeoImageUrl = printf "https://micrach.igonin.dev/uploads/%d/t/%d.%s" .ID $FirstFile.ID $FirstFile.Ext }}
|
{{ $SeoImageUrl = printf "https://micrach.igonin.dev/uploads/%d/t/%d.%s" .ID $FirstFile.ID $FirstFile.Ext }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $SeoImageUrl = "https://memepedia.ru/wp-content/uploads/2018/03/ebanyy-rot-etogo-kazino.png" }}
|
{{ $SeoImageUrl = "https://memepedia.ru/wp-content/uploads/2018/03/ebanyy-rot-etogo-kazino.png" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<title>{{ .Title }}</title>
|
<title>{{ .Title }}</title>
|
||||||
<!-- Primary Meta Tags -->
|
<!-- Primary Meta Tags -->
|
||||||
<meta charset="UTF-8"/>
|
<meta charset="UTF-8"/>
|
||||||
<meta name="title" content="{{ .Title }}">
|
<meta name="title" content="{{ .Title }}">
|
||||||
<meta name="description" content="{{ .Text }}">
|
<meta name="description" content="{{ .Text }}">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<!-- Open Graph / Facebook -->
|
<!-- Open Graph / Facebook -->
|
||||||
<meta property="og:type" content="website">
|
<meta property="og:type" content="website">
|
||||||
<meta property="og:url" content="https://micrach.igonin.dev/{{ .ID }}">
|
<meta property="og:url" content="https://micrach.igonin.dev/{{ .ID }}">
|
||||||
<meta property="og:title" content="{{ .Title }}">
|
<meta property="og:title" content="{{ .Title }}">
|
||||||
<meta property="og:description" content="{{ .Text }}">
|
<meta property="og:description" content="{{ .Text }}">
|
||||||
<meta property="og:image" content="{{ $SeoImageUrl }}">
|
<meta property="og:image" content="{{ $SeoImageUrl }}">
|
||||||
|
|
||||||
<!-- Twitter -->
|
<!-- Twitter -->
|
||||||
<meta property="twitter:card" content="{{ $SeoImageUrl }}">
|
<meta property="twitter:card" content="{{ $SeoImageUrl }}">
|
||||||
<meta property="twitter:url" content="https://micrach.igonin.dev/{{ .ID }}">
|
<meta property="twitter:url" content="https://micrach.igonin.dev/{{ .ID }}">
|
||||||
<meta property="twitter:title" content="{{ .Title }}">
|
<meta property="twitter:title" content="{{ .Title }}">
|
||||||
<meta property="twitter:description" content="{{ .Text }}">
|
<meta property="twitter:description" content="{{ .Text }}">
|
||||||
<meta property="twitter:image" content="{{ $SeoImageUrl }}">
|
<meta property="twitter:image" content="{{ $SeoImageUrl }}">
|
||||||
{{ end }}
|
{{ end }}
|
@ -1,22 +1,22 @@
|
|||||||
{{ define "meta-tags-static" }}
|
{{ define "meta-tags-static" }}
|
||||||
<title>Micrach</title>
|
<title>Micrach</title>
|
||||||
<!-- Primary Meta Tags -->
|
<!-- Primary Meta Tags -->
|
||||||
<meta charset="UTF-8"/>
|
<meta charset="UTF-8"/>
|
||||||
<meta name="title" content="Micrach">
|
<meta name="title" content="Micrach">
|
||||||
<meta name="description" content="Single board imageboard.">
|
<meta name="description" content="Single board imageboard.">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<!-- Open Graph / Facebook -->
|
<!-- Open Graph / Facebook -->
|
||||||
<meta property="og:type" content="website">
|
<meta property="og:type" content="website">
|
||||||
<meta property="og:url" content="https://micrach.igonin.dev/">
|
<meta property="og:url" content="https://micrach.igonin.dev/">
|
||||||
<meta property="og:title" content="Micrach">
|
<meta property="og:title" content="Micrach">
|
||||||
<meta property="og:description" content="Single board imageboard.">
|
<meta property="og:description" content="Single board imageboard.">
|
||||||
<meta property="og:image" content="https://memepedia.ru/wp-content/uploads/2018/03/ebanyy-rot-etogo-kazino.png">
|
<meta property="og:image" content="https://memepedia.ru/wp-content/uploads/2018/03/ebanyy-rot-etogo-kazino.png">
|
||||||
|
|
||||||
<!-- Twitter -->
|
<!-- Twitter -->
|
||||||
<meta property="twitter:card" content="https://memepedia.ru/wp-content/uploads/2018/03/ebanyy-rot-etogo-kazino.png">
|
<meta property="twitter:card" content="https://memepedia.ru/wp-content/uploads/2018/03/ebanyy-rot-etogo-kazino.png">
|
||||||
<meta property="twitter:url" content="https://micrach.igonin.dev/">
|
<meta property="twitter:url" content="https://micrach.igonin.dev/">
|
||||||
<meta property="twitter:title" content="Micrach">
|
<meta property="twitter:title" content="Micrach">
|
||||||
<meta property="twitter:description" content="Single board imageboard.">
|
<meta property="twitter:description" content="Single board imageboard.">
|
||||||
<meta property="twitter:image" content="https://memepedia.ru/wp-content/uploads/2018/03/ebanyy-rot-etogo-kazino.png">
|
<meta property="twitter:image" content="https://memepedia.ru/wp-content/uploads/2018/03/ebanyy-rot-etogo-kazino.png">
|
||||||
{{ end }}
|
{{ end }}
|
@ -1,16 +1,16 @@
|
|||||||
{{ define "static" }}
|
{{ define "static" }}
|
||||||
<link
|
<link
|
||||||
href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css"
|
href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css"
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We"
|
integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We"
|
||||||
crossorigin="anonymous"
|
crossorigin="anonymous"
|
||||||
>
|
>
|
||||||
<script
|
<script
|
||||||
src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.bundle.min.js"
|
src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.bundle.min.js"
|
||||||
integrity="sha384-U1DAWAznBHeqEIlVSCgzq+c9gqGAJn5c/t99JyeKa9xxaYpSvHU5awsuZVVFIhvj"
|
integrity="sha384-U1DAWAznBHeqEIlVSCgzq+c9gqGAJn5c/t99JyeKa9xxaYpSvHU5awsuZVVFIhvj"
|
||||||
crossorigin="anonymous">
|
crossorigin="anonymous">
|
||||||
</script>
|
</script>
|
||||||
<link rel="icon" href="/static/favicon.ico"/>
|
<link rel="icon" href="/static/favicon.ico"/>
|
||||||
<link href="/static/styles/utils.css" rel="stylesheet">
|
<link href="/static/styles/utils.css" rel="stylesheet">
|
||||||
<link href="/static/styles/post-form.css" rel="stylesheet">
|
<link href="/static/styles/post-form.css" rel="stylesheet">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Loading…
Reference in New Issue
Block a user