mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-11 16:09:31 +03:00
more corrections, links, &c
This commit is contained in:
parent
6297bb6292
commit
6581e332ba
@ -102,6 +102,10 @@ hr {
|
||||
}
|
||||
h1 {
|
||||
margin-top: 4rem;
|
||||
line-height: 2.6rem;
|
||||
}
|
||||
#body > div > h1:first-of-type {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
h2,
|
||||
h3 {
|
||||
@ -693,6 +697,20 @@ h2.date {
|
||||
font-size: 0.6rem;
|
||||
}
|
||||
}
|
||||
.video iframe {
|
||||
width: 42rem;
|
||||
height: 24rem;
|
||||
}
|
||||
.video .leader {
|
||||
font-size: 2rem;
|
||||
font-weight: 500;
|
||||
line-height: 2.6rem;
|
||||
margin-bottom: 4rem;
|
||||
}
|
||||
.video .short img {
|
||||
margin-top: 2rem;
|
||||
width: 42rem;
|
||||
}
|
||||
@media only screen and (max-width: 1170px) {
|
||||
#nav,
|
||||
#nav > div,
|
||||
|
@ -32,6 +32,10 @@ hr
|
||||
|
||||
h1
|
||||
margin-top 4rem
|
||||
line-height 2.6rem
|
||||
|
||||
#body > div > h1:first-of-type
|
||||
margin-top 1rem
|
||||
|
||||
h2
|
||||
h3
|
||||
@ -409,5 +413,6 @@ div.toc
|
||||
|
||||
@import 'posts'
|
||||
@import 'leads'
|
||||
@import 'video'
|
||||
|
||||
@import 'mobile'
|
||||
|
15
pub/tree/src/css/video.styl
Normal file
15
pub/tree/src/css/video.styl
Normal file
@ -0,0 +1,15 @@
|
||||
.video
|
||||
iframe
|
||||
width 42rem
|
||||
height 24rem
|
||||
|
||||
.leader
|
||||
font-size 2rem
|
||||
font-weight 500
|
||||
line-height 2.6rem
|
||||
margin-bottom 4rem
|
||||
|
||||
.short img
|
||||
margin-top 2rem
|
||||
width 42rem
|
||||
|
@ -30,7 +30,8 @@ Links = React.createFactory query {
|
||||
keys = _.keys(@props.kids).sort()
|
||||
else
|
||||
keys = _.values keys
|
||||
style = {marginTop: -24 * (keys.indexOf @props.curr) + "px"}
|
||||
if keys.indexOf(@props.curr) isnt -1
|
||||
style = {marginTop: -24 * (keys.indexOf @props.curr) + "px"}
|
||||
div {id:"sibs",style}, keys.map (key) =>
|
||||
href = window.tree.basepath @props.path+"/"+key
|
||||
data = @props.kids[key]
|
||||
@ -81,7 +82,12 @@ module.exports = query {sein:'t',path:'t',name:'t',next:'t',prev:'t',meta:'j'},r
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
_this.goTo window.tree.fragpath href
|
||||
else if id
|
||||
else
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
base = window.tree.fragpath(document.location.pathname)
|
||||
_this.goTo base+"/#{href}"
|
||||
if id
|
||||
window.location.hash = id
|
||||
|
||||
setTitle: ->
|
||||
|
@ -13,7 +13,11 @@ module.exports = (queries, Child, load=_load)-> recl
|
||||
_onChangeStore: ->
|
||||
if @isMounted() then @setState @stateFromStore()
|
||||
|
||||
getPath: -> @props.dataPath ? TreeStore.getCurr()
|
||||
getPath: ->
|
||||
path = @props.dataPath ? TreeStore.getCurr()
|
||||
if path.slice(-1) is "/"
|
||||
path.slice 0,-1
|
||||
else path
|
||||
stateFromStore: -> got: TreeStore.fulfill @getPath(), queries
|
||||
|
||||
componentDidMount: ->
|
||||
|
@ -85,9 +85,11 @@ Links = React.createFactory(query({
|
||||
} else {
|
||||
keys = _.values(keys);
|
||||
}
|
||||
style = {
|
||||
marginTop: -24 * (keys.indexOf(this.props.curr)) + "px"
|
||||
};
|
||||
if (keys.indexOf(this.props.curr) !== -1) {
|
||||
style = {
|
||||
marginTop: -24 * (keys.indexOf(this.props.curr)) + "px"
|
||||
};
|
||||
}
|
||||
return div({
|
||||
id: "sibs",
|
||||
style: style
|
||||
@ -201,14 +203,20 @@ module.exports = query({
|
||||
})(this));
|
||||
_this = this;
|
||||
return $('body').on('click', CLICK, function(e) {
|
||||
var href, id;
|
||||
var base, href, id;
|
||||
href = $(this).attr('href');
|
||||
id = $(this).attr('id');
|
||||
if ((href != null ? href[0] : void 0) === "/") {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
return _this.goTo(window.tree.fragpath(href));
|
||||
} else if (id) {
|
||||
_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;
|
||||
}
|
||||
});
|
||||
@ -322,8 +330,13 @@ module.exports = function(queries, Child, load) {
|
||||
}
|
||||
},
|
||||
getPath: function() {
|
||||
var ref1;
|
||||
return (ref1 = this.props.dataPath) != null ? ref1 : TreeStore.getCurr();
|
||||
var path, ref1;
|
||||
path = (ref1 = this.props.dataPath) != null ? ref1 : TreeStore.getCurr();
|
||||
if (path.slice(-1) === "/") {
|
||||
return path.slice(0, -1);
|
||||
} else {
|
||||
return path;
|
||||
}
|
||||
},
|
||||
stateFromStore: function() {
|
||||
return {
|
||||
|
@ -18,7 +18,7 @@ TreeStore = _.extend EventEmitter.prototype, {
|
||||
|
||||
pathToArr: (_path) -> _path.split "/"
|
||||
|
||||
fulfill: (path,query) ->
|
||||
fulfill: (path,query) ->
|
||||
@fulfillAt (@getTree path.split '/'),path,query
|
||||
fulfillAt: (tree,path,query)->
|
||||
data = @fulfillLocal path, query
|
||||
|
Loading…
Reference in New Issue
Block a user