docbrown/app/assets/stylesheets/shared.scss
Ridhwana 8060f78893
Dynamically update the brand colors (#15432)
* Added alias for app/javascript/controllers

* Added hooks for Stimulus controller.

* Fixed eslint issue with @controllers alias.

* Initial working logo preview.

* Added explicit accept values for png and svg files only for a logo.

* Fixed content layout shift issue and resize to max height 80px.

* Cleaned up logo preview resizing.

* Added focus style to Upload logo label.

* Now the logo preview image has empty alt text as it's visual only.

* Fixed position of upload logo button.

* Removed tooltip for logo.

* Fixed check to load client-side controller.

* Put back tooltip, minus the aria-describedby

* Fixed E2E tests I broke.

* Made the logo preview visible to the accessibility tree.

* feat: update the brand colors on the page when we select a new one

* feat: update the radio button_tags to use crayons-radio

* feat: remove the fill attributes in the svg

* Added support for JPG image upload.

* Fixed height adjustment when width exceeds max preview width.

* feat: add form-background class with an accent

* feat: update the briightness accent on the page

* Fixed JS error if user cancelled file selection for a logo.

* Added the @routes webpack alias for routes.js.erb.

* Fixed data tooltip for assistive technologies.

* Fixed preview logo alignment with upload logo button.

* remove required as it's not doing anything

* feat: update the code brigtness code

* Opting to not show friendly error message if route fails to load.

* Fixed validation message not appearing for logo.

* Revert "Added the @routes webpack alias for routes.js.erb."

This reverts commit 3b6621dcde541f2fa05df6ff75af38955842b88e.

* Reverted to default styling of input[type="file"].

* Moved creator_settings_controller to admin/controllers.

* Updated E2E test for logo preview on the creator settings page.

* create tests for the brand color updates

* feat: update the description

* Update cypress/integration/creatorOnboardingFlows/creatorSettings.spec.js

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* Update app/javascript/admin/controllers/creator_settings_controller.js

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* feat: do not update branding if an invalid color is provided

* feat: move the brightness code to its own accent calculator file in js utilities

* test: brightness ratios

* chore: remove whitespace

Co-authored-by: Nick Taylor <nick@dev.to>
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-11-23 09:46:17 +02:00

187 lines
4.1 KiB
SCSS

@import 'config/import';
#audiocontent {
position: fixed;
bottom: 0px;
left: 0px;
right: 0px;
z-index: var(--z-sticky);
font-family: var(--ff-sans-serif);
display: block;
#progressBar {
color: #fff;
width: 100%;
height: calc(48px + 1vh);
margin-top: 100px;
position: fixed;
left: 0;
bottom: 0;
right: 0;
text-align: left;
background: rgb(236, 236, 236);
display: none;
&.playing {
display: block;
}
#episode-profile-image {
height: calc(48px + 1vh);
width: calc(48px + 1vh);
}
#animated-bars {
position: absolute;
bottom: -12px;
left: -15px;
width: 80px;
opacity: 0.3;
display: none;
&.playing {
display: block;
}
}
#barPlayPause {
height: calc(48px + 1vh);
width: calc(48px + 1vh);
background: rgb(32, 32, 32);
position: absolute;
left: calc(48px + 1vh);
bottom: 0px;
cursor: pointer;
.butt {
width: calc(35px + 0.5vh);
margin: calc(8px + 0.17vh) 7px;
}
.pause-butt {
display: none;
}
&.playing {
.play-butt {
display: none;
}
.pause-butt {
display: block;
}
}
}
.showing {
display: block;
}
.hidden {
display: none;
}
#volume {
height: calc(48px + 1vh);
width: 36px;
background: rgb(32, 32, 32);
position: absolute;
left: calc(100px + 1vh);
bottom: 0px;
cursor: pointer;
img {
padding: 3px;
margin-top: 4px;
margin-left: 4px;
margin-bottom: -11px;
}
#speed {
font-weight: 300;
font-size: calc(12px + 0.2vh);
padding: 3px 0px;
width: 28px;
margin-left: -0.5px;
text-align: center;
margin-top: calc(2px + 0.5vh);
display: block;
user-select: none;
background: transparent;
color: rgb(201, 201, 201);
}
.volume-icon-wrapper {
padding: 1px 0px;
}
#volumeindicator {
.range-wrapper {
position: absolute;
top: 0px;
left: 26px;
background: rgb(32, 32, 32);
z-index: var(--z-elevate);
width: 0;
overflow: hidden;
transition: width 200ms ease-out 95ms;
padding: 8px 0px 5px;
text-align: center;
input {
width: 80%;
cursor: pointer;
}
}
@media screen and (min-width: 430px) {
&:hover {
.range-wrapper {
width: 170px;
}
}
}
}
}
.buffer-wrapper {
height: calc(48px + 1vh);
position: absolute;
left: calc(136px + 1vh);
right: 0;
bottom: 0;
cursor: pointer;
#progress {
background-color: #00ffa3;
height: calc(48px + 1vh);
display: inline-block;
position: relative;
transition: width 0.25s ease-in-out;
}
#buffer {
background-color: #96ffd9;
height: calc(48px + 1vh);
display: inline-block;
position: absolute;
bottom: 0;
transition: width 0.15s ease-in-out;
}
#time {
position: absolute;
right: calc(50px + 0.1vh + 1.5vw);
top: calc(16px + 0.1vh);
color: rgb(161, 161, 161);
font-size: calc(14px + 0.2vh);
background: rgba(236, 236, 236, 0.74);
padding: 2px;
pointer-events: none;
}
#closebutt {
position: absolute;
user-select: none;
right: 0;
top: 0;
bottom: 0;
background: white;
border-left: rgba(236, 236, 236, 1);
margin: 0px;
padding: 0px;
padding-top: calc(8px + 0.2vh);
color: #535353;
font-size: 13.5px;
width: calc(42px + 0.1vh + 1.5vw);
text-align: center;
transition: all 0.3s ease 0s;
white-space: nowrap;
font-size: calc(25px + 0.2vh);
&:hover {
color: #ff4343;
}
}
}
}
}
.forem-background {
fill: var(--accent-brand);
}