Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions cmd/app/assets/pages/blogs/simple-stack.md

This file was deleted.

11 changes: 6 additions & 5 deletions cmd/app/assets/pages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@ author: Justin

![Félix Vallotton, 1923 - Bancs de sable sur la Loire](./static/img/vallotton.jpg "Félix Vallotton, 1923 - Bancs de sable sur la Loire")

Hi! I'm Justin, a software developer based in Brisbane who works
in RnD (research and development) electronics dealing mainly with IoT and
automated hardware testing.
Hi! I'm Justin, a software developer based in Brisbane.

Currently I'm working in RnD electronics developing systems software,
firmware and tooling.

If you would like to contact me about hiring me as a developer for your company
please contact me at: <span style="color:gray">*contact[dot]justinac[at]gmail[dot]com*</span>

<!--
## Links
<nav>
<li>
[CV](./resume/index.html)
</li>
<li>
[Github](https://www.github.com/justinac0)
</li>

</li>-->
8 changes: 4 additions & 4 deletions internal/ssg/ssg.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,10 @@ func GenFromEmbedFS(mount embed.FS, base string) {
// TODO(justin): import from elsewhere
var portfolio []types.Portfolio
portfolio = append(portfolio, types.Portfolio{
ImageUrl: "./static/img/golang-gowv.png",
Title: "Extended WebView Bindings/Wrapper for Golang (gowv)",
About: "<span><b>gowv</b> is a <a style='z-index: 5;' target='_blank' href='https://github.com/webview/webview'>WebView</a> wrapper I wrote to fix some issues I had with the existing WebView Go bindings.</span>",
MdUrl: "./portfolio/gowv.html",
ImageUrl: "./static/img/golang-gowv.png",
Title: "Extended WebView Bindings/Wrapper for Golang (gowv)",
About: "<span><b>gowv</b> is a <a style='z-index: 5;' target='_blank' href='https://github.com/webview/webview'>WebView</a> wrapper I wrote to fix some issues I had with the existing WebView Go bindings.</span>",
MdUrl: "./portfolio/gowv.html",
GithubUrl: "https://github.com/justinac0/gowv",
})
portfolio = append(portfolio, types.Portfolio{
Expand Down
12 changes: 12 additions & 0 deletions internal/types/page.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package types

import "strings"

// TODO(justin): rename to blog***
type PageMeta struct {
Title string `yaml:title`
Expand All @@ -22,3 +24,13 @@ type Style struct {

type Styles map[string]Style
type Pages map[string]Page

func HasBlogs(pages Pages) bool {
for _, p := range pages {
if p.Meta.Draft == false && strings.Contains(p.Url, "blogs") {
return true
}
}

return false
}
42 changes: 22 additions & 20 deletions templates/HomePage.templ
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ templ PortfolioItem(item types.Portfolio) {
if len(item.MdUrl) > 0 {
<a href={ item.MdUrl } class="stretched-link"></a>
}
<div class="portfolio-dim"/>
<div class="portfolio-dim"></div>
</div>
}

Expand All @@ -39,24 +39,26 @@ templ HomePage(relPath string, page types.Page, pages types.Pages, portfolio []t
</div>
<br/>
@FancyPortfolioView(portfolio)
<div id="blogs">
<h1>Blogs</h1>
for _, p := range pages {
<nav>
if strings.Contains(p.Url, "blogs") {
<ul>
<p>
<span style="color: gray"><i>{ p.Meta.Date }</i></span>
if len(relPath) > 0 {
{ " " }<a href={ p.Url }>{ p.Meta.Title }</a>
} else {
{ " " }<a href={ p.Url + ".html" }>{ p.Meta.Title }</a>
}
</p>
</ul>
}
</nav>
}
</div>
if types.HasBlogs(pages) {
<div id="blogs">
<h1>Blogs</h1>
for _, p := range pages {
<nav>
if strings.Contains(p.Url, "blogs") {
<ul>
<p>
<span style="color: gray"><i>{ p.Meta.Date }</i></span>
if len(relPath) > 0 {
{ " " }<a href={ p.Url }>{ p.Meta.Title }</a>
} else {
{ " " }<a href={ p.Url + ".html" }>{ p.Meta.Title }</a>
}
</p>
</ul>
}
</nav>
}
</div>
}
}
}
184 changes: 95 additions & 89 deletions templates/HomePage_templ.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading