Updated navbar and hero.

This commit is contained in:
Chris 2018-01-07 20:24:18 -05:00
parent c6f64e239a
commit d959bedf27
3 changed files with 49 additions and 53 deletions

View File

@ -1,4 +1,4 @@
<section id="homepage-hero" class="hero is-medium is-primary is-bold"> <section id="homepage-hero" class="hero is-primary is-bold">
<div class="hero-head"> <div class="hero-head">
<!-- is-dark / is-light is set by hero.js for the homepage hero --> <!-- is-dark / is-light is set by hero.js for the homepage hero -->
<nav id="hero-navbar" class="navbar is-size-6 is-fixed-top" role="navigation" aria-label="main navigation"> <nav id="hero-navbar" class="navbar is-size-6 is-fixed-top" role="navigation" aria-label="main navigation">
@ -7,20 +7,27 @@
</div> </div>
<div class="hero-body"> <div class="hero-body">
<div class="container"> <section class="section">
<div class="columns"> <div class="container">
<!-- Left panel --> <!-- is-dark / is-light is set by hero.js for the homepage hero -->
<div class="column is-centered-vertically is-5"> <nav id="hero-navbar" class="navbar is-size-6 is-fixed-top" role="navigation" aria-label="main navigation">
{{ partial "home_hero_contents" . }} {{ partial "layout/navbar_contents" . }}
</div> </nav>
<!-- Right panel --> <div class="columns">
<div class="column is-7"> <!-- Left panel -->
<figure class="image is-16by9"> <div class="column is-centered-vertically is-5">
<img src="{{ .Site.BaseURL}}/images/jumbotron.png" /> {{ partial "home_hero_contents" . }}
</figure> </div>
<!-- Right panel -->
<div class="column is-7 is-hidden-mobile">
<figure class="image is-16by9">
<img src="{{ .Site.BaseURL}}/images/jumbotron.png" />
</figure>
</div>
</div> </div>
</div> </div>
</div>
</div> </div>
</section>
</section> </section>

View File

@ -6,42 +6,39 @@
</div> </div>
<div class="navbar-menu"> <div class="navbar-menu">
<div class="navbar-end"> <div class="navbar-end">
{{ $currentPage := . }} {{ $currentPage := . }} {{ range .Site.Menus.main }} {{ if .HasChildren }}
{{ range .Site.Menus.main }} <div class="navbar-item has-dropdown is-hoverable">
{{ if .HasChildren }} <a class="navbar-item">
<div class="navbar-item has-dropdown is-hoverable"> {{ .Name }}
<a class="navbar-item">
{{ .Name }} <span class="icon">
<i class="fas fa-caret-down"></i>
<span class="icon"> </span>
<i class="fas fa-caret-down"></i> </a>
</span> <div class="navbar-dropdown">
</a> {{ range .Children }}
<div class="navbar-dropdown"> <a class="navbar-item {{ if $currentPage.IsMenuCurrent " main " . }} is-active{{ end }}" href="{{ .URL }}">
{{ range .Children }}
<a class="navbar-item {{ if $currentPage.IsMenuCurrent "main" . }} is-active{{ end }}" href="{{ .URL }}">
{{ .Name }}
</a>
{{ end }}
</div>
</div>
{{ else }}
<a class="navbar-item {{ if $currentPage.IsMenuCurrent "main" . }} is-active{{ end }}" href="{{ .URL }}">
{{ .Name }} {{ .Name }}
</a> </a>
{{ end }} {{ end }}
{{ end }} </div>
<!-- Navbar icons --> </div>
<a class="navbar-item is-hidden-desktop-only" href="{{ .Site.Params.TwitterURL }}" target="_blank"> {{ else }}
<span class="icon"> <a class="navbar-item {{ if $currentPage.IsMenuCurrent " main " . }} is-active{{ end }}" href="{{ .URL }}">
<i class="fab fa-2x fa-twitter"></i> {{ .Name }}
</span>
</a> </a>
{{ end }} {{ end }}
<!-- Navbar icons -->
<a class="navbar-item is-hidden-desktop-only" href="{{ .Site.Params.DiscordURL }}" target="_blank"> <a class="navbar-item is-hidden-desktop-only" href="{{ .Site.Params.DiscordURL }}" target="_blank">
<span class="icon"> <span class="icon">
<i class="fab fa-2x fa-discord"></i> <i class="fab fa-2x fa-discord"></i>
</span> </span>
</a> </a>
<a class="navbar-item is-hidden-desktop-only" href="{{ .Site.Params.TwitterURL }}" target="_blank">
<span class="icon">
<i class="fab fa-2x fa-twitter"></i>
</span>
</a>
<a class="navbar-item is-hidden-desktop-only" href="{{ .Site.Params.GithubURL }}" target="_blank"> <a class="navbar-item is-hidden-desktop-only" href="{{ .Site.Params.GithubURL }}" target="_blank">
<span class="icon"> <span class="icon">
<i class="fab fa-2x fa-github"></i> <i class="fab fa-2x fa-github"></i>
@ -49,4 +46,4 @@
</a> </a>
</div> </div>
</div> </div>
</div> </div>

View File

@ -2,20 +2,12 @@
<div class="card"> <div class="card">
<div class="card-content"> <div class="card-content">
<div class="columns"> <div class="columns">
<div class="column is-2">
<figure class="image is-square">
<img src="{{ .Site.BaseURL}}/images/twitterAvatar.png" />
</figure>
</div>
<div class="column"> <div class="column">
<p class="title is-4">{{ .author }}</p> <p class="title is-4">@{{ .author }}</p>
<p class="subtitle is-6">
<time datetime="2016-1-1">{{ .date }}</time> by @{{ .author }}</p>
</div> </div>
</div> </div>
<div class="content"> <div class="content">{{ .message }}</div>
{{ .message }} <div><time datetime="2016-1-1">Posted on {{ .date }}</time></div>
</div>
</div> </div>
</div> </div>
</a> </a>