Merge branch 'test' of https://github.com/galenwp/urbit into karpi

This commit is contained in:
C. Guy Yarvin 2015-10-20 13:55:53 -07:00
commit f5e31597f1
6 changed files with 84 additions and 193 deletions

View File

@ -118,20 +118,6 @@
.date
font-weight 400
.kids p.ib
margin-top 0
.kids h3
font-size 1rem
.kids h3::after
content "\2014"
margin-left 1em
.kids h2,
font-family 'scp'
font-size .7rem
@media only screen and (max-width: 1170px)
#cont.lead

View File

@ -421,31 +421,6 @@ h2.sub {
margin-top: 0;
text-transform: uppercase;
}
div.post h1 {
font-size: 2.8rem;
line-height: 4rem;
display: block;
margin-top: 1rem;
margin-bottom: 1rem;
}
div.post h2 {
line-height: 1rem;
letter-spacing: 1px;
}
div.post h2 {
margin-top: 4rem;
}
div.post h2 {
font-size: 1.2rem;
font-weight: 500;
}
div.post p {
font-size: 1.2rem;
line-height: 2.2rem;
}
div.post li p {
display: inline;
}
div.toc {
margin-top: 3rem;
margin-bottom: 3rem;
@ -519,53 +494,39 @@ div.toc h1.t {
.warning.w {
width: auto;
}
h1.lead {
margin-top: 1rem;
margin-bottom: 6rem;
font-size: 1.6rem;
line-height: 2rem;
margin-bottom: 3rem;
}
h2 {
margin-top: 3rem;
}
h2.date {
margin-top: 0;
line-height: 0.7rem;
}
.list.posts .post {
margin-bottom: 2rem;
}
.list.posts .post h1 {
text-transform: none;
font-size: 1.6rem;
line-height: 1.8rem;
margin-bottom: 1rem;
div.post h1 {
font-size: 2.8rem;
line-height: 4rem;
display: block;
margin-top: 1rem;
margin-bottom: 1rem;
}
.list.posts .post h2 {
font-size: 0.7rem;
font-weight: 400;
line-height: 1rem;
margin-top: 0;
}
.list.posts li.post:before {
content: "";
}
.date {
font-weight: 400;
div.post h2 {
font-family: 'scp';
font-size: 0.7rem;
line-height: 1rem;
letter-spacing: 1px;
}
@media only screen and (min-width: 320px) and (max-width: 1024px) {
#cont {
top: 2rem;
}
h1.lead {
font-size: 1.6rem;
line-height: 2rem;
margin-bottom: 3rem;
}
div.post h3 {
margin-top: 0;
font-size: 0.7rem;
font-weight: 200;
letter-spacing: 0.1rem;
text-transform: uppercase;
}
div.post h3::before {
content: '\2014';
margin-right: 0.3rem;
}
div.post p {
font-size: 1.2rem;
line-height: 2.2rem;
}
div.post li p {
display: inline;
}
div.post p.ib {
margin-top: 0;
}
#cont.lead #body {
margin-top: 3rem;
@ -699,20 +660,6 @@ h2.date {
#cont.lead .date {
font-weight: 400;
}
#cont.lead .kids p.ib {
margin-top: 0;
}
#cont.lead .kids h3 {
font-size: 1rem;
}
#cont.lead .kids h3::after {
content: "\2014";
margin-left: 1em;
}
#cont.lead .kids h2 {
font-family: 'scp';
font-size: 0.7rem;
}
@media only screen and (max-width: 1170px) {
#cont.lead {
top: 0rem;

View File

@ -347,32 +347,6 @@ h2.sub
margin-top 0
text-transform uppercase
div.post
h1
font-size 2.8rem
line-height 4rem
display block
margin-top 1rem
margin-bottom 1rem
h2
line-height 1rem
letter-spacing 1px
h2
margin-top 4rem
h2
font-size 1.2rem
font-weight 500
p
font-size 1.2rem
line-height 2.2rem
li p
display inline
div.toc
margin-top 3rem
margin-bottom 3rem

View File

@ -1,59 +1,33 @@
h1.lead
margin-top 1rem
margin-bottom 6rem
font-size 1.6rem
line-height 2rem
margin-bottom 3rem
h2
margin-top 3rem
&.date
margin-top 0
line-height .7rem
.list.posts
.post
margin-bottom 2rem
.post h1
text-transform none
font-size 1.6rem
line-height 1.8rem
margin-bottom 1rem
div.post
h1
font-size 2.8rem
line-height 4rem
display block
margin-top 1rem
margin-bottom 1rem
.post h2
h2
font-family 'scp'
font-size .7rem
font-weight 400
line-height 1rem
margin-top 0
letter-spacing 1px
li.post:before
content ""
// #nav #sibs
// width 11rem
// & > div
// margin-bottom .6rem
// height auto
// margin-bottom 4px
// height 20px
// a
// white-space normal
// border none
// white-space nowrap
// border-bottom 1px solid #000
.date
font-weight 400
font-family 'scp'
font-size .7rem
@media only screen and (min-width: 320px) and (max-width: 1024px)
#cont
top 2rem
h1.lead
font-size 1.6rem
line-height 2rem
margin-bottom 3rem
h3
margin-top 0
font-size .7rem
font-weight 200
letter-spacing .1rem
text-transform uppercase
h3::before
content '\2014'
margin-right .3rem
p
font-size 1.2rem
line-height 2.2rem
li p
display inline
p.ib
margin-top 0

View File

@ -46,6 +46,7 @@ Links = React.createFactory query {
div {id:"sibs",style}, keys.map (key) =>
href = window.tree.basepath @props.path+"/"+key
data = @props.kids[key]
return null if data.meta.hide
head = data.meta.title if data.meta
head ?= @toText data.head
head ||= key
@ -121,15 +122,17 @@ module.exports = query {
$('body').on 'click', CLICK, (e) ->
href = $(@).attr('href')
id = $(@).attr('id')
if href?[0] is "/"
e.preventDefault()
e.stopPropagation()
_this.goTo window.tree.fragpath href
else
e.preventDefault()
e.stopPropagation()
base = window.tree.fragpath(document.location.pathname)
_this.goTo base+"/#{href}"
if href
if not /^https?:\/\//i.test(href)
if href?[0] is "/"
e.preventDefault()
e.stopPropagation()
_this.goTo window.tree.fragpath href
else
e.preventDefault()
e.stopPropagation()
base = window.tree.fragpath(document.location.pathname)
_this.goTo base+"/#{href}"
if id
window.location.hash = id

View File

@ -111,6 +111,9 @@ Links = React.createFactory(query({
var className, data, head, href;
href = window.tree.basepath(_this.props.path + "/" + key);
data = _this.props.kids[key];
if (data.meta.hide) {
return null;
}
if (data.meta) {
head = data.meta.title;
}
@ -261,15 +264,19 @@ module.exports = query({
var base, href, id;
href = $(this).attr('href');
id = $(this).attr('id');
if ((href != null ? href[0] : void 0) === "/") {
e.preventDefault();
e.stopPropagation();
_this.goTo(window.tree.fragpath(href));
} else {
e.preventDefault();
e.stopPropagation();
base = window.tree.fragpath(document.location.pathname);
_this.goTo(base + ("/" + href));
if (href) {
if (!/^https?:\/\//i.test(href)) {
if ((href != null ? href[0] : void 0) === "/") {
e.preventDefault();
e.stopPropagation();
_this.goTo(window.tree.fragpath(href));
} else {
e.preventDefault();
e.stopPropagation();
base = window.tree.fragpath(document.location.pathname);
_this.goTo(base + ("/" + href));
}
}
}
if (id) {
return window.location.hash = id;