-
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
1 parent
0684eac
commit 0a142da
Showing
7 changed files
with
407 additions
and
39 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
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,41 @@ | ||
import { Controller } from "@hotwired/stimulus"; | ||
|
||
// Connects to data-controller="clock" | ||
export default class extends Controller { | ||
static targets = ["central", "sydney", "islamabad"]; | ||
|
||
connect() { | ||
this.updateTimes(); | ||
this.timer = setInterval(() => this.updateTimes(), 1000); | ||
} | ||
|
||
disconnect() { | ||
clearInterval(this.timer); | ||
} | ||
|
||
updateTimes() { | ||
// Define time zones | ||
const centralTimeOptions = { timeZone: "America/Chicago", hour12: true }; | ||
const sydneyTimeOptions = { timeZone: "Australia/Sydney", hour12: true }; | ||
const islamabadTimeOptions = { timeZone: "Asia/Karachi", hour12: true }; | ||
|
||
// Get current times | ||
const centralTime = new Date().toLocaleTimeString( | ||
"en-US", | ||
centralTimeOptions | ||
); | ||
const sydneyTime = new Date().toLocaleTimeString( | ||
"en-US", | ||
sydneyTimeOptions | ||
); | ||
const islamabadTime = new Date().toLocaleTimeString( | ||
"en-US", | ||
islamabadTimeOptions | ||
); | ||
|
||
// Update the HTML elements with the current times | ||
this.centralTarget.innerText = `${centralTime}`; | ||
this.sydneyTarget.innerText = `${sydneyTime}`; | ||
this.islamabadTarget.innerText = `${islamabadTime}`; | ||
} | ||
} |
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,116 @@ | ||
<!-- Footer --> | ||
<footer class="text-center text-lg-start bg-body-tertiary text-muted"> | ||
<!-- Section: Social media --> | ||
<section class="d-flex justify-content-center justify-content-lg-between p-4 border-bottom"> | ||
<!-- Left --> | ||
<div class="me-5 d-none d-lg-block"> | ||
<span>Get connected with us on social networks:</span> | ||
</div> | ||
<!-- Left --> | ||
<!-- Right --> | ||
<div> | ||
<a href="" class="me-4 text-reset"> | ||
<i class="fab fa-facebook-f"></i> | ||
</a> | ||
<a href="" class="me-4 text-reset"> | ||
<i class="fab fa-twitter"></i> | ||
</a> | ||
<a href="" class="me-4 text-reset"> | ||
<i class="fab fa-google"></i> | ||
</a> | ||
<a href="" class="me-4 text-reset"> | ||
<i class="fab fa-instagram"></i> | ||
</a> | ||
<a href="" class="me-4 text-reset"> | ||
<i class="fab fa-linkedin"></i> | ||
</a> | ||
<a href="" class="me-4 text-reset"> | ||
<i class="fab fa-github"></i> | ||
</a> | ||
</div> | ||
<!-- Right --> | ||
</section> | ||
<!-- Section: Social media --> | ||
<!-- Section: Links --> | ||
<section class="d-none d-lg-block"> | ||
<div class="container text-center text-md-start mt-5"> | ||
<!-- Grid row --> | ||
<div class="row mt-3"> | ||
<!-- Grid column --> | ||
<div class="col-md-3 col-lg-4 col-xl-3 mx-auto mb-4"> | ||
<!-- Content --> | ||
<h6 class="text-uppercase fw-bold mb-4"> | ||
<i class="fas fa-gem me-3"></i>Company name | ||
</h6> | ||
<p> | ||
Here you can use rows and columns to organize your footer content. Lorem ipsum | ||
dolor sit amet, consectetur adipisicing elit. | ||
</p> | ||
</div> | ||
<!-- Grid column --> | ||
<!-- Grid column --> | ||
<div class="col-md-2 col-lg-2 col-xl-2 mx-auto mb-4"> | ||
<!-- Links --> | ||
<h6 class="text-uppercase fw-bold mb-4"> | ||
Products | ||
</h6> | ||
<p> | ||
<a href="#!" class="text-reset">Angular</a> | ||
</p> | ||
<p> | ||
<a href="#!" class="text-reset">React</a> | ||
</p> | ||
<p> | ||
<a href="#!" class="text-reset">Vue</a> | ||
</p> | ||
<p> | ||
<a href="#!" class="text-reset">Laravel</a> | ||
</p> | ||
</div> | ||
<!-- Grid column --> | ||
<!-- Grid column --> | ||
<div class="col-md-3 col-lg-2 col-xl-2 mx-auto mb-4"> | ||
<!-- Links --> | ||
<h6 class="text-uppercase fw-bold mb-4"> | ||
Useful links | ||
</h6> | ||
<p> | ||
<a href="#!" class="text-reset">Pricing</a> | ||
</p> | ||
<p> | ||
<a href="#!" class="text-reset">Settings</a> | ||
</p> | ||
<p> | ||
<a href="#!" class="text-reset">Orders</a> | ||
</p> | ||
<p> | ||
<a href="#!" class="text-reset">Help</a> | ||
</p> | ||
</div> | ||
<!-- Grid column --> | ||
<!-- Grid column --> | ||
<div class="col-md-4 col-lg-3 col-xl-3 mx-auto mb-md-0 mb-4"> | ||
<!-- Links --> | ||
<h6 class="text-uppercase fw-bold mb-4">Contact</h6> | ||
<p><i class="fas fa-home me-3"></i> New York, NY 10012, US</p> | ||
<p> | ||
<i class="fas fa-envelope me-3"></i> | ||
[email protected] | ||
</p> | ||
<p><i class="fas fa-phone me-3"></i> + 01 234 567 88</p> | ||
<p><i class="fas fa-print me-3"></i> + 01 234 567 89</p> | ||
</div> | ||
<!-- Grid column --> | ||
</div> | ||
<!-- Grid row --> | ||
</div> | ||
</section> | ||
<!-- Section: Links --> | ||
<!-- Copyright --> | ||
<div class="text-center p-4" style="background-color: rgba(0, 0, 0, 0.05);"> | ||
© 2021 Copyright: | ||
<a class="text-reset fw-bold" href="https://mdbootstrap.com/">MDBootstrap.com</a> | ||
</div> | ||
<!-- Copyright --> | ||
</footer> | ||
<!-- Footer --> |
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
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
Oops, something went wrong.