mirror of
https://github.com/YunoHost/SSOwat.git
synced 2024-09-03 20:06:27 +02:00
simplify styling of tiles
This commit is contained in:
parent
32323b4980
commit
91cca157c8
3 changed files with 13 additions and 9 deletions
|
@ -331,13 +331,12 @@ textarea {
|
|||
-webkit-transform: skew(0deg, 45deg);
|
||||
}
|
||||
|
||||
.listing-apps span {
|
||||
display: block;
|
||||
margin: -1.2em 0 0 0.2em;
|
||||
}
|
||||
.listing-apps .first-letter { margin: 0; }
|
||||
.listing-apps .first-letter:before {
|
||||
content: attr(data-first-letter);
|
||||
.listing-apps span {
|
||||
display: block;
|
||||
margin: -1.2em 0 0 0.2em;
|
||||
}
|
||||
.listing-apps .first-letter {
|
||||
margin: 0;
|
||||
display: inline-block;
|
||||
}
|
||||
.listing-apps .name {
|
||||
|
|
|
@ -350,7 +350,7 @@ function set_app_tile_style(el)
|
|||
// Add color class.
|
||||
el.classList.add(app_tile_colors[randomColorNumber]);
|
||||
// Set first-letter data attribute.
|
||||
el.querySelector('.first-letter').setAttribute('data-first-letter', el.textContent.substring(0, 2));
|
||||
el.querySelector('.first-letter').innerHTML = el.getAttribute("data-appname").substring(0, 2);
|
||||
}
|
||||
|
||||
function tweak_portal_when_in_iframe()
|
||||
|
|
|
@ -14,7 +14,12 @@
|
|||
<div id="apps" class="wrapper apps">
|
||||
<ul class="listing-apps">
|
||||
{{#app}}
|
||||
<li><a class="app-tile" href="https://{{url}}"><span class="first-letter"></span><span class="name">{{name}}</span></a></li>
|
||||
<li>
|
||||
<a class="app-tile" href="https://{{url}}" data-appname="{{name}}">
|
||||
<span class="first-letter"></span>
|
||||
<span class="name">{{name}}</span>
|
||||
</a>
|
||||
</li>
|
||||
{{/app}}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue