Skip to content
This repository has been archived by the owner on Mar 5, 2020. It is now read-only.

(WIP) Fixes #856 new homepage #943

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
96cda43
(WIP) new homepage. missing blog section
mmmavis May 22, 2015
a9c909a
added blog section with hardcoded content
mmmavis May 25, 2015
271e8fa
hooked up with google feed api, removed hardcoded data
mmmavis May 26, 2015
9c4ce6e
small code cleanup and tweaks
mmmavis May 26, 2015
280c772
Added moment.js & updated Twitter link
mmmavis May 27, 2015
bf01bcb
ui tweaks
mmmavis May 27, 2015
08a6199
blog post excerpt, hero unit buttons
mmmavis May 27, 2015
ba352d3
fixed error thrown by tests
mmmavis May 27, 2015
b8988aa
forgot to include a module in package.json
mmmavis May 27, 2015
c55112e
code cleanup & update CHANAGE LOG
mmmavis May 27, 2015
809171e
an attempt at refactoring blog feed loader code into a separate modul…
mmmavis May 27, 2015
5152a87
Add stub-blog-feed-loader.js and use it for now.
toolness May 27, 2015
86fb847
remove 'Data' suffix from state keys too.
toolness May 27, 2015
7f591c6
Merge pull request #3 from toolness/decouple-new-homepage-from-googs
mmmavis May 27, 2015
26068a0
some code cleanup & wrapped sections in <main> with <section> tags
mmmavis May 28, 2015
57b7799
undo some css rules
mmmavis May 28, 2015
ea31f73
Revert "undo some css rules" - this fix doesn't work on larger screen…
mmmavis May 28, 2015
991d62d
fixed moment date parsing warning
mmmavis May 28, 2015
5f450ff
styling tweaks - long button text should be wrapped
mmmavis May 28, 2015
fb796d3
styling tweaks
mmmavis May 28, 2015
95c4622
undo early css changes made to make the full width coloured section w…
mmmavis May 28, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ to [Semantic Versioning](http://semver.org/).
- Skip navigation has been added at the top of the page.

### Changed
- The homepage has been refreshed to better inform
the site vistors what they can do on the site.
- The `dist` dir is now cleaned up frequently during
development, ensuring that old files don't stay
around for too long.
Expand Down Expand Up @@ -42,15 +44,15 @@ to [Semantic Versioning](http://semver.org/).
- Added environment variables `MAILINGLIST_URL`
and `MAILINGLIST_PRIVACY_NAME`.
- The site now generates `index.html` files for redirects. This
was done so that `/clubs/curriculum/` redirects to
was done so that `/clubs/curriculum/` redirects to
`/activities/web-lit-basics/`.
- `lib/changelog.js` can be used as a node script to help
update `CHANGELOG.md`.
- Aspects of the structure and accuracy of this
changelog are now verified by the automated test suite.

### Changed
- The Clubs Curriculum page has been renamed to
- The Clubs Curriculum page has been renamed to
Web Literacy Basics, and is now available at
`/activities/web-lit-basics/`. It's no longer accessible
through the sidebar, but is instead listed as the
Expand All @@ -64,7 +66,7 @@ to [Semantic Versioning](http://semver.org/).
collapsed area becomes focused, improving navigation for
sighted users who can only use the keyboard for navigation.
- Signing up for the Maker Party mailing list now shows
a "Thank you" modal when the user is returned to the
a "Thank you" modal when the user is returned to the
site from BSD.
- Moved all documentation about manual testing to
`CONTRIBUTING.md`.
Expand Down
5 changes: 2 additions & 3 deletions components/blockquote.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ var Blockquote = React.createClass({
className: React.PropTypes.string,
imgSrc: React.PropTypes.string.isRequired,
imgSrc2x: React.PropTypes.string,
imgAlt: React.PropTypes.string.isRequired,
imgWidth: React.PropTypes.number,
imgHeight: React.PropTypes.number,
children: React.PropTypes.object.isRequired,
Expand All @@ -15,12 +14,12 @@ var Blockquote = React.createClass({
render: function() {
return (
<blockquote className={this.props.className}>
{this.props.children}
<figure>
<ImageTag src1x={this.props.imgSrc} src2x={this.props.imgSrc2x}
alt={this.props.imgAlt}
alt=""
width={this.props.imgWidth || 148} height={this.props.imgHeight || 148} />
</figure>
{this.props.children}
<small>{this.props.author}</small>
</blockquote>
);
Expand Down
8 changes: 6 additions & 2 deletions components/hero-unit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,12 @@ var HeroUnit = React.createClass({
<div className="col-md-12 hero-unit" style={{
backgroundImage: 'url(' + this.state.image + ')'
}}>
{marquee}
{this.props.children}
<div>
<div className="inner-container">
{marquee}
{this.props.children}
</div>
</div>
</div>
</div>
);
Expand Down
51 changes: 51 additions & 0 deletions components/icon-button.jsx
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;
19 changes: 19 additions & 0 deletions components/icon-buttons.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
var React = require('react');

var IconButtons = React.createClass({
render: function() {
return (
<div className="row icon-buttons">
{
React.Children.map(this.props.children, function(iconButton){
return(
<div className="col-sm-4 col-md-4 col-lg-4">{iconButton}</div>
)
})
}
</div>
);
}
});

module.exports = IconButtons;
28 changes: 15 additions & 13 deletions components/icon-links.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,21 @@ var IconLinks = React.createClass({
var links = Array.isArray(this.props.children) ? this.props.children : [this.props.children];
var classes;
return (
<div className="row icon-links">
{
links.map(function(link, i){
// we either have 2 or 3 icons in a IconLinks row
classes = (links.length === 2 && i === 0) ?
"col-sm-4 col-md-4 col-lg-4 col-sm-offset-2 col-md-offset-2 col-lg-offset-2" :
"col-sm-4 col-md-4 col-lg-4";
return(
<div className={classes} key={i}>{link}</div>
)
})
}
</div>
<section>
<div className="row icon-links">
{
links.map(function(link, i){
// we either have 2 or 3 icons in a IconLinks row
classes = (links.length === 2 && i === 0) ?
"col-sm-4 col-md-4 col-lg-4 col-sm-offset-2 col-md-offset-2 col-lg-offset-2" :
"col-sm-4 col-md-4 col-lg-4";
return(
<div className={classes} key={i}>{link}</div>
)
})
}
</div>
</section>
);
}
});
Expand Down
Binary file modified img/pages/home/hero-unit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/pages/home/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions img/pages/home/svg/icon-hostanevent.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 64 additions & 0 deletions img/pages/home/svg/icon-startamozillaclub.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions img/pages/home/svg/icon-teachanactivity.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/pages/home/values.jpg
Binary file not shown.
16 changes: 14 additions & 2 deletions less/common.less
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ main {
}

section {
padding: 2.5rem;
padding: 1.5rem;
@media screen and (min-width: @screen-md-min) {
padding: @section-padding-vertical @section-padding-horizontal;
}
}

a.bold-link {
Expand All @@ -65,6 +68,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) {
Expand Down Expand Up @@ -141,7 +153,7 @@ html.no-js .no-js-warning {

.caret-list {
list-style-type: none;
padding-left: 2rem;
padding-left: 0;
li {
&:before {
content: "\f363";
Expand Down
4 changes: 4 additions & 0 deletions less/components/blockquote.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ blockquote {
font-size: 3rem;
font-style: italic;
text-align: center;
margin-bottom: 0;
img {
display: block;
margin: 0 auto 1rem;
Expand All @@ -14,4 +15,7 @@ blockquote {
font-weight: 300;
margin-top: 1rem;
}
p {
font-size: 2.5rem;
}
}
1 change: 1 addition & 0 deletions less/components/btn.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.btn {
white-space: normal;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

button text should be wrapped. we shouldn't assume button text can always fit into one line, especially the site will be localized in the future.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point, do you think you can actually add that as a comment in the code?

&.btn-awsm {
position: relative;
width: 100%;
Expand Down
2 changes: 1 addition & 1 deletion less/components/hero-unit.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
color: white;
display: flex;
flex-direction: column;
height: 45rem;
min-height: 45rem;
justify-content: center;
text-align: center;
@media (min-width: @screen-md-min) {
Expand Down
22 changes: 22 additions & 0 deletions less/components/icon-button.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.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;
line-height: 1.2;
margin: 1rem 0 .8rem 0;
}
}
7 changes: 7 additions & 0 deletions less/components/icon-buttons.less
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;
}
}
Loading