-
Notifications
You must be signed in to change notification settings - Fork 91
(WIP) Fixes #856 new homepage #943
Changes from 11 commits
96cda43
a9c909a
271e8fa
9c4ce6e
280c772
bf01bcb
08a6199
ba352d3
b8988aa
c55112e
809171e
5152a87
86fb847
7f591c6
26068a0
57b7799
ea31f73
991d62d
5f450ff
fb796d3
95c4622
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
var React = require('react'); | ||
var Router = require('react-router'); | ||
var Link = Router.Link; | ||
var ImageTag = require('./imagetag.jsx'); | ||
|
||
var LinkSwap = React.createClass({ | ||
render: function() { | ||
var classes = "btn btn-awsm"; | ||
// Swap out Link or a simple anchor depending on the props we have. | ||
if (this.props.linkTo) { | ||
return ( | ||
<Link to={this.props.linkTo} className={classes}> | ||
{this.props.children} | ||
</Link> | ||
) | ||
} | ||
return ( | ||
<a href={this.props.href} className={classes}> | ||
{this.props.children} | ||
</a> | ||
) | ||
} | ||
}); | ||
|
||
var IconButton = React.createClass({ | ||
propTypes: { | ||
linkTo: React.PropTypes.string, | ||
href: React.PropTypes.string, | ||
imgSrc: React.PropTypes.string.isRequired, | ||
imgSrc2X: React.PropTypes.string, | ||
head: React.PropTypes.string.isRequired, | ||
subhead: React.PropTypes.string | ||
}, | ||
render: function() { | ||
return ( | ||
<div className="icon-button"> | ||
<LinkSwap linkTo={this.props.linkTo} href={this.props.href}> | ||
<figure> | ||
<ImageTag className="image" src1x={this.props.imgSrc} src2x={this.props.imgSrc2x} | ||
alt="" height={50} /> | ||
<figcaption> | ||
<p className="link-text">{this.props.head}</p> | ||
</figcaption> | ||
</figure> | ||
</LinkSwap> | ||
</div> | ||
); | ||
} | ||
}); | ||
|
||
module.exports = IconButton; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
var React = require('react'); | ||
|
||
var IconButtons = React.createClass({ | ||
render: function() { | ||
var links = Array.isArray(this.props.children) ? this.props.children : [this.props.children]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rather than creating this and mapping over it, maybe use |
||
var classes; | ||
return ( | ||
<div className="row icon-buttons"> | ||
{ | ||
links.map(function(link, i){ | ||
return( | ||
<div className="col-sm-4 col-md-4 col-lg-4" key={i}>{link}</div> | ||
) | ||
}) | ||
} | ||
</div> | ||
); | ||
} | ||
}); | ||
|
||
module.exports = IconButtons; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,15 @@ a.bold-link { | |
white-space: pre; | ||
} | ||
|
||
a.more { | ||
font-weight: 600; | ||
&:after { | ||
content: "\f30f"; | ||
font-family: "Ionicons"; | ||
margin: 0 .5rem; | ||
} | ||
} | ||
|
||
.teach-tabzilla#tabzilla { | ||
display: none; | ||
@media screen and (min-width: @screen-md-min) { | ||
|
@@ -113,6 +122,11 @@ html.no-js .no-js-warning { | |
border-top: 0.2rem solid @white; | ||
} | ||
|
||
#content { | ||
padding-left: 0; | ||
padding-right: 0; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, unfortunately this seems to break other pages. For instance, in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. arghhh, if There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, can you set negative margin to offset the padding? I actually did that with the hero unit for the original site, way back in February: https://github.com/mozilla/teach.webmaker.org/blob/8804e410ce96df5d2983fe829b6a81c335e94d74/styles.less#L23-L26 I'm not sure if that CSS has actually survived to present-day or not, hehe. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Argh, I tried the following on that full width coloured section
This leaves a gap to the right due to the negative offset on the left. Adding Also, this approach won't work on larger screen either as we can't specify how much offset we want to move. (see https://github.com/mmmavis/teach.webmaker.org/blob/develop/less/components/page.less#L21-L23) 😭 |
||
|
||
.video-container { | ||
position: relative; | ||
width: 100%; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.icon-button { | ||
a.btn.btn-awsm { | ||
width: 100%; | ||
color: @blueSidebarColor; | ||
background-color: @paleBlue; | ||
box-shadow: 0px 0.4rem 0px @blueSidebarColor, | ||
0px 0.1rem 0px rgba(255, 255, 255, 0.5) inset; | ||
&:hover { | ||
color: @bodyTextColor; | ||
background-color: @awsmBtnColor; | ||
top: 0; | ||
box-shadow: 0px 0.4rem 0px #C4A74F, | ||
0px 0.1rem 0px rgba(255, 255, 255, 0.5) inset; | ||
} | ||
} | ||
.link-text { | ||
font-size: 1.5rem; | ||
font-weight: 700; | ||
margin: 1rem 0 0 0; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.icon-buttons { | ||
margin-top: 5rem; | ||
margin-bottom: 2rem; | ||
@media screen and (min-width: @screen-md-min) { | ||
margin-top: 12rem; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, this is something I'm kind of a curmudgeon about--please use complete sentences in the changelog 😁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, the new homepage design is a BIG DEAL so you should put it at the very top of the list 💃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍