Skip to content

Commit

Permalink
Merge pull request austingebauer#28 from m-hofmann/main
Browse files Browse the repository at this point in the history
Make home_image optional
  • Loading branch information
austingebauer authored May 1, 2023
2 parents e2dd05e + 1a1129c commit 9d1d1db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ copyright = "© Copyright Year, Your Name"
description = "Your meta description" # Your meta description of the site
header_title = "Your Name" # Your header title
header_subtitle = "Your Creative Subtitle" # Your header subtitle
home_image = "/images/avatar.png" # Path to header image starting from the static directory
home_image = "/images/avatar.png" # Path to header image starting from the static directory (optional)
recent_posts = 5 # Max amount of recent posts to show
mainSections = ["posts", "post", "blog"] # Main sections to include in recent posts
[params.style] # CSS style overrides
Expand Down
4 changes: 4 additions & 0 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<header class="container mt-sm-5 mt-4 mb-4 mt-xs-1">
<div class="row">
{{ if isset .Site.Params "home_image" }}
<div class="col-sm-4 col-12 text-sm-right text-center pt-sm-4">
<a href="/" class="text-decoration-none">
<img id="home-image" class="rounded-circle"
Expand All @@ -16,6 +17,9 @@
</a>
</div>
<div class="col-sm-8 col-12 text-sm-left text-center">
{{ else }}
<div class="col-12 text-center">
{{ end }}
<h2 class="m-0 mb-2 mt-4">
<a href="/" class="text-decoration-none">
{{ if isset .Site.Params "header_title" }}
Expand Down

0 comments on commit 9d1d1db

Please sign in to comment.