Skip to content

Commit

Permalink
vNext - Mono mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Futur3Sn0w committed Jan 31, 2024
1 parent 97d2bda commit 2e4a4f2
Show file tree
Hide file tree
Showing 14 changed files with 109 additions and 59 deletions.
11 changes: 10 additions & 1 deletion css/stock_cards/batteryCard.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.batteryCard {
background: linear-gradient(360deg, #47ad0c, #59e754);
color: white !important;
color: white;
font-size: 22px;
font-weight: 600;
}
Expand Down Expand Up @@ -36,6 +36,10 @@
transform: scale(0.7) translateZ(15px);
}

.subCards:not(.darkModeOn).plated .batteryCard .bcIndicator {
border: 3px solid #222222;
}

.bcIndicator::after {
content: "";
width: 7px;
Expand All @@ -48,6 +52,11 @@
right: -8px;
}

.subCards:not(.darkModeOn).plated .batteryCard .bcIndicator::after,
.subCards:not(.darkModeOn).plated .batteryCard .bciProg {
background-color: #222;
}

.bciProg {
width: 100%;
height: 100%;
Expand Down
8 changes: 8 additions & 0 deletions css/stock_cards/calendarCard.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@
justify-content: center;
}

.subCards.plated .calendarCard .month {
background: #000;
}

.subCards:not(.darkModeOn).plated .calendarCard .month {
background: #fff;
}

.calendarCard .calenDayNo {
font-size: 42px;
height: 50px;
Expand Down
4 changes: 4 additions & 0 deletions css/stock_cards/emojiLocaleCard.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
justify-content: center;
}

.subCards.plated .emojiLocaleCard div p:last-of-type {
opacity: 0;
}

.emojiLocaleCard:active p:first-of-type {
opacity: 0;
}
1 change: 1 addition & 0 deletions css/stock_cards/shortcutCard.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
align-items: center;
justify-content: center;
background-color: transparent !important;
background: transparent !important;
box-shadow: none !important;
overflow: visible !important;
}
Expand Down
14 changes: 11 additions & 3 deletions css/stock_cards/textCard.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

font-weight: normal;
position: relative;
background-color: white !important;
background-color: white;
}

.shelf.darkModeOn .subCards .textCard {
background-color: #222222 !important;
color: white !important;
background-color: #222222;
color: white;
}

.textCard.expanded::before {
Expand Down Expand Up @@ -45,6 +45,14 @@
justify-content: center;
}

.subCards.plated .textCard::before {
background: #000;
}

.subCards:not(.darkModeOn).plated .textCard::before {
background: #fff;
}

.textCard.rectCard textarea {
height: calc(100% - 10px);
width: calc(100% - 10px);
Expand Down
6 changes: 6 additions & 0 deletions css/stock_cards/weatherCard.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@
transition: .2s;
}

.subCards:not(.darkModeOn).plated .weatherCard .temp,
.subCards:not(.darkModeOn).plated .weatherCard>i {
color: black;
}


.temp {
font-size: 25px;
transform: translateX(-10px);
Expand Down
2 changes: 1 addition & 1 deletion css/structure/css.css
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ body:has(.modal-about.visible)::before {

background-color: rgba(255, 255, 255, 0.65);
backdrop-filter: blur(70px) saturate(6);
box-shadow: 0 3px 10px 0 rgba(0, 0, 0, 0.1);
box-shadow: 0 6px 10px 0 rgba(0, 0, 0, .35);
border: 1px solid rgba(0, 0, 0, 0);
border-radius: 16px;

Expand Down
8 changes: 0 additions & 8 deletions css/structure/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@
width: 180px;
}

.card.dbg {
display: none;
}

.card.dbg.enabled {
display: flex;
}

.displayNone {
display: none !important;
}
14 changes: 7 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
</div>
</div>
<div class="aboutText">
A hybrid dashboard and digital display for large-format screens, heavily inspired by TV
A hybrid dashboard and digital display for large-format screens, heavily inspired by TV & VisionOS
<!-- PlusUI is your one-stop-shop for all your information, shortcuts, notes, and more. <br>PlusUI is currently
in beta/Open Demo, meaning it won't be super customizable yet, but it will save your changes for
later.<br>Feel free to report bugs on
Expand All @@ -71,8 +71,8 @@

<div class="backDrop" id="backDrop2"></div>

<div class="surface aboutBtn" id="topChromeAboutBtn"></div>
<div class="surface timeDate singleLine darkModeOn">
<div class="surface aboutBtn interactable-hov" id="topChromeAboutBtn"></div>
<div class="surface timeDate interactable-hov">
<div class="tdm time" id="time"></div>
<div class="ccButtons">
<div class="ccb ccb1" label="Personalize"><i class="fa-solid fa-brush"></i></div>
Expand All @@ -94,8 +94,9 @@
</div>
<div class="group">
<div class="dcExpt interactable-hov">
<i class="fa-solid fa-triangle-exclamation"></i>
<label for="">idkyet</label>
<input type="checkbox" name="monoMode" id="cbMonoMode">
<i class="fa-solid fa-cube"></i>
<label for="">Mono Widgets</label>
</div>
<div class="dcExpt interactable-hov floatModeCardOptGroup">
<input type="checkbox" name="floatMode" id="cbFloatMode">
Expand Down Expand Up @@ -162,7 +163,7 @@
<i id="cmi-resize-icn" class="fa-solid fa-up-right-and-down-left-from-center"></i>
</div>
<div class="cmItem cmi-expand interactable-hov" data-btnLabel="">
<i id="cmi-expand-icn" class="fa-solid fa-up-right-from-square"></i>
<i id="cmi-expand-icn" class="fa-solid fa-clone"></i>
Expand
</div>
<div class="cmItem cmi-disableCard interactable-hov">
Expand Down Expand Up @@ -297,7 +298,6 @@
<div class="shelf left">
<div class="shelfLabel surface">Shelf</div>
<div class="spacerA spcLeft"></div>
<!-- <div class="surface cards darkModeOn" id="cards"> -->
<div class="surface subCards">

<div class="weatherCard card expandable labeled rectCard" data-enabled="y" data-resizableCard="y"
Expand Down
5 changes: 5 additions & 0 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ window.onload = function () {
$('#cbFloatMode').prop('checked', true);
}

if (localStorage.getItem('monoCards') == 'true') {
$('.subCards').addClass('plated');
$('#cbMonoMode').prop('checked', true);
}

$('#backDrop2').css('background-image', "url(" + backdropImg + ")");
$('body').css('background-image', "url(" + backdropImg + ")");
refreshWall();
Expand Down
14 changes: 13 additions & 1 deletion js/shelf.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ $('.cmi-disableCard').on('click', function () {
$('.shelfLabel').addClass('show').text(friendlyName + " removed");
setTimeout(() => {
$('.shelfLabel').removeClass('show')
}, 10000);
}, 6000);

$(".subCards").sortable("refresh");
dockRadi();
Expand Down Expand Up @@ -252,4 +252,16 @@ $('#cbFloatMode').click(function () {
localStorage.setItem('float', 'false');
}
alignShelfLabel();
});

// Monochrome mode

$('#cbMonoMode').click(function () {
if ($(this).is(':checked')) {
$('.subCards').addClass('plated');
localStorage.setItem('monoCards', 'true');
} else {
$('.subCards').removeClass('plated');
localStorage.setItem('monoCards', 'false');
}
});
43 changes: 16 additions & 27 deletions js/stock_cards.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,42 +53,31 @@ let touchstartX = 0
let touchendX = 0

function checkDirectionWC() {
if ($('.shelf').hasClass('float')) {
} else {
if (touchendX < touchstartX) {
// left swipe
if ($('.shelf').hasClass('right')) {
if ($('.cards').hasClass('collapsed') == 0) {
$('#saoL-radio').click()
} else {
$('#saoC-radio').click()
}
} else if ($('.shelf').hasClass('center')) {
$('#saoL-radio').click()
}
} else if (touchendX > touchstartX) {
// right swipe
if ($('.shelf').hasClass('left')) {
if ($('.cards').hasClass('collapsed') == 0) {
$('#saoR-radio').click()
} else {
$('#saoC-radio').click()
}
} else if ($('.shelf').hasClass('center')) {
$('#saoR-radio').click()
}
if (touchendX < touchstartX) {
// left swipe
if ($('.shelf').hasClass('right')) {
$('#saoC-radio').click()
} else if ($('.shelf').hasClass('center')) {
$('#saoL-radio').click()
}
} else if (touchendX > touchstartX) {
// right swipe
if ($('.shelf').hasClass('left')) {
$('#saoC-radio').click()
} else if ($('.shelf').hasClass('center')) {
$('#saoR-radio').click()
}
}

}

// document.querySelector('.subCards').addEventListener('touchstart', e => {
// document.querySelector('.shelf:not(.subCards)').addEventListener('touchstart', e => {
// touchstartX = e.changedTouches[0].screenX
// })

// document.querySelector('.subCards').addEventListener('touchend', e => {
// document.querySelector('.shelf:not(.subCards)').addEventListener('touchend', e => {
// touchendX = e.changedTouches[0].screenX
// checkDirectionWC()
// e.stopPropagation();
// })

//
Expand Down
14 changes: 13 additions & 1 deletion master_cards.css
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ body:has(.shelf.float) .shelfBack {
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 6px 9px 0 rgba(0, 0, 0, 0.2);
box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.35);
outline: solid 3px transparent;

position: relative;
Expand All @@ -258,6 +258,18 @@ body:has(.shelf.float) .shelfBack {
margin-right: -10px !important;
}

.plated .card {
background: var(--section-l);
background-color: var(--section-l);
color: black;
}

.plated.darkModeOn .card {
background: var(--section-d);
background-color: var(--section-d);
color: white;
}

.card.md {
transition: none !important;
}
Expand Down
24 changes: 14 additions & 10 deletions master_controlPanel.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
--section-inputBorder-l: rgba(0, 0, 0, .25);
--surface-button-l: rgba(0, 0, 0, .15);

--section-d: rgba(0, 0, 0, 0.6);
--section-d: rgba(34, 34, 34, 0.6);
--section-input-d: rgba(255, 255, 255, 0.2);
--section-inputBorder-d: rgba(0, 0, 0, .2);
--surface-button-d: rgba(255, 255, 255, 0.15);
Expand Down Expand Up @@ -46,6 +46,7 @@
.timeDate.ccOpen {
height: 50px;
gap: 3px;
transform: none !important;
/* padding-right: 3px; */
}

Expand Down Expand Up @@ -260,7 +261,6 @@

background-color: rgba(255, 255, 255, .25);
user-select: none;
cursor: pointer;

transition: .15s;
}
Expand Down Expand Up @@ -331,7 +331,7 @@
color: inherit;
border-radius: 19px;
padding: 10px;
padding-top: 35px;
/* padding-top: 35px; */
margin: 0 10px;

opacity: 0;
Expand All @@ -357,10 +357,11 @@
.controlPanelOptGroup::before {
content: attr(data-sect);

position: absolute;
top: 10px;
left: 10px;
width: fit-content;
width: 100%;
padding: 5px 0;

text-align: center;

display: flex;
align-items: center;
Expand All @@ -379,8 +380,10 @@
}

.controlPanelOptGroup .ccSubHead {
padding-left: 7px;
margin-right: auto;
/* padding-left: 1px; */
/* margin-right: auto; */
width: 100%;
text-align: center;

font-weight: 500;
font-size: 14px;
Expand Down Expand Up @@ -474,7 +477,7 @@

color: inherit;
font-size: 12px;
border-radius: 15px;
border-radius: 50px;
background-color: var(--section-input-l);
padding: 3px;

Expand Down Expand Up @@ -573,12 +576,13 @@
}

.sectLabel {
width: fit-content;
width: 100%;

display: flex;
align-items: center;
justify-content: center;

text-align: center;
user-select: none;
font-weight: 500;
font-size: 14px;
Expand Down

0 comments on commit 2e4a4f2

Please sign in to comment.