Updated papers section
All checks were successful
Docker Deploy / build-and-push (push) Successful in 1m13s

This commit is contained in:
Atridad Lahiji 2025-01-03 02:21:58 -07:00
parent 546a49f550
commit f32ba4faf6
Signed by: atridad
SSH key fingerprint: SHA256:LGomp8Opq0jz+7kbwNcdfTcuaLRb5Nh0k5AchDDb438
6 changed files with 39 additions and 31 deletions

View file

@ -51,7 +51,7 @@ func main() {
e.GET("/", pages.Home)
e.GET("/projects", pages.Projects)
e.GET("/talks", pages.Talks)
e.GET("/pubs", pages.Pubs)
e.GET("/papers", pages.Papers)
e.GET("/posts", pages.Posts)
e.GET("/posts/:post", pages.Post)
e.GET("/tools", pages.Tools)

32
pages/papers.go Normal file
View file

@ -0,0 +1,32 @@
package pages
import (
"atri.dad/lib"
"github.com/labstack/echo/v4"
)
type PapersProps struct {
Papers []lib.CardLink
}
func Papers(c echo.Context) error {
papers := []lib.CardLink{
{
Name: "Bridging the Gap Between Social Networks and Healthcare",
Description: "An Assessment of the Need for Improved Patient-Patient, Patient-Provider, and Provider-Provider Sharing",
Href: "/public/files/bridging_the_gap_between_social_networks_and_healthcare.pdf",
Tags: []string{"masters", "coursework", "sna"},
Date: "January 03, 2025",
},
}
props := PapersProps{
Papers: papers,
}
// 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,9 +1,9 @@
{{define "title"}}
Atridad Lahiji // Publications
Atridad Lahiji // Papers
{{end}}
{{define "headercontent"}}
Atridad Lahiji // Publications
Atridad Lahiji // Papers
{{end}}
{{define "head"}}
@ -12,15 +12,15 @@ Atridad Lahiji // Publications
{{define "main"}}
{{if .Pubs}}
{{if .Papers}}
<section class="flex flex-row flex-wrap gap-2 justify-center align-middle">
{{range .Pubs}}
{{range .Papers}}
{{template "cardlinks" .}}
{{end}}
</section>
{{end}}
{{if not .Pubs}}
{{if not .Papers}}
<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)!

View file

@ -6,7 +6,7 @@
<a class="no-underline" href="/projects"> Projects </a>
</li>
<li>
<a class="no-underline" href="/pubs"> Publications </a>
<a class="no-underline" href="/papers"> Papers </a>
</li>
<li>
<a class="no-underline" href="/talks"> Talks </a>