|
1 | | -link-type(type) |
2 | | - padding-right image-width('link-types/' + type + '.png') + 3 |
3 | | - background-image url('/img/link-types/' + type + '.png') |
4 | | - |
5 | 1 | $pseudo |
6 | 2 | text-decoration none |
7 | 3 | border-bottom 1px dashed transparent |
8 | 4 | &:hover |
9 | 5 | border-bottom 1px dashed |
10 | 6 | text-decoration none |
11 | 7 |
|
12 | | -$link-type |
13 | | - background-position 100% 60% |
14 | | - background-repeat no-repeat |
| 8 | +$link-type |
| 9 | + &::before |
| 10 | + position absolute |
| 11 | + color #fff |
| 12 | + background #5C626A |
| 13 | + padding 0 9px |
| 14 | + border-radius 2px |
| 15 | + font 10px/19px font |
| 16 | + letter-spacing .1ex |
15 | 17 |
|
16 | 18 | // .pseudo is for any tag but link that should look like pseudo-link |
17 | 19 | .pseudo |
@@ -50,87 +52,84 @@ a:active |
50 | 52 | font-size 90% |
51 | 53 |
|
52 | 54 | // -- |
53 | | -.main [href^="mailto:"], |
54 | | -a.mailto |
| 55 | +.link__type[data-url^="mailto:"] |
55 | 56 | @extend $link-type |
56 | | - link-type 'mailto' |
| 57 | + &::before |
| 58 | + @extend $font-mail |
| 59 | + font-size 12px // слишком мелкая иконка |
57 | 60 |
|
58 | 61 | // -- |
59 | | -.main [target="_blank"], |
60 | | -a.external |
| 62 | +.link__type[data-url^='/play/'], |
| 63 | +.link__type[data-url^='http://plnkr.co/'] |
61 | 64 | @extend $link-type |
62 | | - link-type 'newwindow' |
| 65 | + &::before |
| 66 | + @extend $font-edit |
| 67 | + font-size 12px // слишком мелкая иконка |
63 | 68 |
|
64 | 69 | // -- |
65 | | -.main [href^='/play/'], |
66 | | -.main [href^='http://plnkr.co/'], |
67 | | -a.sandbox |
| 70 | +.link__type[data-url$=".doc"], |
| 71 | +.link__type[data-url$=".docx"] |
68 | 72 | @extend $link-type |
69 | | - link-type 'sandbox' |
| 73 | + &::before |
| 74 | + content 'DOC' |
70 | 75 |
|
71 | 76 | // -- |
72 | | -.main [href$=".doc"], |
73 | | -.main [href$=".docx"], |
74 | | -a.doc |
| 77 | +.link__type[data-url$=".zip"] |
75 | 78 | @extend $link-type |
76 | | - link-type 'doc' |
| 79 | + &::before |
| 80 | + content 'ZIP' |
77 | 81 |
|
78 | 82 | // -- |
79 | | -.main [href$=".zip"], |
80 | | -a.zip |
| 83 | +.link__type[data-url$=".xls"], |
| 84 | +.link__type[data-url$=".xlsx"] |
81 | 85 | @extend $link-type |
82 | | - link-type 'zip' |
| 86 | + &::before |
| 87 | + content 'XLS' |
83 | 88 |
|
84 | 89 | // -- |
85 | | -.main [href$=".xls"], |
86 | | -.main [href$=".xlsx"], |
87 | | -a.xls |
| 90 | +.link__type[data-url$=".pdf"] |
88 | 91 | @extend $link-type |
89 | | - link-type 'xls' |
| 92 | + &::before |
| 93 | + content 'PDF' |
90 | 94 |
|
91 | 95 | // -- |
92 | | -.main [href$=".pdf"], |
93 | | -a.pdf |
| 96 | +.link__type[data-url^='http://developer.mozilla.org'], |
| 97 | +.link__type[data-url^='https://developer.mozilla.org'] |
94 | 98 | @extend $link-type |
95 | | - link-type 'pdf' |
| 99 | + &::before |
| 100 | + content 'MDN' |
96 | 101 |
|
97 | 102 | // -- |
98 | | -.main [href^='http://developer.mozilla.org'], |
99 | | -.main [href^='https://developer.mozilla.org'], |
100 | | -a.mdn |
| 103 | +.link__type[data-url^='http://msdn.microsoft.com'], |
| 104 | +.link__type[data-url^='https://msdn.microsoft.com'] |
101 | 105 | @extend $link-type |
102 | | - link-type 'mdn' |
| 106 | + &::before |
| 107 | + content 'MSDN' |
103 | 108 |
|
104 | 109 | // -- |
105 | | -.main [href^='http://msdn.microsoft.com'], |
106 | | -.main [href^='https://msdn.microsoft.com'], |
107 | | -a.msdn |
| 110 | +.link__type[data-url^='http://wikipedia.org'], |
| 111 | +.link__type[data-url*='wikipedia.org'] |
108 | 112 | @extend $link-type |
109 | | - link-type 'msdn' |
| 113 | + &::before |
| 114 | + content 'WIKI' |
110 | 115 |
|
111 | 116 | // -- |
112 | | -.main [href^='http://wikipedia.org'], |
113 | | -.main [href*='wikipedia.org'], |
114 | | -a.wiki |
| 117 | +.link__type[data-url^='http://w3.org'], |
| 118 | +.link__type[data-url^='http://dev.w3.org'], |
| 119 | +.link__type[data-url^='http://www.w3.org'], |
| 120 | +.link__type[data-url^='https://www.w3.org'], |
| 121 | +.link__type[data-url^='https://w3.org'] |
115 | 122 | @extend $link-type |
116 | | - link-type 'wiki' |
| 123 | + &::before |
| 124 | + content 'W3C' |
117 | 125 |
|
118 | 126 | // -- |
119 | | -.main [href^='http://w3.org'], |
120 | | -.main [href^='http://dev.w3.org'], |
121 | | -.main [href^='http://www.w3.org'], |
122 | | -.main [href^='https://www.w3.org'], |
123 | | -.main [href^='https://w3.org'], |
124 | | -a.w3c |
| 127 | +.link__type[data-url^='http://es5.github.com'] |
125 | 128 | @extend $link-type |
126 | | - link-type 'w3c' |
| 129 | + &::before |
| 130 | + content 'ECMA' |
127 | 131 |
|
128 | 132 | // -- |
129 | | -.main [href^='http://es5.github.com'], |
130 | | -a.ecma |
131 | | - @extend $link-type |
132 | | - link-type 'ecma' |
133 | | -// -- |
134 | 133 |
|
135 | 134 | // placeholder selector, can't be moved to the top |
136 | 135 | // because order matters |
|
0 commit comments