add currency converter
This commit is contained in:
86
src/services/dms-deg/index.html
Normal file
86
src/services/dms-deg/index.html
Normal file
@@ -0,0 +1,86 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>DMS - Decimal Degree Converter</title>
|
||||
<link rel="stylesheet" href="/css/mainstyle.css">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
|
||||
<style>
|
||||
.converter-input {
|
||||
width: 4rem;
|
||||
padding: 7.5px;
|
||||
border-radius: 10px;
|
||||
border: none;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.material-symbols-outlined {
|
||||
font-variation-settings:
|
||||
'FILL' 0,
|
||||
'wght' 400,
|
||||
'GRAD' 0,
|
||||
'opsz' 24
|
||||
}
|
||||
|
||||
#out {
|
||||
width: 30%;
|
||||
padding: 7.5px;
|
||||
font-size: 0.75rem;
|
||||
border-radius: 10px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.copy-icon {
|
||||
margin-left: 10px;
|
||||
cursor: pointer;
|
||||
background-color: white;
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content-wrapper">
|
||||
<div class="content">
|
||||
<h1>Degrees Minutes Seconds - Decimal Degree Converter</h1>
|
||||
<button onclick="clearApp()" class="button" style="margin-bottom: 5px;">Clear</button>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
Latitude
|
||||
</td>
|
||||
<td>
|
||||
<input type="number" step="0.1" id="deg-lat" class="converter-input">°
|
||||
<input type="number" step="0.1" id="min-lat" class="converter-input">'
|
||||
<input type="number" step="0.1" id="sec-lat" class="converter-input">''
|
||||
<select id="lat" class="converter-input">
|
||||
<option value="N">N</option>
|
||||
<option value="S">S</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<td>
|
||||
Longitude
|
||||
</td>
|
||||
<td>
|
||||
<input type="number" step="0.1" id="deg-long" class="converter-input">°
|
||||
<input type="number" step="0.1" id="min-long" class="converter-input">'
|
||||
<input type="number" step="0.1" id="sec-long" class="converter-input">''
|
||||
<select id="long" class="converter-input">
|
||||
<option value="W">W</option>
|
||||
<option value="E">E</option>
|
||||
</select>
|
||||
</td>
|
||||
</table>
|
||||
<button onclick="convertDMSDecimal()" class="button">Convert!</button>
|
||||
<h3>Output</h3>
|
||||
<div style="width: 100%; display: flex; justify-content: center; align-items: center;">
|
||||
<input type="text" id="out"></input>
|
||||
<span class="material-symbols-outlined copy-icon" onclick="copy()" title="copy output to clipboard">content_copy</span>
|
||||
</div>
|
||||
<script src="index.js"></script>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
47
src/services/dms-deg/index.js
Normal file
47
src/services/dms-deg/index.js
Normal file
@@ -0,0 +1,47 @@
|
||||
const degLat = document.getElementById( 'deg-lat' );
|
||||
const minLat = document.getElementById( 'min-lat' );
|
||||
const secLat = document.getElementById( 'sec-lat' );
|
||||
const latitude = document.getElementById( 'lat' );
|
||||
const degLong = document.getElementById( 'deg-long' );
|
||||
const minLong = document.getElementById( 'min-long' );
|
||||
const secLong = document.getElementById( 'sec-long' );
|
||||
const longitude = document.getElementById( 'long' );
|
||||
|
||||
const output = document.getElementById( 'out' );
|
||||
|
||||
|
||||
var convertDMSDecimal = () => {
|
||||
let long = 0;
|
||||
let lat = 0;
|
||||
if ( !isNaN( degLat.value ) && !isNaN( minLat.value ) && !isNaN( secLat.value ) && !isNaN( degLong.value ) && !isNaN( minLong.value ) && !isNaN( secLong.value ) ) {
|
||||
try {
|
||||
// calculate latitude
|
||||
lat = Math.round( ( parseInt( degLat.value ) + parseInt( minLat.value ) / 60 + parseFloat( secLat.value ) / 6000 ) * 100000 ) / 100000;
|
||||
|
||||
// calculate longitude
|
||||
long = Math.round( ( parseInt( degLong.value ) + parseInt( minLong.value ) / 60 + parseFloat( secLong.value ) / 6000 ) * 100000 ) / 100000;
|
||||
} catch ( err ) {
|
||||
console.error( err );
|
||||
alert( 'An error occurred whilst calculating. Please ensure that degrees & minutes are entered as whole numbers' );
|
||||
}
|
||||
output.value = String( lat ) + latitude.value + ' ' + String( long ) + longitude.value;
|
||||
} else {
|
||||
alert( 'Invalid input. Please ensure that all input fields only contain numbers!' );
|
||||
}
|
||||
}
|
||||
|
||||
var copy = () => {
|
||||
navigator.clipboard.writeText( output.value );
|
||||
}
|
||||
|
||||
|
||||
var clearApp = () => {
|
||||
degLat.value = '';
|
||||
minLat.value = '';
|
||||
secLat.value = '';
|
||||
degLong.value = '';
|
||||
minLong.value = '';
|
||||
secLong.value = '';
|
||||
latitude.value = 'N';
|
||||
longitude.value = 'W';
|
||||
}
|
||||
143
src/sitemap.xml
143
src/sitemap.xml
@@ -11,22 +11,7 @@
|
||||
<lastmod>2024-05-20</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/legal/privacy</loc>
|
||||
<priority>0.67</priority>
|
||||
<lastmod>2024-05-20</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/about</loc>
|
||||
<priority>0.67</priority>
|
||||
<lastmod>2024-05-20</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/presentations</loc>
|
||||
<priority>0.67</priority>
|
||||
<lastmod>2024-05-20</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/projects</loc>
|
||||
<loc>https://www.janishutz.com/support</loc>
|
||||
<priority>0.67</priority>
|
||||
<lastmod>2024-05-20</lastmod>
|
||||
</url>
|
||||
@@ -36,17 +21,42 @@
|
||||
<lastmod>2024-05-20</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/support</loc>
|
||||
<loc>https://www.janishutz.com/projects</loc>
|
||||
<priority>0.67</priority>
|
||||
<lastmod>2024-05-20</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/legal/licenses</loc>
|
||||
<priority>0.50</priority>
|
||||
<loc>https://www.janishutz.com/presentations</loc>
|
||||
<priority>0.67</priority>
|
||||
<lastmod>2024-05-20</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/projects/arch-dev-vm</loc>
|
||||
<loc>https://www.janishutz.com/about</loc>
|
||||
<priority>0.67</priority>
|
||||
<lastmod>2024-05-20</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/legal/privacy</loc>
|
||||
<priority>0.67</priority>
|
||||
<lastmod>2024-05-20</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/services/dms-deg</loc>
|
||||
<priority>0.50</priority>
|
||||
<lastmod>2024-06-14</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/projects/store</loc>
|
||||
<priority>0.50</priority>
|
||||
<lastmod>2024-06-05</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/legal/returns</loc>
|
||||
<priority>0.50</priority>
|
||||
<lastmod>2024-06-04</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/legal/tos</loc>
|
||||
<priority>0.50</priority>
|
||||
<lastmod>2024-05-20</lastmod>
|
||||
</url>
|
||||
@@ -56,62 +66,22 @@
|
||||
<lastmod>2024-05-20</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/legal/tos</loc>
|
||||
<loc>https://www.janishutz.com/projects/arch-dev-vm</loc>
|
||||
<priority>0.50</priority>
|
||||
<lastmod>2024-05-20</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/legal/returns</loc>
|
||||
<loc>https://www.janishutz.com/legal/licenses</loc>
|
||||
<priority>0.50</priority>
|
||||
<lastmod>2024-06-04</lastmod>
|
||||
<lastmod>2024-05-20</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/projects/store</loc>
|
||||
<priority>0.50</priority>
|
||||
<lastmod>2024-06-05</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/about/aboutme</loc>
|
||||
<loc>https://www.janishutz.com/support/js-disabled</loc>
|
||||
<priority>0.33</priority>
|
||||
<lastmod>2024-05-20</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/presentations/auth</loc>
|
||||
<priority>0.33</priority>
|
||||
<lastmod>2024-05-20</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/projects/impress</loc>
|
||||
<priority>0.33</priority>
|
||||
<lastmod>2024-04-30</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/projects/languageschoolhossegor-booking</loc>
|
||||
<priority>0.33</priority>
|
||||
<lastmod>2024-04-30</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/projects/libreevent</loc>
|
||||
<priority>0.33</priority>
|
||||
<lastmod>2024-05-20</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/projects/musicplayer</loc>
|
||||
<priority>0.33</priority>
|
||||
<lastmod>2024-05-20</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/projects/qrscanner</loc>
|
||||
<priority>0.33</priority>
|
||||
<lastmod>2024-04-30</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/projects/schoolprojects</loc>
|
||||
<priority>0.33</priority>
|
||||
<lastmod>2024-04-30</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/projects/smuL</loc>
|
||||
<loc>https://www.janishutz.com/support/contact</loc>
|
||||
<priority>0.33</priority>
|
||||
<lastmod>2024-05-20</lastmod>
|
||||
</url>
|
||||
@@ -121,18 +91,48 @@
|
||||
<lastmod>2024-04-30</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/support/contact</loc>
|
||||
<loc>https://www.janishutz.com/projects/smuL</loc>
|
||||
<priority>0.33</priority>
|
||||
<lastmod>2024-05-20</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/support/js-disabled</loc>
|
||||
<loc>https://www.janishutz.com/projects/schoolprojects</loc>
|
||||
<priority>0.33</priority>
|
||||
<lastmod>2024-04-30</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/projects/qrscanner</loc>
|
||||
<priority>0.33</priority>
|
||||
<lastmod>2024-04-30</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/projects/musicplayer</loc>
|
||||
<priority>0.33</priority>
|
||||
<lastmod>2024-05-20</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/legal/licences/proprietary</loc>
|
||||
<priority>0.25</priority>
|
||||
<loc>https://www.janishutz.com/projects/libreevent</loc>
|
||||
<priority>0.33</priority>
|
||||
<lastmod>2024-05-20</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/projects/languageschoolhossegor-booking</loc>
|
||||
<priority>0.33</priority>
|
||||
<lastmod>2024-04-30</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/projects/impress</loc>
|
||||
<priority>0.33</priority>
|
||||
<lastmod>2024-04-30</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/presentations/auth</loc>
|
||||
<priority>0.33</priority>
|
||||
<lastmod>2024-05-20</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/about/aboutme</loc>
|
||||
<priority>0.33</priority>
|
||||
<lastmod>2024-05-20</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
@@ -140,6 +140,11 @@
|
||||
<priority>0.25</priority>
|
||||
<lastmod>2024-05-20</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/legal/licences/proprietary</loc>
|
||||
<priority>0.25</priority>
|
||||
<lastmod>2024-05-20</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.janishutz.com/legal/privacy/v1</loc>
|
||||
<priority>0.00</priority>
|
||||
|
||||
Reference in New Issue
Block a user