mirror of
https://github.com/Death916/deathclock.git
synced 2026-04-10 03:04:40 -07:00
trying to fit on pi screen
This commit is contained in:
parent
059e296c92
commit
92ed012c4d
2 changed files with 36 additions and 18 deletions
|
|
@ -6,7 +6,7 @@ body {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
min-width: 360px; /* Minimum width to prevent extreme squishing */
|
min-width: 360px;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
|
|
@ -25,18 +25,20 @@ h2 {
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
justify-content: center; /* Center items on small screens */
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#nba-container,
|
#nba-container,
|
||||||
#mlb-container{
|
#mlb-container {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-width: 300px; /* Minimum width for the containers */
|
min-width: 300px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Individual Score Containers */
|
/* Individual Score Containers */
|
||||||
.score-container {
|
.score-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 5px;
|
padding: 0; /* Remove padding from score container */
|
||||||
|
margin: 0; /* remove margin from score container */
|
||||||
}
|
}
|
||||||
|
|
||||||
#mlb-scores-display {
|
#mlb-scores-display {
|
||||||
|
|
@ -45,22 +47,27 @@ h2 {
|
||||||
|
|
||||||
.score-box {
|
.score-box {
|
||||||
background-color: #232338;
|
background-color: #232338;
|
||||||
padding: 5px;
|
padding: 2px 5px; /* Reduced padding on score boxes */
|
||||||
margin-bottom: 5px;
|
margin-bottom: 2px; /* Reduced margin on score boxes */
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
border: 1px solid #4a4a82;
|
border: 1px solid #4a4a82;
|
||||||
|
display: flex; /* Use flexbox for inner alignment */
|
||||||
|
flex-direction: column; /* Stack the game-score and game-period vertically */
|
||||||
|
justify-content: center; /* Center vertically */
|
||||||
}
|
}
|
||||||
|
|
||||||
.game-score {
|
.game-score {
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
color: #e6e6fa;
|
color: #e6e6fa;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
margin: 2px 0; /* Add a small top/bottom margin */
|
||||||
}
|
}
|
||||||
|
|
||||||
.game-period {
|
.game-period {
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
color: #b39ddb;
|
color: #b39ddb;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
margin: 2px 0; /* Add a small top/bottom margin */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Weather Styles */
|
/* Weather Styles */
|
||||||
|
|
@ -73,7 +80,7 @@ h2 {
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
|
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
|
||||||
border: 1px solid #4a4a82;
|
border: 1px solid #4a4a82;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
flex: 1; /* Each section takes equal width */
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#weather-display:hover {
|
#weather-display:hover {
|
||||||
|
|
@ -117,7 +124,7 @@ h2 {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Media Queries */
|
/* Media Queries */
|
||||||
@media (min-width: 1000px) {
|
@media (min-width: 750px) {
|
||||||
/* Landscape layout */
|
/* Landscape layout */
|
||||||
body {
|
body {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
|
|
@ -127,8 +134,8 @@ h2 {
|
||||||
}
|
}
|
||||||
|
|
||||||
#main-content-container {
|
#main-content-container {
|
||||||
flex-wrap: nowrap; /* No wrapping on landscape */
|
flex-wrap: nowrap;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
}
|
}
|
||||||
|
|
||||||
#mlb-scores-display {
|
#mlb-scores-display {
|
||||||
|
|
@ -136,19 +143,19 @@ h2 {
|
||||||
}
|
}
|
||||||
|
|
||||||
.score-container {
|
.score-container {
|
||||||
padding: 10px;
|
padding: 0; /* Remove padding from score container */
|
||||||
|
margin: 0; /* remove margin from score container */
|
||||||
}
|
}
|
||||||
|
|
||||||
.score-box {
|
.score-box {
|
||||||
padding: 8px;
|
padding: 2px 5px; /* Reduced padding on score boxes */
|
||||||
margin-bottom: 8px;
|
margin-bottom: 2px; /* Reduced margin on score boxes */
|
||||||
}
|
}
|
||||||
|
|
||||||
#weather-display {
|
#weather-display {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
margin: 0; /* Remove vertical margin on landscape */
|
margin: 0;
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ticker {
|
.ticker {
|
||||||
|
|
@ -183,17 +190,28 @@ h2 {
|
||||||
#main-content-container {
|
#main-content-container {
|
||||||
gap: 1px;
|
gap: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#nba-container,
|
#nba-container,
|
||||||
#mlb-container{
|
#mlb-container {
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
.score-container {
|
||||||
|
padding: 0; /* Remove padding from score container */
|
||||||
|
margin: 0; /* remove margin from score container */
|
||||||
|
}
|
||||||
|
.score-box {
|
||||||
|
padding: 2px 5px; /* Reduced padding on score boxes */
|
||||||
|
margin-bottom: 2px; /* Reduced margin on score boxes */
|
||||||
|
}
|
||||||
|
|
||||||
.game-score {
|
.game-score {
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
|
margin: 2px 0; /* Add a small top/bottom margin */
|
||||||
}
|
}
|
||||||
|
|
||||||
.game-period {
|
.game-period {
|
||||||
font-size: 0.7em;
|
font-size: 0.7em;
|
||||||
|
margin: 2px 0; /* Add a small top/bottom margin */
|
||||||
}
|
}
|
||||||
|
|
||||||
.ticker {
|
.ticker {
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ class Weather:
|
||||||
curl_command = [
|
curl_command = [
|
||||||
"curl",
|
"curl",
|
||||||
"-s", # Silent mode
|
"-s", # Silent mode
|
||||||
"v2.wttr.in/Sacramento.png?0pq&scale=2", # Fetch weather data for Sacramento
|
"v2.wttr.in/Sacramento.png?0pq&scale=.5", # Fetch weather data for Sacramento
|
||||||
"-o",
|
"-o",
|
||||||
screenshot_path,
|
screenshot_path,
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue