seperated website into two subpages

yes
This commit is contained in:
Durvenson 2020-07-27 16:45:12 -04:00
parent 2877914c6f
commit 6981dfac40
9 changed files with 329 additions and 0 deletions

2
map/.gitattributes vendored Normal file
View file

@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto

BIN
map/blankmapthing.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 KiB

63
map/index.css Normal file
View file

@ -0,0 +1,63 @@
@import url("https://fonts.googleapis.com/css2?family=Balsamiq+Sans&display=swap");
html {
background-color: #111111;
color: #DDDDDD;
font-family: Balsamiq Sans, cursive;
}
#left {
position: fixed;
width: 200px;
height: 100%;
left: 0;
background-color: #333333;
z-index: 10;
}
#right {
position: fixed;
width: 200px;
height: 100%;
right: 0;
background-color: #333333;
overflow-y: auto;
}
h2, #coords, #coords2 {
text-align: center;
}
#mapbg, #mapborders, #maptext, #mapbg2 {
position: absolute;
width: 1400px;
height: 1400px;
}
#mapbg, #mapbg2 {
z-index: -3;
display: block;
}
#mapborders {
z-index: -2;
}
#maptext {
z-index: -1;
}
#map {
position: relative;
width: calc(100% - 400px);
height: 100%;
left: 200px;
}
#mainheader {
position: fixed;
width: calc(100% - 600px);
background-color: #444444;
left: 300px;
text-align: center;
z-index: 1;
}
button {
font-family: Balsamiq Sans, cursive;
font-size: 20px;
margin: 4px;
background-color: #222222AA;
border: solid 5px #111111AA;
border-radius: 5px;
color: #DDDDDD;
}

55
map/index.html Normal file
View file

@ -0,0 +1,55 @@
<html>
<head>
<title>
SGS
</title>
<link rel="stylesheet" type="text/css" href="index.css">
</link>
</head>
<body>
<div id="left">
<h2>
Instructions
</h2>
Use the scrollbars to navigate.<br>
However, do not zoom in/out; it breaks this website. However, if you refresh after you zoom, then it works fine.
If you are interested in this, then check out <a href="https://discord.gg/crTTVjs">here.</a>
<button onclick="coords()">Go to Coords</button>
<button onclick="geo()">Geographical Map</button>
<button onclick="pol()">Political Map</button>
</div>
<div id="right">
<h2>
Key
</h2>
<h3 id ="coords">0,0</h3>
<p>(x,z coords)</p>
<p id ="coords2">0,0</p>
<p>(for canvas editing)</p>
<p>Stars: Capitals</p>
<p>Filled Dots: Cities</p>
<p>Hollow Dots: Towns</p>
<p>Squares: Outposts</p>
<p>Filled Areas: Claims</p>
<p>Striped Areas: Joint Claims</p>
<h2>
Changelog
</h2>
<p>6/19/2020: Map's framework created.</p>
<p>7/25/2020: Map has finally found a use.</p>
<p>Stranomegaium added as the first country.</p>
<p>Pagvarz added (originally as Praviagz) and went under many name changes.</p>
<p>Cities and towns have been added to various countries.</p>
</div>
<h1 id="mainheader">
Stranomegaium Cartography Service
</h1>
<div id="map" style="overflow: scroll;">
<img id="mapbg" src="mapv1.svg"></img>
<img id="mapbg2" src="blankmapthing.png"></img>
<span style="position: fixed; left: calc(50% - 11px); top: calc(50% - 16px); z-index: 7;">+</span>
</div>
<script src="index.js">
</script>
</body>
</html>

36
map/index.js Normal file
View file

@ -0,0 +1,36 @@
function coords() {
var wantedcoords = prompt("Coords? (seperate with comma)","0,0");
wantedcoords = wantedcoords.split(",")
map.scrollTop = (parseInt(wantedcoords[1].replace(" ","")) + 7000)/10;
map.scrollLeft = (parseInt(wantedcoords[0].replace(" ","")) + 7000)/10;
}
function geo() {
map2.style.display = "none";
map3.style.display = "initial";
}
function pol() {
map3.style.display = "none";
map2.style.display = "initial";
}
function update() {
document.getElementById("coords").innerHTML = (Math.round(map.scrollLeft*10 - 7000)) + ',' + (Math.round(map.scrollTop*10 - 7000));
document.getElementById("coords2").innerHTML = (Math.round(map.scrollLeft)) + ',' + (Math.round(map.scrollTop));
}
var wantedcoords = [];
var map = document.getElementById("map");
var map2 = document.getElementById("mapbg");
var map3 = document.getElementById("mapbg2");
var mapwidth = map.clientWidth;
var mapheight = map.clientHeight;
map2.style.paddingLeft = mapwidth/2;
map2.style.paddingRight = mapwidth/2;
map2.style.paddingTop = mapheight/2;
map2.style.paddingBottom = mapheight/2;
map3.style.paddingLeft = mapwidth/2;
map3.style.paddingRight = mapwidth/2;
map3.style.paddingTop = mapheight/2;
map3.style.paddingBottom = mapheight/2;
map.scrollTop = 700;
map.scrollLeft = 700;
pol();
var test = setInterval(update,16);

214
map/mapv1.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 464 KiB