diff --git a/backup/creature_death_sheet.lua~ b/backup/creature_death_sheet.lua~
new file mode 100644
index 0000000..e948579
--- /dev/null
+++ b/backup/creature_death_sheet.lua~
@@ -0,0 +1,15 @@
+
+local ANIM_DURATION = 1.0
+local NR_QUADS = 7
+
+local FRAME_DUR = ANIM_DURATION/NR_QUADS
+
+return {
+ tile_width = 64,
+ tile_height = 64,
+ tile_origin = {0.5, 0.5},
+ tile_names = Anim {
+ 0, 1, 2, 3, 4, 5, 6,
+ time = {FRAME_DUR, FRAME_DUR, FRAME_DUR*2.0, FRAME_DUR*0.5, FRAME_DUR, FRAME_DUR*1,FRAME_DUR*1, FRAME_DUR*1.0},
+ }
+}
diff --git a/backup/new.html~ b/backup/new.html~
new file mode 100644
index 0000000..ef7144b
--- /dev/null
+++ b/backup/new.html~
@@ -0,0 +1,11 @@
+
+
+
+
+ hi
+
+ by lisa
+
+
+
+
diff --git a/backup/postCollection.go~ b/backup/postCollection.go~
new file mode 100644
index 0000000..81b3d93
--- /dev/null
+++ b/backup/postCollection.go~
@@ -0,0 +1,66 @@
+package main
+
+import (
+ "fmt"
+ "html/template"
+ "io/ioutil"
+ "strings"
+ "time"
+)
+
+//Post : Is exported
+type Post struct {
+ Date time.Time
+ Title string
+ URLTitle string
+ Content template.HTML
+}
+
+var lewd = "Lewd Interlude"
+var reveries = "Takunomi Coffee Reveries, Vol. I"
+var romantic = "Romantic Japanese Christmas Takunomi Saturday Recap"
+
+func spaceToHyphen(s string) string {
+ return strings.Replace(s, " ", "-", -1)
+}
+
+func setDate(year int, month time.Month, day int) time.Time {
+ return time.Date(year, month, day, 0, 0, 0, 0, time.UTC)
+}
+
+func newPost(date time.Time, title string) Post {
+ return Post{date, title, spaceToHyphen(title), getPostContent(title)}
+}
+
+var postsCollection = []Post{
+ newPost(setDate(2017, time.September, 12), lewd),
+ newPost(setDate(2017, time.March, 4), reveries),
+ newPost(setDate(2017, time.April, 23), romantic),
+}
+
+func getPostByURLTitle(title string) Post {
+ for _, post := range postsCollection {
+ if post.URLTitle == title {
+ return post
+ }
+ }
+ return Post{}
+}
+
+func getPostContent(title string) template.HTML {
+ content, err := ioutil.ReadFile("posts/" + title)
+ if err != nil {
+ fmt.Println(content)
+ return template.HTML("")
+ }
+ return template.HTML(string(content[:len(content)]))
+}
+
+func getNewestPosts(numberOfPosts int) []Post {
+ var posts []Post
+ for i := 0; i < numberOfPosts; i++ {
+ post := postsCollection[i]
+ posts = append(posts, getPostByURLTitle(post.URLTitle))
+ }
+ return posts
+}
diff --git a/backup/vimrc~ b/backup/vimrc~
index 7f7e00e..5d7a1f3 100644
--- a/backup/vimrc~
+++ b/backup/vimrc~
@@ -56,9 +56,6 @@ if has('mouse')
set mouse=a
endif
-syntax on
-color dracula
-
set hlsearch
" Only do this part when compiled with support for autocommands.
@@ -143,9 +140,19 @@ set smartcase
call plug#begin('~/.vim/plugged')
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
+Plug 'dracula/vim', { 'as': 'dracula' }
+Plug 'fatih/vim-go'
call plug#end()
+syntax on
+color dracula
+
+let g:go_highlight_types = 1
+let g:go_highlight_fields = 1
+let g:go_highlight_functions = 1
+let g:go_highlight_methods = 1
+let g:go_highlight_extra_types = 1
if executable ('fzf')
" FZF{{{
@@ -153,6 +160,5 @@ if executable ('fzf')
nnoremap :FZF
" }}}
-
-
+endif
diff --git a/backup/websiteTemplate.go~ b/backup/websiteTemplate.go~
index d65fb16..933895f 100644
--- a/backup/websiteTemplate.go~
+++ b/backup/websiteTemplate.go~
@@ -1,23 +1,24 @@
package main
import (
+ "fmt"
"html/template"
"net/http"
- "strings"
"os"
- "fmt"
+ "strings"
)
+//Page : Is exported to PostCollection
type Page struct {
- Title string
+ Title string
MenuItems []string
- Posts []Post
+ Posts []Post
}
-var name string = "takunomi"
+var name = "takunomi"
var posts []Post
-var sections = []string {"about","past", "contact"}
-var templates = template.Must(template.ParseFiles("blog.tmpl", "blog_roll.tmpl", "style.tmpl", "post.tmpl"))
+var sections = []string{"about", "past", "contact"}
+var templates = template.Must(template.ParseFiles("blog.tmpl", "blog_roll.tmpl", "style.tmpl", "post.tmpl"))
func main() {
@@ -32,8 +33,6 @@ func main() {
http.ListenAndServe(":35291", nil)
}
- //http.ListenAndServe(":8080", nil)
-
}
func errorHandler(w http.ResponseWriter, req *http.Request, status int) {
@@ -48,24 +47,23 @@ func blogHandler(w http.ResponseWriter, req *http.Request) {
errorHandler(w, req, http.StatusNotFound)
return
}
- posts = getNewestPosts(3)
- page := Page {name, sections, posts}
+ posts = getNewestPosts(3)
+ page := Page{name, sections, posts}
renderTemplates(w, page)
}
-func postHandler (w http.ResponseWriter, r *http.Request) {
- title := strings.TrimPrefix(r.URL.Path, "/post/")
- posts := []Post{getPostByURLTitle(title)}
- page := Page {name, sections, posts}
+func postHandler(w http.ResponseWriter, r *http.Request) {
+ title := strings.TrimPrefix(r.URL.Path, "/post/")
+ posts := []Post{getPostByURLTitle(title)}
+ page := Page{name, sections, posts}
renderTemplates(w, page)
}
-func renderTemplates (w http.ResponseWriter, p Page) {
+func renderTemplates(w http.ResponseWriter, p Page) {
s1 := templates.Lookup("blog.tmpl")
- s1.ExecuteTemplate(w, "blog", p)
- s2 := templates.Lookup("blog_roll.tmpl")
- s2.ExecuteTemplate(w, "blog_roll", nil)
- s3 := templates.Lookup("post.tmpl")
- s3.ExecuteTemplate(w, "post", nil)
+ s1.ExecuteTemplate(w, "blog", p)
+ s2 := templates.Lookup("blog_roll.tmpl")
+ s2.ExecuteTemplate(w, "blog_roll", nil)
+ s3 := templates.Lookup("post.tmpl")
+ s3.ExecuteTemplate(w, "post", nil)
}
-
diff --git a/colors/dracula.vim b/colors/dracula.vim
deleted file mode 100644
index 3a33fd3..0000000
--- a/colors/dracula.vim
+++ /dev/null
@@ -1,90 +0,0 @@
-" Dracula vim-airline theme
-"
-" Copyright 2016, All rights reserved
-"
-" Code licensed under the MIT license
-" http://zenorocha.mit-license.org
-"
-" @author Extrante
-" @author Zeno Rocha
-
-" Color palette
-let s:gui01 = "#44475a"
-let s:gui02 = "#5f6a8e"
-let s:gui03 = "#ffb86c"
-let s:gui04 = "#bd93f9"
-let s:gui05 = "#ff5555"
-let s:gui06 = "#f1fa8c"
-let s:gui07 = "#50fa7b"
-let s:gui08 = "#bd93f9"
-let s:cterm01 = "236"
-let s:cterm02 = "61"
-let s:cterm03 = "215"
-let s:cterm04 = "141"
-let s:cterm05 = "160"
-let s:cterm06 = "228"
-let s:cterm07 = "84"
-let s:cterm08 = "141"
-
-let s:guiWhite = "#f8f8f2"
-let s:guiBlack = "#282a36"
-let s:ctermWhite = "15"
-let s:ctermBlack = "16"
-
-" Normal mode
-let s:N1 = [ s:guiBlack , s:gui08 , s:ctermBlack , s:cterm08 ]
-let s:N2 = [ s:guiWhite , s:gui02 , s:ctermWhite , s:cterm02 ]
-let s:N3 = [ s:guiWhite , s:gui01 , s:ctermWhite , s:cterm01 ]
-
-" Insert mode
-let s:I1 = [ s:guiBlack , s:gui07 , s:ctermBlack , s:cterm07 ]
-let s:I2 = [ s:guiWhite , s:gui02 , s:ctermWhite , s:cterm02 ]
-let s:I3 = [ s:guiWhite , s:gui01 , s:ctermWhite , s:cterm01 ]
-
-" Visual mode
-let s:V1 = [ s:guiBlack , s:gui06 , s:ctermBlack , s:cterm06 ]
-let s:V2 = [ s:guiWhite , s:gui02 , s:ctermWhite , s:cterm02 ]
-let s:V3 = [ s:guiWhite , s:gui01 , s:ctermWhite, s:cterm01 ]
-
-" Replace mode
-let s:R1 = [ s:guiBlack , s:gui05 , s:ctermWhite, s:cterm05 ]
-let s:R2 = [ s:guiWhite , s:gui02 , s:ctermWhite, s:cterm02 ]
-let s:R3 = [ s:guiWhite , s:gui01 , s:ctermWhite, s:cterm01 ]
-
-let g:airline#themes#dracula#palette = {}
-let g:airline#themes#dracula#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3)
-let g:airline#themes#dracula#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3)
-let g:airline#themes#dracula#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3)
-let g:airline#themes#dracula#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3)
-let g:airline#themes#dracula#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3)
-
-" Inactive mode
-let s:IN1 = [ s:gui04 , s:gui02 , s:cterm04 , s:cterm02 ]
-let s:IN2 = [ s:gui04 , s:gui01 , s:cterm04 , s:cterm01 ]
-let s:IA = [ s:IN1[1] , s:IN2[1] , s:IN1[3] , s:IN2[3] , '' ]
-let g:airline#themes#dracula#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA)
-
-" Warning info
-let s:WARNING = [ s:guiBlack, s:gui03, s:ctermBlack, s:cterm03 ]
-let s:ERROR = [ s:guiWhite, s:gui05, s:ctermWhite, s:cterm05 ]
-
-let g:airline#themes#dracula#palette.normal.airline_warning = s:WARNING
-let g:airline#themes#dracula#palette.insert.airline_warning = s:WARNING
-let g:airline#themes#dracula#palette.visual.airline_warning = s:WARNING
-let g:airline#themes#dracula#palette.replace.airline_warning = s:WARNING
-
-let g:airline#themes#dracula#palette.normal.airline_error = s:ERROR
-let g:airline#themes#dracula#palette.insert.airline_error = s:ERROR
-let g:airline#themes#dracula#palette.visual.airline_error = s:ERROR
-let g:airline#themes#dracula#palette.replace.airline_error = s:ERROR
-
-" CtrlP
-if !get(g:, 'loaded_ctrlp', 0)
- finish
-endif
-
-let s:CP1 = [ s:guiWhite , s:gui01 , s:ctermWhite , s:cterm01 ]
-let s:CP2 = [ s:guiWhite , s:gui02 , s:ctermWhite , s:cterm02 ]
-let s:CP3 = [ s:guiWhite , s:gui08 , s:ctermWhite , s:cterm08 ]
-
-let g:airline#themes#dracula#palette.ctrlp = airline#extensions#ctrlp#generate_color_map(s:CP1, s:CP2, s:CP3)
diff --git a/plugged/dracula b/plugged/dracula
new file mode 160000
index 0000000..6a5bf34
--- /dev/null
+++ b/plugged/dracula
@@ -0,0 +1 @@
+Subproject commit 6a5bf34193927c70b6c21dcbe1c130d2ab0951d6
diff --git a/plugged/vim-go b/plugged/vim-go
new file mode 160000
index 0000000..c0d209c
--- /dev/null
+++ b/plugged/vim-go
@@ -0,0 +1 @@
+Subproject commit c0d209cce7f0eb0af250d2471ae9495a8bf1f19e
diff --git a/vimrc b/vimrc
index 09741fb..1ae00d0 100644
--- a/vimrc
+++ b/vimrc
@@ -56,9 +56,6 @@ if has('mouse')
set mouse=a
endif
-syntax on
-color dracula
-
set hlsearch
" Only do this part when compiled with support for autocommands.
@@ -143,9 +140,18 @@ set smartcase
call plug#begin('~/.vim/plugged')
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
+Plug 'dracula/vim', { 'as': 'dracula' }
+Plug 'fatih/vim-go'
call plug#end()
+syntax on
+color dracula
+
+let g:go_highlight_types = 1
+let g:go_highlight_fields = 1
+let g:go_highlight_functions = 1
+let g:go_highlight_methods = 1
if executable ('fzf')
" FZF{{{