JSFiddle - React, Tailwind, and code Playground

by timshutes

HTML

<script src="http://citylightphilly.com/dev/wp-content/themes/citylight3/js/responsive-nav.min.js"></script>
<script src="http://fonts.googleapis.com/css?family=Lato:400,700,900"></script>
<div class="header">
    <img class="logo" src="http://dev.citylightphilly.com/wp-content/themes/citylight3/assets/logo.png" />
    <button id="toggle" class="closed"></button>
</div>
<div class="spacer clearfix"></div>
<div id="nav">
    <ul class="primary-nav">
        <li><a href="#">Sundays</a></li>
        <li><a href="#">Learn More</a></li>
        <li><a href="#">Citygroups</a></li>
        <li class="desktop-logo"><a href="/"><img src="http://dev.citylightphilly.com/wp-content/themes/citylight3/assets/logo.png" /></a></li>
        <li><a href="#">Discipleship</a></li>
        <li><a href="#">Sermons</a></li>
        <li><a href="#">Get in Touch</a></li>
    </ul>
</div>

CSS

a {
    text-decoration: none;
}
.primary-nav li a, .primary-nav li a:active, .primary-nav li a:visited {
    font: 400 1.175em"Lato", sans-serif;
    text-transform: uppercase;
    color: #000;
}
.primary-nav li a:hover {
    color: #FAAC1D;
}
/* BG & Layout */
 .header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 87px;
    z-index: 9999;
    background: #FFF;
}
img.logo {
    display: none;
}
.spacer {
    height: 70px;
}
/* Main Nav */
 button#toggle {
    display: none;
    float: right;
    border: 0;
    width: 6.5625%;
    min-height: 23px;
    margin: 24px 9.375% 23px 34.375%;
    padding: 0;
    background: url(assets/nav-toggle.png) center no-repeat;
}
button#toggle.opened {
    background: url(assets/nav-toggle-opened.png) center no-repeat;
}

#nav {
    width: 100%;
}

#nav ul {
    height: 87px;
    width: 66.6666666667%;
    min-width: 968px; 
    margin: 0 auto;
    padding: 0;
    display: table;
    list-style: none;
    border: 0;
    background-color: #fff;
}

#nav li {
    display: table-cell;
    text-align: center;
    vertical-align: middle;
    font-size: .875em;
}



#nav li a {
    display: auto;
    vertical-align: none;
    border: 0;
    padding: 0;
    margin: 0;
}

#nav li.desktop-logo {
    width: 206px;
    padding: 0 20px;
}

#nav li.desktop-logo img {
    padding: 0;
}

.js #nav {
    position: relative;
}
.js #nav.closed {
    max-height: none;
}
#nav-toggle {
    display: none;
}

.header, .spacer {
    display: none;
}

JavaScript

var navigation = responsiveNav("#nav", { // Selector: The ID of the wrapper
        animate: true, // Boolean: Use CSS3 transitions, true or false
        transition: 400, // Integer: Speed of the transition, in milliseconds
        label: "Menu", // String: Label for the navigation toggle
        insert: "before", // String: Insert the toggle before or after the navigation
        customToggle: "#toggle", // Selector: Specify the ID of a custom toggle
        openPos: "relative", // String: Position of the opened nav, relative or static
        jsClass: "js", // String: 'JS enabled' class which is added to <html> el
        init: function () {}, // Function: Init callback
        open: function () {
            var toggle = document.getElementById("toggle");
            toggle.className = toggle.className.replace(/(^|\s)closed(\s|$)/, "opened");
        }, // Function: Open callback
        close: function () {
            var toggle = document.getElementById("toggle");
            toggle.className = toggle.className.replace(/(^|\s)opened(\s|$)/, "closed");
        } // Function: Close callback
    });