Skip to content
This repository has been archived by the owner on Jul 18, 2023. It is now read-only.

Commit

Permalink
Added option for custom accent color and cleaned some code.
Browse files Browse the repository at this point in the history
  • Loading branch information
git-Hmmm committed Aug 25, 2022
1 parent 28accdc commit 9ee485d
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 203 deletions.
37 changes: 12 additions & 25 deletions public/about/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,31 +82,18 @@ <h4>
onclick="openColorPicker();"
></i>
<div class="theming">
<ul id="themecolor-picker">
<li>
<span style="background: #4873b3 none repeat scroll 0% 0%"></span>
</li>
<li>
<span
style="background: #df0000bf none repeat scroll 0% 0%"
></span>
</li>
<li>
<span
style="background: #605dbbb3 none repeat scroll 0% 0%"
></span>
</li>
<li>
<span
style="background: #00e60069 none repeat scroll 0% 0%"
></span>
</li>
<li>
<span
style="background: #0067fdc7 none repeat scroll 0% 0%"
></span>
</li>
</ul>
<div id="themecolor-picker">
<span style="background: #4873b3 none repeat scroll 0% 0%"></span>
<span style="background: #df0000bf none repeat scroll 0% 0%"></span>
<span style="background: #605dbbb3 none repeat scroll 0% 0%"></span>
<span style="background: #00e60069 none repeat scroll 0% 0%"></span>
<span style="background: #0067fdc7 none repeat scroll 0% 0%"></span>
<span
onclick="this.style.setProperty('background-color', prompt('Set Custom Color (eg. #000 or yellow or anything that works with css)', document.documentElement.style.getPropertyValue('--accentColor')));"
style="background: var(--accentColor) none repeat scroll 0% 0%"
>🎨</span
>
</div>
</div>
<span class="right"></span>
<button onclick="history.back()">Back</button>
Expand Down
3 changes: 1 addition & 2 deletions public/colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ accentColors.forEach((color) => {
color.addEventListener('click', () => {
accentColors.forEach((el) => el.classList.remove('active'));
color.classList.add('active');
let colorNow1 = color.style.getPropertyValue('background-color');
// todo: in future maybe allow user to set any color, `colorNow1 = prompt("Set Custom Color:", colorNow1)`;
const colorNow1 = color.style.getPropertyValue('background-color');
document.documentElement.style.setProperty('--accentColor', colorNow1);
localStorage.setItem('theme', colorNow1);
});
Expand Down
37 changes: 12 additions & 25 deletions public/dependencies/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,31 +44,18 @@ <h1>Downloading dependencies</h1>
onclick="openColorPicker();"
></i>
<div class="theming">
<ul id="themecolor-picker">
<li>
<span style="background: #4873b3 none repeat scroll 0% 0%"></span>
</li>
<li>
<span
style="background: #df0000bf none repeat scroll 0% 0%"
></span>
</li>
<li>
<span
style="background: #605dbbb3 none repeat scroll 0% 0%"
></span>
</li>
<li>
<span
style="background: #00e60069 none repeat scroll 0% 0%"
></span>
</li>
<li>
<span
style="background: #0067fdc7 none repeat scroll 0% 0%"
></span>
</li>
</ul>
<div id="themecolor-picker">
<span style="background: #4873b3 none repeat scroll 0% 0%"></span>
<span style="background: #df0000bf none repeat scroll 0% 0%"></span>
<span style="background: #605dbbb3 none repeat scroll 0% 0%"></span>
<span style="background: #00e60069 none repeat scroll 0% 0%"></span>
<span style="background: #0067fdc7 none repeat scroll 0% 0%"></span>
<span
onclick="this.style.setProperty('background-color', prompt('Set Custom Color (eg. #000 or yellow or anything that works with css)', document.documentElement.style.getPropertyValue('--accentColor')));"
style="background: var(--accentColor) none repeat scroll 0% 0%"
>🎨</span
>
</div>
</div>
<span class="right"></span>
<button onclick="location.href='../index.html'">Back</button>
Expand Down
37 changes: 12 additions & 25 deletions public/devices/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,31 +45,18 @@ <h1>Select the device you want to install ReVanced to</h1>
onclick="openColorPicker();"
></i>
<div class="theming">
<ul id="themecolor-picker">
<li>
<span style="background: #4873b3 none repeat scroll 0% 0%"></span>
</li>
<li>
<span
style="background: #df0000bf none repeat scroll 0% 0%"
></span>
</li>
<li>
<span
style="background: #605dbbb3 none repeat scroll 0% 0%"
></span>
</li>
<li>
<span
style="background: #00e60069 none repeat scroll 0% 0%"
></span>
</li>
<li>
<span
style="background: #0067fdc7 none repeat scroll 0% 0%"
></span>
</li>
</ul>
<div id="themecolor-picker">
<span style="background: #4873b3 none repeat scroll 0% 0%"></span>
<span style="background: #df0000bf none repeat scroll 0% 0%"></span>
<span style="background: #605dbbb3 none repeat scroll 0% 0%"></span>
<span style="background: #00e60069 none repeat scroll 0% 0%"></span>
<span style="background: #0067fdc7 none repeat scroll 0% 0%"></span>
<span
onclick="this.style.setProperty('background-color', prompt('Set Custom Color (eg. #000 or yellow or anything that works with css)', document.documentElement.style.getPropertyValue('--accentColor')));"
style="background: var(--accentColor) none repeat scroll 0% 0%"
>🎨</span
>
</div>
</div>
<span class="right"></span>
<button id="back" onclick="history.back()">Back</button>
Expand Down
37 changes: 12 additions & 25 deletions public/failure/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,18 @@ <h1>Failure</h1>
onclick="openColorPicker();"
></i>
<div class="theming">
<ul id="themecolor-picker">
<li>
<span style="background: #4873b3 none repeat scroll 0% 0%"></span>
</li>
<li>
<span
style="background: #df0000bf none repeat scroll 0% 0%"
></span>
</li>
<li>
<span
style="background: #605dbbb3 none repeat scroll 0% 0%"
></span>
</li>
<li>
<span
style="background: #00e60069 none repeat scroll 0% 0%"
></span>
</li>
<li>
<span
style="background: #0067fdc7 none repeat scroll 0% 0%"
></span>
</li>
</ul>
<div id="themecolor-picker">
<span style="background: #4873b3 none repeat scroll 0% 0%"></span>
<span style="background: #df0000bf none repeat scroll 0% 0%"></span>
<span style="background: #605dbbb3 none repeat scroll 0% 0%"></span>
<span style="background: #00e60069 none repeat scroll 0% 0%"></span>
<span style="background: #0067fdc7 none repeat scroll 0% 0%"></span>
<span
onclick="this.style.setProperty('background-color', prompt('Set Custom Color (eg. #000 or yellow or anything that works with css)', document.documentElement.style.getPropertyValue('--accentColor')));"
style="background: var(--accentColor) none repeat scroll 0% 0%"
>🎨</span
>
</div>
</div>
<span class="right"></span>
<button onclick="history.back();">Back</button>
Expand Down
37 changes: 12 additions & 25 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,31 +84,18 @@ <h1>Select the app you want to patch</h1>
onclick="openColorPicker();"
></i>
<div class="theming">
<ul id="themecolor-picker">
<li>
<span style="background: #4873b3 none repeat scroll 0% 0%"></span>
</li>
<li>
<span
style="background: #df0000bf none repeat scroll 0% 0%"
></span>
</li>
<li>
<span
style="background: #605dbbb3 none repeat scroll 0% 0%"
></span>
</li>
<li>
<span
style="background: #00e60069 none repeat scroll 0% 0%"
></span>
</li>
<li>
<span
style="background: #0067fdc7 none repeat scroll 0% 0%"
></span>
</li>
</ul>
<div id="themecolor-picker">
<span style="background: #4873b3 none repeat scroll 0% 0%"></span>
<span style="background: #df0000bf none repeat scroll 0% 0%"></span>
<span style="background: #605dbbb3 none repeat scroll 0% 0%"></span>
<span style="background: #00e60069 none repeat scroll 0% 0%"></span>
<span style="background: #0067fdc7 none repeat scroll 0% 0%"></span>
<span
onclick="this.style.setProperty('background-color', prompt('Set Custom Color (eg. #000 or yellow or anything that works with css)', document.documentElement.style.getPropertyValue('--accentColor')));"
style="background: var(--accentColor) none repeat scroll 0% 0%"
>🎨</span
>
</div>
</div>
<span class="right"></span>
<button class="highlighted" id="continue" onclick="setApp()">
Expand Down
37 changes: 12 additions & 25 deletions public/patch/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,18 @@ <h1>Patching...</h1>
onclick="openColorPicker();"
></i>
<div class="theming">
<ul id="themecolor-picker">
<li>
<span style="background: #4873b3 none repeat scroll 0% 0%"></span>
</li>
<li>
<span
style="background: #df0000bf none repeat scroll 0% 0%"
></span>
</li>
<li>
<span
style="background: #605dbbb3 none repeat scroll 0% 0%"
></span>
</li>
<li>
<span
style="background: #00e60069 none repeat scroll 0% 0%"
></span>
</li>
<li>
<span
style="background: #0067fdc7 none repeat scroll 0% 0%"
></span>
</li>
</ul>
<div id="themecolor-picker">
<span style="background: #4873b3 none repeat scroll 0% 0%"></span>
<span style="background: #df0000bf none repeat scroll 0% 0%"></span>
<span style="background: #605dbbb3 none repeat scroll 0% 0%"></span>
<span style="background: #00e60069 none repeat scroll 0% 0%"></span>
<span style="background: #0067fdc7 none repeat scroll 0% 0%"></span>
<span
onclick="this.style.setProperty('background-color', prompt('Set Custom Color (eg. #000 or yellow or anything that works with css)', document.documentElement.style.getPropertyValue('--accentColor')));"
style="background: var(--accentColor) none repeat scroll 0% 0%"
>🎨</span
>
</div>
</div>
<span class="right"></span>
</footer>
Expand Down
37 changes: 12 additions & 25 deletions public/patches/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,31 +44,18 @@ <h1>Select patches to include</h1>
onclick="openColorPicker();"
></i>
<div class="theming">
<ul id="themecolor-picker">
<li>
<span style="background: #4873b3 none repeat scroll 0% 0%"></span>
</li>
<li>
<span
style="background: #df0000bf none repeat scroll 0% 0%"
></span>
</li>
<li>
<span
style="background: #605dbbb3 none repeat scroll 0% 0%"
></span>
</li>
<li>
<span
style="background: #00e60069 none repeat scroll 0% 0%"
></span>
</li>
<li>
<span
style="background: #0067fdc7 none repeat scroll 0% 0%"
></span>
</li>
</ul>
<div id="themecolor-picker">
<span style="background: #4873b3 none repeat scroll 0% 0%"></span>
<span style="background: #df0000bf none repeat scroll 0% 0%"></span>
<span style="background: #605dbbb3 none repeat scroll 0% 0%"></span>
<span style="background: #00e60069 none repeat scroll 0% 0%"></span>
<span style="background: #0067fdc7 none repeat scroll 0% 0%"></span>
<span
onclick="this.style.setProperty('background-color', prompt('Set Custom Color (eg. #000 or yellow or anything that works with css)', document.documentElement.style.getPropertyValue('--accentColor')));"
style="background: var(--accentColor) none repeat scroll 0% 0%"
>🎨</span
>
</div>
</div>
<span class="right"></span>
<button onclick="history.back()">Back</button>
Expand Down
3 changes: 2 additions & 1 deletion public/styles/core.css
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ dialog {

#themecolor-picker {
display: flex;
list-style: none;
padding: 0;
}

Expand All @@ -281,6 +280,8 @@ dialog {
display: inline-block;
border-radius: 5px;
cursor: pointer;
height: 22px;
width: 22px;
}

#themecolor-picker span.active {
Expand Down
37 changes: 12 additions & 25 deletions public/versions/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,31 +40,18 @@ <h1>Select the version you want to download</h1>
onclick="openColorPicker();"
></i>
<div class="theming">
<ul id="themecolor-picker">
<li>
<span style="background: #4873b3 none repeat scroll 0% 0%"></span>
</li>
<li>
<span
style="background: #df0000bf none repeat scroll 0% 0%"
></span>
</li>
<li>
<span
style="background: #605dbbb3 none repeat scroll 0% 0%"
></span>
</li>
<li>
<span
style="background: #00e60069 none repeat scroll 0% 0%"
></span>
</li>
<li>
<span
style="background: #0067fdc7 none repeat scroll 0% 0%"
></span>
</li>
</ul>
<div id="themecolor-picker">
<span style="background: #4873b3 none repeat scroll 0% 0%"></span>
<span style="background: #df0000bf none repeat scroll 0% 0%"></span>
<span style="background: #605dbbb3 none repeat scroll 0% 0%"></span>
<span style="background: #00e60069 none repeat scroll 0% 0%"></span>
<span style="background: #0067fdc7 none repeat scroll 0% 0%"></span>
<span
onclick="this.style.setProperty('background-color', prompt('Set Custom Color (eg. #000 or yellow or anything that works with css)', document.documentElement.style.getPropertyValue('--accentColor')));"
style="background: var(--accentColor) none repeat scroll 0% 0%"
>🎨</span
>
</div>
</div>
<span class="right"></span>
<button id="back" onclick="history.back()">Back</button>
Expand Down

0 comments on commit 9ee485d

Please sign in to comment.