From ae85645c5ebfccbb3145f128e2202e5f5e492880 Mon Sep 17 00:00:00 2001 From: codecalm Date: Sat, 21 Mar 2020 12:20:38 +0100 Subject: editor "active" class feature --- src/editor.html | 3 +++ src/style.scss | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/editor.html b/src/editor.html index 6794a49..3a928f2 100644 --- a/src/editor.html +++ b/src/editor.html @@ -113,6 +113,9 @@ layout: default .on('click', '.js-icon', function (e) { var icon = $(this).attr('data-icon'); + $('.js-icon').removeClass('active'); + $(this).addClass('active'); + $('.js-icon-name').html(icon); localStorage.setItem('icon', icon); diff --git a/src/style.scss b/src/style.scss index 2ffbb47..49a1b2f 100644 --- a/src/style.scss +++ b/src/style.scss @@ -179,6 +179,10 @@ a { justify-content: center; border: 1px solid transparent; + &.active { + background: #f0f0f0; + } + @at-root a#{&}:hover { opacity: .75; } -- cgit v1.2.1