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);
|
-webkit-transform: skew(0deg, 45deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.listing-apps span {
|
.listing-apps span {
|
||||||
display: block;
|
display: block;
|
||||||
margin: -1.2em 0 0 0.2em;
|
margin: -1.2em 0 0 0.2em;
|
||||||
}
|
}
|
||||||
.listing-apps .first-letter { margin: 0; }
|
.listing-apps .first-letter {
|
||||||
.listing-apps .first-letter:before {
|
margin: 0;
|
||||||
content: attr(data-first-letter);
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
.listing-apps .name {
|
.listing-apps .name {
|
||||||
|
|
|
@ -350,7 +350,7 @@ function set_app_tile_style(el)
|
||||||
// Add color class.
|
// Add color class.
|
||||||
el.classList.add(app_tile_colors[randomColorNumber]);
|
el.classList.add(app_tile_colors[randomColorNumber]);
|
||||||
// Set first-letter data attribute.
|
// 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()
|
function tweak_portal_when_in_iframe()
|
||||||
|
|
|
@ -14,7 +14,12 @@
|
||||||
<div id="apps" class="wrapper apps">
|
<div id="apps" class="wrapper apps">
|
||||||
<ul class="listing-apps">
|
<ul class="listing-apps">
|
||||||
{{#app}}
|
{{#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}}
|
{{/app}}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue