changes
This commit is contained in:
parent
a9b9b35d60
commit
2d841f1332
8
main.go
8
main.go
|
@ -19,7 +19,7 @@ type Page struct {
|
|||
var style = ``
|
||||
var name = "takunomi"
|
||||
var posts []Post
|
||||
var templates = template.Must(template.ParseFiles("templates/blog.tmpl", "templates/about.tmpl", "templates/past.tmpl", "templates/contact.tmpl", "templates/blog_roll.tmpl", "templates/post.tmpl"))
|
||||
var templates = template.Must(template.ParseFiles("templates/blog.tmpl", "templates/about.tmpl","templates/keru_shoujo.tmpl", "templates/past.tmpl", "templates/contact.tmpl", "templates/blog_roll.tmpl", "templates/post.tmpl"))
|
||||
|
||||
func main() {
|
||||
|
||||
|
@ -45,6 +45,7 @@ func retrievePosts() {
|
|||
func buildHandlers() {
|
||||
http.HandleFunc("/about/", aboutHandler)
|
||||
http.HandleFunc("/past/", pastHandler)
|
||||
http.HandleFunc("/the_girl_who_kicked_a_rabbit/", keruHandler)
|
||||
http.HandleFunc("/contact/", contactHandler)
|
||||
http.HandleFunc("/post/", postHandler)
|
||||
http.HandleFunc("/update", updateHandler)
|
||||
|
@ -77,6 +78,11 @@ func pastHandler(w http.ResponseWriter, r *http.Request) {
|
|||
renderTemplates(w, page)
|
||||
}
|
||||
|
||||
func keruHandler(w http.ResponseWriter, r *http.Request) {
|
||||
posts := []Post{getPostByURLTitle("The-Girl-Who-Kicked-a-Rabbit")}
|
||||
page := Page{name, posts, "blog"}
|
||||
renderTemplates(w, page)
|
||||
}
|
||||
func contactHandler(w http.ResponseWriter, r *http.Request) {
|
||||
page := Page{name, []Post{}, "contact"}
|
||||
renderTemplates(w, page)
|
||||
|
|
4
posts/The Girl Who Kicked a Rabbit.html
Normal file
4
posts/The Girl Who Kicked a Rabbit.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
<p><p><figure><img src="/images/game1/fami_mockup.png"></br></img></figure>
|
||||
<time datetime="2013-01-01">2013-01-01</time></p>
|
||||
|
||||
<p>This game...</p>
|
|
@ -1,5 +1,5 @@
|
|||
{{define "about"}}
|
||||
<article class="post">
|
||||
<p>This is about ME!</p>
|
||||
<p>"Takunomi" means drinking at home. It's when you have a cozy party in your own home, with your own music and good friends. You can play a video game in 4-player, or just chat. Is Takunomi a group, a person, or a company? I'm not sure. We're creating a game, there are some long posts about video games, and that's about it. Write us if you wanna talk, or maybe even try the game.</p>
|
||||
</article>
|
||||
{{end}}
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
<ul id="menu">
|
||||
<!-- <li><a class={{if eq .CurrentPage "blog"}} "menuselect menuElement no-link"{{else}}"menuElement no-link"{{end}} href="/">blog</a></li> -->
|
||||
<li><a class={{if eq .CurrentPage "past"}} "menuselect menuElement no-link"{{else}}"menuElement no-link"{{end}} href="/past">past</a></li>
|
||||
<li><a class={{if eq .CurrentPage "keru_shoujo"}} "menuselect menuElement no-link"{{else}}"menuElement no-link"{{end}} href="/the_girl_who_kicked_a_rabbit">the girl who kicked a rabbit</a></li>
|
||||
<li><a class={{if eq .CurrentPage "about"}} "menuselect menuElement no-link"{{else}}"menuElement no-link"{{end}} href="/about">about</a></li>
|
||||
<li><a class={{if eq .CurrentPage "contact"}} "menuselect menuElement no-link"{{else}}"menuElement no-link"{{end}} href="/contact">contact</a></li>
|
||||
</ul>
|
||||
|
@ -39,6 +40,8 @@
|
|||
<div>{{template "about" .}}</div>
|
||||
{{else if eq .CurrentPage "past"}}
|
||||
<div>{{template "past" .}}</div>
|
||||
{{else if eq .CurrentPage "keru_shoujo"}}
|
||||
<div>{{template "keru_shoujo" .}}</div>
|
||||
{{else if eq .CurrentPage "contact"}}
|
||||
<div>{{template "contact" .}}</div>
|
||||
{{end}}
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
<ul style="list-style: none;">
|
||||
<li><b><a class="no-link" style="text-decoration: none; color: inherit" href="https://twitter.com/sketchwhale">@sketchwhale</a></b></li>
|
||||
<li><b>ohayo dot jacob at gmail</b></li>
|
||||
<li><b><a class="no-link" style="text-decoration: none; color: inherit" href="gitfub.space/ohayo-jacob">gitfub.space/ohayo-jacob</a></b></li>
|
||||
</ul>
|
||||
</article>
|
||||
{{end}}
|
||||
|
|
3
templates/keru_shoujo.tmpl
Normal file
3
templates/keru_shoujo.tmpl
Normal file
|
@ -0,0 +1,3 @@
|
|||
{{define "keru_shoujo"}}
|
||||
<h2 style="margin-top:0px;"><a class="no-link" style="text-decoration: none; color: inherit" href="/the_girl_who_kicked_a_rabbit/{{.URLTitle}}">{{.Title}}</a></h2>
|
||||
<div>{{ .Content }}</div>{{end}}
|
Loading…
Reference in New Issue
Block a user