-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ArielT
committed
Feb 6, 2024
1 parent
4339e21
commit 5cc3e74
Showing
6 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,6 @@ | |
|
||
## Background Color Generator | ||
- simple background gradient generator | ||
|
||
## Simple Clock | ||
- simple javascript clock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<link rel="stylesheet" href="styles.css"> | ||
<title>Digital Clock</title> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="clock" id="clock">12:00:00</div> | ||
</div> | ||
<script src="script.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
function updateClock() { | ||
const now = new Date(); | ||
const hours = now.getHours().toString().padStart(2, '0'); | ||
const minutes = now.getMinutes().toString().padStart(2, '0'); | ||
const seconds = now.getSeconds().toString().padStart(2, '0'); | ||
const timeString = `${hours}:${minutes}:${seconds}`; | ||
|
||
document.getElementById('clock').innerText = timeString; | ||
} | ||
|
||
setInterval(updateClock, 1000); // Update the clock every second |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro&display=swap'); | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
height: 100vh; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
background-image: url('georgiyev-unsplash.jpg'); | ||
background-size: cover; | ||
background-position: center; | ||
} | ||
|
||
.container { | ||
text-align: center; | ||
} | ||
|
||
.clock { | ||
font-family: 'Source Code Pro', monospace; | ||
font-size: 2em; | ||
color: #fff; | ||
background: rgba(8, 8, 8, 0.5); | ||
padding: 10px; | ||
border-radius: 10px; | ||
display: inline-block; | ||
} |