-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/Gsvd/gsvd.dev
- Loading branch information
Showing
23 changed files
with
72 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Launch Server with Debug", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "debug", | ||
"program": "${workspaceFolder}/cmd/gsvd.dev", | ||
"env": {}, | ||
"args": [], | ||
"buildFlags": "", | ||
"dlvFlags": ["--log"] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
package handlers | ||
|
||
import ( | ||
"github.com/Gsvd/gsvd.dev/internal" | ||
"github.com/Gsvd/gsvd.dev/internal/services" | ||
"github.com/gofiber/fiber/v2" | ||
) | ||
|
||
func HomeHandler(c *fiber.Ctx) error { | ||
articlesMetadata, err := internal.LoadArticlesMetadata() | ||
articlesMetadata, err := services.LoadArticles() | ||
if err != nil { | ||
panic(err) | ||
} | ||
if len(articlesMetadata) > 5 { | ||
articlesMetadata = articlesMetadata[:5] | ||
} | ||
return c.Render("templates/index", fiber.Map{ | ||
return c.Render("internal/templates/index", fiber.Map{ | ||
"Title": "Gsvd - People-Focused Software Developer", | ||
"Articles": articlesMetadata, | ||
"Canonical": "", | ||
}, "templates/layouts/main") | ||
}, "internal/templates/layouts/main") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
package internal | ||
package models | ||
|
||
import "html/template" | ||
|
||
type Article struct { | ||
Metadata ArticleMetadata | ||
Metadata Metadata | ||
Content template.HTML | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
package internal | ||
package models | ||
|
||
type ArticleMetadata struct { | ||
type Metadata struct { | ||
Id int | ||
Slug string | ||
Title string | ||
Description string | ||
Id int | ||
Date string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{{template "templates/partials/header" .}} | ||
{{template "internal/templates/partials/header" .}} | ||
|
||
<h1 class="text-2xl underline underline-offset-2 mb-2">{{.Article.Metadata.Title}}</h1> | ||
<h2 class="text-lg mb-8 italic">{{.Article.Metadata.Date}}</h2> | ||
<article class="prose dark:prose-dark max-w-none">{{.Article.Content}}</article> | ||
|
||
{{template "templates/partials/footer" .}} | ||
{{template "internal/templates/partials/footer" .}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters