From 57eb8f6712361a3bf75983ce153fac4846dc0273 Mon Sep 17 00:00:00 2001 From: Vikas Kushwaha Date: Tue, 11 Feb 2025 16:31:08 +0530 Subject: Initial commit --- cmd/web/templates/home/htmx-home-feed.tmpl | 3 ++ cmd/web/templates/home/htmx-home-page.tmpl | 3 ++ cmd/web/templates/home/index.tmpl | 45 ++++++++++++++++ .../home/partials/article-favorite-button.tmpl | 6 +++ .../templates/home/partials/feed-navigation.tmpl | 17 ++++++ cmd/web/templates/home/partials/pagination.tmpl | 18 +++++++ cmd/web/templates/home/partials/post-preview.tmpl | 60 ++++++++++++++++++++++ cmd/web/templates/home/partials/tag-item-list.tmpl | 12 +++++ 8 files changed, 164 insertions(+) create mode 100644 cmd/web/templates/home/htmx-home-feed.tmpl create mode 100644 cmd/web/templates/home/htmx-home-page.tmpl create mode 100644 cmd/web/templates/home/index.tmpl create mode 100644 cmd/web/templates/home/partials/article-favorite-button.tmpl create mode 100644 cmd/web/templates/home/partials/feed-navigation.tmpl create mode 100644 cmd/web/templates/home/partials/pagination.tmpl create mode 100644 cmd/web/templates/home/partials/post-preview.tmpl create mode 100644 cmd/web/templates/home/partials/tag-item-list.tmpl (limited to 'cmd/web/templates/home') diff --git a/cmd/web/templates/home/htmx-home-feed.tmpl b/cmd/web/templates/home/htmx-home-feed.tmpl new file mode 100644 index 0000000..eb24863 --- /dev/null +++ b/cmd/web/templates/home/htmx-home-feed.tmpl @@ -0,0 +1,3 @@ +{{ template "home/partials/post-preview" . }} +{{ template "home/partials/feed-navigation" . }} +{{ template "home/partials/pagination" . }} \ No newline at end of file diff --git a/cmd/web/templates/home/htmx-home-page.tmpl b/cmd/web/templates/home/htmx-home-page.tmpl new file mode 100644 index 0000000..575f328 --- /dev/null +++ b/cmd/web/templates/home/htmx-home-page.tmpl @@ -0,0 +1,3 @@ +{{ template "home/index" . }} +{{ template "components/navbar" . }} +{{ template "components/head" . }} \ No newline at end of file diff --git a/cmd/web/templates/home/index.tmpl b/cmd/web/templates/home/index.tmpl new file mode 100644 index 0000000..65fee1d --- /dev/null +++ b/cmd/web/templates/home/index.tmpl @@ -0,0 +1,45 @@ +
+ + +
+
+ +
+
+ +
+ +
+ + +
+ +
+ +
+ +
+
+
diff --git a/cmd/web/templates/home/partials/article-favorite-button.tmpl b/cmd/web/templates/home/partials/article-favorite-button.tmpl new file mode 100644 index 0000000..c26226a --- /dev/null +++ b/cmd/web/templates/home/partials/article-favorite-button.tmpl @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/cmd/web/templates/home/partials/feed-navigation.tmpl b/cmd/web/templates/home/partials/feed-navigation.tmpl new file mode 100644 index 0000000..0a2356a --- /dev/null +++ b/cmd/web/templates/home/partials/feed-navigation.tmpl @@ -0,0 +1,17 @@ + \ No newline at end of file diff --git a/cmd/web/templates/home/partials/pagination.tmpl b/cmd/web/templates/home/partials/pagination.tmpl new file mode 100644 index 0000000..2ca4042 --- /dev/null +++ b/cmd/web/templates/home/partials/pagination.tmpl @@ -0,0 +1,18 @@ + diff --git a/cmd/web/templates/home/partials/post-preview.tmpl b/cmd/web/templates/home/partials/post-preview.tmpl new file mode 100644 index 0000000..7ef2111 --- /dev/null +++ b/cmd/web/templates/home/partials/post-preview.tmpl @@ -0,0 +1,60 @@ +
+ {{ if .HasArticles }} + {{ range $article := .Articles }} + +
+ + +

{{ $article.Title }}

+

{{ $article.Description }}

+ +
+ Read more... + +
    + {{ range $tag := $article.Tags }} +
  • {{ $tag.Name }}
  • + {{ end }} +
+
+
+
+ {{ end }} + {{ end }} + + {{ if not .HasArticles }} +
+ +
+ {{ end }} +
\ No newline at end of file diff --git a/cmd/web/templates/home/partials/tag-item-list.tmpl b/cmd/web/templates/home/partials/tag-item-list.tmpl new file mode 100644 index 0000000..eac4e53 --- /dev/null +++ b/cmd/web/templates/home/partials/tag-item-list.tmpl @@ -0,0 +1,12 @@ + \ No newline at end of file -- cgit v1.2.3