mirror of
https://github.com/yanislav-igonin/micrach
synced 2025-04-20 03:40:33 +03:00
feat: header component
This commit is contained in:
parent
21c82b47e9
commit
2809a418a2
17
templates/header.html
Normal file
17
templates/header.html
Normal file
@ -0,0 +1,17 @@
|
||||
{{ define "header" }}
|
||||
|
||||
{{ if . }}
|
||||
<a href="/" class="thread-title-link">
|
||||
<h1 class="display-1 text-center thread-title">
|
||||
{{ if ne . "" }}
|
||||
{{ . }}
|
||||
{{ else }}
|
||||
Welcome to Micrach
|
||||
{{ end }}
|
||||
</h1>
|
||||
</a>
|
||||
{{ else }}
|
||||
<h1 class="display-1 text-center">Welcome to Micrach</h1>
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
@ -8,7 +8,7 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1 class="display-1 text-center">Welcome to Micrach</h1>
|
||||
{{ template "header" }}
|
||||
|
||||
<div class="container">
|
||||
{{ template "post-form" .FormData }}
|
||||
|
@ -11,19 +11,11 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a href="/" class="thread-title-link">
|
||||
<h1 class="display-1 text-center thread-title">
|
||||
{{ if ne $FirstPost.Title "" }}
|
||||
{{$FirstPost.Title}}
|
||||
{{ else }}
|
||||
Welcome to Micrach
|
||||
{{ end }}
|
||||
</h1>
|
||||
</a>
|
||||
{{ template "header" $FirstPost.Title }}
|
||||
|
||||
<div class="container">
|
||||
{{ template "post-form" .FormData }}
|
||||
|
||||
|
||||
<div id="postsСontainer">
|
||||
{{ range $Post := .Thread }}
|
||||
<div class="post-container mb-4">
|
||||
|
Loading…
Reference in New Issue
Block a user