Rework blog
This commit is contained in:
parent
bdf95f35ed
commit
643f9de5c8
4 changed files with 9 additions and 41 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
tailwindcss
|
tailwindcss
|
||||||
.hugo_build.lock
|
.hugo_build.lock
|
||||||
resources/
|
resources/
|
||||||
|
public/
|
||||||
|
|
0
content/posts/.gitkeep
Normal file
0
content/posts/.gitkeep
Normal file
|
@ -1,14 +0,0 @@
|
||||||
[
|
|
||||||
{
|
|
||||||
"title": "Hello World",
|
|
||||||
"release": "2023-05-24",
|
|
||||||
"author": "LinuxSquare",
|
|
||||||
"content": "## Meow World"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "Bye World",
|
|
||||||
"release": "2023-05-26",
|
|
||||||
"author": "LinuxSquare",
|
|
||||||
"content": ""
|
|
||||||
}
|
|
||||||
]
|
|
|
@ -1,34 +1,15 @@
|
||||||
<!-- Get Data maybe from strapi -->
|
<!-- Get Data maybe from strapi -->
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
{{ range .Site.Data.news }}
|
{{ range last 4 (site.GetPage "posts").Pages.ByDate }}
|
||||||
<div class="flex-auto">
|
<div class="flex-auto">
|
||||||
<h3 class="mb-0">{{.title}}</h3>
|
<h3 class="mb-0">{{ .Title }}</h3>
|
||||||
<small>{{.release}}</small>
|
<small>{{ .Date | time.Format ":date_long" }}</small>
|
||||||
</div>
|
</div>
|
||||||
<p></p>
|
<p>{{ .Summary }}</p>
|
||||||
<button
|
<a
|
||||||
type="button"
|
|
||||||
class="text-white bg-blue-700 hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 font-medium rounded-full text-sm px-5 py-2.5 text-center me-2 mb-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 max-w-2xs"
|
class="text-white bg-blue-700 hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 font-medium rounded-full text-sm px-5 py-2.5 text-center me-2 mb-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 max-w-2xs"
|
||||||
onclick="openNewsPage('{{.title}}', '{{.release}}', '{{.author}}', '{{.content}}')">Read more</button>
|
href="{{ .RelPermalink }}">
|
||||||
|
Read more
|
||||||
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="newsbox" class="invisible">
|
|
||||||
<div class="color-background"></div>
|
|
||||||
<div class="content">
|
|
||||||
<div class="inner">
|
|
||||||
<div class="close-btn" onclick="closeNewsPage()"></div>
|
|
||||||
<h3 id="title-h3" class="title"></h3>
|
|
||||||
<div class="flex flex-row lead">
|
|
||||||
<span id="post-date" class="flex-auto"></span>
|
|
||||||
<span id="authorname" class="flex-auto"></span>
|
|
||||||
</div>
|
|
||||||
<div class="content">
|
|
||||||
<div id="content-box">
|
|
||||||
{{ "## Meow" | markdownify }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
Loading…
Reference in a new issue