Skip to content

Commit

Permalink
Contact page rebuilt
Browse files Browse the repository at this point in the history
  • Loading branch information
harrymkt committed Aug 5, 2024
1 parent b27b8e3 commit af62bc9
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 11 deletions.
18 changes: 8 additions & 10 deletions contact/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,14 @@
</head>
<body>
<script>navstart();</script>
<h1 id="mainc">Contact me</h1>
<p>This is a list of available contact informations If you need to contact me.</p>
<table>
<tr><th>type</th><th>value</th></tr>
<tr><td>Telegram</td><td><a href="https://t.me/harrymkt">harrymkt</a></td></tr>
<tr><td>Phone</td><td>+959760485634</td></tr>
<tr><td>Email</td><td><a href="mailto:harrymk64@gmail.com">harrymk64@gmail.com</a></td></tr>
</table>

</p>
<h1 id="mainc">Contact</h1>
<p>You can contact me with the following:</p>
<h2>Telegram</h2>
<p>This is the recommended option if you have it. Send me message at <a href="https://t.me/harrymkt">harrymkt</a>.</p>
<h2>Facebook Messenger</h2>
<p>Although not much reliable as Telegram, you can still contact me on Messenger. Send me at <a href="https://facebook.com/harry.mk.64">harry.mk.64</a>.</p>
<h2>Email</h2>
<p>Although email is unreliable, you can contact me at <a href="mailto:harrymk64@gmail.com">harrymk64@gmail.com</a>.</p>

<script>addfooter();</script>
</body>
Expand Down
32 changes: 31 additions & 1 deletion scripts/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function createLinkListItem(href, text, target="_blank")
{
var listItem = document.createElement("li");
var link = document.createElement("a");
link.target = target;
if(target!=="") link.target = target;
link.href = href;
link.textContent = text;
listItem.appendChild(link);
Expand Down Expand Up @@ -122,4 +122,34 @@ function get_storage(value, otherwise="undefined")
var n=localStorage.getItem(value);
if(n==="" || n==="undefined" || n===null) n=otherwise;
return n;
}
function round(num, decimals)
{
const factor = Math.pow(10, decimals);
return Math.round(num * factor) / factor;
}
function convert_size(size, round_to = 2)
{
if (size < 1) return "0 B";
if (size < 1024)
{
return round(size, round_to) + " B";
}
size = size / 1024;
if (size < 1024)
{
return round(size, round_to) + " KB";
}
size = size / 1024;
if (size < 1024)
{
return round(size, round_to) + " MB";
}
size = size / 1024;
if (size < 1024)
{
return round(size, round_to) + " GB";
}
size = size / 1024;
return round(size, round_to) + " TB";
}

0 comments on commit af62bc9

Please sign in to comment.