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,7 +7,13 @@
</div> </div>
<div class="hero-body"> <div class="hero-body">
<section class="section">
<div class="container"> <div class="container">
<!-- 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">
{{ partial "layout/navbar_contents" . }}
</nav>
<div class="columns"> <div class="columns">
<!-- Left panel --> <!-- Left panel -->
<div class="column is-centered-vertically is-5"> <div class="column is-centered-vertically is-5">
@ -15,7 +21,7 @@
</div> </div>
<!-- Right panel --> <!-- Right panel -->
<div class="column is-7"> <div class="column is-7 is-hidden-mobile">
<figure class="image is-16by9"> <figure class="image is-16by9">
<img src="{{ .Site.BaseURL}}/images/jumbotron.png" /> <img src="{{ .Site.BaseURL}}/images/jumbotron.png" />
</figure> </figure>
@ -23,4 +29,5 @@
</div> </div>
</div> </div>
</div> </div>
</section>
</section> </section>

View File

@ -6,9 +6,7 @@
</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 }}
{{ if .HasChildren }}
<div class="navbar-item has-dropdown is-hoverable"> <div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-item"> <a class="navbar-item">
{{ .Name }} {{ .Name }}
@ -19,29 +17,28 @@
</a> </a>
<div class="navbar-dropdown"> <div class="navbar-dropdown">
{{ range .Children }} {{ range .Children }}
<a class="navbar-item {{ if $currentPage.IsMenuCurrent "main" . }} is-active{{ end }}" href="{{ .URL }}"> <a class="navbar-item {{ if $currentPage.IsMenuCurrent " main " . }} is-active{{ end }}" href="{{ .URL }}">
{{ .Name }} {{ .Name }}
</a> </a>
{{ end }} {{ end }}
</div> </div>
</div> </div>
{{ else }} {{ else }}
<a class="navbar-item {{ if $currentPage.IsMenuCurrent "main" . }} is-active{{ end }}" href="{{ .URL }}"> <a class="navbar-item {{ if $currentPage.IsMenuCurrent " main " . }} is-active{{ end }}" href="{{ .URL }}">
{{ .Name }} {{ .Name }}
</a> </a>
{{ end }} {{ end }} {{ end }}
{{ end }}
<!-- Navbar icons --> <!-- Navbar icons -->
<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.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>

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>