Skip to content

Commit

Permalink
version 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
ruizxzx committed May 19, 2024
1 parent 66ccdf6 commit 744d556
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h1>Daily Watching Time Calculator</h1>
<input type="number" id="daysToComplete" placeholder="Enter days to complete">

<label for="completionDate">Completion Date:</label>
<input type="date" id="completionDate">
<input type="date" id="completionDate" placeholder="dd-mm-yyyy">
</div>

<label for="speed">Speed you are watching:</label>
Expand All @@ -26,6 +26,10 @@ <h1>Daily Watching Time Calculator</h1>
<button onclick="calculateTime()">Calculate</button>

<div id="result"></div>
<!-- Promotion section initialized with default content -->
<div id="promotion">
<p>Are you looking for Lecture Duration Calculator (+/-)? Check out <a href='https://ruizxzx.github.io/TimeCalculator/' target='_blank'>Lecture Duration Calculator</a>.</p>
</div>
</div>
<script src="script.js"></script>
</body>
Expand Down
5 changes: 5 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,10 @@ function calculateTime() {

// Scroll to the top of the page
window.scrollTo({ top: 0, behavior: 'smooth' });

// Promotion
document.getElementById("promotion").innerHTML = "<p>Are you looking for Lecture Duration Calculator (+/-)? Check out <a href='https://ruizxzx.github.io/TimeCalculator/' target='_blank'>Lecture Duration Calculator</a>.</p>";

}

}
9 changes: 9 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,13 @@ th, td {

th {
background-color: #f2f2f2;
.container {
width: 80%;
margin: 0 auto;
}

#promotion {
margin-top: 20px;
}

}

0 comments on commit 744d556

Please sign in to comment.