mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-17 17:19:30 -07:00
- Replace CSS zoom with CSS transform scaling for better mobile compatibility - Implement wrapper-based scaling approach that includes both content and navigation bar - Replace Almanac layout with CSS Grid for better cross-browser layout - Greatly improve scanline algorithm to handle a wide variety of displays - Add setting to override automatic scanlines to user-specified scale factor - Remove scanline scaling debug functions - Refactor settings module: initialize settings upfront and improve change handler declarations - Enhance scanline SCSS with repeating-linear-gradient for better performance - Add app icon for iOS/iPadOS - Add 'fullscreen' event listener - De-bounce 'resize' event listener - Add 'orientationchange' event listener - Implement three resize scaling algorithms: - Baseline (when no scaling is needed, like on the index page) - Mobile scaling (except Mobile Safari kiosk mode) - Mobile Safari kiosk mode (using manual offset calculations) - Standard fullscreen/kiosk mode (using CSS centering)
162 lines
2.4 KiB
SCSS
162 lines
2.4 KiB
SCSS
@use 'shared/_colors' as c;
|
|
@use 'shared/_utils' as u;
|
|
|
|
.weather-display {
|
|
width: 640px;
|
|
height: 480px;
|
|
overflow: hidden;
|
|
position: relative;
|
|
background-image: url(../images/backgrounds/1.png);
|
|
|
|
/* this method is required to hide blocks so they can be measured while off screen */
|
|
height: 0px;
|
|
|
|
&.show {
|
|
height: 480px;
|
|
}
|
|
|
|
.template {
|
|
display: none;
|
|
}
|
|
|
|
.header {
|
|
width: 640px;
|
|
height: 60px;
|
|
padding-top: 30px;
|
|
|
|
.title {
|
|
color: c.$title-color;
|
|
@include u.text-shadow(3px, 1.5px);
|
|
font-family: 'Star4000';
|
|
font-size: 24pt;
|
|
position: absolute;
|
|
width: 250px;
|
|
|
|
&.single {
|
|
left: 170px;
|
|
top: 25px;
|
|
}
|
|
|
|
&.dual {
|
|
left: 170px;
|
|
|
|
&>div {
|
|
position: absolute;
|
|
}
|
|
|
|
.top {
|
|
top: -3px;
|
|
}
|
|
|
|
.bottom {
|
|
top: 26px;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
.logo {
|
|
top: 30px;
|
|
left: 50px;
|
|
position: absolute;
|
|
z-index: 10;
|
|
}
|
|
|
|
.noaa-logo {
|
|
position: absolute;
|
|
top: 39px;
|
|
left: 356px;
|
|
}
|
|
|
|
.title.single {
|
|
top: 40px;
|
|
}
|
|
|
|
.date-time {
|
|
white-space: pre;
|
|
color: c.$date-time;
|
|
font-family: 'Star4000 Small';
|
|
font-size: 24pt;
|
|
@include u.text-shadow(3px, 1.5px);
|
|
left: 415px;
|
|
width: 170px;
|
|
text-align: right;
|
|
position: absolute;
|
|
|
|
&.date {
|
|
padding-top: 22px;
|
|
}
|
|
}
|
|
}
|
|
|
|
.main {
|
|
position: relative;
|
|
|
|
&.has-scroll {
|
|
width: 640px;
|
|
margin-top: 0;
|
|
height: 310px;
|
|
overflow: hidden;
|
|
|
|
&.no-header {
|
|
height: 400px;
|
|
margin-top: 0; // Reset for no-header case since the gap issue is header-related
|
|
}
|
|
}
|
|
|
|
&.has-box {
|
|
margin-left: 64px;
|
|
margin-right: 64px;
|
|
width: calc(100% - 128px);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
.scroll {
|
|
@include u.text-shadow(3px, 1.5px);
|
|
width: 640px;
|
|
height: 70px;
|
|
overflow: hidden;
|
|
margin-top: 3px;
|
|
|
|
&.hazard {
|
|
background-color: rgb(112, 35, 35);
|
|
}
|
|
|
|
.fixed,
|
|
.scroll-header {
|
|
margin-left: 55px;
|
|
margin-right: 55px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
// Remove margins for hazard scrolls to maximize text space
|
|
&.hazard .fixed {
|
|
margin-left: 0;
|
|
margin-right: 0;
|
|
}
|
|
|
|
.scroll-header {
|
|
height: 26px;
|
|
font-family: "Star4000 Small";
|
|
font-size: 20pt;
|
|
margin-top: -10px;
|
|
}
|
|
|
|
.fixed {
|
|
font-family: 'Star4000';
|
|
font-size: 24pt;
|
|
|
|
.scroll-area {
|
|
text-wrap: nowrap;
|
|
position: relative;
|
|
// the following added by js code as it is dependent on the content of the element
|
|
// transition: left (x)s;
|
|
// left: calc((elem width) - 640px);
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|