forked from libp2p/website
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from tableflip/topbar-partial
Pull the topbar into a partial
- Loading branch information
Showing
9 changed files
with
47 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
var fadeInArcticle = require('./fade-in-article') | ||
var scrollToHash = require('./scroll-to-hash') | ||
var initTopbar = require('./topbar') | ||
var initMobileNav = require('./mobile-nav') | ||
var initTriangles = require('./triangle') | ||
|
||
module.exports = function initPage () { | ||
fadeInArcticle() | ||
scrollToHash() | ||
initTopbar() | ||
initMobileNav() | ||
initTriangles() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
var $ = require('jquery') | ||
|
||
module.exports = function initLogoAnimation () { | ||
$(window).scroll(function (e) { | ||
var $logo = $('header .logo') | ||
|
||
if ($(window).outerWidth() > 767 && !$logo.hasClass('static')) { | ||
if ($(window).scrollTop() > 300) { | ||
$logo.addClass('show') | ||
} else { | ||
$logo.removeClass('show') | ||
} | ||
} | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<header> | ||
<div class="wrap"> | ||
<a class="logo {{ if (not (eq .URL "/")) }}static{{end}}" href="/"> | ||
<img width="60" height="72" src="/img/logo_small.png" alt=""> | ||
<b>lib</b>p2p | ||
</a> | ||
<a href='#' class='bars'><i class="fa fa-bars" aria-hidden="true"></i></a> | ||
<a href='#' class="close"><i class="fa fa-times" aria-hidden="true"></i></a> | ||
<nav> | ||
<ul> | ||
<li><a href="/implementations" {{ if eq .URL "/implementations/" }}class="active"{{ end }}>Implementations</a></li> | ||
<li><a href="/bundles" {{ if eq .URL "/bundles/" }}class="active"{{ end }}>Bundles</a></li> | ||
<li><a href="/media" {{ if eq .URL "/media/" }}class="active"{{ end }}>Media</a></li> | ||
<li><a href="https://github.com/libp2p" target="_blank">Github</a></li> | ||
<li><a href="https://github.com/libp2p/specs" target="_blank">Specifications</a></li> | ||
</ul> | ||
</nav> | ||
</div> | ||
</header> |