Re-wrote based on my personal site

This commit is contained in:
2024-11-03 17:01:48 -06:00
parent 9dad47b960
commit 10cc09fed1
35 changed files with 185 additions and 309 deletions

View File

@ -1,7 +1,7 @@
package pages
import (
"atri.dad/lib"
"goth.stack/lib"
"github.com/labstack/echo/v4"
)

File diff suppressed because one or more lines are too long

View File

@ -6,8 +6,8 @@ import (
"io/fs"
"net/http"
contentfs "atri.dad/content"
"atri.dad/lib"
contentfs "goth.stack/content"
"goth.stack/lib"
chromahtml "github.com/alecthomas/chroma/v2/formatters/html"
"github.com/labstack/echo/v4"
"github.com/yuin/goldmark"

View File

@ -8,8 +8,8 @@ import (
"strings"
"time"
contentfs "atri.dad/content"
"atri.dad/lib"
contentfs "goth.stack/content"
"goth.stack/lib"
"github.com/labstack/echo/v4"
)

View File

@ -1,49 +0,0 @@
package pages
import (
"atri.dad/lib"
"github.com/labstack/echo/v4"
)
type ProjectProps struct {
Projects []lib.CardLink
}
func Projects(c echo.Context) error {
projects := []lib.CardLink{
{
Name: "Pollo",
Description: "A dead-simple real-time voting tool.",
Tags: []string{"golang", "htmx", "product"},
Href: "https://github.com/atridadl/pollo",
},
{
Name: "GOTH Stack",
Description: "🚀 A Web Application Template Powered by HTMX + Go + Tailwind 🚀",
Tags: []string{"golang", "htmx", "template"},
Href: "https://github.com/atridadl/goth.stack",
},
{
Name: "Himbot",
Description: "A discord bot written in Go. Loosly named after my username online (HimbothySwaggins).",
Tags: []string{"golang", "bot"},
Href: "https://github.com/atridadl/HimBot",
},
{
Name: "loadr",
Description: "A lightweight REST load testing tool with robust support for different verbs, token auth, and performance reports.",
Tags: []string{"golang", "cli"},
Href: "https://github.com/atridadl/loadr",
},
}
props := ProjectProps{
Projects: projects,
}
// Specify the partials used by this page
partials := []string{"header", "navitems", "cardlinks"}
// Render the template
return lib.RenderTemplate(c.Response().Writer, "base", partials, props)
}

View File

@ -1,24 +0,0 @@
package pages
import (
"atri.dad/lib"
"github.com/labstack/echo/v4"
)
type PubProps struct {
Pubs []lib.CardLink
}
func Pubs(c echo.Context) error {
pubs := []lib.CardLink{}
props := PubProps{
Pubs: pubs,
}
// Specify the partials used by this page
partials := []string{"header", "navitems", "cardlinks"}
// Render the template
return lib.RenderTemplate(c.Response().Writer, "base", partials, props)
}

View File

@ -1,39 +0,0 @@
package pages
import (
"atri.dad/lib"
"github.com/labstack/echo/v4"
)
type TalkProps struct {
Talks []lib.CardLink
}
func Talks(c echo.Context) error {
talks := []lib.CardLink{
{
Name: "Hypermedia as the engine of application state - an Introduction",
Description: "A talk on building reactive websites using tools like HTMX instead of JSON + JS. Will be presented at the Dev Edmonton Fabruary 2024 JS/Ruby/Python Meetup",
Href: "/public/files/hypermedia_talk_atridad.pdf",
Tags: []string{"golang", "htmx", "ssr"},
Date: "February 01, 2024",
},
{
Name: "Introduction to Social Network Analysis (SNA)",
Description: "Understanding Relationships in Social Structures",
Href: "/public/files/Understanding_Relationships_in_Social_Structures.pdf",
Tags: []string{"graphs", "social", "lecture"},
Date: "October 08, 2024",
},
}
props := TalkProps{
Talks: talks,
}
// Specify the partials used by this page
partials := []string{"header", "navitems", "cardlinks"}
// Render the template
return lib.RenderTemplate(c.Response().Writer, "base", partials, props)
}

View File

@ -1,9 +1,9 @@
{{define "title"}}
Atridad Lahiji // Root
GOTH Stack // Root
{{end}}
{{define "headercontent"}}
Atridad Lahiji // Root
{{template "title" .}}
{{end}}
{{define "head"}}
@ -21,7 +21,7 @@ Atridad Lahiji // Root
</h2>
<span>
<h2 class="mb-2 text-xl text-white sm:text-[1.5rem]">Places I exist:</h2>
<h2 class="mb-2 text-xl text-white sm:text-[1.5rem]">Links:</h2>
<div class="flex flex-row flex-wrap items-center justify-center gap-4 text-center">
{{range .Socials}}
{{template "iconlinks" .}}
@ -30,7 +30,7 @@ Atridad Lahiji // Root
</span>
<span>
<h2 class="mb-2 text-xl text-white sm:text-[1.5rem]">Stuff I Use:</h2>
<h2 class="mb-2 text-xl text-white sm:text-[1.5rem]">Tech Stack:</h2>
<div class="flex flex-row flex-wrap items-center justify-center gap-4 text-center">
{{range .Tech}}

View File

@ -3,13 +3,7 @@
<a class="no-underline" href="/"> Home </a>
</li>
<li>
<a class="no-underline" href="/projects"> Projects </a>
</li>
<li>
<a class="no-underline" href="/pubs"> Publications </a>
</li>
<li>
<a class="no-underline" href="/talks"> Talks </a>
<a class="no-underline" href="/api/swagger/index.html"> API Documentation </a>
</li>
<li>
<a class="no-underline" href="/posts"> Posts </a>

View File

@ -1,9 +1,9 @@
{{define "title"}}
Atridad Lahiji // Post
GOTH Stack // Post
{{end}}
{{define "headercontent"}}
Atridad Lahiji // Post
{{template "title" .}}
{{end}}
{{define "head"}}

View File

@ -1,9 +1,9 @@
{{define "title"}}
Atridad Lahiji // Blog
GOTH Stack // Blog
{{end}}
{{define "headercontent"}}
Atridad Lahiji // Blog
{{template "title" .}}
{{end}}
{{define "head"}}

View File

@ -1,34 +0,0 @@
{{define "title"}}
Atridad Lahiji // Projects
{{end}}
{{define "headercontent"}}
Atridad Lahiji // Projects
{{end}}
{{define "head"}}
<link rel="stylesheet" href="/public/css/styles.css" />
{{end}}
{{define "main"}}
{{if .Projects}}
<section class="flex flex-row flex-wrap gap-2 justify-center align-middle">
{{range .Projects}}
{{template "cardlinks" .}}
{{end}}
</section>
{{end}}
{{if not .Projects}}
<section class="flex flex-row flex-wrap gap-2 justify-center align-middle">
<h2 class="text-2xl font-extrabold tracking-tight text-white sm:text-[2rem]">
Nothing to see here (yet)!
</h2>
</section>
{{end}}
{{end}}
{{define "foot"}}
{{end}}

View File

@ -1,9 +1,9 @@
{{define "title"}}
Atridad Lahiji // Publications
GOTH Stack // Publications
{{end}}
{{define "headercontent"}}
Atridad Lahiji // Publications
{{template "title" .}}
{{end}}
{{define "head"}}

View File

@ -1,34 +0,0 @@
{{define "title"}}
Atridad Lahiji // Talks
{{end}}
{{define "headercontent"}}
Atridad Lahiji // Talks
{{end}}
{{define "head"}}
<link rel="stylesheet" href="/public/css/styles.css" />
{{end}}
{{define "main"}}
{{if .Talks}}
<section class="flex flex-row flex-wrap gap-2 justify-center align-middle">
{{range .Talks}}
{{template "cardlinks" .}}
{{end}}
</section>
{{end}}
{{if not .Talks}}
<section class="flex flex-row flex-wrap gap-2 justify-center align-middle">
<h2 class="text-2xl font-extrabold tracking-tight text-white sm:text-[2rem]">
Nothing to see here (yet)!
</h2>
</section>
{{end}}
{{end}}
{{define "foot"}}
{{end}}

View File

@ -1,9 +1,9 @@
{{define "title"}}
Atridad Lahiji // Tools
GOTH Stack // Tools
{{end}}
{{define "headercontent"}}
Atridad Lahiji // Tools
{{template "title" .}}
{{end}}
{{define "head"}}

View File

@ -1,9 +1,9 @@
{{define "title"}}
Atridad Lahiji // Tools // Resizer
GOTH Stack // Tools // Resizer
{{end}}
{{define "headercontent"}}
Atridad Lahiji // Tools // Resizer
{{template "title" .}}
{{end}}
{{define "head"}}
@ -28,4 +28,4 @@ Atridad Lahiji // Tools // Resizer
{{end}}
{{define "foot"}}
{{end}}
{{end}}

View File

@ -1,7 +1,7 @@
{{define "title"}}Atridad Lahiji // Tools // SSE Demo{{end}}
{{define "title"}}GOTH Stack // Tools // SSE Demo{{end}}
{{define "headercontent"}}
Atridad Lahiji // Tools // SSE Demo
{{template "title" .}}
{{end}}
{{define "head"}}

View File

@ -1,7 +1,7 @@
package pages
import (
"atri.dad/lib"
"goth.stack/lib"
"github.com/labstack/echo/v4"
)

View File

@ -1,8 +1,8 @@
package pages
import (
"atri.dad/lib"
"github.com/labstack/echo/v4"
"goth.stack/lib"
)
type ResizeProps struct {
@ -22,12 +22,12 @@ func Resize(c echo.Context) error {
Name: "Hypermedia as the engine of application state - an Introduction",
Description: "A talk on building reactive websites using tools like HTMX instead of JSON + JS. Will be presented at the Dev Edmonton Fabruary 2024 JS/Ruby/Python Meetup",
// Href: lib.GeneratePublicURL("hypermedia_talk_atridad.pdf"),
Tags: []string{"golang", "htmx", "ssr"},
Date: "February 01, 2024",
Tags: []string{"golang", "htmx", "ssr"},
Date: "February 01, 2024",
},
}
props := TalkProps{
props := ResizeProps{
Talks: talks,
}

View File

@ -1,7 +1,7 @@
package pages
import (
"atri.dad/lib"
"goth.stack/lib"
"github.com/labstack/echo/v4"
)