Files
@ 2ba369aa5c5a
Branch filter:
Location: website/www/conservancy/static/img/projects/sugar-labs.svg - annotation
2ba369aa5c5a
9.5 KiB
image/svg+xml
Supporter: js: fade out “Expand All” anchor when all sections expand
The expandable sections can be expanded either one-by-one, or with
the “Expand All” button. Add a counter for each expandable
section (which requires their div's to have 'id' attributes, lest
they be counted in the '__global' section of expandables).
The __global counter will work as advertised if you have no 'id'
attributes on any of your 'expandable-section'-classed div's, but if
you mix a __global without an id with ones that *do* have an id, it's
likely this particular code won't work for that.
Finally, add some documentation which is probably over-documenting
for someone who knows Javascript and jQuery well, but it took me a
while to figure out this code so I felt throwing some notes in there
might be helpful.
The expandable sections can be expanded either one-by-one, or with
the “Expand All” button. Add a counter for each expandable
section (which requires their div's to have 'id' attributes, lest
they be counted in the '__global' section of expandables).
The __global counter will work as advertised if you have no 'id'
attributes on any of your 'expandable-section'-classed div's, but if
you mix a __global without an id with ones that *do* have an id, it's
likely this particular code won't work for that.
Finally, add some documentation which is probably over-documenting
for someone who knows Javascript and jQuery well, but it took me a
while to figure out this code so I felt throwing some notes in there
might be helpful.
81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba | <?xml version="1.0" encoding="UTF-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="540px" height="180px" viewBox="0 0 540 180" enable-background="new 0 0 540 180" xml:space="preserve">
<rect fill="#FFFFFF" width="540" height="180"/>
<g>
<g>
<path fill="#033CD2" d="M63.051,117.519c-11.052,0-21.119-5.5-21.119-11.539c0-3.157,2.303-5.63,5.244-5.63 c2.022,0,3.719,1.183,5.515,2.435c2.592,1.809,5.529,3.855,10.651,3.855c5.139,0,8.21-2.647,8.21-5.209 c0-3.416-5.271-5.607-10.852-7.927c-7.799-3.243-16.639-6.918-16.639-15.886c0-10.573,9.933-16.279,19.28-16.279 c7.89,0,18.895,4.132,18.895,10.86c0,2.526-1.763,5.244-5.632,5.244c-2.068,0-3.558-1.125-4.997-2.212 c-1.872-1.414-3.994-3.015-8.266-3.015c-1.209,0-7.242,0.227-7.242,4.726c0,2.729,4.879,4.613,10.044,6.608 c7.772,3.001,17.446,6.739,17.446,16.333C83.591,112,72.943,117.519,63.051,117.519L63.051,117.519z"/>
<path fill="#78E600" d="M63.343,63.098c7.066,0,17.134,3.775,17.134,9.099c0,1.839-1.259,3.484-3.873,3.484 c-3.677,0-5.13-5.227-13.261-5.227c-4.84,0-9.002,2.129-9.002,6.485c0,9.002,27.491,8.035,27.491,22.941 c0,10.746-9.196,15.877-18.779,15.877c-10.842,0-19.359-5.422-19.359-9.779c0-2.321,1.645-3.87,3.484-3.87 c3.775,0,6.873,6.291,16.166,6.291c6.195,0,9.97-3.484,9.97-6.97c0-10.066-27.491-9.486-27.491-23.812 C45.822,68.132,54.728,63.098,63.343,63.098 M63.343,59.578c-10.2,0-21.041,6.323-21.041,18.04 c0,10.142,9.828,14.228,17.724,17.511c4.578,1.903,9.767,4.061,9.767,6.302c0,1.41-2.297,3.45-6.45,3.45 c-4.569,0-7.15-1.801-9.646-3.541c-1.939-1.353-3.944-2.75-6.52-2.75c-3.928,0-7.004,3.246-7.004,7.39 c0,7.085,10.691,13.299,22.879,13.299c10.74,0,22.299-6.069,22.299-19.396c0-10.802-10.733-14.947-18.57-17.974 c-3.337-1.289-8.921-3.445-8.921-4.968c0-2.822,4.567-2.965,5.482-2.965c3.682,0,5.393,1.292,7.205,2.66 c1.593,1.203,3.398,2.566,6.057,2.566c4.284,0,7.393-2.946,7.393-7.004C83.997,64.072,71.784,59.578,63.343,59.578L63.343,59.578z "/>
</g>
<g>
<path fill="#033CD2" d="M117.647,117.519c-10.726,0-22.187-5.854-22.187-22.281v-27.59c0-3.773,2.418-6.309,6.02-6.309 s6.021,2.536,6.021,6.309v27.299c0,7.979,3.224,11.693,10.146,11.693c6.922,0,10.146-3.715,10.146-11.693V67.647 c0-3.773,2.418-6.309,6.02-6.309c3.6,0,6.018,2.536,6.018,6.309v27.59C139.831,111.665,128.371,117.519,117.647,117.519 L117.647,117.519z"/>
<path fill="#78E600" d="M133.812,63.098c2.613,0,4.259,1.743,4.259,4.549v27.589c0,15.101-10.068,20.522-20.425,20.522 c-10.357,0-20.425-5.422-20.425-20.522V67.647c0-2.807,1.646-4.549,4.26-4.549c2.613,0,4.259,1.743,4.259,4.549v27.299 c0,8.809,3.872,13.454,11.907,13.454s11.906-4.646,11.906-13.454V67.647C129.553,64.841,131.198,63.098,133.812,63.098 M133.812,59.578c-4.581,0-7.78,3.318-7.78,8.069v27.299c0,8.754-4.239,9.935-8.386,9.935s-8.387-1.181-8.387-9.935V67.647 c0-4.751-3.199-8.069-7.779-8.069c-4.581,0-7.78,3.318-7.78,8.069v27.589c0,17.727,12.37,24.042,23.945,24.042 s23.945-6.315,23.945-24.042V67.647C141.591,62.896,138.393,59.578,133.812,59.578L133.812,59.578z"/>
</g>
<g>
<path fill="#033CD2" d="M175.533,137.846c-8.493,0-21.509-4.994-21.509-11.149c0-2.758,1.671-5.729,5.342-5.729 c2.021,0,3.766,1.074,5.785,2.317c2.804,1.728,5.981,3.683,11.059,3.683c10.827,0,12.215-9.426,12.273-13.816 c-3.037,2.818-7.039,4.37-11.498,4.37c-16.028,0-24.414-14.133-24.414-28.092s8.386-28.09,24.414-28.09 c4.424,0,8.692,1.905,11.688,4.32c0.654-2.638,2.95-4.32,6.122-4.32c2.778,0,5.731,2.077,5.731,5.923v44.237 C200.526,127.503,190.715,137.846,175.533,137.846L175.533,137.846z M176.985,72.216c-9.132,0-12.372,9.271-12.372,17.212 s3.24,17.211,12.372,17.211c9.13,0,12.371-9.271,12.371-17.211S186.115,72.216,176.985,72.216L176.985,72.216z"/>
<path fill="#78E600" d="M194.795,63.098c1.645,0,3.969,1.162,3.969,4.163v44.237c0,15.294-9.293,24.587-23.232,24.587 c-8.809,0-19.747-5.033-19.747-9.389c0-1.742,0.872-3.969,3.582-3.969c3.872,0,7.648,6.001,16.843,6.001 c10.843,0,14.037-8.519,14.037-15.875V108.4h-0.194c-2.614,4.453-7.261,7.358-13.068,7.358c-14.52,0-22.651-12.682-22.651-26.331 s8.131-26.33,22.651-26.33c5.517,0,10.841,3.388,13.068,6.486h0.194v-2.324C190.246,64.26,192.472,63.098,194.795,63.098 M176.984,108.4c10.454,0,14.132-10.26,14.132-18.972c0-8.712-3.679-18.973-14.132-18.973c-10.455,0-14.133,10.261-14.133,18.973 C162.852,98.141,166.529,108.4,176.984,108.4 M194.795,59.578c-3.035,0-5.485,1.289-6.859,3.399 c-3.083-1.981-6.961-3.399-10.952-3.399c-17.182,0-26.171,15.017-26.171,29.85s8.99,29.85,26.171,29.85 c3.423,0,6.604-0.83,9.352-2.385c-0.846,4.075-3.355,8.315-10.127,8.315c-4.579,0-7.53-1.818-10.134-3.422 c-2.154-1.326-4.188-2.579-6.708-2.579c-4.115,0-7.102,3.149-7.102,7.488c0,7.488,13.898,12.908,23.267,12.908 c7.882,0,14.584-2.642,19.383-7.64c4.821-5.022,7.37-12.1,7.37-20.467V67.261C202.284,62.271,198.426,59.578,194.795,59.578 L194.795,59.578z M176.984,104.881c-10.101,0-10.613-12.872-10.613-15.453s0.512-15.453,10.613-15.453 c10.101,0,10.612,12.873,10.612,15.453S187.085,104.881,176.984,104.881L176.984,104.881z"/>
</g>
<g>
<path fill="#033CD2" d="M256.264,117.519c-2.625,0-5.279-1.729-5.68-5.044c-3.492,3.314-7.752,5.044-12.52,5.044 c-16.026,0-24.411-14.131-24.411-28.091c0-13.958,8.385-28.089,24.411-28.089c4.755,0,8.745,1.484,12.563,4.743 c0.52-3.119,3.091-4.743,5.636-4.743c2.776,0,5.727,2.076,5.727,5.923v44.334C261.991,115.442,259.04,117.519,256.264,117.519 L256.264,117.519z M238.065,72.215c-9.132,0-12.373,9.273-12.373,17.212c0,7.94,3.241,17.212,12.373,17.212 c9.133,0,12.373-9.272,12.373-17.212C250.438,81.488,247.198,72.215,238.065,72.215L238.065,72.215z"/>
<path fill="#78E600" d="M256.264,63.098c1.645,0,3.967,1.162,3.967,4.163v44.334c0,3.002-2.322,4.164-3.967,4.164 c-1.743,0-3.97-1.162-3.97-4.164v-3.581h-0.193c-3.678,5.228-8.518,7.745-14.036,7.745c-14.521,0-22.651-12.682-22.651-26.331 s8.13-26.33,22.651-26.33c5.905,0,10.067,2.516,14.036,6.873h0.193v-2.71C252.294,64.26,254.521,63.098,256.264,63.098 M238.065,108.4c10.454,0,14.133-10.26,14.133-18.972c0-8.712-3.679-18.973-14.133-18.973c-10.455,0-14.133,10.261-14.133,18.973 C223.932,98.141,227.61,108.4,238.065,108.4 M256.264,59.578c-2.479,0-5.063,1.254-6.454,3.637 c-3.564-2.488-7.348-3.637-11.745-3.637c-17.181,0-26.171,15.017-26.171,29.85s8.99,29.85,26.171,29.85 c4.331,0,8.272-1.291,11.662-3.784c1.37,2.479,4.009,3.784,6.538,3.784c3.63,0,7.487-2.692,7.487-7.684V67.261 C263.751,62.271,259.894,59.578,256.264,59.578L256.264,59.578z M238.065,104.881c-10.102,0-10.613-12.872-10.613-15.453 s0.512-15.453,10.613-15.453c10.101,0,10.613,12.873,10.613,15.453S248.166,104.881,238.065,104.881L238.065,104.881z"/>
</g>
<g>
<path fill="#033CD2" d="M282.981,117.519c-3.601,0-6.02-2.536-6.02-6.311V67.647c0-3.774,2.419-6.309,6.02-6.309 c3.289,0,5.593,2.118,5.965,5.361c2.537-2.849,6.103-5.361,10.104-5.361c3.768,0,6.503,2.572,6.503,6.115 c0,2.326-1.173,5.322-6.76,6.375C295.832,74.343,289,76.616,289,86.718v24.49C289,114.982,286.581,117.519,282.981,117.519 L282.981,117.519z"/>
<path fill="#78E600" d="M299.049,63.098c3,0,4.744,1.936,4.744,4.355c0,2.42-1.744,3.97-5.326,4.647 c-5.033,0.871-11.228,4.646-11.228,14.617v24.491c0,2.808-1.646,4.551-4.259,4.551c-2.615,0-4.26-1.743-4.26-4.551V67.647 c0-2.807,1.645-4.549,4.26-4.549c2.613,0,4.259,1.743,4.259,4.549v4.356h0.194C289.369,68.035,294.112,63.098,299.049,63.098 M299.049,59.578c-3.515,0-6.709,1.664-9.283,3.875c-1.286-2.396-3.728-3.875-6.785-3.875c-4.581,0-7.779,3.318-7.779,8.069 v43.561c0,4.752,3.198,8.07,7.779,8.07c4.58,0,7.778-3.318,7.778-8.07V86.717c0-8.449,5.206-10.611,8.309-11.148 c0.018-0.003,0.035-0.006,0.054-0.01c7.128-1.348,8.191-5.657,8.191-8.105C307.313,62.89,303.838,59.578,299.049,59.578 L299.049,59.578z"/>
</g>
<path fill="#969696" d="M324.99,111.208c0,2.808-1.646,4.551-4.259,4.551c-2.614,0-4.26-1.743-4.26-4.551V44.997 c0-2.808,1.646-4.55,4.26-4.55c2.613,0,4.259,1.743,4.259,4.55V111.208z"/>
<path fill="#969696" d="M386.071,111.595c0,3.002-2.324,4.164-3.969,4.164c-1.742,0-3.969-1.162-3.969-4.164v-3.581h-0.193 c-3.68,5.228-8.52,7.745-14.037,7.745c-14.52,0-22.65-12.682-22.65-26.331s8.131-26.33,22.65-26.33 c5.906,0,10.067,2.516,14.037,6.873h0.193v-2.71c0-3.001,2.227-4.163,3.969-4.163c1.645,0,3.969,1.162,3.969,4.163V111.595z M363.903,108.4c10.455,0,14.133-10.26,14.133-18.972c0-8.712-3.678-18.973-14.133-18.973c-10.453,0-14.132,10.261-14.132,18.973 C349.771,98.141,353.45,108.4,363.903,108.4z"/>
<path fill="#969696" d="M404.946,44.997c0-2.808,1.646-4.55,4.26-4.55s4.26,1.743,4.26,4.55v25.07h0.192 c2.227-3.194,6.97-6.969,13.745-6.969c13.941,0,21.975,12.681,21.975,26.33s-8.033,26.331-21.975,26.331 c-6.775,0-11.324-2.421-13.745-7.068h-0.192v2.518c0,2.808-1.646,4.551-4.26,4.551s-4.26-1.743-4.26-4.551V44.997z M426.727,108.4 c10.453,0,14.131-10.26,14.131-18.972c0-8.712-3.678-18.973-14.131-18.973c-10.455,0-14.135,10.261-14.135,18.973 C412.592,98.141,416.272,108.4,426.727,108.4z"/>
<path fill="#969696" d="M481.999,63.098c7.066,0,17.135,3.775,17.135,9.099c0,1.839-1.26,3.484-3.873,3.484 c-3.678,0-5.13-5.227-13.262-5.227c-4.84,0-9.002,2.129-9.002,6.485c0,9.002,27.491,8.035,27.491,22.941 c0,10.746-9.196,15.877-18.778,15.877c-10.843,0-19.361-5.422-19.361-9.779c0-2.321,1.646-3.87,3.484-3.87 c3.775,0,6.873,6.291,16.166,6.291c6.195,0,9.971-3.484,9.971-6.97c0-10.066-27.491-9.486-27.491-23.812 C464.478,68.132,473.383,63.098,481.999,63.098z"/>
</g>
</svg>
|