diff options
author | Jeffrey Tse <jeffreytse.mail@gmail.com> | 2019-09-19 14:14:23 +0800 |
---|---|---|
committer | Jeffrey Tse <jeffreytse.mail@gmail.com> | 2019-09-19 14:14:23 +0800 |
commit | fc7e421ae280d7bb99d689d0ef740f3d0398ee26 (patch) | |
tree | 51983f52a46bcaf38c3deb86e9511b89036c9bfc /_includes | |
parent | 563c82dd5201bef76f5a9fb683c097bc9127d001 (diff) |
update: adjust header brand favicon, banner, etc
Diffstat (limited to '_includes')
-rw-r--r-- | _includes/head.html | 4 | ||||
-rw-r--r-- | _includes/views/banner.html | 18 | ||||
-rw-r--r-- | _includes/views/site-brand.html | 7 |
3 files changed, 19 insertions, 10 deletions
diff --git a/_includes/head.html b/_includes/head.html index 03d16ba..770a7bf 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -4,10 +4,8 @@ <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="google-translate-customization" content="108d9124921d80c3-80e20d618ff053c8-g4f02ec6f3dba68b7-c"></meta> {%- seo -%} - {%- if site.favicon -%} <link rel="shortcut icon" href="{{ site.favicon }}"> - {%- endif -%} -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}"> {%- feed_meta -%} {%- if jekyll.environment == 'production' and site.google_analytics -%} diff --git a/_includes/views/banner.html b/_includes/views/banner.html index 7878997..baa8465 100644 --- a/_includes/views/banner.html +++ b/_includes/views/banner.html @@ -21,7 +21,7 @@ {% if banner %} {% assign auto_banner = true %} - {% assign array = banner | split: '//' %} + {% assign array = banner | split: '/' %} {% assign protocol = array[0] %} {% if array.size > 1 and (protocol == '' or protocol == 'http:' or protocol == 'https:') %} @@ -57,9 +57,23 @@ </section> {%- if auto_banner -%} + {%- assign selector = ".page-banner-img" -%} - {%- assign seed = page.id | append: '-seed-' | append: banner -%} + + {%- if banner == "default" -%} + + {%- assign heading = page.heading | default: page.title | escape -%} + {%- assign subheading = page.subheading | default: page.subtitle | escape -%} + {%- assign seed = page.date | append: heading | append: subheading -%} + + {%- else -%} + + {%- assign seed = 'theme-' | append: banner -%} + + {%- endif -%} + {%- include extensions/trianglify.html -%} + {%- endif -%} {%- endif -%} diff --git a/_includes/views/site-brand.html b/_includes/views/site-brand.html index cbb3b6c..e1ad4a8 100644 --- a/_includes/views/site-brand.html +++ b/_includes/views/site-brand.html @@ -1,7 +1,4 @@ -<a class="site-title" rel="author" href="{{ "/" | relative_url }}"> - {%- if site.favicon -%} - <img class="site-favicon" title="{{ site.title | escape }}" src="{{ - site.favicon }}"> - {%- endif -%} +<a class="site-brand-inner" rel="author" href="{{ "/" | relative_url }}"> + <img class="site-favicon" title="{{ site.title | escape }}" src="{{ site.favicon }}" onerror="this.style.display='none'"> {{ site.title | escape }} </a> |