externalized css, add image ability, moved templates around

This commit is contained in:
Jacob 2017-11-30 12:15:27 +01:00
parent f1667c758a
commit 5aebb3a5a2
11 changed files with 19 additions and 5 deletions

View File

@ -69,7 +69,9 @@ a:hover {
} }
img { img {
display: block;
max-width: 500px; max-width: 500px;
margin: auto;
} }
ul { ul {
@ -120,9 +122,9 @@ ul {
background-color: #ffffff; background-color: #ffffff;
} }
}
#menu ul{ #menu ul{
display: block;
margin: auto;
float: center; float: center;
text-align: center; text-align: center;
list-style: none; list-style: none;

BIN
images/20172802.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

View File

@ -0,0 +1,10 @@
<img width="560" height="315" src="/images/20172802.png"></br></img>
<time datetime="2017-02-28">2017-02-28</time>
<p>Around december I <a href="http://declandineen.com/checkpoints/hp2akj46x6z58hwka4bwmklacmmxym">spoke with the butter-voiced-blessed Declan Dineen</a>, for his podcast show <a href="http://declandineen.com/checkpoints/"><em>Checkpoints</em></a>.</p>
<p>Now that it's out there, and our conversation has been edited into a pleasant little bite, I thought, well, it's nice and all that I'm praising learning how to code, but it's important never to forget: Getting started is never as easy as an experienced person might make it sound.</p>
<p>Because of that, I thought I should introduce something that might seem very hard to grasp for newcomers in coding, yet really is quite fun to use: The Terminal!</p>
<p>The Terminal app, as it's called on <em>mac</em>, or <em>CMD</em> on <em>Windows</em>, or <em>XTERM</em> on <em>Linux</em> (if you're running <em>Linux</em> you probably know all of this already) is a text-based version of controlling you're computer. You can do all the usual stuff like open programs, copy files, shut down your computer, delete stuff or tweek your computer.</p>
<p>Using the terminal, is an interesting way of using your computer differently, for the same stuff. You navigate around the computer by writing <strong>cd [folder name]</strong>, perhaps pressing <em>tab</em> to auto-complete, and <strong>cd ..</strong> or just <strong>..</strong> to go back to a previous folder. Files can be opened by writing <strong>open [file name]</strong>, or shortcuts can be made, so you can start <em>Chrome</em> by writing <strong>chr</strong> or something else.</p>
<p>The terminal is also the simplest way to create and execute your own programs. If you write a java program, you write <strong>javac [program name].java</strong> to make it a runnable program, and you run the program by writing <strong>java [program name]</strong> (no extension). Sometimes programs are even built so that you need the terminal to run them. Writing <strong>vim</strong> or <strong>vim [file name]</strong> opens a weird and hard-to-understand writing program called vim, and use it to edit text files.</p>
<p>The terminal even makes me think about game design in a different way. Games have evolved into what they are today, partly by shedding what they were years ago. They're definitely more accessible, but that doesn't guarantee they're always better. I think that it's important to tools that do things differently, in order to widen my perspective, and perhaps do design in a not necessarily more original way, but a less conventional way.</p>
<p>A weird tool like the terminal or a hard to understand text editor like Vim, a ways to understand, that the established can be done differently. This lesson is good for creative thinking, and the knowledge of using the terminal, is good for any aspiring game developer.</p>

View File

@ -4,8 +4,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>{{.Title}}</title> <title>{{.Title}}</title>
<!--<link rel="stylesheet" href="style.css">--> <link rel="stylesheet" href="/css/style.css">
<style>{{template "style"}}</style>
</head> </head>
<body> <body>
<h1><a class="title" href="/" style="text-decoration: none; color: inherit">{{.Title}}</a></h1> <h1><a class="title" href="/" style="text-decoration: none; color: inherit">{{.Title}}</a></h1>

Binary file not shown.

View File

@ -18,7 +18,7 @@ type Page struct {
var style = `` var style = ``
var name = "takunomi" var name = "takunomi"
var posts []Post var posts []Post
var templates = template.Must(template.ParseFiles("blog.tmpl", "about.tmpl", "past.tmpl", "contact.tmpl", "blog_roll.tmpl", "style.tmpl", "post.tmpl")) 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"))
func main() { func main() {
@ -29,6 +29,9 @@ func main() {
http.HandleFunc("/contact/", contactHandler) http.HandleFunc("/contact/", contactHandler)
http.HandleFunc("/post/", postHandler) http.HandleFunc("/post/", postHandler)
http.HandleFunc("/", blogHandler) http.HandleFunc("/", blogHandler)
http.Handle("/images/", http.StripPrefix("/images/", http.FileServer(http.Dir("images"))))
http.Handle("/css/", http.StripPrefix("/css/", http.FileServer(http.Dir("css"))))
posts = PostsCollection[:] posts = PostsCollection[:]
if os.Args[1] == "local" { if os.Args[1] == "local" {