Skip to content

Commit

Permalink
Merge pull request not-matthias#84 from tstoeter/main
Browse files Browse the repository at this point in the history
feat: logo support
  • Loading branch information
not-matthias authored Dec 27, 2024
2 parents c9abd57 + 9232c62 commit 7b85d52
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
10 changes: 10 additions & 0 deletions content/posts/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ Defines the navigation menu items for your blog.
]
```

## Logo

Defines the site logo image file.

- Type: String
- Usage:
```toml
logo = "site_logo.svg"
```

## Socials

Defines the social media links.
Expand Down
16 changes: 16 additions & 0 deletions sass/parts/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,22 @@ header .socials {
justify-content: center;
}

.logo {
border-bottom: unset;
background-image: unset;
}

.logo>img {
border: unset;
width: auto;
height: 24px;
vertical-align: middle;
}

.logo:hover {
background-color: transparent;
}

.socials {
/* flex-child */
flex-grow: 0;
Expand Down
2 changes: 1 addition & 1 deletion sass/parts/_tags.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}

a:hover {
color: var(--hover_color);
color: var(--hover-color);
background-color: var(--primary-color);
}

Expand Down
6 changes: 6 additions & 0 deletions templates/partials/nav.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<header>
<div class="main">
{% if config.extra.logo %}
<a href={{ config.base_url }} class="logo">
<img alt={{ config.title }} src={{ get_url(path=config.extra.logo) }}>
</a>
{% else %}
<a href={{ config.base_url }}>{{ config.title }}</a>
{% endif %}

<div class="socials">
{% for social in config.extra.socials | default(value=[]) %}
Expand Down

0 comments on commit 7b85d52

Please sign in to comment.