diff --git a/blog/blog.go b/blog/blog.go index 4c97a4dc..eb76cfbe 100644 --- a/blog/blog.go +++ b/blog/blog.go @@ -1002,21 +1002,6 @@ func (b *Blog) Home(c *gin.Context) { }) } -// Posts is the index page for blog posts -func (b *Blog) Posts(c *gin.Context) { - b.Render(c, http.StatusOK, "posts.html", gin.H{ - "logged_in": b.auth.IsLoggedIn(c), - "is_admin": b.auth.IsAdmin(c), - "posts": b.GetPosts(false), - "version": b.Version, - "title": "Posts", - "recent": b.GetLatest(), - "admin_page": false, - "settings": b.GetSettings(), - "nav_pages": b.GetNavPages(), - }) -} - // Post is the page for all individual posts func (b *Blog) Post(c *gin.Context) { post, err := b.GetPostObject(c) @@ -1137,81 +1122,6 @@ func (b *Blog) Tag(c *gin.Context) { } } -// Tags is the index page for all Tags -func (b *Blog) Tags(c *gin.Context) { - b.Render(c, http.StatusOK, "tags.html", gin.H{ - "version": b.Version, - "title": "Tags", - "tags": b.getTags(), - "recent": b.GetLatest(), - "admin_page": false, - "settings": b.GetSettings(), - "nav_pages": b.GetNavPages(), - }) -} - -// Speaking is the index page for presentations -func (b *Blog) Speaking(c *gin.Context) { - b.Render(c, http.StatusOK, "presentations.html", gin.H{ - "logged_in": b.auth.IsLoggedIn(c), - "is_admin": b.auth.IsAdmin(c), - "version": b.Version, - "title": "Presentations and Speaking", - "recent": b.GetLatest(), - "admin_page": false, - "settings": b.GetSettings(), - "nav_pages": b.GetNavPages(), - }) -} - -// Projects is the index page for projects / code -func (b *Blog) Projects(c *gin.Context) { - b.Render(c, http.StatusOK, "projects.html", gin.H{ - "logged_in": b.auth.IsLoggedIn(c), - "is_admin": b.auth.IsAdmin(c), - "version": b.Version, - "title": "Projects", - "recent": b.GetLatest(), - "admin_page": false, - "settings": b.GetSettings(), - "nav_pages": b.GetNavPages(), - }) -} - -// About is the about page -func (b *Blog) About(c *gin.Context) { - b.Render(c, http.StatusOK, "about.html", gin.H{ - "logged_in": b.auth.IsLoggedIn(c), - "is_admin": b.auth.IsAdmin(c), - "version": b.Version, - "title": "About", - "recent": b.GetLatest(), - "admin_page": false, - "settings": b.GetSettings(), - "nav_pages": b.GetNavPages(), - }) -} - -// Archives shows the posts by year, month, etc. -func (b *Blog) Archives(c *gin.Context) { - yearKeys, byYear := b.getArchivesByYear() - monthKeys, byYearMonth := b.getArchivesByYearMonth() - b.Render(c, http.StatusOK, "archives.html", gin.H{ - "logged_in": b.auth.IsLoggedIn(c), - "is_admin": b.auth.IsAdmin(c), - "version": b.Version, - "title": "Blog Archives", - "yearKeys": yearKeys, - "byYear": byYear, - "yearMonthKeys": monthKeys, - "byYearMonth": byYearMonth, - "recent": b.GetLatest(), - "admin_page": false, - "settings": b.GetSettings(), - "nav_pages": b.GetNavPages(), - }) -} - // SiteURL is the site's public origin without a trailing slash: the // site_url setting, or — when it is unset — the requesting scheme and // host, honouring X-Forwarded-Proto from a reverse proxy. diff --git a/plugins/docs/content/writing-a-theme.md b/plugins/docs/content/writing-a-theme.md index c8d0daa9..cce7f81b 100644 --- a/plugins/docs/content/writing-a-theme.md +++ b/plugins/docs/content/writing-a-theme.md @@ -91,7 +91,7 @@ Beyond those, each template gets its own data. This is the contract of the runni | `admin*.html` | `/admin/…` | per page: `posts`, `post_types`, `pages`, `comments`, `users`, `themes`, `setting_groups`, `plugin`, … — read `admin/admin.go` and `admin/plugins.go` before overriding one | | `wizard_*.html` | the install wizard, before there is a database | only `version` and `title` (and `errors`) — none of the common keys exist yet | -Six templates in default — `about.html`, `archives.html`, `posts.html`, `presentations.html`, `projects.html`, `tags.html` — are left over from before pages were configurable; no route renders them today, so there is nothing to override. Post, page, tag and setting objects are goblog's own types: `.post.Title`, `.post.Permalink`, `.post.Tags`, `.post.CreatedAt.Format "Jan 02, 2006"`, `.page.HasHero`, `.page.HeroURL`. Default's templates show what each has; the Go types are in `blog/`. +Post, page, tag and setting objects are goblog's own types: `.post.Title`, `.post.Permalink`, `.post.Tags`, `.post.CreatedAt.Format "Jan 02, 2006"`, `.page.HasHero`, `.page.HeroURL`. Default's templates show what each has; the Go types are in `blog/`. Post, page and comment bodies are rendered to HTML by goblog: use `{{ .post.HTML }}`, `{{ .page.HTML }}` and, for each comment, `{{ .HTML }}`. diff --git a/themes/default/templates/about.html b/themes/default/templates/about.html deleted file mode 100644 index 2665ab1a..00000000 --- a/themes/default/templates/about.html +++ /dev/null @@ -1,52 +0,0 @@ -{{ template "header.html" .}} - -
-   -
- -
-

About Jason Ernst

-

- I'm currently Principal Software Engineer at a startup working on mobile - networks on phones. At the University of Guelph in Canada I hold adjunct - Professor status and serve on the committee of several graduate students - who are studying wireless networks and occasionally still co-publish - research papers. -

- -

- Prior to this I was a Senior Software Engineer at a two different robotics - startups in San Francisco (Rapid Robotics and Osaro). I was also the CTO and - first developer at a startup in Vancouver called RightMesh which was building - a mesh networking library for Android phones. During this time I was also an - adjunct professor at the University of Guelph and was the industrial PI of - a $2.13M MITACS grant to improve connectivity in Northern Canada, - specifically Rigolet. RightMesh raised $30M in an ICO in 2018. -

- -

- Before that I was the CTO of Redtree Robotics which was working - on a robotics hardware software platform to enable plug-and-play swarm - robotics. I started this company with a friend during grad school and - we raised some seed funding from Real Ventures. -

- -

- I've won, sponsored, and mentored hackathons. I love to give talks and - present papers. -

- -

- I also enjoy driving, working on cars, video games, contributing to - open source, - cycling, running, and travel. -

- -
-

Tags Archives

-
- -
- - -{{ template "footer.html" .}} diff --git a/themes/default/templates/admin_edit_page.html b/themes/default/templates/admin_edit_page.html index d7ef1dd1..6017d8f6 100644 --- a/themes/default/templates/admin_edit_page.html +++ b/themes/default/templates/admin_edit_page.html @@ -43,8 +43,11 @@

Edit Page: {{ .page.Title }}

- - + + + + +
@@ -105,6 +108,37 @@

Edit Page: {{ .page.Title }}