From 22eae2af38ad3ad094e05bf3741ca129cdbdc6df Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sun, 15 Dec 2013 09:21:24 +0200 Subject: [PATCH] Use a CSS sprite for the license images. -3 HTTP requests. --- _includes/license-overview.html | 5 ++++- _includes/sidebar.html | 10 +++++++-- css/application.css | 36 +++++++++++++++----------------- img/blue-dot@2x.png | Bin 272 -> 0 bytes img/green-dot@2x.png | Bin 276 -> 0 bytes img/license-sprite.png | Bin 0 -> 639 bytes img/license-sprite@2x.png | Bin 0 -> 742 bytes img/red-dot@2x.png | Bin 275 -> 0 bytes img/source@2x.png | Bin 357 -> 0 bytes 9 files changed, 29 insertions(+), 22 deletions(-) delete mode 100644 img/blue-dot@2x.png delete mode 100644 img/green-dot@2x.png create mode 100644 img/license-sprite.png create mode 100644 img/license-sprite@2x.png delete mode 100644 img/red-dot@2x.png delete mode 100644 img/source@2x.png diff --git a/_includes/license-overview.html b/_includes/license-overview.html index 527f1e8..fcc2c64 100644 --- a/_includes/license-overview.html +++ b/_includes/license-overview.html @@ -36,7 +36,10 @@ {% for rule_obj in rules %} {% assign req = rule_obj.tag %} {% if variation[type] contains req %} -
  • {{ rule_obj.label }}
  • +
  • + + {{ rule_obj.label }} +
  • {% endif %} {% endfor %} diff --git a/_includes/sidebar.html b/_includes/sidebar.html index 30c1b9b..f62639e 100644 --- a/_includes/sidebar.html +++ b/_includes/sidebar.html @@ -14,7 +14,10 @@ {% if page.source %}
    - Source + + + Source +
    {% endif %} @@ -28,7 +31,10 @@ {% for rule_obj in rules %} {% assign req = rule_obj.tag %} {% if page[type] contains req %} -
  • {{ rule_obj.label }}
  • +
  • + + {{ rule_obj.label }} +
  • {% endif %} {% endfor %} diff --git a/css/application.css b/css/application.css index d190b44..b455ed5 100644 --- a/css/application.css +++ b/css/application.css @@ -263,30 +263,26 @@ strong { .license-rules .label { font-weight: bold; } + .license-rules li { - background-position: 0 1px; - background-repeat: no-repeat; - background-size: 12px 12px; margin-right: 15px; margin-bottom: 5px; - padding-left: 16px; } .license-rules li:hover { color: #443a33; } -.license-required li { - background-image: url(../img/blue-dot@2x.png); +.license-sprite { + background-image: url(../img/license-sprite.png); + background-repeat: no-repeat; + display: inline-block; } -.license-permitted li { - background-image: url(../img/green-dot@2x.png); -} - -.license-forbidden li { - background-image: url(../img/red-dot@2x.png); -} +.sidebar .source span { background-position: 0 0; width: 16px; height: 12px; } +.license-forbidden span { background-position: -16px 0; width: 12px; height: 12px; } +.license-permitted span { background-position: -28px 0; width: 12px; height: 12px; } +.license-required span { background-position: -40px 0; width: 12px; height: 12px; } .license-rules-sidebar li { float: none; @@ -346,12 +342,6 @@ strong { margin-bottom: 30px; } -.sidebar .source a { - padding-left: 20px; - background: transparent url(../img/source@2x.png) 0 1px no-repeat; - background-size: 16px 12px; -} - .sidebar .boilerplate { font: 0.7em "Courier new", courier; } @@ -493,4 +483,12 @@ strong { -moz-background-size: 72px 198px; background-size: 72px 198px; } + + .license-sprite { + background-image: url(../img/license-sprite@2x.png); + -webkit-background-size: 52px 12px; + -moz-background-size: 52px 12px; + background-size: 52px 12px; + } + } diff --git a/img/blue-dot@2x.png b/img/blue-dot@2x.png deleted file mode 100644 index 271c1de3a7992117b8b4066e2ac59f69458e2718..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 272 zcmV+r0q_2aP)D)XwoEtTuM-*epe7l`>1)<0@8>m^>rR3h>&J=1HS1ypnC5! zjKL<0i9THHafOd9T=Y@TIwR}gF#@O@A?7gO4K#3qD#(YO7w8~_`cQ=Kt3VSG)R!XI z=|B}8)Q_A|P6j4WKQ@d5B?JP205u(GLkV$oU?~__>%dMhaMXc|VBjtu_{$?&Nx$Tt z^k-^G|7hA&ATUbKB2!@4RV2rCOL*bruS`#BWyVa*3M~BvEEs7;uPwKy16(+H*OmvE WO8b_+6P|nk0000}$pV diff --git a/img/green-dot@2x.png b/img/green-dot@2x.png deleted file mode 100644 index f20deb707730434de37c67f68874c59ca8a669c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 276 zcmV+v0qg#WP)aXQY(z-zqLu3j#9;3g>|G9EA|je({09_*V8$iS;%n!J zEbmROzN)3M;K0KcX9QTogM(_?8EFR(5keV6n8JED(7*xeLji14po0kNOEJ2y0!_qF zKZ;>L2TJgvGIB&A85lujtp5n)5efuCRCJ&XCB)T%xnN+a0~^7>UI$Ksfvb4nFOO&; z{gQjqpJ`e8N7KdvfkAQ>SpvhZC^@cM!VAZ|GJT1anPg$|!P1|hY+m~2Ys=+s2M@04 a+HwQ*_k>m>BU{q|0000)_qF$&^AsK!_f>e`A72MP{s7Mj-guwhiwKI=GF#p`sx@>> zN_T=3Qz+6%cQ$?h^T9aUoo%X6w1c!C6L=XF{=|2Q$)eGjTPS>T@IOz#sc5tl^LoN$ z2z95bN5aMH$JO;n66!Xghc}51V(HBTivUn#7$qJ`Y5^%d(3#mGrC0GWeuV5QyohhG z831jJ<+fu2w_uRIH1p^WK*R|C!eRW1mDqrFV$scqzr|PC+{a>^!#FC$95lHNn8HRx zOku3g{w!WA#bOES+(o>L1vr7%u?oYO!7N}Gw&6XzgmHAy0szEZ7q8%L1dR3BS6Gj| zB@!NE3+`eYzQ#&Gl>^zs5SC*n8brNUWU~h~8Wer>5ed6WgpBWEEq=m7e1V&oM#MfW zMH^H20RLc;e6aT-U_84B1Mq7~Ktc=q@Hvj)9suAYOyfhG28^Qd{7bn(c@a=yIex%i z+(Seww*u#}6~Eymmf|t~Mw9EcCii=85I*5X2`Dg)U*6{~Rwa26ZUMPdHc zXyH>tY|1|N$u}tRWd;I9u{gJ=M=xL%9w7lf!)3Hkp#eaH3N2j48JxzIKKl}vaH>Rw zVO;R+B@AH>05f=No`(-&?gA#z0qhu%|F;ALEb;6m1OPyR+t}*=zcK;Wa0VwZhX4cg Z@d@Ir_c?J&xkms1002ovPDHLkV1lv%8P)&* literal 0 HcmV?d00001 diff --git a/img/license-sprite@2x.png b/img/license-sprite@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..063370e071f73d996eb25025d2de7fa327cd6214 GIT binary patch literal 742 zcmVu_Tve3 zfw)CXU=QlifpX|42Fjrye)>T3cnZ(qBA^@nIEha%fQ?u#-7Of!AeI8)72F^@ zOR%pD{UGi)Y{4YpI_$=23}Bu1)o>h}unK*$_atsBdcP{EN7C(h59?)T8P?zqbje;9 z`f#bp{i<~9aSYwEGliX~<74@`2Ma~+rw!DNv6OKZFb}wbHR689i+Bf3K(G94K%>b0 zw1Hm0Dgex25?|wc{DMo#OF|M(Vh4UoeAMP=1s00juZmlZ#{l2pRZL+~YyQAXIMn*P z{|n+CLBM`IfG@GAHK(u8$*mEqXtQ zo5YyboyNU*6OHtnoKNNFv!eHdxR12wL7W4?Foq&`I+#F1_8J%~dOwJ3YR})v^LreA z#<=Vq#*ans2c6-0T$Y`A>@7n-=nQpiN7J=y;u*}8p%TFMm3SRNdz#pVk+SrI z&hiEx#bvF#f^9fZrhd?QCee$dXh^q+ar9!eZ2hXvR7VX1|N3odCEx<4@dd_lzO4O! Y0K^a>ma2j_L;wH)07*qoM6N<$g20|#ZvX%Q literal 0 HcmV?d00001 diff --git a/img/red-dot@2x.png b/img/red-dot@2x.png deleted file mode 100644 index 8562bc3f164e002c8a6885ddd1513566032880ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 275 zcmV+u0qp*XP)$KcElpuf|1OkBoWgTci3F+y;TrjZIfsJ5buLEbnz)d{xmq)aa ze#u?w&(xOw(X_EZU=W{0mcXzpN{;KM@WL^#OkZMU##xx8So$;A=B01Gwp<@}@X#|| ZTkbwtn3k|$djkLf002ovPDHLkV1itLbp-$b diff --git a/img/source@2x.png b/img/source@2x.png deleted file mode 100644 index 7df0c6630f16de23f32421a03c4b33341aaa4af4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 357 zcmV-r0h<1aP)+~fh|Vzyu?19d5AC9bMxhSvqKPde5SM^MsG*Jnq?kk5z5@U* zFa-hZ0TXCJafKz60*2@d+bBVN0(S6&JtTokc!?PZ;1_U=jle1X#x4dRg>jtv1f-Av z*O-ME*6{}Q2}mFT1|fzT6mSfPOg#en0rCC&fPTOq<<4&HE*4IR00000NkvXXu0mjf Ds$-4f