Skip to content

Commit

Permalink
v3.1.0: finalizing theme config functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
mustakshif committed Apr 20, 2024
1 parent aeb2ca5 commit 87b0181
Show file tree
Hide file tree
Showing 6 changed files with 290 additions and 75 deletions.
23 changes: 13 additions & 10 deletions assets/asriConfigMenu.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
<button class="b3-menu__separator asri-config"></button>
<button class="b3-menu__item asri-config" id="pickColor">
<svg class="b3-menu__icon"></svg>
<label for="asriColorPicker" class="be-menu__label">${(lang === 'zh_CN' || lang ===
'zh_CHT') ?i18nMenuItems[lang]['pickColor'] : i18nMenuItems['en_US']['pickColor']}</label>
<input id="asriColorPicker" type="color" value="${asriConfigs.userCustomColor}">
<label for="asriColorPicker" class="be-menu__label">${getConfigDisplayContent('pickColor')}</label>
<input id="asriColorPicker" type="color" value="${asriConfigs.schemes[asriConfigs.curScheme].userCustomColor}">
</button>
<button class="b3-menu__item asri-config" id="followSysAccent">
<svg class="b3-menu__icon"></svg>
<label for="" class="be-menu__label">${(lang === 'zh_CN' || lang === 'zh_CHT')
?i18nMenuItems[lang]['followSysAccent'] :
i18nMenuItems['en_US']['followSysAccent']}</label>
<label for="" class="be-menu__label">${getConfigDisplayContent('followSysAccent')}</label>
</button>
<button class="b3-menu__item asri-config" id="useSeparateScheme">
<svg class="b3-menu__icon"></svg>
<label for="" class="be-menu__label">${getConfigDisplayContent('useSeparateScheme')}
</label>
</button>
<button class="b3-menu__item asri-config" data-type="nobg" id="asriChroma">
<svg class="b3-menu__icon" xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.2"
d="m19 11l-8-8l-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0zM5 2l5 5m-8 6h15m5 7a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4c.3 1.6 2 2.4 2 4" />
</svg>
<div aria-label="${asriChromaAriaLabelPrefix + asriChromaSlider?.value || '1'}" class="b3-tooltips b3-tooltips__n">
<div aria-label="${getConfigDisplayContent('asriChroma') + asriChromaSlider?.value || '1'}"
class="b3-tooltips b3-tooltips__n">
<input style="box-sizing: border-box" type="range" id="asriChromaSlider" class="b3-slider fn__block" min="0"
max="5" step="0.1" value="1">
</div>
Expand All @@ -29,8 +32,8 @@
d="M12 16a4 4 0 1 1 0-8a4 4 0 0 1 0 8m0-14v6m0 8v6M2 12h6m8 0h6M4.929 4.929L9.172 9.17m5.656 5.659l4.243 4.242m-14.142 0l4.243-4.242m5.656-5.658l4.243-4.242" />
</g>
</svg>
<div aria-label="${asriHueShiftSlider?.value || '0'}" class="b3-tooltips b3-tooltips__n">
<input style="box-sizing: border-box" type="range" id="asriHueShiftSlider" class="b3-slider fn__block"
min="-180" max="180" step="1" value="0">
<div aria-label="${getConfigDisplayContent('asriHueShift') + asriHueShiftSlider?.value || '0'}"
class="b3-tooltips b3-tooltips__n"><input style="box-sizing: border-box" type="range" id="asriHueShiftSlider"
class="b3-slider fn__block" min="-180" max="180" step="1" value="0">
</div>
</button>
Loading

0 comments on commit 87b0181

Please sign in to comment.