add options to select the size of icons and texts or hide them

This commit is contained in:
Simon Vieille
2020-04-25 14:25:51 +02:00
parent 18314b260f
commit 95f7eb5980
6 changed files with 96 additions and 3 deletions
+6 -3
View File
@@ -28,8 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<li v-for="app in apps" v-bind:class="{'side-menu-app': true, 'active': app.active}">
<a v-bind:href="app.href">
<span class="side-menu-app-icon" v-html="app.icon"></span>
{{ app.name }}
<span class="side-menu-app-text" v-html="app.name"></span>
</a>
</li>
</ul>
@@ -54,10 +53,14 @@ export default {
let href = element.getAttribute('href')
if (href !== '#') {
let svg = element.querySelector('svg').outerHTML
svg = svg.replace(/(height|width)="20"/, '')
this.apps.push({
href: href,
name: element.querySelector('span').innerHTML,
icon: element.querySelector('svg').outerHTML,
icon: svg,
active: element.classList.contains('active')
});
}