Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
harrymkt committed Apr 4, 2024
1 parent 7b0a1a9 commit a8e0e0f
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 32 deletions.
12 changes: 8 additions & 4 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,33 @@ z-index: 1;
}
body
{
background-color: #fff; /* white */
color: Blue;
width: auto;
height: auto;
}
#mainc
{
background-color: Blue;
color: Blue;
width: auto;
height: auto;
}
footer
{
color: White;
background-color: White;
width: 250px;
height: 250px;
}
.beforefooter
{
color: Blue;
background-color: White;
width: auto;
height: auto;
}
#cometome
{
color: Gold;
}
#ownername
{
color: White;
}
7 changes: 0 additions & 7 deletions scripts/bootstrap.js

This file was deleted.

34 changes: 16 additions & 18 deletions scripts/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,58 +41,56 @@ var years = Math.floor(months / 12);

var output = '';

if (years > 0) {
if (years > 0)
{
output += years + ' year';
if (years > 1) output += 's';
output += ', ';
}

if (months > 0) {
if (months > 0)
{
output += (months % 12) + ' month';
if (months % 12 > 1) output += 's';
output += ', ';
}

if (days > 0) {
if (days > 0)
{
output += (days % 30) + ' day';
if (days % 30 > 1) output += 's';
output += ', ';
}

if (hours > 0) {
if (hours > 0)
{
output += (hours % 24) + ' hour';
if (hours % 24 > 1) output += 's';
output += ', ';
}

if (minutes > 0) {
if (minutes > 0)
{
output += (minutes % 60) + ' minute';
if (minutes % 60 > 1) output += 's';
output += ', ';
}

if (showsecond || (days == 0 && hours == 0 && minutes == 0)) {
if (showsecond || (days == 0 && hours == 0 && minutes == 0))
{
output += (seconds % 60) + ' second';
if (seconds % 60 > 1) output += 's';
output += ', ';
}

output = output.trim().replace(/,\s*$/, '');

if (output.includes(',')) {
if (output.includes(','))
{
var lastCommaPos = output.lastIndexOf(',');
output = output.slice(0, lastCommaPos) + ' and' + output.slice(lastCommaPos + 1);
}

output += ltext;

return output;
}
function createLinkListItem(href, text)
function createLinkListItem(href, text, target="_blank")
{
var listItem = document.createElement("li");
var link = document.createElement("a");
link.target = "_blank";
link.target = target;
link.href = href;
link.textContent = text;
listItem.appendChild(link);
Expand Down
7 changes: 4 additions & 3 deletions scripts/nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ var currentPath = current_url.replace(/\/$/, "");
var pagePath = page.url.replace(/\/$/, "");

// Check if the hosts and normalized paths match
if (currentPath === pagePath) {
if (currentPath === pagePath)
{
class_name = "active";
link_text = page.name + " (current page)";
onclick_attr = "event.preventDefault();";
Expand All @@ -101,7 +102,7 @@ var linkElement = document.createElement('a');
linkElement.href = page.url;
linkElement.className = class_name;
linkElement.onclick = function () { eval(onclick_attr); }; // Avoid using eval if possible
if (page.accesskey !== "" && page.accesskey !== "undefined") linkElement.accessKey = page.accesskey;
if (page.accesskey!==null && page.accesskey !== "" && page.accesskey !== "undefined") linkElement.accessKey = page.accesskey;
linkElement.textContent = link_text;

// Create a list item element (dt in this case)
Expand Down Expand Up @@ -140,7 +141,7 @@ var dy = dates.getDate();
var dt = "";
var currentage=y-birthyear;
if(m == 6 && dy == 26)
dt += "This is Harry Min Khant's " + currentage + " year"+(currentage===1?"":"s")+" Birthday. ";
dt += "This is <b id=\"ownername\"></b>'s " + currentage + " year"+(currentage===1?"":"s")+" Birthday. ";
if((m == 11 && dy == 31) || (m == 0 && dy == 1))
dt += "Happy new year! ";
else if(m == 1 && dy == 14)
Expand Down

0 comments on commit a8e0e0f

Please sign in to comment.