Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Rough draft of a new homepage; #1074
Browse files Browse the repository at this point in the history
We've talked a lot about different ways to make the homepage dynamic.
Here I'm taking the opposite approach: this homepage is designed to
function primarily as a first impression of Gittip that answers the most
basic questions, and then leads people in one of three further
directions: signing up, browsing communities, or reading about Gittip.
Let's make the community and profile pages the focus of dynamic activity
on the site, not the homepage.
  • Loading branch information
chadwhitacre committed Jul 4, 2014
1 parent 4a9348c commit 8931818
Show file tree
Hide file tree
Showing 22 changed files with 237 additions and 231 deletions.
10 changes: 4 additions & 6 deletions 404.spt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@
{% extends "templates/base.html" %}

{% block heading %}
<h2 class="top">
<span>Page Not Found</span>
</h2>
<h1>Page Not Found</h1>
{% endblock %}
{% block box %}

<p class="as-content">
Sorry, we can't find the page that you are searching for.
</p>
<div class="as-content">
<p style="margin: 3em 0;">Sorry, we can't find the page that you are looking for.</p>
</div>

<div class="nav level-1"><a href="/"><button>Home</button></a></div>

Expand Down
2 changes: 1 addition & 1 deletion 410.spt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[---]
[---] text/html via jinja2
{% extends "templates/base.html" %}
{% block heading %}<h2 class="top"><span>Closed</span></h2>{% endblock %}
{% block heading %}<h1>Closed</h1>{% endblock %}
{% block box %}

<div class="as-content">
Expand Down
2 changes: 2 additions & 0 deletions scss/fonts-colors-mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ $lighter-gray: #EEE;
$black: #333;
$red: #C00;
$light-red: #F99;
$gold: #FFC300;
$white: #FFF;

@font-face {
/* Props to http://www.fontsquirrel.com/ and http://www.losttype.com/. */
Expand Down
1 change: 1 addition & 0 deletions scss/gittip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
// Page layout styles

@import "layout";
@import "homepage";


// Styles specific to certain pages.
Expand Down
108 changes: 108 additions & 0 deletions scss/homepage.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
#hero {
.homepage {

padding: 128px 0;

h1 {
font-size: 96px;
line-height: 96px;
margin: 0 0 24px;
padding: 0;
}

font: normal 36px/48px $Ideal;
text-shadow: 0.1em 0.1em 0.2em black;
p { line-height: 48px; margin: 0; padding: 0; }

span {
white-space: nowrap;
}
}
}

.homepage-content {

color: $white;
font: normal 36px/48px $Ideal;
text-shadow: 0.1em 0.1em 0.2em black;

h1 {
font: bold 96px/96px $Ideal;
text-transform: none;
margin: 0 0 24px;
padding: 0;
color: $white;
}

a {
color: $gold;
&:hover {
color: $brown;
}
}

span {
white-space: nowrap;
}

.give-receive {
display: table;
width: 100%;

.give,.receive {
width: 50%;
display: table-cell;
padding: 96px 48px;
}

.give {
background: url("pennies.brown.jpg");
}

.receive {
background: url("pennies.gold.jpg");
}

}

.why {
text-align: center;
padding: 96px 48px;
background: url("pennies.jpg");
}

.browse-about {
display: table;
width: 100%;

.browse,.about {
width: 50%;
display: table-cell;
}

.browse {
background: url("pennies.brown.jpg");
}

.about {
background: url("pennies.gold.jpg");
a {
color: $brown;
}
}
h1 {
margin: 0;
padding: 0;

a {
display: block;
padding: 96px 48px;
text-align: center;
&:hover {
color: $green;
}
}
}

}
}
70 changes: 22 additions & 48 deletions scss/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
text-transform: uppercase;
padding-left: 18px;
text-align: left;
a {
color: inherit;
}
a {
color: inherit;
}
}
.sign-in, .you-are {
padding-top: 18px;
Expand All @@ -47,63 +47,37 @@
}

#hero {
background: transparent url('hero-bg.png') top left repeat;
border: 1px solid $light-gray;
background: url("pennies.jpg") 50% 50% no-repeat;

border: 1px solid $brown;
border-style: solid none;
color: $black;
padding-bottom: 100px;
text-align: center;
position: relative;
z-index: 1;

h2 {
span {
background: transparent url('hero-bg.png') top left repeat;
display: inline-block;
padding: 0 10px;
}
}
h2.top {
letter-spacing: -2px;
font: normal 36px $Mensch;
padding: 1.5em 0 1em 0;
h1 {
font: bold 48px $Ideal;
padding: 48px 0 24px;
color: $white;
text-shadow: 0.1em 0.1em 0.2em black;

span {
background: transparent url('hero-bg.png') top left repeat;
display: inline-block;
padding: 0 10px;
}
&:after {
background: $black;
content: "";
display: block;
height: 1px;
margin-top: -0.5em;
em {
font-style: italic;
color: $gold;
}
}
h1 {
letter-spacing: -3px;
font: normal 64px $Mensch;
padding-bottom: 0.375em;

p {
color: $white;
text-shadow: 0.1em 0.1em 0.2em black;
font-size: 120%;
line-height: 200%;
}
h2.bottom {
padding-bottom: 20px;
span.button-container {
display: inline-block;
padding: 0 10px;

button {
font-size: 14px;
line-height: 17px;
}
}
&:after {
background: $black;
content: "";
display: block;
height: 1px;
margin-top: -16px;
}
a {
color: $gold;
}
}
.box {
Expand Down
54 changes: 45 additions & 9 deletions scss/responsiveness.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@
width: 100%;
}

.homepage-content {
.give-receive, .browse-about {
display: block;
.give,.receive,.browse,.about {
width: 100%;
display: block;
text-align: center;
}
}
}

.col0, .col1, .col2 {
float: none;
margin: auto;
Expand All @@ -37,12 +48,24 @@
}

#hero {
h2.top {
font-size: 30px;
}
.homepage {
h1 {
font-size: 72px;
line-height: 72px;
margin: 0 0 21px;
}

h2 {
font: italic 48px/64px $Ideal;
padding: 0 20px;
}
}
}
.homepage-content {
h1 {
font-size: 48px;
font-size: 72px;
line-height: 72px;
margin: 0 0 21px;
}
}

Expand Down Expand Up @@ -95,14 +118,27 @@

#hero {
font-size: 15px;
h2.top {
letter-spacing: -1px;
font-size: 1.33em;
h1 {
font-size: 36px;
padding: 36px 0 18px;
}
.homepage {
h1 {
font-size: 64px;
line-height: 64px;
margin: 0 0 18px;
}

h2 {
font: italic 36px/48px $Ideal;
}
}
}
.homepage-content {
h1 {
letter-spacing: -1px;
font-size: 36px;
font-size: 64px;
line-height: 64px;
margin: 0 0 18px;
}
}

Expand Down
6 changes: 5 additions & 1 deletion templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,13 @@ <h1>
<div class="container">
{% block heading %}
{% if title %}
<h2 class="top"><span>{{ title }}</span></h2>
<h1>{{ title }}</h1>
{% endif %}
{% endblock %}
</div>
</div>

{% block whole_page %}
<div class="container">
{% block killbox %}
<div class="box">
Expand All @@ -61,7 +62,10 @@ <h2 class="top"><span>{{ title }}</span></h2>
<div id="page" class="group">
{% block page %}{% endblock %}
</div>
</div>
{% endblock %}

<div class="container">
<div id="footer">
<div class="social">
<a href="https://twitter.com/gittip"><img src="{{ website.asset_url }}/icons/twitter.16.png" /></a>
Expand Down
31 changes: 0 additions & 31 deletions templates/for-contributors.html

This file was deleted.

2 changes: 1 addition & 1 deletion templates/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
})</script>
{% endblock %}

{% block heading %}<h2 class="top"><span>{{ hero }}</span></h2>{% endblock %}
{% block heading %}<h1>{{ hero }}</h1>{% endblock %}

{% block nav %}
{% set current_page = path.raw.split('/')[2] %}
Expand Down
Loading

0 comments on commit 8931818

Please sign in to comment.