-
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
eac0289
commit 8ad83a8
Showing
3 changed files
with
518 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
<!DOCTYPE html> | ||
|
||
<html lang="en"> | ||
<head> | ||
<!--Title--> | ||
<title>SparkGen - Weather Alert Maker</title> | ||
|
||
<!--Set charset and dizable zoom...--> | ||
<meta charset="utf-8"/> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> | ||
|
||
<!--OpenGraph Social Metadata--> | ||
<meta property="og:title" content="SparkGen"> | ||
<meta property="og:type" content="website"> | ||
<meta property="og:description" content="Create your own weather watch and warning maps."> | ||
|
||
<!--Links to the Leaflet CSS/JS--> | ||
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script> | ||
<link href="https://unpkg.com/[email protected]/dist/leaflet.css" rel="stylesheet"/> | ||
|
||
<!--Leaflet.draw--> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/leaflet.css" /> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/1.0.2/leaflet.draw.css" /> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/leaflet.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/1.0.2/leaflet.draw.js"></script> | ||
|
||
<!--Turf lib--> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Turf.js/5.1.6/turf.min.js"></script> | ||
|
||
<!--MapTiler SDK--> | ||
<script src="https://cdn.maptiler.com/maptiler-sdk-js/v2.0.3/maptiler-sdk.umd.js"></script> | ||
<link href="https://cdn.maptiler.com/maptiler-sdk-js/v2.0.3/maptiler-sdk.css" rel="stylesheet" /> | ||
<script src="https://cdn.maptiler.com/leaflet-maptilersdk/v2.0.0/leaflet-maptilersdk.js"></script> | ||
|
||
<!--Links to the Google icon set--> | ||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200" /> | ||
|
||
<!--Links to the font used--> | ||
<link rel="preconnect" href="https://fonts.googleapis.com"> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
<link href="https://fonts.googleapis.com/css2?family=Outfit:[email protected]&display=swap" rel="stylesheet"> | ||
|
||
<!--CSS--> | ||
<link rel="stylesheet" href="style.css"></link> | ||
</head> | ||
|
||
|
||
<body style="overflow: none;"> | ||
<div id="content"> | ||
<!--Map--> | ||
<div id="mapid" style="z-index: 1; width: 100%; height: 100%; position: absolute; top: 0px; left: 0px;"></div> | ||
|
||
<!--Loader--> | ||
<div id="loader" style="z-index: 100; flex-direction: column; position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; background: black; color: white; display: flex; align-items: center; justify-content: center;"> | ||
<h2>Loading...</h2> | ||
<p style="width: 70%; text-align: center;">We're downloading the county database. This may take some time but only needs to be done once.</p> | ||
<div style="width: 200px; height: 10px; background: rgb(90, 90, 90); border-radius: 10px;"> | ||
<div id="loadingprog" style="height: 10px; background: white; border-radius: 10px;"></div> | ||
</div> | ||
<p id="textprog">0%</p> | ||
</div> | ||
|
||
<!--Polygon Color/Style chooser--> | ||
<div id="style" style="z-index: 100; overflow: auto; flex-direction: column; position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; background: rgb(20, 20, 20, 0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: white; display: none; align-items: center;"> | ||
<h2>Select a style preset</h2> | ||
<select id="styleselect" style="width: 40%; font-size: large;" onchange="var selection = document.getElementById('styleselect').value; document.getElementById('alerttext').innerHTML = selection; setStyle(selection);"> | ||
<option selected="true">Custom</option> | ||
</select> | ||
<br> | ||
<h2 style="margin: 0px;">Properties</h2> | ||
<p style="margin: 0px; margin-bottom: 10px; font-size: medium;">Modifying these do not change the presets.</p> | ||
<br> | ||
<div style="display: flex; flex-direction: row; align-items: center;"> | ||
<p style="margin: 0px 10px 0px 0px;">Color: </p><input id="styleColor" type="color" value="#FF0000"> | ||
</div> | ||
<br> | ||
<div style="width: 40%; display: flex; flex-direction: row; align-items: center;"> | ||
<p style="margin: 0px 10px 0px 0px;">Opacity: </p><input id="styleOpacity" style="width: 100%;" type="range" min="0.1" max="1" step="0.05" value="0.3"> | ||
</div> | ||
<br><br> | ||
<button id="setStyle" style="border-radius: 5px; padding: 10px; cursor: pointer;">Set style</button> | ||
</div> | ||
|
||
<!--Polygon Color/Style chooser--> | ||
<div id="settings" style="z-index: 100; overflow: auto; flex-direction: column; position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; background: rgb(20, 20, 20, 0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: white; display: none; align-items: center;"> | ||
<br> | ||
<button id="settclose" style="border-radius: 10px; padding: 5px; cursor: pointer;"><i class="material-symbols-outlined">close</i></button> | ||
<br><br> | ||
<h2 style="margin: 0px;">Preset styles</h2> | ||
<p style="margin: 0px; margin-bottom: 10px; font-size: medium;">You can upload a JSON of style presets to easily choose a color for an alert.</p> | ||
<button id="uploadstyles" onclick="uploadstyles();">Upload</button> | ||
<br> | ||
</div> | ||
|
||
<!--Info piece--> | ||
<div id="infopiece" style="padding: 10px; color: white; z-index: 1000; overflow: auto; flex-direction: column; position: absolute; margin: 0px; top: 0px; left: 0px; width: auto; height: auto; border-radius: 5px; background: rgb(20, 20, 20, 0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: white;"></div> | ||
|
||
<!--Context menu--> | ||
<div id="custom-context-menu" class="context-menu"> | ||
<ul> | ||
<li id="menu-item-1" ><i class="material-symbols-outlined">add</i> Add custom polygon</li> | ||
<li id="menu-item-2" ><i class="material-symbols-outlined">edit</i> Change styles</li> | ||
<li id="menu-item-3" ><i class="material-symbols-outlined">edit_note</i> Change title</li> | ||
<li id="menu-item-4" ><i class="material-symbols-outlined">schedule</i> Change time</li> | ||
<li id="menu-item-5" ><i class="material-symbols-outlined">settings</i> Settings</li> | ||
<li id="menu-item-6" style="color: gray"><i class="material-symbols-outlined">info</i> Information</li> | ||
<li id="menu-item-7" style="color: gray"><i class="material-symbols-outlined">help</i> Help</li> | ||
</ul> | ||
</div> | ||
|
||
<!--Alert Title--> | ||
<div id="alerttitle" style="padding: 10px; color: white; z-index: 90; overflow: auto; align-items: center; flex-direction: column; position: absolute; margin: 0px; top: 0px; right: 0px; width: auto; height: auto; border-radius: 0px 0px 0px 15px; background: rgb(20, 20, 20, 0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: white;"> | ||
<h1 id="alerttext" style="margin: 5px;">No alert</h1><br> | ||
<h2 id="alerttime" style="margin: 5px;">12/23/24 5:33 PM PST</h2> | ||
</div> | ||
|
||
<!--Sizer--> | ||
<div id="sizer" style="font-size: larger; z-index: 1000; justify-content: center; flex-direction: column; position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; background: rgb(20, 20, 20, 0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: white; display: none; align-items: center;"> | ||
200x200 | ||
</div> | ||
|
||
|
||
</div> | ||
</body> | ||
<!--Add JS after elements are added--> | ||
<script src="script.js"></script> | ||
</html> |
Oops, something went wrong.