Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start an about page #8

Merged
merged 3 commits into from
Jan 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions internal/handlers/blog.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ func (h *BlogHandler) Index(w http.ResponseWriter, r *http.Request) {
})
}

func (h *BlogHandler) About(w http.ResponseWriter, r *http.Request) {

renderTemplate(w, "about.html", map[string]interface{}{
"Title": "Web Log by Nick Foden",
})
}

func (h *BlogHandler) Post(w http.ResponseWriter, r *http.Request) {
slug := chi.URLParam(r, "slug")

Expand Down
33 changes: 33 additions & 0 deletions internal/templates/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{{template "base.html" .}} {{ define "content" }}
<h1 class="font_sixtyfour">About Nick</h1>
<p class="font_roboto-condensed post_p">
I've built a lot of different platforms, apps, and services and have worked
for large enterprise and tiny startups. Small teams where wearing many hats,
and larger teams with differing skill levels and where had a concentration on
leveling up colleagues. I lead a mobile team for the largest healthcare org in
the us and I have singlehandedly built dozens of services currently in
production today that healthy businesses continue to leverage. I enjoy being
involved early in the process and collaborating with cross functional teams to
solve problems. And with a drive for simplicity and a curiosity for thinking
around corners & alternative solutions.
</p>
<p class="font_roboto-condensed post_p">
I enjoy collaborative conversations and humble about actual code, rather find
the most effective solution than be right, and many times that is also not an
engineering solve, but rather deeper understanding of the requirements and
framing or a product/design solution. Ultimately I believe our job is to write
less code, have less dependencies, and create predictable scalable solutions
that don't reinvent the wheel or waste time solving solved problems.
Leveraging experience and doing that up front research saves hours/weeks down
the line. Predictable, clean and consistent code unlocks velocity and reduces
debt and bugs. Choose boring ! And save your innovation tokens for the unique
parts of the business.
</p>
<p class="font_roboto-condensed post_p">
v1 make it work, v2+ simplify / refactor and iterate down / reduce verbosity.
Influenced by React Rally, Lead Dev, Datadog DASH, Google Cloud Next and other
conferences, and really stuck with me from LeadDev NY the other year with a
keynote on living cities and how to have healthier codebases. (Will find the
video and link it).
</p>
{{ end }}
1 change: 1 addition & 0 deletions internal/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<html lang="en">
<head>
<title>{{ .Title }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="/static/css/style.css" rel="stylesheet" />
<link href="/static/assets/favicon.ico" rel="icon" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
Expand Down
2 changes: 1 addition & 1 deletion internal/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{ range .Posts }}
<li>
<div class="row">
<a class="font_roboto-condensed" href="/posts/{{ .Slug }}"
<a class="font_roboto-condensed index_post_link" href="/posts/{{ .Slug }}"
>{{ .Title }}</a
>
<p class="font_roboto-condensed index_post_date">
Expand Down
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ func main() {
// Handlers
blogHandler := handlers.NewBlogHandler(posts)

// Pages
r.Get("/", blogHandler.Index)
r.Get("/about", blogHandler.About)
r.Get("/posts/{slug}", blogHandler.Post)

// API
r.Get("/get_current_year", (func(w http.ResponseWriter, r *http.Request) {
year := time.Now().Year()
fmt.Fprintf(w, "%d", year)
Expand Down
20 changes: 18 additions & 2 deletions static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ header {
}

h1 {
font-size: 18px;
font-size: 32px;

@media only screen and (min-width: 768px) {
font-size: 24px;
}
}

main {
Expand Down Expand Up @@ -57,8 +61,20 @@ main {
}

.index_post_date {
font-size: 14px;
font-size: 16px;
margin: 0 0 0 8px;

@media only screen and (min-width: 768px) {
font-size: 14px;
}
}

.index_post_link {
font-size: 24px;

@media only screen and (min-width: 768px) {
font-size: 18px;
}
}

.index_posts_ul {
Expand Down
Loading