Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: head.htm

Issue 4893100195446784: Issue 545 - Implement overflow for list of supporters (Closed)
Patch Set: Created May 27, 2014, 4:30 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « body.htm ('k') | icon-arrow.png » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <link rel="canonical" href="http://acceptableads.org/"/> 1 <link rel="canonical" href="http://acceptableads.org/"/>
2 <meta property="og:type" content="website"/> 2 <meta property="og:type" content="website"/>
3 <meta property="og:image" content="http://acceptableads.org/images/manifesto/acc eptable-ads-manifesto-share.png?a=show"/> 3 <meta property="og:image" content="http://acceptableads.org/images/manifesto/acc eptable-ads-manifesto-share.png?a=show"/>
4 <meta property="og:url" content="http://acceptableads.org"/> 4 <meta property="og:url" content="http://acceptableads.org"/>
5 <meta name="google-site-verification" content="3deBAaPY4M2OuOe576R36TC28S5svlfRR sdaGS6WCXg"/> 5 <meta name="google-site-verification" content="3deBAaPY4M2OuOe576R36TC28S5svlfRR sdaGS6WCXg"/>
6 <meta charset="utf-8"/> 6 <meta charset="utf-8"/>
7 <meta name="viewport" content="width=device-width, initial-scale=1"/> 7 <meta name="viewport" content="width=device-width, initial-scale=1"/>
8 <style type="text/css"> 8 <style type="text/css">
9 @font-face 9 @font-face
10 { 10 {
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 display: none; 175 display: none;
176 } 176 }
177 177
178 #content, 178 #content,
179 #social 179 #social
180 { 180 {
181 padding-bottom: 30px; 181 padding-bottom: 30px;
182 border-bottom: 1px dashed #71695f; 182 border-bottom: 1px dashed #71695f;
183 } 183 }
184 184
185 #supporters
186 {
187 margin-bottom: 20px;
188 }
189
190 .supporter 185 .supporter
191 { 186 {
192 display: inline-block; 187 display: inline-block;
193 width: 135px; 188 width: 135px;
194 margin: 10px; 189 margin: 10px;
195 font-size: 15px; 190 font-size: 15px;
196 text-align: center; 191 text-align: center;
197 text-decoration: none; 192 text-decoration: none;
198 line-height: 1.2em; 193 line-height: 1.2em;
199 vertical-align: top; 194 vertical-align: top;
(...skipping 17 matching lines...) Expand all
217 margin: 0px; 212 margin: 0px;
218 } 213 }
219 214
220 #join-org img 215 #join-org img
221 { 216 {
222 width: 19px; 217 width: 19px;
223 height: 19px; 218 height: 19px;
224 margin-top: 6px; 219 margin-top: 6px;
225 } 220 }
226 221
227 #join-org strong 222 #join-org strong,
223 #supporters-overflow a
228 { 224 {
229 font-weight: normal; 225 font-weight: normal;
226 font-size: 15px;
230 color: #78b364; 227 color: #78b364;
231 text-decoration: underline; 228 text-decoration: underline;
232 } 229 }
233 230
231 #supporters-overflow
232 {
233 margin-bottom: 20px;
234 }
235
236 #supporters-overflow .sprite
237 {
238 display: inline-block;
239 width: 9px;
240 height: 5px;
241 vertical-align: middle;
242 background-image: url(/images/manifesto/icon-arrow.png?a=show);
243 background-position: 0px -6px;
244 }
245
246 #supporters-overflow.collapsed .sprite
247 {
248 background-position: 0px 0px;
249 }
250
251 #supporters-overflow .supporter
252 {
253 width: auto;
254 font-size: 20px;
255 margin: 10px 10px 10px 0px;
256 }
257
258 #supporters-overflow.collapsed #supporters-overflow-less,
259 #supporters-overflow #supporters-overflow-more,
260 #supporters-overflow.collapsed .supporter
261 {
262 display: none;
263 }
264
265 #supporters-overflow.collapsed #supporters-overflow-more,
266 #supporters-overflow #supporters-overflow-less
267 {
268 display: inline;
269 }
270
234 #social button 271 #social button
235 { 272 {
236 width: 100%; 273 width: 100%;
237 margin: 0px; 274 margin: 0px;
238 margin-bottom: 10px; 275 margin-bottom: 10px;
239 } 276 }
240 277
241 #facebook button 278 #facebook button
242 { 279 {
243 background-color: #45658a; 280 background-color: #45658a;
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 { 539 {
503 listener(event); 540 listener(event);
504 }); 541 });
505 } 542 }
506 } 543 }
507 544
508 addListener(window, "DOMContentLoaded", function(ev) 545 addListener(window, "DOMContentLoaded", function(ev)
509 { 546 {
510 fetchNumberOfSignees(); 547 fetchNumberOfSignees();
511 548
549 var showSupporters = document.getElementById("supporters-overflow-more");
550 var hideSupporters = document.getElementById("supporters-overflow-less");
551 addListener(showSupporters, "click", toggleSupporters, false);
552 addListener(hideSupporters, "click", toggleSupporters, false);
553
512 var readmore = document.getElementById("readmore"); 554 var readmore = document.getElementById("readmore");
513 addListener(readmore, "click", function(ev) 555 addListener(readmore, "click", function(ev)
514 { 556 {
515 var fulltext = document.getElementById("fulltext"); 557 var fulltext = document.getElementById("fulltext");
516 if (fulltext.hasAttribute("hidden")) 558 if (fulltext.hasAttribute("hidden"))
517 fulltext.removeAttribute("hidden"); 559 fulltext.removeAttribute("hidden");
518 else 560 else
519 fulltext.hidden = "hidden"; 561 fulltext.hidden = "hidden";
520 562
521 ev.preventDefault(); 563 ev.preventDefault();
522 ev.stopPropagation(); 564 ev.stopPropagation();
523 }, false); 565 }, false);
524 566
525 var shareTitle = document.getElementById("share-text-title")[textAttr]; 567 var shareTitle = document.getElementById("share-text-title")[textAttr];
526 var shareDescription = document.getElementById("share-text-description")[textA ttr]; 568 var shareDescription = document.getElementById("share-text-description")[textA ttr];
527 var facebookButton = document.getElementById("facebook"); 569 var facebookButton = document.getElementById("facebook");
528 facebookButton.href = "https://www.facebook.com/sharer/sharer.php?s=100&p%5Bti tle%5D=" 570 facebookButton.href = "https://www.facebook.com/sharer/sharer.php?s=100&p%5Bti tle%5D="
529 + encodeURIComponent(shareTitle) 571 + encodeURIComponent(shareTitle)
530 + "&p%5Bsummary%5D=" 572 + "&p%5Bsummary%5D="
531 + encodeURIComponent(shareDescription) 573 + encodeURIComponent(shareDescription)
532 + "&p%5Burl%5D=http%3A%2F%2Facceptableads.org%2F"; 574 + "&p%5Burl%5D=http%3A%2F%2Facceptableads.org%2F";
533 var twitterButton = document.getElementById("twitter"); 575 var twitterButton = document.getElementById("twitter");
534 twitterButton.href = "https://twitter.com/intent/tweet?text=" 576 twitterButton.href = "https://twitter.com/intent/tweet?text="
535 + encodeURIComponent(shareTitle) 577 + encodeURIComponent(shareTitle)
536 + "&url=http%3A%2F%2Facceptableads.org%2F"; 578 + "&url=http%3A%2F%2Facceptableads.org%2F";
537 }, false); 579 }, false);
538 580
581 function toggleSupporters(ev)
582 {
583 var supportersOverflow = document.getElementById("supporters-overflow");
584 var classes = supportersOverflow.className.split(" ");
585 if (classes.indexOf("collapsed") > -1)
586 classes.splice(classes.indexOf("collapsed"), 1);
587 else
588 classes.push("collapsed");
589 supportersOverflow.className = classes.join(" ");
590
591 ev.preventDefault();
592 ev.stopPropagation();
593 }
594
539 function checkCollapse() 595 function checkCollapse()
540 { 596 {
541 if (document.documentElement.offsetWidth < 500) 597 if (document.documentElement.offsetWidth < 500)
542 return; 598 return;
543 599
544 var social = document.getElementById("sign"); 600 var social = document.getElementById("sign");
545 var placeholder = document.getElementById("sign-placeholder"); 601 var placeholder = document.getElementById("sign-placeholder");
546 var classes = social.className.split(" "); 602 var classes = social.className.split(" ");
547 603
548 var scrollTop = document.body.scrollTop; 604 var scrollTop = document.body.scrollTop;
(...skipping 13 matching lines...) Expand all
562 { 618 {
563 classes.splice(classes.indexOf("collapsed"), 1); 619 classes.splice(classes.indexOf("collapsed"), 1);
564 placeholder.style.height = "0px"; 620 placeholder.style.height = "0px";
565 social.className = classes.join(" "); 621 social.className = classes.join(" ");
566 } 622 }
567 } 623 }
568 624
569 addListener(window, "scroll", checkCollapse); 625 addListener(window, "scroll", checkCollapse);
570 addListener(window, "resize", checkCollapse); 626 addListener(window, "resize", checkCollapse);
571 --></script> 627 --></script>
OLDNEW
« no previous file with comments | « body.htm ('k') | icon-arrow.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld