diff options
author | Davide Asnaghi <30296575+d-asnaghi@users.noreply.github.com> | 2021-03-22 19:43:06 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-22 19:43:06 +0300 |
commit | e06406949561f74525774ac579737ed6ae4374fb (patch) | |
tree | 9de8727cd5ed84b74c36be0593cb352dff485aaf | |
parent | bfd73a84dd7ec119058bcad61e8bf46059288049 (diff) | |
parent | 52979d95e28a4b38a70a0afd17c7e2f1648e95d2 (diff) |
Merge pull request #16 from your-identity/icon-svg
[LOGO] use img rather than text
-rw-r--r-- | README.md | 7 | ||||
-rw-r--r-- | exampleSite/content/_index.md | 1 | ||||
-rw-r--r-- | layouts/_default/list.html | 6 | ||||
-rw-r--r-- | static/assets/css/main.css | 9 |
4 files changed, 22 insertions, 1 deletions
@@ -50,6 +50,13 @@ to `config.toml` file in your Hugo root directory and change params fields. See the basic `_index.md` file params supported by the theme — https://github.com/your-identity/hugo-theme-dimension/blob/master/archetypes/_index.md +```toml +title: Your Name +description: A great human +background: "<path or link to image>" +logo: "<path or link to image>" +``` + ## How to run your site From your Hugo root directory run: diff --git a/exampleSite/content/_index.md b/exampleSite/content/_index.md index 8e7bbe0..4df165a 100644 --- a/exampleSite/content/_index.md +++ b/exampleSite/content/_index.md @@ -2,4 +2,5 @@ title: Your Name description: A great human background: "images/bg.jpg" +logo: "https://upload.wikimedia.org/wikipedia/commons/8/8e/Font_Awesome_5_regular_gem.svg" ---
\ No newline at end of file diff --git a/layouts/_default/list.html b/layouts/_default/list.html index c9febcf..1c8773e 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -8,7 +8,11 @@ <!-- Header --> <header id="header"> <div class="logo"> - <a href="/"><span class="icon fa-{{ .Params.Icon }}"></span></a> + <a href="/"> + <span class="icon"> + <img src="{{ .Params.logo }}"> + </span> + </a> </div> <div class="content"> <div class="inner"> diff --git a/static/assets/css/main.css b/static/assets/css/main.css index 82979c1..c670056 100644 --- a/static/assets/css/main.css +++ b/static/assets/css/main.css @@ -635,6 +635,15 @@ input, select, textarea { font-family: 'Font Awesome 5 Brands'; } + .icon > img { + display: inline-block; + vertical-align: middle; + max-width: 3.5rem; + max-height: 3.5rem; + width: auto; + height: auto; + } + /* Image */ .image { |