nav fix and spam

This commit is contained in:
Galen Wolfe-Pauly 2015-11-04 14:27:57 -08:00
parent b726b5a263
commit f323fc9190
4 changed files with 56 additions and 4 deletions

View File

@ -206,7 +206,6 @@ li:before {
z-index: 0;
margin-left: -32rem;
overflow: hidden;
opacity: 0;
transition: opacity 1s ease-in-out;
}
#nav.moving {
@ -456,6 +455,21 @@ div.toc h1.t {
text-decoration: none;
margin-bottom: 2rem;
}
#body .spam {
width: 9rem;
background-color: #555;
padding: 1rem;
letter-spacing: 1px;
font-weight: 500;
margin-bottom: 2rem;
}
#body .spam,
#body .spam a {
color: #fff;
}
#body .spam a {
border-color: #fff;
}
#body .CodeMirror {
font-size: 0.8rem;
line-height: 1rem;

View File

@ -136,7 +136,6 @@ li:before
z-index 0
margin-left -32rem
overflow hidden
opacity 0
transition opacity 1s ease-in-out
#nav.moving
@ -382,6 +381,21 @@ div.toc
text-decoration none
margin-bottom 2rem
#body .spam
width 9rem
background-color #555
padding 1rem
letter-spacing 1px
font-weight 500
margin-bottom 2rem
#body .spam
#body .spam a
color #fff
#body .spam a
border-color #fff
#body .CodeMirror
font-size .8rem
line-height 1rem

View File

@ -12,7 +12,14 @@ Logo = React.createFactory recl
if color is "white" or color is "black" # else?
src = "//storage.googleapis.com/urbit-extra/logo/logo-#{color}-100x100.png"
(a {href:"http://urbit.org",style:{border:"none"}}, [(img {src,className:"logo"})])
Spam = React.createFactory recl
render: ->
(div {className:'spam'}, [
(a {href:"http://urbit.org"}, "Sign up"),
" for an Urbit invite."
])
Next = React.createFactory query {
path:'t'
kids:
@ -50,6 +57,8 @@ module.exports = query {
render: ->
className = (@props.meta.layout?.replace /,/g," ") || ""
body = [reactify @props.body]
if document.location.hostname is 'urbit.org'
body.unshift (Spam {}, "")
if @props.meta.logo?
body.unshift (Logo color:@props.meta.logo)
if @props.meta.next?

View File

@ -425,7 +425,7 @@ module.exports = function(queries, Child, load) {
},{"../actions/TreeActions.coffee":1,"../stores/TreeStore.coffee":21,"./LoadComponent.coffee":10}],4:[function(require,module,exports){
var Logo, Next, a, clas, div, img, p, query, reactify, recl, ref;
var Logo, Next, Spam, a, clas, div, img, p, query, reactify, recl, ref;
clas = require('classnames');
@ -458,6 +458,18 @@ Logo = React.createFactory(recl({
}
}));
Spam = React.createFactory(recl({
render: function() {
return div({
className: 'spam'
}, [
a({
href: "http://urbit.org"
}, "Sign up"), " for an Urbit invite."
]);
}
}));
Next = React.createFactory(query({
path: 't',
kids: {
@ -507,6 +519,9 @@ module.exports = query({
var body, className, ref1;
className = ((ref1 = this.props.meta.layout) != null ? ref1.replace(/,/g, " ") : void 0) || "";
body = [reactify(this.props.body)];
if (document.location.hostname === 'urbit.org') {
body.unshift(Spam({}, ""));
}
if (this.props.meta.logo != null) {
body.unshift(Logo({
color: this.props.meta.logo