Skip to content

Commit

Permalink
fixed floats by manually adding classes instead of relying on :nth-ch…
Browse files Browse the repository at this point in the history
…ild etc.
  • Loading branch information
Paul Wittmann committed Jan 12, 2012
1 parent cc133b8 commit b1a68e7
Show file tree
Hide file tree
Showing 12 changed files with 56 additions and 15 deletions.
4 changes: 3 additions & 1 deletion app/assets/javascripts/home/testimonials.js.coffee
Expand Up @@ -20,6 +20,9 @@ $.extend Testimonials.prototype,
' </div>' +
'</li>'
)
$('#testimonials ul li:odd').addClass('even');
$('#testimonials ul li:even').addClass('odd');


$.fn.testimonials = ->
new Testimonials(this)
Expand All @@ -28,4 +31,3 @@ $.fn.testimonials = ->
$(document).ready ->
$('#testimonials ul').testimonials() if $('#testimonials').length > 0
# .lionbars()

3 changes: 2 additions & 1 deletion app/assets/stylesheets/home.css.scss
Expand Up @@ -125,7 +125,7 @@ section {
@include box-shadow(#ddd 0px 0px 5px);
font-size: 14px;

&:last-child {
&.last {
margin-right: 0;
}

Expand Down Expand Up @@ -195,6 +195,7 @@ section {
text-shadow: 2px 2px 0px #666;
cursor: hand;
@include border-radius(6px);
background-color: #19A509;
@include background-image(linear-gradient(#3f9c33 0%, #348629 100%));

&:hover {
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/home/please_donate.css.scss
Expand Up @@ -50,7 +50,7 @@
cursor: hand;
text-shadow: 2px 2px 0px #fff;

&:last-child {
&.last {
margin-left: 5px;
padding-left: 52px;
background: url(/images/switch.png) left top no-repeat;
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/home/rails_core.css.scss
Expand Up @@ -93,7 +93,7 @@
cite {
display: block;
margin-top: 32px;
font-family: "Tangerine";
font-family: "Tangerine", 'Times New Roman';
font-size: 32px;
color: #333;
text-shadow: 1px 1px 1px #ddd;
Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/home/testimonials.css.scss
Expand Up @@ -41,7 +41,7 @@
}
}

&:nth-child(odd) {
&.odd {
float: left;
clear: left;
margin-right: 30px;
Expand All @@ -64,7 +64,7 @@
}
}
}
&:nth-child(even) {
&.even {
float: right;
clear: right;

Expand Down
3 changes: 1 addition & 2 deletions app/assets/stylesheets/home/thanks_companies.css.scss
Expand Up @@ -18,8 +18,7 @@
margin-right: 20px;
font-size: 13px;
}
&:nth-child(3),
&:nth-child(5) {
&.last-child {
margin-right: 0;
}

Expand Down
38 changes: 38 additions & 0 deletions app/assets/stylesheets/ie.css.scss
@@ -0,0 +1,38 @@
dd {
clear: right;
float: none;
}

#testimonials {
ul {
li.odd, li.even {
clear: none !important;
height: 85px;
}
}
}

// for rotations cf. http://www.useragentman.com/IETransformsTranslator/index.html

.price-tag {
/* IE8+ - must be on one line, unfortunately */
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.7071067811865475, M12=-0.7071067811865477, M21=0.7071067811865477, M22=0.7071067811865475, SizingMethod='auto expand')";

/* IE6 and 7 */
filter: progid:DXImageTransform.Microsoft.Matrix(
M11=0.7071067811865475,
M12=-0.7071067811865477,
M21=0.7071067811865477,
M22=0.7071067811865475,
SizingMethod='auto expand');

/*
* To make the transform-origin be the middle of
* the object. Note: These numbers
* are approximations. For more accurate results,
* use Internet Explorer with this tool.
*/
margin-left: 5px;
margin-top: -35px;
}

1 change: 1 addition & 0 deletions app/assets/stylesheets/orders.css.scss
Expand Up @@ -156,6 +156,7 @@
text-shadow: 2px 2px 0 #666;
cursor: hand;
@include border-radius(6px);
background-color: #19A509;
@include background-image(linear-gradient(#3f9c33 0%, #348629 100%));
&:hover {
@include background-image(linear-gradient(#1CBE0A 0%, #158F07 100%));
Expand Down
6 changes: 3 additions & 3 deletions app/views/home/_please_donate.html.haml
Expand Up @@ -18,7 +18,7 @@
%p You can get these packages in two flavors: as one-off payments or subscriptions. Flip the switch on the right to review them:
.switch
%label.on{for: 'type_package', value: 'packages'} One off
%label{for: 'type_subscription', value: 'subscriptions'} Subscription
%label.last{for: 'type_subscription', value: 'subscriptions'} Subscription

#packages
%h3 Packages
Expand Down Expand Up @@ -59,7 +59,7 @@
%p And a skype cup of tea with Josh &amp; Sven.
= link_to 'Donate', new_package_path(package: 'big')
= stats_for(:big, :donator)
%li.huge
%li.huge.last
%h4
Huge
.price-tag
Expand Down Expand Up @@ -112,7 +112,7 @@
%p And a skype cup of tea with Josh &amp; Sven.
= link_to 'Donate', new_subscription_path(package: 'big')
= stats_for(:big, :subscriber)
%li.huge
%li.huge.last
%h4
Huge
.price-tag
Expand Down
4 changes: 2 additions & 2 deletions app/views/home/_thanks_companies.html.haml
Expand Up @@ -9,13 +9,13 @@
%li.gold
%img{src: 'images/logos/github.png'}
%p GitHub is the best way to collaborate with others on code. Free public repositories, collaborator management, issue tracking, wikis, downloads, code review, graphs ...
%li.gold.clearfix
%li.gold.clearfix.last-child
%img{src: 'images/logos/gidsy.png'}
%p Gidsy is a marketplace for authentic experiences. It's a place where anyone can offer and book tours and activities. By joining a great community of organizers ...
%li.silver
%img{src: 'images/logos/shopify.png'}
%p Shopify offers a ecommerce solution to create and run your own online store.
%li.silver
%li.silver.last-child
%img{src: 'images/logos/railslove.png'}
%p Hello, we are Railslove. We build web applications and, well, we're quite at it.

Expand Down
2 changes: 0 additions & 2 deletions app/views/layouts/_header.html.haml
Expand Up @@ -13,5 +13,3 @@
%li= link_to 'Sign in', new_user_session_path
#github
%a{ href: 'https://github.com/travis-ci/travis-crowd', title: 'Fork me on GitHub'} Fork me on GitHub


2 changes: 2 additions & 0 deletions app/views/layouts/application.html.haml
Expand Up @@ -3,6 +3,8 @@
%head
%title Travis needs your help
= stylesheet_link_tag 'application'
/[if lt IE 9]
= stylesheet_link_tag 'ie'
= javascript_include_tag 'https://js.stripe.com/v1', 'application'
= csrf_meta_tags
= tag :meta, name: 'stripe-key', content: STRIPE_PUBLIC_KEY
Expand Down

0 comments on commit b1a68e7

Please sign in to comment.