Updated papers section
All checks were successful
Docker Deploy / build-and-push (push) Successful in 1m13s
All checks were successful
Docker Deploy / build-and-push (push) Successful in 1m13s
This commit is contained in:
parent
546a49f550
commit
f32ba4faf6
6 changed files with 39 additions and 31 deletions
2
main.go
2
main.go
|
@ -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
32
pages/papers.go
Normal 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)
|
||||
}
|
|
@ -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)
|
||||
}
|
|
@ -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)!
|
|
@ -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>
|
||||
|
|
Binary file not shown.
Loading…
Add table
Reference in a new issue