Space flags with margin-right instead of a space (#1241)
* removal of space * margin-right addition * Update flags.jet.html * margin into padding * add "highlighted" class for possible future use * bigger rules-drop, fix wrong display, remove useless line * add alt for category img & alt with every language for flag * literally no point of an alt on a div * flag alt
Cette révision appartient à :
Parent
73390e1d30
révision
638b841e26
4 fichiers modifiés avec 11 ajouts et 11 suppressions
|
@ -151,7 +151,13 @@ select.form-input {
|
|||
padding: 10px 4px 9px 7px;
|
||||
}
|
||||
|
||||
.language span.input-group { display: inline-block; }
|
||||
.language span.input-group { display: inline-block; padding-right: 4px; }
|
||||
.language span.input-group.highlighted {
|
||||
border: 1px solid #c4c4c4;
|
||||
background-color: hsla(30, 100%, 50%, 0.2) !important;
|
||||
padding-right: 2px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.language span.input-group span { display: none; }
|
||||
.language .input-group label { margin-bottom: 1px; }
|
||||
.language .input-group input { margin-right: 4px; }
|
||||
|
@ -999,16 +1005,14 @@ input.nav-btn {
|
|||
display: flex;
|
||||
user-select: none;
|
||||
vertical-align: bottom;
|
||||
width: 429px;
|
||||
width: 435px;
|
||||
max-width: 100%;
|
||||
}
|
||||
.rules-drop > summary {
|
||||
cursor: pointer;
|
||||
}
|
||||
.rules-drop > div {
|
||||
display: inline-block;
|
||||
height: auto;
|
||||
border: 1px solid black;
|
||||
padding: 0;
|
||||
border-top: none;
|
||||
}
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
{{ block flagList(languages=nil, selected="", inputname="languages", id="lang")}}
|
||||
{{ if isset(languages) }}
|
||||
{{ range _, language := languages }}
|
||||
<span class="input-group">
|
||||
<span name="{{id}}-languagename">{{LanguageName(language, T)}}</span><input type="checkbox" name="{{inputname}}" class="form-language-checkbox" id="{{id}}-{{ language.Code }}" value="{{language.Code}}"{{ range _, v := selected}}{{ if contains(v, language.Code) }} checked{{end}}{{end}}><label for="{{id}}-{{ language.Code }}" class="flag flag-{{ language.Flag(false) }}" title="{{LanguageName(language, T)}}"></label>
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ range _, language := languages }}<span class="input-group"><span name="{{id}}-languagename">{{LanguageName(language, T)}}</span><input type="checkbox" name="{{inputname}}" class="form-language-checkbox" id="{{id}}-{{ language.Code }}" value="{{language.Code}}"{{ range _, v := selected}}{{ if contains(v, language.Code) }} checked{{end}}{{end}}><label for="{{id}}-{{ language.Code }}" class="flag flag-{{ language.Flag(false) }}" title="{{LanguageName(language, T)}}"></label></span>{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
@ -21,7 +21,7 @@ Templates.Add("torrents.item", function(torrent) {
|
|||
"<div class=\"nyaa-cat nyaa-cat-"+ torrent.sub_category +"\">"+
|
||||
{{end}}
|
||||
"<a href=\"{{URL.Parse("/search?c=") }}"+ torrent.category + "_" + torrent.sub_category +"\" title=\""+ T.r(torrent.category+"_"+torrent.sub_category)+"\" class=\"category\">"+
|
||||
((torrent.languages[0] != "") ? "<a href=\"{{URL.Parse("/search?c=") }}"+ torrent.category + "_" + torrent.sub_category +"&lang=" + torrent.languages.join(",") +"\"><img src=\"img/blank.gif\" class=\"flag flag-"+ ((torrent.languages.length == 1) ? flagCode(torrent.languages[0]) : "multiple") +"\" title=\""+torrent.languages.map(function (el, i) { return T.r(el)}).join(",")+"\"></a>" : "") +
|
||||
((torrent.languages[0] != "") ? "<a href=\"{{URL.Parse("/search?c=") }}"+ torrent.category + "_" + torrent.sub_category +"&lang=" + torrent.languages.join(",") +"\"><img src=\"img/blank.gif\" class=\"flag flag-"+ ((torrent.languages.length == 1) ? flagCode(torrent.languages[0]) : "multiple") +"\" title=\""+torrent.languages.map(function (el, i) { return T.r(el)}).join(",")+"\" alt=\""+torrent.languages.map(function (el, i) { return T.r(el)}).join(",")+"\"></a>" : "") +
|
||||
"</a>"+
|
||||
"</div></td>"+
|
||||
"<td class=\"tr-name home-td\""+ (torrent.comments.length == 0 ? "colspan=\"2\"" : "" ) +"><a href=\"/view/"+torrent.id+"\">"+Templates.EncodeEntities(torrent.name) +"</a></td>"+
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
<a href="{{ URL.Parse("/search?c="+.Category+"_"+ .SubCategory) }}" title="{{ T(CategoryName(.Category, .SubCategory)) }}" class="category">
|
||||
{{if .Languages[0] != "" }}
|
||||
<a href="{{ URL.Parse("/search?c="+.Category+"_"+ .SubCategory +"&lang=") }}{{ range key, language := .Languages }}{{ language }}{{ if len(.Languages) > 1 && (key+1) < len(.Languages) }},{{ end }}{{ end }}">
|
||||
<img src="/img/blank.gif" alt="{{ LanguageNameFromCode(.Languages[0], T) }}" class="flag flag-{{ (len(.Languages) == 1) ? FlagCode(.Languages[0]) : "multiple" }}" title="{{ range key, language := .Languages }}{{ LanguageNameFromCode(language, T) }}{{ if len(.Languages) > 1 && (key+1) < len(.Languages) }},{{ end }}{{ end }}">
|
||||
<img src="/img/blank.gif" alt="{{ range key, language := .Languages }}{{ LanguageNameFromCode(language, T) }}{{ if len(.Languages) > 1 && (key+1) < len(.Languages) }},{{ end }}{{ end }}" class="flag flag-{{ (len(.Languages) == 1) ? FlagCode(.Languages[0]) : "multiple" }}" title="{{ range key, language := .Languages }}{{ LanguageNameFromCode(language, T) }}{{ if len(.Languages) > 1 && (key+1) < len(.Languages) }},{{ end }}{{ end }}">
|
||||
</a>
|
||||
{{end}}
|
||||
</a>
|
||||
|
|
Référencer dans un nouveau ticket