Updated papers section
This commit is contained in:
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>
|
||||
|
Reference in New Issue
Block a user