summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-04-15 19:45:36 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-04-15 19:45:36 -0700
commitdaa94f9a619716b4993eb7acab37c62feab91574 (patch)
tree895920306e49843d5332b110c8e29ab66a9152dd
parent1546d1ad242f65fcb9ad0ec3c2fcc4b237dc7ff0 (diff)
downloadtempo-daa94f9a619716b4993eb7acab37c62feab91574.tar.gz
tempo-daa94f9a619716b4993eb7acab37c62feab91574.tar.xz
simplify centring cssHEADmaster
-rw-r--r--manifest.json2
-rw-r--r--style.css41
-rw-r--r--tempo.html10
-rw-r--r--tempo.js4
4 files changed, 17 insertions, 40 deletions
diff --git a/manifest.json b/manifest.json
index b752d9a..3812577 100644
--- a/manifest.json
+++ b/manifest.json
@@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "Tempo",
- "version": "0.10",
+ "version": "0.11",
"description": "Replace new tab page with a clock.",
"icons": {
diff --git a/style.css b/style.css
index 2b4ac4c..0466928 100644
--- a/style.css
+++ b/style.css
@@ -2,47 +2,30 @@ body {
color: #ddd;
background-color: #222;
font-family: 'Lato', sans-serif;
- padding: 0em;
- margin: 0em;
-
user-select: none;
-}
-div#container {
- width: 50em;
- height: 12em;
- margin: auto;
- position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
+ height: 100vh;
+ margin: 0;
+ padding: 0;
- cursor: default;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
}
div#time {
- line-height: 8em;
-}
-
-div#time p {
font-size: 8em;
font-weight: 100;
- text-align: center;
- padding: 0em;
- margin: 0em;
+ line-height: 1em;
}
div#date {
- margin-top: 1em;
- line-height: 1.6em;
-}
-
-div#date p {
color: #777;
font-size: 1.6em;
font-weight: 300;
- text-align: center;
- padding: 0em;
- margin: 0em;
+ line-height: 1em;
+
+ margin-top: 1rem;
+ margin-bottom: 1.2rem;
}
diff --git a/tempo.html b/tempo.html
index d504dc3..0425653 100644
--- a/tempo.html
+++ b/tempo.html
@@ -9,13 +9,7 @@
<script src="tempo.js"></script>
</head>
<body>
- <div id="container">
- <div id="time">
- <p id="timeval">&nbsp;</p>
- </div>
- <div id="date">
- <p id="dateval">&nbsp;</p>
- </div>
- </div>
+ <div id="time">&nbsp;</div>
+ <div id="date">&nbsp;</div>
</body>
</html>
diff --git a/tempo.js b/tempo.js
index 4380603..12261b5 100644
--- a/tempo.js
+++ b/tempo.js
@@ -24,8 +24,8 @@ function updateTime() {
'\u00A0\u00A0' + padTime(s);
let str_d = dd + ' ' + months[dm] + ' ' + dy;
- document.getElementById('timeval').textContent = str_t;
- document.getElementById('dateval').textContent = str_d;
+ document.getElementById('time').textContent = str_t;
+ document.getElementById('date').textContent = str_d;
}
function startTempo() {