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

Commit

Permalink
Factor out homepage listing styles
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Dec 15, 2016
1 parent fbbde03 commit d15bab1
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 104 deletions.
102 changes: 102 additions & 0 deletions scss/components/listing.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
table.listing {
width: 100%;

tr:first-child td { border-top: 0; }
tr:last-child td { border-bottom: 0; }

td.item {
position: relative;
color: $medium-gray;
border: 1px solid $light-brown;
border-style: solid none;

a {
color: $medium-gray;
position: relative;
z-index: 2;
}
a:hover {
background: none !important;
color: $green !important;
}
img {
width: 48px;
height: 48px;
position: absolute;
top: 8px;
left: 0;
}
.name {
display: block;
color: $black;
font: bold 20px/24px $Ideal;
position: absolute;
z-index: 1;
top: 0;
left: 56px;
padding: 12px 0 0;
width: 100%;
height: 100%;
}
.details {
font: normal 12px/15px $Ideal;
min-height: 64px;
padding: 38px 144px 0 56px;
.owner a {
color: $medium-gray;
position: relative;
z-index: 2;
}
span {
white-space: nowrap;
}
.status-icon {
font-size: 12px;
padding: 0;
}
}
.numbers {
position: absolute;
bottom: 8px;
right: 0;
z-index: 0;
font-size: 11px;
line-height: 13px;
th {
text-align: right;
border-bottom: 1px solid transparent;
}
.label {
text-align: left;
}
td {
text-align: right;
padding: 1px 0 0 12px;
&:first-child {
padding-left: 0;
}
}
th, .label {
color: $medium-gray;
visibility: hidden;
}
}

&:hover {
color: $black;
.status a {
color: $black;
}
.owner a {
color: $black;
}
th, .label {
visibility: visible;
}
th {
border-bottom: 1px solid $light-brown;
}
}
}
}

102 changes: 0 additions & 102 deletions scss/pages/homepage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,106 +11,4 @@
top: 0;
right: 0;
}

table.teams {
width: 100%;

tr:first-child td { border-top: 0; }
tr:last-child td { border-bottom: 0; }

td.team {
position: relative;
color: $medium-gray;
border: 1px solid $light-brown;
border-style: solid none;

a {
color: $medium-gray;
position: relative;
z-index: 2;
}
a:hover {
background: none !important;
color: $green !important;
}
img {
width: 48px;
height: 48px;
position: absolute;
top: 8px;
left: 0;
}
.name {
display: block;
color: $black;
font: bold 20px/24px $Ideal;
position: absolute;
z-index: 1;
top: 0;
left: 56px;
padding: 12px 0 0;
width: 100%;
height: 100%;
}
.details {
font: normal 12px/15px $Ideal;
min-height: 64px;
padding: 38px 144px 0 56px;
.owner a {
color: $medium-gray;
position: relative;
z-index: 2;
}
span {
white-space: nowrap;
}
.status-icon {
font-size: 12px;
padding: 0;
}
}
.numbers {
position: absolute;
bottom: 8px;
right: 0;
z-index: 0;
font-size: 11px;
line-height: 13px;
th {
text-align: right;
border-bottom: 1px solid transparent;
}
.label {
text-align: left;
}
td {
text-align: right;
padding: 1px 0 0 12px;
&:first-child {
padding-left: 0;
}
}
th, .label {
color: $medium-gray;
visibility: hidden;
}
}

&:hover {
color: $black;
.status a {
color: $black;
}
.owner a {
color: $black;
}
th, .label {
visibility: visible;
}
th {
border-bottom: 1px solid $light-brown;
}
}
}
}
}
1 change: 1 addition & 0 deletions www/assets/gratipay.css.spt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
@import "scss/components/emails";
@import "scss/components/js-edit";
@import "scss/components/linear_gradient";
@import "scss/components/listing";
@import "scss/components/loading-indicators";
@import "scss/components/long-form";
@import "scss/components/memberships";
Expand Down
4 changes: 2 additions & 2 deletions www/index.html.spt
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ page_id = "homepage"
</ul>

{% for tab in tabs %}
<table class="teams tab" data-tab="{{ tab }}">
<table class="listing tab" data-tab="{{ tab }}">
{% for i, team in enumerate(tabs[tab]['teams'], start=1) %}
<tr>
<td class="team">
<td class="item">
<img src="{{ team.get_image_url('small') }}">
<a class="name" href="/{{ team.slug }}/">{{ team.name }}</a>

Expand Down

0 comments on commit d15bab1

Please sign in to comment.