Add resume and nav bar
This commit is contained in:
parent
7fd8eed45b
commit
68164655c9
|
@ -1,3 +1,6 @@
|
||||||
[submodule "static"]
|
[submodule "static"]
|
||||||
path = static
|
path = static
|
||||||
url = https://github.com/cactorium/cactorium.github.io
|
url = https://github.com/cactorium/cactorium.github.io
|
||||||
|
[submodule "resume"]
|
||||||
|
path = resume
|
||||||
|
url = https://github.com/cactorium/kelvin-ly-resume.git
|
||||||
|
|
63
main.css
63
main.css
|
@ -1,5 +1,68 @@
|
||||||
body {
|
body {
|
||||||
|
margin: 0;
|
||||||
|
background-color: rgb(240, 240, 240);
|
||||||
|
}
|
||||||
|
|
||||||
|
article {
|
||||||
max-width: 1012px;
|
max-width: 1012px;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
margin-left: 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
19
main.go
|
@ -36,12 +36,24 @@ const HTML_HEADER = `<!doctype html5>
|
||||||
<link href=/main.css media=all rel=stylesheet type=text/css></link>
|
<link href=/main.css media=all rel=stylesheet type=text/css></link>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<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;">
|
<article class="markdown-body entry-content" style="padding:2em;">
|
||||||
`
|
`
|
||||||
|
|
||||||
const HTML_FOOTER = ` </article>
|
const HTML_FOOTER = ` </article>
|
||||||
<footer>
|
<footer>
|
||||||
|
<div class="footer-wrapper">
|
||||||
by Kelvin Ly, source available <a href="https://github.com/cactorium/kelvinly-server">here</a>
|
by Kelvin Ly, source available <a href="https://github.com/cactorium/kelvinly-server">here</a>
|
||||||
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
</html>`
|
</html>`
|
||||||
|
@ -105,7 +117,8 @@ func main() {
|
||||||
LogFileName: "/tmp/kelvinly-server-log",
|
LogFileName: "/tmp/kelvinly-server-log",
|
||||||
LogFilePerm: 0640,
|
LogFilePerm: 0640,
|
||||||
WorkDir: "/home/kelvin/kelvinly-server/",
|
WorkDir: "/home/kelvin/kelvinly-server/",
|
||||||
Umask: 027,
|
//WorkDir: ".",
|
||||||
|
Umask: 027,
|
||||||
}
|
}
|
||||||
// TODO: figure out the daemonizing stuff
|
// TODO: figure out the daemonizing stuff
|
||||||
|
|
||||||
|
@ -169,6 +182,7 @@ func startServer(srv *http.Server) {
|
||||||
serveMux.HandleFunc("/", rootHandler)
|
serveMux.HandleFunc("/", rootHandler)
|
||||||
//serveMux.Handle("/certbot/", http.StripPrefix("/certbot/", http.FileServer(http.Dir("./certbot-tmp"))))
|
//serveMux.Handle("/certbot/", http.StripPrefix("/certbot/", http.FileServer(http.Dir("./certbot-tmp"))))
|
||||||
serveMux.Handle("/gfm/", http.StripPrefix("/gfm", http.FileServer(gfmstyle.Assets)))
|
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") })
|
serveMux.HandleFunc("/main.css", func(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, "main.css") })
|
||||||
|
|
||||||
srv.Addr = ":8443"
|
srv.Addr = ":8443"
|
||||||
|
@ -176,6 +190,9 @@ func startServer(srv *http.Server) {
|
||||||
log.Print("starting server")
|
log.Print("starting server")
|
||||||
log.Fatal(srv.ListenAndServeTLS("/etc/letsencrypt/live/"+DOMAIN_NAME+"/fullchain.pem",
|
log.Fatal(srv.ListenAndServeTLS("/etc/letsencrypt/live/"+DOMAIN_NAME+"/fullchain.pem",
|
||||||
"/etc/letsencrypt/live/"+DOMAIN_NAME+"/privkey.pem"))
|
"/etc/letsencrypt/live/"+DOMAIN_NAME+"/privkey.pem"))
|
||||||
|
/*
|
||||||
|
log.Fatal(srv.ListenAndServe())
|
||||||
|
*/
|
||||||
close(serverShutdown)
|
close(serverShutdown)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit ebda2c3802c3f94820a711bd5348125df4570430
|
Loading…
Reference in New Issue