this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

๐Ÿ› Fix missing blog_entry.templ

+44
+44
pages/blog_entry.templ
··· 1 + package pages 2 + 3 + import "github.com/ewen-lbh/portfolio/shared" 4 + import "github.com/ewen-lbh/portfolio/components" 5 + import "github.com/ortfo/db" 6 + import "fmt" 7 + 8 + templ BlogEntry(entry shared.BlogEntry, db ortfodb.Database) { 9 + @components.IntroWith(entry.Date.Format("2006-01-02"), entry.Title, false) { 10 + @components.ArrowLink("/about") { 11 + <i18n>Learn more about me</i18n> 12 + } 13 + } 14 + <main class={ "blog-entry", blogEntryMain() }> 15 + @shared.HTML(ortfodb.HTMLString(entry.Content)) 16 + if entry.Pageviews > 1 { 17 + } 18 + </main> 19 + if entry.Pageviews > 1 { 20 + <footer class={ entryFooter() }> 21 + <h2>Stats from <a href="https://stats.ewen.works/ewen.works">stats.ewen.works</a> </h2> 22 + { fmt.Sprintf("%d", entry.Pageviews) } views 23 + </footer> 24 + } 25 + if len(entry.RelatedWorksSlugs) > 0 { 26 + <h2 class={ centeredHeader() }>Related works</h2> 27 + @components.GalleryPage(entry.RelatedWorks(db), "en", false) 28 + } 29 + } 30 + 31 + css centeredHeader() { 32 + text-align: center; 33 + } 34 + 35 + css blogEntryMain() { 36 + max-width: 800px; 37 + margin: 2rem auto; 38 + padding: 0 1rem; 39 + } 40 + 41 + css entryFooter() { 42 + margin-top: 4rem; 43 + text-align: center; 44 + }