This commit is contained in:
parent
186491250e
commit
08557f45db
@ -8,6 +8,7 @@ RUN CGO_ENABLED=0 go build -o /app
|
|||||||
FROM scratch
|
FROM scratch
|
||||||
COPY --from=build /app .
|
COPY --from=build /app .
|
||||||
COPY html/ html/
|
COPY html/ html/
|
||||||
|
COPY css/ css/
|
||||||
COPY static/ static/
|
COPY static/ static/
|
||||||
COPY tmpl/ tmpl/
|
COPY tmpl/ tmpl/
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
@ -8,12 +8,15 @@ services:
|
|||||||
watch:
|
watch:
|
||||||
- action: rebuild
|
- action: rebuild
|
||||||
path: src/
|
path: src/
|
||||||
- action: sync+restart
|
|
||||||
path: html/
|
|
||||||
target: html/
|
|
||||||
- action: sync+restart
|
- action: sync+restart
|
||||||
path: tmpl/
|
path: tmpl/
|
||||||
target: tmpl/
|
target: tmpl/
|
||||||
|
- action: sync+restart
|
||||||
|
path: html/
|
||||||
|
target: html/
|
||||||
|
- action: sync
|
||||||
|
path: css/
|
||||||
|
target: css/
|
||||||
- action: sync
|
- action: sync
|
||||||
path: static/
|
path: static/
|
||||||
target: static/
|
target: static/
|
||||||
|
11
css/resume.css
Normal file
11
css/resume.css
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
@media print {
|
||||||
|
@page {
|
||||||
|
size: A4;
|
||||||
|
size: portrait;
|
||||||
|
margin: 5mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu, #credits {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
@ -2,9 +2,9 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
{{template "head.tmpl" .}}
|
{{template "head.tmpl" .}}
|
||||||
|
<script src="static/copy.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script src="static/copy.js"></script>
|
|
||||||
{{template "header.tmpl" .}}
|
{{template "header.tmpl" .}}
|
||||||
<div id="content">
|
<div id="content">
|
||||||
<!--
|
<!--
|
||||||
@ -56,6 +56,11 @@
|
|||||||
<td id="ssh"><a href="/static/ssh" target="_blank" rel="noreferrer noopener">ssh</a></td>
|
<td id="ssh"><a href="/static/ssh" target="_blank" rel="noreferrer noopener">ssh</a></td>
|
||||||
<td><button onclick="copyFile('ssh')">Copy</button></td>
|
<td><button onclick="copyFile('ssh')">Copy</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>LinkedIn</td>
|
||||||
|
<td id="in"><a href="https://www.linkedin.com/in/angedhn" target="_blank" rel="noreferrer noopener">www.linkedin.com/in/angedhn</a></td>
|
||||||
|
<td><button onclick="copyElem('in')">Copy</button></td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
{{template "head.tmpl" .}}
|
<head>
|
||||||
|
{{template "head.tmpl" .}}
|
||||||
|
<link rel="stylesheet" href="resume.css"/>
|
||||||
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{{template "header.tmpl". }}
|
{{template "header.tmpl" .}}
|
||||||
<div id="content">
|
<div id="content">
|
||||||
<div id="nav">
|
<div id="nav">
|
||||||
<!--
|
<!--
|
||||||
@ -28,20 +31,21 @@
|
|||||||
<h3><b>Freelance</b> - DevOps</h3>
|
<h3><b>Freelance</b> - DevOps</h3>
|
||||||
SEPTEMBER 2023 - TODAY
|
SEPTEMBER 2023 - TODAY
|
||||||
<ul>
|
<ul>
|
||||||
<li>Server setup (Debian, Docker/K8s, web server, customer application)</li>
|
<li>Server setup (Debian, Docker/K8S, web server, customer application)</li>
|
||||||
<li>CI/CD, real-time monitoring</li>
|
<li>CI/CD, real-time monitoring</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3><b>Selfhost</b> - DevOps</h3>
|
<h3><b>Selfhost</b> - DevOps</h3>
|
||||||
JANUARY 2022 - TODAY
|
JANUARY 2022 - TODAY
|
||||||
<ul>
|
<ul>
|
||||||
<li>Debian + K8S + Gitea CI/CD + Nextcloud + Matrix.org + Jellyfin + SearXNG</li>
|
<li>Debian, K8S, Gitea CI/CD</li>
|
||||||
|
<li>Nextcloud, Matrix.org, Jellyfin, SearXNG</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3><b>EPITECH CodingClub association, Toulouse</b> - Cobra</h3>
|
<h3><b>EPITECH CodingClub association, Toulouse</b> - Cobra</h3>
|
||||||
JANUARY 2021 - JUNE 2024
|
JANUARY 2021 - JUNE 2024
|
||||||
<ul>
|
<ul>
|
||||||
<li>Coding workshops for high school students</li>
|
<li>Coding workshops for high school students</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3><b>Predicloud, Toulouse</b> - DevOps / Site Reliability Manager</h3>
|
<h3><b>Predicloud, Toulouse</b> - DevOps SRE</h3>
|
||||||
JUNE 2022 - JULY 2023
|
JUNE 2022 - JULY 2023
|
||||||
<ul>
|
<ul>
|
||||||
<li>CI/CD, K8S monitoring</li>
|
<li>CI/CD, K8S monitoring</li>
|
||||||
@ -57,7 +61,7 @@
|
|||||||
<tr><td>Python</td> <td>Git</td></tr>
|
<tr><td>Python</td> <td>Git</td></tr>
|
||||||
<tr><td>Bash</td> <td>Vim</td></tr>
|
<tr><td>Bash</td> <td>Vim</td></tr>
|
||||||
<tr><td>Go</td> <td>Docker</td></tr>
|
<tr><td>Go</td> <td>Docker</td></tr>
|
||||||
<tr><td>JavaScript</td><td>K8S</td></tr>
|
<tr><td>JS</td> <td>K8S</td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -16,15 +16,19 @@ var routes = []struct {
|
|||||||
handler http.HandlerFunc
|
handler http.HandlerFunc
|
||||||
}{
|
}{
|
||||||
{[]string{"GET"}, url(""), index},
|
{[]string{"GET"}, url(""), index},
|
||||||
{[]string{"GET"}, url("/style\\.css"), style},
|
|
||||||
{[]string{"GET"}, url("/static/.+"), static},
|
{[]string{"GET"}, url("/static/.+"), static},
|
||||||
{[]string{"GET"}, url("/[^/]+"), html},
|
{[]string{"GET"}, url("/(.+\\.css)"), css},
|
||||||
|
{[]string{"GET"}, url("/([^/]+)"), html},
|
||||||
}
|
}
|
||||||
|
|
||||||
func url(s string) *regexp.Regexp {
|
func url(s string) *regexp.Regexp {
|
||||||
return regexp.MustCompile("^" + s + "/?$")
|
return regexp.MustCompile("^" + s + "/?$")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func getParam(r *http.Request, i int) string {
|
||||||
|
return r.Context().Value(URLParam{}).([]string)[i]
|
||||||
|
}
|
||||||
|
|
||||||
func route(w http.ResponseWriter, r *http.Request) {
|
func route(w http.ResponseWriter, r *http.Request) {
|
||||||
for _, rt := range routes {
|
for _, rt := range routes {
|
||||||
matches := rt.regex.FindStringSubmatch(r.URL.Path)
|
matches := rt.regex.FindStringSubmatch(r.URL.Path)
|
||||||
|
@ -26,6 +26,6 @@ func generateTmpl() {
|
|||||||
"name": names[i],
|
"name": names[i],
|
||||||
"names": names,
|
"names": names,
|
||||||
})
|
})
|
||||||
TMPL["/" + names[i]] = b.Bytes()
|
TMPL[names[i]] = b.Bytes()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
13
src/views.go
13
src/views.go
@ -1,23 +1,26 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"path/filepath"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"fmt"
|
||||||
)
|
)
|
||||||
|
|
||||||
func index(w http.ResponseWriter, r *http.Request) {
|
func index(w http.ResponseWriter, r *http.Request) {
|
||||||
http.Redirect(w, r, "/contact", http.StatusMovedPermanently)
|
http.Redirect(w, r, "/contact", http.StatusMovedPermanently)
|
||||||
}
|
}
|
||||||
|
|
||||||
func style(w http.ResponseWriter, r *http.Request) {
|
|
||||||
http.ServeFile(w, r, "html/style.css")
|
|
||||||
}
|
|
||||||
|
|
||||||
func static(w http.ResponseWriter, r *http.Request) {
|
func static(w http.ResponseWriter, r *http.Request) {
|
||||||
http.ServeFile(w, r, r.URL.Path)
|
http.ServeFile(w, r, r.URL.Path)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func css(w http.ResponseWriter, r *http.Request) {
|
||||||
|
fmt.Println(filepath.Join("css", getParam(r, 0)))
|
||||||
|
http.ServeFile(w, r, filepath.Join("css", getParam(r, 0)))
|
||||||
|
}
|
||||||
|
|
||||||
func html(w http.ResponseWriter, r *http.Request) {
|
func html(w http.ResponseWriter, r *http.Request) {
|
||||||
if t, found := TMPL[r.URL.Path]; found {
|
if t, found := TMPL[getParam(r, 0)]; found {
|
||||||
w.Write(t)
|
w.Write(t)
|
||||||
} else {
|
} else {
|
||||||
http.NotFound(w, r)
|
http.NotFound(w, r)
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
<head>
|
<meta charset="UTF-8">
|
||||||
<meta charset="UTF-8">
|
<title>Ange DUHAYON</title>
|
||||||
<title>Ange DUHAYON</title>
|
<link rel="stylesheet" href="style.css"/>
|
||||||
<link rel="stylesheet" href="style.css"/>
|
|
||||||
</head>
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<div id="header">
|
<div id="header">
|
||||||
<a id="headerLink" href="/">Ange DUHAYON</a>
|
<a id="headerLink" href="/">Ange DUHAYON</a>
|
||||||
<span id="headerSubtitle">DevOps Engineer</span>
|
<span id="headerSubtitle">DevOps Engineer</span>
|
||||||
<span class="right" style="font-size: .4em;">Website heavily inspired from <a href="//suckless.org/" target="_blank" rel="noreferrer noopener">suckless.org</a></span>
|
<span id="credits" class="right" style="font-size: .4em;">Website heavily inspired from <a href="//suckless.org/" target="_blank" rel="noreferrer noopener">suckless.org</a></span>
|
||||||
</div>
|
</div>
|
||||||
<div id="menu">
|
<div id="menu">
|
||||||
{{$name := .name}}
|
{{$name := .name}}
|
||||||
|
Loading…
Reference in New Issue
Block a user