From 61eae5c5f9881cab29712f6e696085baa977e1f9 Mon Sep 17 00:00:00 2001 From: Jeffrey Tse Date: Wed, 11 Sep 2019 12:19:34 +0800 Subject: release: v1.0.0 --- _includes/views/banner.html | 66 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 _includes/views/banner.html (limited to '_includes/views/banner.html') diff --git a/_includes/views/banner.html b/_includes/views/banner.html new file mode 100644 index 0000000..7878997 --- /dev/null +++ b/_includes/views/banner.html @@ -0,0 +1,66 @@ +{%- include functions.html func='log' level='debug' msg='Get banner_html value' -%} +{% assign name = 'banner_html' %} +{%- include functions.html func='get_value' -%} +{% assign banner_html = return %} + +{%- include functions.html func='log' level='debug' msg='Get banner value' -%} +{% assign name = 'banner' %} +{%- include functions.html func='get_value' -%} +{% assign banner = return %} + +{%- include functions.html func='log' level='debug' msg='Get heading value' -%} +{% assign name = 'heading' %} +{%- include functions.html func='get_value' -%} +{% assign heading = return %} + +{%- include functions.html func='log' level='debug' msg='Get subheading value' -%} +{% assign name = 'subheading' %} +{%- include functions.html func='get_value' -%} +{% assign subheading = return %} + +{% if banner %} + + {% assign auto_banner = true %} + {% assign array = banner | split: '//' %} + {% assign protocol = array[0] %} + + {% if array.size > 1 and (protocol == '' or protocol == 'http:' or protocol == 'https:') %} + {% assign auto_banner = false %} + {% endif %} + +
+
+ {%- if auto_banner == false -%} +
+ {%- endif -%} +
+
+
+ + {%- if banner_html -%} + + {%- assign banner_html = 'views/' | append: banner_html -%} + {%- include {{ banner_html }} -%} + + {%- else -%} + +

+ {{ heading | default: page.title | escape }} +

+

+ {{ subheading | default: page.subtitle | escape }} +

+ + {%- endif -%} +
+
+
+ + {%- if auto_banner -%} + {%- assign selector = ".page-banner-img" -%} + {%- assign seed = page.id | append: '-seed-' | append: banner -%} + {%- include extensions/trianglify.html -%} + {%- endif -%} + +{%- endif -%} + -- cgit v1.2.3