Add resume and nav bar

This commit is contained in:
Kelvin Ly 2018-10-30 18:34:38 -04:00
parent 7fd8eed45b
commit 68164655c9
4 changed files with 85 additions and 1 deletions

3
.gitmodules vendored
View File

@ -1,3 +1,6 @@
[submodule "static"]
path = static
url = https://github.com/cactorium/cactorium.github.io
[submodule "resume"]
path = resume
url = https://github.com/cactorium/kelvin-ly-resume.git

View File

@ -1,5 +1,68 @@
body {
margin: 0;
background-color: rgb(240, 240, 240);
}
article {
max-width: 1012px;
margin-right: auto;
margin-left: auto;
}
nav, footer {
background-color: rgb(1, 33, 1);
margin-right: auto;
margin-left: auto;
size: 1.5em;
color: rgb(180, 220, 180);
}
a {
text-decoration: none;
color: rgb(220, 220, 250);
}
.footer-wrapper, .nav-wrapper {
max-width: 1012px;
margin-right: auto;
margin-left: auto;
}
.nav-wrapper {
display: flex;
flex-direction: row;
justify-content: flex;
}
.nav-item {
padding-top: 1.2em;
padding-bottom: 1.2em;
transition: 0.3s;
}
.nav-item a {
padding-left: 1.2em;
padding-right: 1.2em;
font-size: 1.2em;
transition: 0.3s;
}
.nav-item:hover {
background-color: rgb(180, 220, 200);
transition: 0.3s;
}
.nav-item:hover a {
transition: 0.3s;
color: rgb(5, 35, 35);
}
.footer-wrapper {
text-align: right;
padding-top: 1.0em;
padding-bottom: 1em;
padding-left: 1.0em;
padding-right: 1.0em;
bottom: 0;
}

19
main.go
View File

@ -36,12 +36,24 @@ const HTML_HEADER = `<!doctype html5>
<link href=/main.css media=all rel=stylesheet type=text/css></link>
</head>
<body>
<nav>
<div class="nav-wrapper">
<div class="nav-item">
<a href="/">Home</a>
</div>
<div class="nav-item">
<a href="/resume/resume-KelvinLy-hardware.pdf">Resume</a>
</div>
</div>
</nav>
<article class="markdown-body entry-content" style="padding:2em;">
`
const HTML_FOOTER = ` </article>
<footer>
<div class="footer-wrapper">
by Kelvin Ly, source available <a href="https://github.com/cactorium/kelvinly-server">here</a>
</div>
</footer>
</body>
</html>`
@ -105,7 +117,8 @@ func main() {
LogFileName: "/tmp/kelvinly-server-log",
LogFilePerm: 0640,
WorkDir: "/home/kelvin/kelvinly-server/",
Umask: 027,
//WorkDir: ".",
Umask: 027,
}
// TODO: figure out the daemonizing stuff
@ -169,6 +182,7 @@ func startServer(srv *http.Server) {
serveMux.HandleFunc("/", rootHandler)
//serveMux.Handle("/certbot/", http.StripPrefix("/certbot/", http.FileServer(http.Dir("./certbot-tmp"))))
serveMux.Handle("/gfm/", http.StripPrefix("/gfm", http.FileServer(gfmstyle.Assets)))
serveMux.Handle("/resume/", http.StripPrefix("/resume", http.FileServer(http.Dir("resume/"))))
serveMux.HandleFunc("/main.css", func(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, "main.css") })
srv.Addr = ":8443"
@ -176,6 +190,9 @@ func startServer(srv *http.Server) {
log.Print("starting server")
log.Fatal(srv.ListenAndServeTLS("/etc/letsencrypt/live/"+DOMAIN_NAME+"/fullchain.pem",
"/etc/letsencrypt/live/"+DOMAIN_NAME+"/privkey.pem"))
/*
log.Fatal(srv.ListenAndServe())
*/
close(serverShutdown)
}

1
resume Submodule

@ -0,0 +1 @@
Subproject commit ebda2c3802c3f94820a711bd5348125df4570430