From 462336f60242ddbfd41b3d00e020914678101855 Mon Sep 17 00:00:00 2001 From: Jeremy Thomas Date: Sun, 7 Oct 2018 17:46:48 +0200 Subject: [PATCH] Add fullheight hero with navbar documentation --- docs/_includes/examples/navbar-basic.html | 23 ++++++ docs/css/bulma-docs.css | 8 +- docs/documentation/layout/hero.html | 91 ++++++++++++++++++----- 3 files changed, 103 insertions(+), 19 deletions(-) create mode 100644 docs/_includes/examples/navbar-basic.html diff --git a/docs/_includes/examples/navbar-basic.html b/docs/_includes/examples/navbar-basic.html new file mode 100644 index 00000000..97261e4f --- /dev/null +++ b/docs/_includes/examples/navbar-basic.html @@ -0,0 +1,23 @@ + \ No newline at end of file diff --git a/docs/css/bulma-docs.css b/docs/css/bulma-docs.css index 6f48d20e..e9abdc79 100644 --- a/docs/css/bulma-docs.css +++ b/docs/css/bulma-docs.css @@ -10131,12 +10131,12 @@ label.panel-block:hover { } } -.hero.is-halfheight .hero-body, .hero.is-fullheight .hero-body { +.hero.is-halfheight .hero-body, .hero.is-fullheight .hero-body, .hero.is-fullheight-with-navbar .hero-body { align-items: center; display: flex; } -.hero.is-halfheight .hero-body > .container, .hero.is-fullheight .hero-body > .container { +.hero.is-halfheight .hero-body > .container, .hero.is-fullheight .hero-body > .container, .hero.is-fullheight-with-navbar .hero-body > .container { flex-grow: 1; flex-shrink: 1; } @@ -10149,6 +10149,10 @@ label.panel-block:hover { min-height: 100vh; } +.hero.is-fullheight-with-navbar { + min-height: calc(100vh - 3.25rem); +} + .hero-video { overflow: hidden; } diff --git a/docs/documentation/layout/hero.html b/docs/documentation/layout/hero.html index 8c363d21..16552bfd 100644 --- a/docs/documentation/layout/hero.html +++ b/docs/documentation/layout/hero.html @@ -13,7 +13,7 @@ breadcrumb: meta: colors: true sizes: true - variables: true + variables: false ---
@@ -76,9 +76,9 @@ meta:
{% include elements/anchor.html name="Colors" %} -

- As with buttons, you can choose one of the 7 different colors: -

+
+ As with buttons, you can choose one of the 7 different colors: +
@@ -207,9 +207,9 @@ meta:
{% include elements/anchor.html name="Gradients" %} -

+
By adding the is-bold modifier, you can generate a subtle gradient -

+
@@ -331,9 +331,22 @@ meta:
{% include elements/anchor.html name="Sizes" %} -

- You can have even more imposing banners by using one of 3 different sizes -

+
+

+ You can have even more imposing banners by using one of 3 different sizes: +

+
    +
  • + medium +
  • +
  • + large +
  • +
  • + fullheight +
  • +
+
@@ -403,10 +416,10 @@ meta:

- Full Height title + Fullheight title

- Full Height subtitle + Fullheight subtitle

@@ -418,10 +431,10 @@ meta:

- Full Height title + Fullheight title

- Full Height subtitle + Fullheight subtitle

@@ -429,12 +442,56 @@ meta: {% endhighlight %} +
- {% include elements/anchor.html name="Full height hero" %} -

And vertically centered

+ {% include elements/anchor.html name="Fullheight with navbar" %} + {% include elements/new-tag.html version="0.7.2" %}
-

You can split the hero in 3 vertical parts:

+

+ If you are using a fixed navbar, you can use the is-fullheight-with-navbar modifier on the hero for it to occupy the viewport height minus the navbar height. +

+
+
+
+ +
+ {% include examples/navbar-basic.html %} +
+
+
+

+ Fullheight title +

+

+ Fullheight subtitle +

+
+
+
+
+ +{% highlight html %} +
+
+
+

+ Fullheight title +

+

+ Fullheight subtitle +

+
+
+
+{% endhighlight %} + + +
+
+ {% include elements/anchor.html name="Fullheight hero in 3 parts" %} +
+

To obtain a hero that will cover the whole height of the viewport, you can split it in 3 vertical parts:

  • hero @@ -679,4 +736,4 @@ meta: {% include layout/main-open.html %} -{% include elements/variables.html type='component' %} +{% include elements/variables.html type='component' hide_content=true %}