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

Commit

Permalink
css and ad optimizations (#660)
Browse files Browse the repository at this point in the history
partial fix for #389
  • Loading branch information
andrewmcodes committed Oct 9, 2019
1 parent 2be6394 commit 0726d9d
Show file tree
Hide file tree
Showing 26 changed files with 34 additions and 16 deletions.
2 changes: 1 addition & 1 deletion app/views/ad_templates/@responsive_footer/themes/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#cf .cf-img-wrapper {
margin-right: 10px;
line-height: 0px;
line-height: 0;
}

#cf .cf-img-wrapper img {
Expand Down
1 change: 1 addition & 0 deletions app/views/ad_templates/default/themes/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
vertical-align: middle;
border-style: none;
max-width: 130px;
position: relative;
}

#cf .cf-text {
Expand Down
1 change: 1 addition & 0 deletions app/views/ad_templates/default/themes/light.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
vertical-align: middle;
border-style: none;
max-width: 130px;
position: relative;
}

#cf .cf-text {
Expand Down
2 changes: 1 addition & 1 deletion app/views/ad_templates/docsify/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="clearfix">
<a data-href="campaign_url" target="_blank" rel="nofollow noopener">
<span class="cf-img-wrapper">
<%= image_tag @creative.small_image.cloudfront_url, class: "cf-img", alt: @creative.name rescue nil %>
<%= image_tag @creative.small_image.cloudfront_url, width: 130, height: 130, class: "cf-img", alt: @creative.name rescue nil %>
</span>
<span class="cf-text">
<strong><%= @creative.headline %></strong>
Expand Down
1 change: 1 addition & 0 deletions app/views/ad_templates/docsify/themes/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
vertical-align: middle;
border-style: none;
max-width: 130px;
position: relative;
}

#cf .cf-text {
Expand Down
1 change: 1 addition & 0 deletions app/views/ad_templates/docsify/themes/light.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
vertical-align: middle;
border-style: none;
max-width: 130px;
position: relative;
}

#cf .cf-text {
Expand Down
1 change: 1 addition & 0 deletions app/views/ad_templates/image-centered/themes/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@

#cf .cf-img-wrapper img {
max-width: 130px;
position: relative;
}

#cf .cf-text {
Expand Down
1 change: 1 addition & 0 deletions app/views/ad_templates/image-centered/themes/light.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@

#cf .cf-img-wrapper img {
max-width: 130px;
position: relative;
}

#cf .cf-text {
Expand Down
2 changes: 1 addition & 1 deletion app/views/ad_templates/image-only/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<span class="cf-wrapper">
<div class="cf-header">supported by</div>
<a data-href="campaign_url" class="cf-img-wrapper" target="_blank" rel="nofollow noopener">
<%= image_tag @creative.small_image.cloudfront_url, class: "cf-img", alt: @creative.name rescue nil %>
<%= image_tag @creative.small_image.cloudfront_url, height: 150, width: 150, class: "cf-img", alt: @creative.name rescue nil %>
</a>
<a href="https://codefund.io" data-target="powered_by_url" class="cf-powered-by" target="_blank" rel="nofollow noopener">
<em>ethical</em> ad by CodeFund
Expand Down
1 change: 1 addition & 0 deletions app/views/ad_templates/image-only/themes/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#cf .cf-img-wrapper img {
width: 150px;
height: 150px;
position: relative;
}

#cf .cf-text {
Expand Down
1 change: 1 addition & 0 deletions app/views/ad_templates/image-only/themes/light.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#cf .cf-img-wrapper img {
width: 150px;
height: 150px;
position: relative;
}

#cf .cf-text {
Expand Down
1 change: 1 addition & 0 deletions app/views/ad_templates/media/themes/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#cf .cf-img-wrapper img {
border-radius: 5px;
position: relative;
}

#cf a {
Expand Down
1 change: 1 addition & 0 deletions app/views/ad_templates/media/themes/light.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#cf .cf-img-wrapper img {
border-radius: 5px;
position: relative;
}

#cf a {
Expand Down
3 changes: 2 additions & 1 deletion app/views/ad_templates/rectangle-narrow/themes/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}

#cf .cf-wrapper {
border-radius: 0px;
border-radius: 0;
display: block;
padding: 14px 10px;
overflow: hidden;
Expand All @@ -30,6 +30,7 @@
vertical-align: middle;
border-style: none;
max-width: 130px;
position: relative;
}

#cf .cf-text {
Expand Down
3 changes: 2 additions & 1 deletion app/views/ad_templates/rectangle-narrow/themes/light.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}

#cf .cf-wrapper {
border-radius: 0px;
border-radius: 0;
display: block;
padding: 14px 10px;
overflow: hidden;
Expand All @@ -30,6 +30,7 @@
vertical-align: middle;
border-style: none;
max-width: 130px;
position: relative;
}

#cf .cf-text {
Expand Down
2 changes: 1 addition & 1 deletion app/views/ad_templates/sponsored-text/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<ins id="cf">
<span class="cf-wrapper">
Sponsored:&nbsp;
<%= image_tag @creative.icon_image.cloudfront_url, class: "cf-img", style: "width: 20px; height: 20px;", alt: @creative.name rescue nil %>
<%= image_tag @creative.icon_image.cloudfront_url, height: 20, width: 20, class: "cf-img", style: "width: 20px; height: 20px;", alt: @creative.name rescue nil %>
<b><%= @creative.headline %></b>
<%= @creative.body %>
<a href="#" data-href="campaign_url" rel="nofollow noopener" target="_blank">
Expand Down
1 change: 1 addition & 0 deletions app/views/ad_templates/sponsored-text/themes/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#cf .cf-wrapper img,
#cf .cf-wrapper svg {
vertical-align: middle;
position: relative;
}

#cf a.cf-powered-by {
Expand Down
1 change: 1 addition & 0 deletions app/views/ad_templates/sponsored-text/themes/light.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#cf .cf-wrapper img,
#cf .cf-wrapper svg {
vertical-align: middle;
position: relative;
}

#cf a.cf-powered-by {
Expand Down
2 changes: 1 addition & 1 deletion app/views/ad_templates/square/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<span class="cf-wrapper">
<a data-href="campaign_url" target="_blank" rel="nofollow noopener">
<span class="cf-img-wrapper" >
<%= image_tag @creative.large_image.cloudfront_url, class: "cf-img", alt: @creative.name rescue nil %>
<%= image_tag @creative.large_image.cloudfront_url, width: 255, height: 255, class: "cf-img", alt: @creative.name rescue nil %>
</span>
<span class="cf-text">
<strong><%= @creative.headline %></strong>
Expand Down
3 changes: 2 additions & 1 deletion app/views/ad_templates/square/themes/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#cf .cf-wrapper {
display: block;
padding: 0px;
padding: 0;
font-size: 14px;
line-height: 1.4;
text-align: left;
Expand All @@ -40,6 +40,7 @@
vertical-align: middle;
border-style: none;
width: 100%;
position: relative;
}

#cf .cf-text {
Expand Down
3 changes: 2 additions & 1 deletion app/views/ad_templates/square/themes/light.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#cf .cf-wrapper {
display: block;
padding: 0px;
padding: 0;
font-size: 14px;
line-height: 1.4;
text-align: left;
Expand All @@ -40,6 +40,7 @@
vertical-align: middle;
border-style: none;
width: 100%;
position: relative;
}

#cf .cf-text {
Expand Down
4 changes: 2 additions & 2 deletions app/views/ad_templates/text/themes/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#cf .cf-hidden {
visibility: hidden;
width: 0px;
height: 0px;
width: 0;
height: 0;
border-style: none;
}
4 changes: 2 additions & 2 deletions app/views/ad_templates/text/themes/light.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#cf .cf-hidden {
visibility: hidden;
width: 0px;
height: 0px;
width: 0;
height: 0;
border-style: none;
}
2 changes: 1 addition & 1 deletion app/views/ad_templates/vertical/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<span class="cf-wrapper">
<a data-href="campaign_url" target="_blank" rel="nofollow noopener">
<span class="cf-img-wrapper">
<%= image_tag @creative.small_image.cloudfront_url, border: 0, class: "cf-img", alt: @creative.name rescue nil %>
<%= image_tag @creative.small_image.cloudfront_url, height: 125, width: 125, border: 0, class: "cf-img", alt: @creative.name rescue nil %>
</span>
<span class="cf-text">
<strong><%= @creative.headline %></strong>
Expand Down
3 changes: 2 additions & 1 deletion app/views/ad_templates/vertical/themes/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#cf .cf-wrapper {
display: block;
padding: 0px;
padding: 0;
font-size: 14px;
line-height: 1.4;
text-align: left;
Expand All @@ -30,6 +30,7 @@
#cf .cf-img-wrapper img {
width: 125px;
height: 125px;
position: relative;
}

#cf .cf-text {
Expand Down
3 changes: 2 additions & 1 deletion app/views/ad_templates/vertical/themes/light.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#cf .cf-wrapper {
display: block;
padding: 0px;
padding: 0;
font-size: 14px;
line-height: 1.4;
text-align: left;
Expand All @@ -30,6 +30,7 @@
#cf .cf-img-wrapper img {
width: 125px;
height: 125px;
position: relative;
}

#cf .cf-text {
Expand Down

0 comments on commit 0726d9d

Please sign in to comment.