Skip to content

Commit

Permalink
region map generator
Browse files Browse the repository at this point in the history
  • Loading branch information
dangeratio committed Nov 21, 2017
1 parent ded2e80 commit 4336c41
Show file tree
Hide file tree
Showing 21 changed files with 19,490 additions and 39 deletions.
35 changes: 1 addition & 34 deletions css/defaults.css
Expand Up @@ -20,10 +20,8 @@ body
color: rgba(0,0,0,.6);
}

#page, #menu {
/*margin-left: 15px;*/
#page {
padding-left: 15px;
/*margin-right: 15px;*/
}

.bgimage {
Expand All @@ -50,37 +48,6 @@ body
text-decoration: none;
}

.menuitem, .menuitem-style {
background-color: #5A6668;
color: white;
margin-bottom:2px !important;
}

.menu-selected {
color: #DF691A !important;
}

.menuitem:hover {
color: #DF691A !important;
opacity: 0.65;
filter: alpha(opacity=65);
}

.link-menu-style {
background-color: #5A6668;
float: right !important;
color: white;
}

.link-menu-style:hover {
background-color: grey;
}

.menu-button {
margin-left: -1px !important;

}

.hover-icon-clickarea {
margin-right: 3px;
margin-left: 2px !important;
Expand Down
39 changes: 38 additions & 1 deletion css/menu.css
@@ -1,7 +1,6 @@

/* Index Menu */


#index-menu {
display:none;
position:fixed;
Expand Down Expand Up @@ -33,3 +32,41 @@
.padding-below {
padding-bottom: 1em;
}

#menu {
/*margin-left: 15px;*/
padding-left: 15px;
/*margin-right: 15px;*/
}


.menuitem, .menuitem-style {
background-color: #5A6668;
color: white;
margin-bottom:2px !important;
}

.menu-selected {
color: #DF691A !important;
}

.menuitem:hover {
color: #DF691A !important;
opacity: 0.65;
filter: alpha(opacity=65);
}

.link-menu-style {
background-color: #5A6668;
float: right !important;
color: white;
}

.link-menu-style:hover {
background-color: grey;
}

.menu-button {
margin-left: -1px !important;

}
5 changes: 4 additions & 1 deletion hex-map-generator/hex_map_generator.html
Expand Up @@ -20,7 +20,7 @@

<div class="toolbar container">
<div class="row title-row">
<div class="title col-md-12 logo">Region Map Generator&nbsp;&nbsp;&nbsp;<img src="img/d20.png" width="25" height="28"></div>
<div class="title col-md-12 logo">Hex Map Generator&nbsp;&nbsp;&nbsp;<img src="img/d20.png" width="25" height="28"></div>
</div>
<div class="row padding-below">
<div class="button menu-button">&nbsp;<span class="glyphicon glyphicon-th"></span>&nbsp;</div>
Expand All @@ -42,6 +42,9 @@
<div class="index-row">
<div id="menu-auto-roll-tables" class='index-btn' aria-hidden='true'>Auto Roll Tables</div>
</div>
<div class="index-row">
<div id="menu-hex-map-generator" class='index-btn' aria-hidden='true'>Hex Map Generator</div>
</div>
<div class="index-row">
<div id="menu-region-map-generator" class='index-btn-bottom' aria-hidden='true'>Region Map Generator</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion hex-map-generator/js/map_generator.js
Expand Up @@ -569,7 +569,8 @@ $('body').on('click', '#reload', function() { window.location.reload(); });
// top menu
$('body').on('click', '.menu-button', function(e) { toggle_menu(e); } );
$('body').on('click', '#menu-auto-roll-tables', function() { window.location.replace("../index.html"); } );
$('body').on('click', '#menu-region-map-generator', function() { window.location.replace("hex_map_generator.html"); } );
$('body').on('click', '#menu-hex-map-generator', function() { window.location.replace("../hex-map-generator/hex_map_generator.html"); } );
$('body').on('click', '#menu-region-map-generator', function() { window.location.replace("../region-map-generator/index.html"); } );

// sizes
$('body').on('click', '#small', function() {
Expand Down
3 changes: 3 additions & 0 deletions index.html
Expand Up @@ -77,6 +77,9 @@
<div class="index-row">
<div id="menu-auto-roll-tables" class='index-btn' aria-hidden='true'>Auto Roll Tables</div>
</div>
<div class="index-row">
<div id="menu-hex-map-generator" class='index-btn' aria-hidden='true'>Hex Map Generator</div>
</div>
<div class="index-row">
<div id="menu-region-map-generator" class='index-btn-bottom' aria-hidden='true'>Region Map Generator</div>
</div>
Expand Down
5 changes: 3 additions & 2 deletions js/rolltables.js
Expand Up @@ -880,8 +880,9 @@ $('body').on('click', '.srd-button', function() { window.location.replace("refer

// top menu
$('body').on('click', '.menu-button', function(e) { toggle_menu(e); } );
$('body').on('click', '#menu-auto-roll-tables', function() { window.location.replace("index.html"); } );
$('body').on('click', '#menu-region-map-generator', function() { window.location.replace("hex-map-generator/hex_map_generator.html"); } );
$('body').on('click', '#menu-auto-roll-tables', function() { window.location.replace("./index.html"); } );
$('body').on('click', '#menu-hex-map-generator', function() { window.location.replace("./hex-map-generator/hex_map_generator.html"); } );
$('body').on('click', '#menu-region-map-generator', function() { window.location.replace("./region-map-generator/index.html"); } );



Expand Down
22 changes: 22 additions & 0 deletions region-map-generator/LICENSE.md
@@ -0,0 +1,22 @@
This code is licensed under the MIT License:

> Copyright (c) 2016: Martin O'Leary
>
> Permission is hereby granted, free of charge, to any person obtaining
> a copy of this software and associated documentation files (the
> "Software"), to deal in the Software without restriction, including
> without limitation the rights to use, copy, modify, merge, publish,
> distribute, sublicense, and/or sell copies of the Software, and to
> permit persons to whom the Software is furnished to do so, subject to
> the following conditions:
>
> The above copyright notice and this permission notice shall be
> included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
> LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
> OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
> WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 changes: 29 additions & 0 deletions region-map-generator/README.md
@@ -0,0 +1,29 @@
# Fantasy map generator

This is code for generating fantasy maps, using the algorithm behind [@unchartedatlas][uncharted]. For more details, see [these notes][notes].

## Dependencies

This code depends on the following:

* [D3.js][d3] (tested with version 4.2.0)
* Adam Hooper's [js-priority-queue][priority]
* My [language generation code][language]

## Support, licensing, ongoing development

This project is, from my perspective, finished.

The code is available under the [MIT license][license], so you can fork it,
improve it, learn from it, build upon it. However, I have no interest in
maintaining it as an ongoing open source project, nor in providing support for
it. Pull requests will be either ignored or closed.

If you do make something interesting with this code, please do still let me know! I'm sorry that I can't provide any support, but I am still genuinely interested in seeing creative applications of the code.

[uncharted]: https://twitter.com/unchartedatlas
[notes]: https://mewo2.com/notes/terrain/
[language]: https://github.com/mewo2/naming-language/
[priority]: https://github.com/adamhooper/js-priority-queue
[d3]: https://d3js.org/
[license]: https://github.com/mewo2/terrain/blob/master/LICENSE.md
78 changes: 78 additions & 0 deletions region-map-generator/credits.html
@@ -0,0 +1,78 @@
<!DOCTYPE htm
<head>
<title>Auto Roll Tables</title>
<script type="text/javascript">
if (self == top) { document.documentElement.style.display = 'block'; }
else { top.location = self.location; }
</script>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="stylesheet" href="../css/defaults.css" type="text/css" media="all" />
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Ubuntu:regular,bold&subset=Latin">
<link rel="stylesheet" href="../includes/bootstrap.min.css">
<link rel="stylesheet" href="../includes/bootstrap-theme.min.css">

</head>
<body>

<div id="page" class="container-fluid">
<div class="row">
<div class="col-md-12 logo-nopad">Region Map Generator</div>
</div>

<div id="menu-container" class="row">
<div class="col-md-12">
Credits
</div>
</div>


<div class="row">
<div class="col-md-12">&nbsp;</div>
</div>

<div class="row">
<div id="quote" class="col-md-11 changelog text-less-muted">
<p>page developed by dangeratio</p>
<p>region map generator from:</p>
<p>Martin O'Leary | @mewo2 | <a href="http://mewo2.com/notes/terrain/">website</a> | <a href="https://github.com/mewo2/terrain">source</a></p>
<p>The code is available under the <a href="https://opensource.org/licenses/MIT">MIT license</a>, so you can fork it, improve it, learn from it, build upon it.</p>

</div>
</div>

<div class="row">
<div class="col-md-12">
<a href="index.html">back to region map generator</a>
</div>
</div>

</div>

</body>

<script src="includes/jquery.min.js"></script>
<script src="includes/bootstrap.min.js"></script>


<!-- Start of StatCounter Code for Default Guide -->
<script type="text/javascript">
var sc_project=10833414;
var sc_invisible=1;
var sc_security="aab08f2d";
var scJsHost = (("https:" == document.location.protocol) ?
"https://secure." : "http://www.");
document.write("<sc"+"ript type='text/javascript' src='" +
scJsHost+
"statcounter.com/counter/counter.js'></"+"script>");
</script>
<noscript><div class="statcounter"><a title="web counter"
href="http://statcounter.com/" target="_blank"><img
class="statcounter"
src="http://c.statcounter.com/10833414/0/aab08f2d/1/"
alt="web counter"></a></div></noscript>
<!-- End of StatCounter Code for Default Guide -->

</html>
80 changes: 80 additions & 0 deletions region-map-generator/css/menu.css
@@ -0,0 +1,80 @@

/* Index Menu */

.logo {
vertical-align: middle;
margin-top: 15px;
padding-left: 15px;
padding-right: 15px;
font-size: 18px;
line-height: 20px;
height: 40px;
color: white;
}

#index-menu {
display:none;
position:fixed;
top: 5em;
line-height: 2em;
background-color: black; /* #5A6668; */
z-index: 9999;
margin-left: 2em;
padding: 1px;
}

.index-btn, .index-btn-bottom {
background-color: #5A6668;
color: white;
padding: 0.5em 1em;
cursor: pointer;
}

.index-btn {
border-bottom: solid 1px black;
}

.index-btn:hover, .index-btn-bottom:hover {
background-color: #4E5859;
color: white;
}

.padding-below {
padding-bottom: 1em;
}

#menu {
padding-left: 15px;
}

.menuitem, .menuitem-style {
background-color: #5A6668;
color: white;
margin-bottom:2px !important;
margin-right:3px;
}

.menu-selected {
color: #DF691A !important;
}

.menuitem:hover {
color: #DF691A !important;
opacity: 0.65;
filter: alpha(opacity=65);
}

.link-menu-style {
background-color: #5A6668;
float: right !important;
color: white;
}

.link-menu-style:hover {
background-color: grey;
}

.menu-button {
margin-left: -1px !important;

}
11 changes: 11 additions & 0 deletions region-map-generator/css/style.css
@@ -0,0 +1,11 @@
body {
font-family: Raleway;
background-color: #2b3e50;
}

div.example {
margin-top:15px;
margin-left:15px;
clear: both;
overflow: auto;
}

0 comments on commit 4336c41

Please sign in to comment.