From 2d23c2fe1fc581fc6761e963e0ec96888438583f Mon Sep 17 00:00:00 2001 From: Ben Alpert Date: Thu, 26 Mar 2015 09:53:27 -0700 Subject: [PATCH] Switch nav design --- website/core/HeaderLinks.js | 47 ++++++++++++------- website/src/react-native/css/react-native.css | 24 ++++++---- 2 files changed, 45 insertions(+), 26 deletions(-) diff --git a/website/core/HeaderLinks.js b/website/core/HeaderLinks.js index adeba3e00..30f489ee3 100644 --- a/website/core/HeaderLinks.js +++ b/website/core/HeaderLinks.js @@ -12,28 +12,39 @@ var React = require('React'); var HeaderLinks = React.createClass({ - links: [ - {section: 'docs', href: '/react-native/docs/getting-started.html#content', text: 'docs'}, - {section: 'support', href: '/react-native/support.html', text: 'support'}, - {section: 'react', href: 'http://facebook.github.io/react', text: 'react'}, - {section: 'github', href: 'http://github.com/facebook/react-native', text: 'github'}, + linksInternal: [ + {section: 'docs', href: '/react-native/docs/getting-started.html#content', text: 'Docs'}, + {section: 'support', href: '/react-native/support.html', text: 'Support'}, ], + linksExternal: [ + {section: 'github', href: 'http://github.com/facebook/react-native', text: 'GitHub'}, + {section: 'react', href: 'http://facebook.github.io/react', text: 'React'}, + ], + + makeLinks: function(links) { + return links.map(function(link) { + return ( +
  • + + {link.text} + +
  • + ); + }, this) + }, render: function() { return ( - +
    + + +
    ); } }); diff --git a/website/src/react-native/css/react-native.css b/website/src/react-native/css/react-native.css index 113bf0d20..416e5bc1a 100644 --- a/website/src/react-native/css/react-native.css +++ b/website/src/react-native/css/react-native.css @@ -249,7 +249,15 @@ h1:hover .hash-link, h2:hover .hash-link, h3:hover .hash-link, h4:hover .hash-li text-decoration: none; } -.nav-main .nav-site { +.nav-main .nav-site-wrapper { + display: inline; +} + +.nav-main .nav-site-internal { + margin: 0 0 0 20px; +} + +.nav-main .nav-site-external { float: right; margin: 0; } @@ -259,21 +267,20 @@ h1:hover .hash-link, h2:hover .hash-link, h3:hover .hash-link, h4:hover .hash-li } .nav-main .nav-site a { - padding: 0 8px; - text-transform: uppercase; - letter-spacing: 1px; + box-sizing: content-box; + padding: 0 10px; line-height: 50px; display: inline-block; height: 50px; - color: #aaa; + color: #ddd; } .nav-main .nav-site a:hover { - color: #fafafa; + color: #fff; } .nav-main .nav-site a.active { - color: #fafafa; + color: #fff; border-bottom: 3px solid #05A5D1; background: #333; } @@ -294,7 +301,8 @@ h1:hover .hash-link, h2:hover .hash-link, h3:hover .hash-link, h4:hover .hash-li } .nav-main ul { - display: inline; + display: inline-block; + vertical-align: top; } .nav-main li {