Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Popup UI to Material 3 #986

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions Extensions/combined/icons/logo.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 47 additions & 30 deletions Extensions/combined/popup.css
Original file line number Diff line number Diff line change
@@ -1,20 +1,49 @@
/* Variables */
:root {
--primary: #cc2929;
--accent: #581111;
--primary: #f39090;
--secondary: #502e2e;
--tertiary: #221818;
--background: #352929;

--background: #111;
--secondary: #272727;
--tertiary: #424242;
--accent: #581111;
--lightGrey: #999;
--white: #fff;
}

/*** MATERIAL 3 ***/
.m3-primary {
background: var(--primary) !important;
color: var(--background) !important;
}
.m3-btn {
background: var(--tertiary);
color: var(--primary);
transition: 0.4s;
border-radius: 4px;
font-weight: 500;
border-radius: 100em;
box-shadow: 0 5px 5px rgba(0,0,0,0.1);
margin: 0.25em;
}
.m3-btn:hover {
background: var(--secondary) !important;
color: var(--primary) !important;
}

select {
border-radius: 1em;
background-color: var(--secondary);
color: var(--primary);
border: none;
outline: none;
padding: 3px 2px;
}
/*** END MATERIAL 3 ***/

/* Window Styling */
html,
body {
background-color: var(--background);
color: var(--white);
color: var(--primary);
min-width: 310px;
min-height: 350px;
padding: 0.5em;
Expand All @@ -26,30 +55,19 @@ h1 {
font-size: 26px;
}

#ext-version {
padding: 0.25rem 0.5rem;
}

button {
color: var(--white);
background: var(--secondary);
cursor: pointer;
padding: 5px 16px;
border: none;
border-radius: 4px;
font-weight: 500;
/* box-shadow: 0 2px 4px -1px rgb(0 0 0 / 20%), 0 4px 5px 0 rgb(0 0 0 / 14%),
0 1px 10px 0 rgb(0 0 0 / 12%); */
transition: 0.4s;
}

button:hover {
background: #444;
}

#ext-version {
padding: 0.25rem 0.5rem;
}

#ext-update {
cursor: pointer;
color: var(--white);
color: var(--primary);
text-decoration: none;
background: var(--primary);
border-radius: 0.25rem;
Expand Down Expand Up @@ -113,17 +131,17 @@ button:hover {
position: fixed;
background: none;
box-shadow: none;
color: var(--lightGrey);
color: var(--primary);
top: 26px;
right: 26px;
padding: 2px;
z-index: 69;
height: 2rem;
width: 2rem;
transition-duration: .25s;
}

#advancedToggle:hover {
color: var(--white);
transform: rotate(-90deg);
}

Expand All @@ -143,11 +161,10 @@ button:hover {
right: 14px;
width: calc(100% - 65px);
height: calc(100% - 58px);
border: 2px solid var(--secondary);
border-radius: 0.5rem;
padding: 1rem;
overflow-y: auto;
overflow-x: hidden;
border: none;
}

::-webkit-scrollbar {
Expand All @@ -159,7 +176,7 @@ button:hover {
}

::-webkit-scrollbar-thumb {
background-color: #333; /* color of the scroll thumb */
background-color: var(--primary); /* color of the scroll thumb */
border-radius: 1rem 0 0 1rem; /* roundness of the scroll thumb */
border-bottom: 0.25rem solid #111; /* creates padding around scroll thumb */
border-left: 0.25rem solid #111; /* creates padding around scroll thumb */
Expand All @@ -175,7 +192,7 @@ button:hover {
}

#advancedLegend {
color: var(--tertiary) !important;
color: var(--secondary) !important;
/* margin: auto; */ /* Center the label */
/* padding: .25rem .5rem; */
/* border-radius: .25rem; */
Expand Down Expand Up @@ -226,7 +243,7 @@ button:hover {
width: 13px;
left: 2px;
bottom: 2px;
background: var(--lightGrey);
background: var(--primary);
transition: 0.4s;
border-radius: 50%;
}
Expand Down
29 changes: 12 additions & 17 deletions Extensions/combined/popup.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<!DOCTYPE html>
<html>

<!--- HEADER -->
<head>
<meta content="text/html; charset=utf-8" />
<title title="__MSG_extensionName__">__MSG_extensionName__</title>
Expand All @@ -11,43 +13,40 @@
rel="stylesheet"
/>
</head>
<!-- END HEADER -->
<body>
<center>
<svg width="48" viewBox="0 0 24 24">
<path
d="M14.9 3H6c-.9 0-1.6.5-1.9 1.2l-3 7c-.1.3-.1.5-.1.7v2c0 1.1.9 2 2 2h6.3l-.9 4.5c-.1.5 0 1 .4 1.4l1.1 1.1 6.5-6.6c.4-.4.6-.9.6-1.4V5c-.1-1.1-1-2-2.1-2zm7.4 12.8h-2.9c-.4 0-.7-.3-.7-.7V3.9c0-.4.3-.7.7-.7h2.9c.4 0 .7.3.7.7V15c0 .4-.3.8-.7.8z"
fill="red"
/>
<path d="m8 12.5 5.1-2.9L8 6.7v5.8z" fill="#fff" />
</svg>
<img src="icons/logo.svg" />
<h1 style="margin-bottom: 0.75rem" title="__MSG_extensionName__">
__MSG_extensionName__
</h1>
<p style="color: var(--lightGrey)" title="__MSG_textDeveloper__">
__MSG_textDeveloper__
</p>

<button id="link_website" title="__MSG_linkWebsite__">
<button class="m3-btn" id="link_website" title="__MSG_linkWebsite__">
__MSG_linkWebsite__
</button>
<button
style="margin-top: 0.3em; background: #ff0000"
class="m3-btn m3-primary"
style="margin-top: 0.3em;"
id="link_donate"
title="__MSG_linkDonate__"
>
__MSG_linkDonate__
</button>
<button id="link_discord">Discord</button>
<button class="m3-btn" id="link_discord">Discord</button>
<br />
<button style="margin-top: 0.3rem" id="link_faq" title="__MSG_linkFAQ__">
<button class="m3-btn" style="margin-top: 0.3rem" id="link_faq" title="__MSG_linkFAQ__">
__MSG_linkFAQ__
</button>
<button id="link_github">GitHub</button>
<button style="margin-top: 0.3em" id="link_help" title="__MSG_linkHelp__">
<button class="m3-btn" id="link_github">GitHub</button>
<button class="m3-btn" style="margin-top: 0.3em" id="link_help" title="__MSG_linkHelp__">
__MSG_linkHelp__
</button>
<br />
<button
class="m3-btn"
style="margin-top: 0.3em"
id="link_changelog"
title="__MSG_linkChangelog__"
Expand Down Expand Up @@ -98,10 +97,6 @@ <h1 style="margin-bottom: 0.75rem" title="__MSG_extensionName__">

<!-- dialog box -->
<fieldset id="advancedSettings">
<legend id="advancedLegend" title="__MSG_legendSettings__">
__MSG_legendSettings__
</legend>

<label class="switch" data-hover="Stop counting your likes and dislikes">
<input type="checkbox" id="disable_vote_submission" />
<span class="slider"></span>
Expand Down