mirror of
https://github.com/Death916/deathclock.git
synced 2026-04-10 03:04:40 -07:00
deleted that doing manually
This commit is contained in:
parent
92ed012c4d
commit
aba3a7b641
5 changed files with 90 additions and 170 deletions
BIN
assets/favicon.ico
Normal file
BIN
assets/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
85
assets/styles.css
Normal file
85
assets/styles.css
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
/* assets/styles.css */
|
||||
|
||||
/* Basic ticker styling */
|
||||
.ticker-wrap {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
background-color: #f0f0f0; /* Light background for visibility */
|
||||
padding: 10px 0;
|
||||
margin-top: 20px;
|
||||
border-top: 1px solid #ccc;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.ticker-move {
|
||||
/* Animation properties will be set dynamically via style prop */
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
padding-right: 100%; /* Ensures the loop effect */
|
||||
animation-name: ticker;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
}
|
||||
|
||||
/* The animation */
|
||||
@keyframes ticker {
|
||||
0% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
100% {
|
||||
/* Translate left by the width of the text */
|
||||
/* The actual value is set dynamically if possible, otherwise estimate */
|
||||
transform: translateX(-100%); /* Simplified fallback */
|
||||
}
|
||||
}
|
||||
|
||||
/* Style for individual news items if needed */
|
||||
.news-item {
|
||||
margin: 0 15px; /* Spacing between items */
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
/* Styling for score boxes */
|
||||
.score-container {
|
||||
display: flex;
|
||||
flex-direction: column; /* Stack games vertically */
|
||||
gap: 8px; /* Space between score boxes */
|
||||
align-items: center; /* Center boxes if container is wider */
|
||||
}
|
||||
|
||||
.score-box {
|
||||
border: 1px solid #ddd;
|
||||
padding: 8px 12px;
|
||||
border-radius: 4px;
|
||||
background-color: #f9f9f9;
|
||||
min-width: 200px; /* Ensure minimum width */
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.game-score {
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
display: block; /* Put score on its own line */
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.game-period, .game-status {
|
||||
font-size: 0.9em;
|
||||
color: #555;
|
||||
display: block; /* Put status on its own line */
|
||||
}
|
||||
|
||||
/* Make MLB scores display in columns if desired */
|
||||
.mlb-score-container {
|
||||
display: block; /* Override flex */
|
||||
column-count: 2;
|
||||
column-gap: 15px;
|
||||
padding: 0 10px; /* Add some padding */
|
||||
}
|
||||
/* Ensure MLB boxes break correctly */
|
||||
.mlb-score-container .score-box {
|
||||
display: inline-block; /* Necessary for column break */
|
||||
width: 95%; /* Adjust width as needed */
|
||||
margin-bottom: 10px; /* Space below items in columns */
|
||||
break-inside: avoid-column; /* Try to prevent breaking inside a box */
|
||||
}
|
||||
0
deathclock/deathclock.py
Normal file
0
deathclock/deathclock.py
Normal file
170
main.qml
170
main.qml
|
|
@ -1,170 +0,0 @@
|
|||
// main.qml
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
ApplicationWindow {
|
||||
visible: true
|
||||
width: 800
|
||||
height: 480
|
||||
title: "Clockz"
|
||||
property string currTime: "00:00:00"
|
||||
property string onTouchPressed: "Left area not pressed"
|
||||
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
source: "/home/death916/code/python/pyside/images/background.png"
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
}
|
||||
|
||||
// Left touch area
|
||||
MouseArea {
|
||||
id : scoreArea
|
||||
anchors.left: parent.left
|
||||
width: 70
|
||||
height: parent.height // Full height
|
||||
|
||||
// Header text inside the MouseArea
|
||||
Text {
|
||||
anchors.top: parent.top
|
||||
width: parent.width
|
||||
height: 30
|
||||
text: "Scores"
|
||||
font.pixelSize: 20
|
||||
color: "white"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
console.log("Left area pressed!")
|
||||
onTouchPressed = "Left area pressed"
|
||||
}
|
||||
}
|
||||
|
||||
// Colored rectangle to indicate the active area
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
width: 70
|
||||
height: parent.height - newsArea.height // Full height
|
||||
color: Qt.rgba(0, 0, 1, 0.3) // Slightly opaque blue
|
||||
}
|
||||
|
||||
// Display the message on the screen
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: onTouchPressed
|
||||
font.pixelSize: 20
|
||||
color: "white"
|
||||
}
|
||||
|
||||
// Weather box
|
||||
Rectangle {
|
||||
width: parent.width * 1 / 3 // 1/3 of the parent width
|
||||
height: parent.height * 1 / 3 // 1/3 of the parent height
|
||||
color: Qt.rgba(0, 0, 1, 0.5) // Semi-transparent blue
|
||||
anchors.centerIn: parent
|
||||
|
||||
// Text "Weather" at the top
|
||||
Text {
|
||||
anchors.top: parent.top
|
||||
width: parent.width * 1 / 3
|
||||
height: 30
|
||||
text: "Weather"
|
||||
font.pixelSize: 20
|
||||
color: "white"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
|
||||
|
||||
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
source: weatherMapPath
|
||||
//fillMode: Image.fill // Fill the entire area // Uncomment this line to fill the entire area
|
||||
}
|
||||
|
||||
// Additional weather content can be added here
|
||||
}
|
||||
|
||||
// Clock container
|
||||
Rectangle {
|
||||
x: 300
|
||||
y: 1
|
||||
width: time.implicitWidth + 20 // Adjusted width based on the text size
|
||||
height: time.implicitHeight + 20 // Adjusted height based on the text size
|
||||
border.color: "gray"
|
||||
color: "transparent"
|
||||
|
||||
Text {
|
||||
id: time
|
||||
text: currTime
|
||||
font.pixelSize: 20
|
||||
color: "black"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
}
|
||||
|
||||
//bottom news scroll area
|
||||
Rectangle {
|
||||
id: newsArea
|
||||
width: parent.width
|
||||
height: parent.height * 1 / 6
|
||||
color: Qt.rgba(0, 0, 1, 0.5) // Semi-transparent blue
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
|
||||
// Text "News" at the top
|
||||
Text {
|
||||
id: newsHeader
|
||||
anchors.top: parent.top
|
||||
width: parent.width
|
||||
height: 30
|
||||
text: "News"
|
||||
font.pixelSize: 20
|
||||
color: "white"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
|
||||
id: newsText
|
||||
text: news
|
||||
font.pixelSize: 15
|
||||
color: "white"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
x: parent.width
|
||||
anchors.top: newsHeader.bottom
|
||||
|
||||
SequentialAnimation on x {
|
||||
loops: Animation.Infinite
|
||||
running: true
|
||||
|
||||
PropertyAnimation {
|
||||
from: parent.width
|
||||
to: -newsText.width
|
||||
duration: 2000000 // 10 seconds (in milliseconds)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: newsTimer
|
||||
interval: 300005// 10 minutes
|
||||
running: true
|
||||
repeat: true
|
||||
onTriggered: {
|
||||
newsText.text = news // Update the news text
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ... Additional UI elements as needed ...
|
||||
}
|
||||
}
|
||||
5
rxconfig.py
Normal file
5
rxconfig.py
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import reflex as rx
|
||||
|
||||
config = rx.Config(
|
||||
app_name="deathclock",
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue