This commit is contained in:
ajuvercr 2019-10-20 12:36:18 +02:00
parent b0eccf0d78
commit dbd32194a1
9 changed files with 1554 additions and 53 deletions

BIN
mapbuilder/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View file

@ -1,12 +1,41 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head>
<head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Planetwars Mapbuilder</title> <title>Planetwars Mapbuilder</title>
<link rel="stylesheet" type="text/css" href="./static/res/style.css"> <link rel="stylesheet" type="text/css" href="./static/res/style.css">
<script src="./index.js"></script> <link rel="shortcut icon" type="image/x-icon" href="./favicon.ico" />
</head> </head>
<body>
<h1>HALLO GUYS</h1> <body>
</body>
</html> <div id="mySidepanel" class="sidepanel">
<a href="javascript:void(0)" class="closebtn" onclick="toggleNav()">&times;</a>
<a href="#">About</a>
<a href="#">Services</a>
<a href="#">Clients</a>
<a href="#">Contact</a>
</div>
<button class="openbtn" onclick="toggleNav()">&#9776;</button>
<h2>Collapsed Sidepanel</h2>
<p>Content...</p>
</body>
<script>
var nav_open = false;
/* Set the width of the sidebar to 250px (show it) */
function toggleNav() {
if (nav_open) {
document.getElementById("mySidepanel").style.width = "0";
} else {
document.getElementById("mySidepanel").style.width = "250px";
}
nav_open = !nav_open;
}
</script>
<script src="dist/bundle.js"></script>
</html>

File diff suppressed because it is too large Load diff

View file

@ -7,7 +7,7 @@
"scripts": { "scripts": {
"develop": "webpack --mode development --watch", "develop": "webpack --mode development --watch",
"build": "webpack --config webpack.config.js", "build": "webpack --config webpack.config.js",
"start": "webpack-dev-server --content-base dist/" "start": "webpack-dev-server"
}, },
"keywords": [ "keywords": [
"planetwars", "planetwars",
@ -21,12 +21,16 @@
}, },
"homepage": "https://github.com/ajuvercr/Planetwars#Readme", "homepage": "https://github.com/ajuvercr/Planetwars#Readme",
"devDependencies": { "devDependencies": {
"webpack": "^4.29.3", "copy-webpack-plugin": "^5.0.0",
"ts-loader": "^6.0.2", "css-loader": "^3.2.0",
"node-sass": "^4.12.0",
"sass-loader": "^8.0.0",
"static-eval": ">=2.0.0", "static-eval": ">=2.0.0",
"style-loader": "^1.0.0",
"ts-loader": "^6.0.2",
"typescript": "^3.5.2", "typescript": "^3.5.2",
"webpack": "^4.29.3",
"webpack-cli": "^3.1.0", "webpack-cli": "^3.1.0",
"webpack-dev-server": "^3.1.5", "webpack-dev-server": "^3.1.5"
"copy-webpack-plugin": "^5.0.0"
} }
} }

View file

@ -0,0 +1,71 @@
/* The sidepanel menu */
.sidepanel {
height: 100vh;
/* Specify a height */
width: 0;
/* 0 width - change this with JavaScript */
position: fixed;
/* Stay in place */
z-index: 1;
/* Stay on top */
top: 0;
right: 0;
background-color: #111;
/* Black*/
overflow-x: hidden;
overflow-y: scroll;
/* Disable horizontal scroll */
padding-top: 60px;
/* Place content 60px from the top */
transition: 0.5s;
/* 0.5 second transition effect to slide in the sidepanel */
}
/* The sidepanel links */
.sidepanel a {
padding: 8px 8px 8px 32px;
text-decoration: none;
font-size: 25px;
color: #818181;
display: block;
transition: 0.3s;
}
/* When you mouse over the navigation links, change their color */
.sidepanel a:hover {
color: #f1f1f1;
}
/* Position and style the close button (top right corner) */
.sidepanel .closebtn {
position: absolute;
top: 0;
left: 0;
font-size: 36px;
}
/* Style the button that is used to open the sidepanel */
.openbtn {
position: absolute;
right: 5px;
top: 5px;
font-size: 20px;
cursor: pointer;
background-color: #111;
color: white;
padding: 10px 15px;
border: none;
}
.openbtn:hover {
background-color: #444;
}

View file

@ -1,4 +0,0 @@
h1 {
color: blue;
}

View file

@ -1,14 +1,22 @@
{ {
"compilerOptions": { "compilerOptions": {
"lib": ["es2017", "es7", "es6", "dom"], "lib": [
"outDir": "./dist/", "es2017",
"noImplicitAny": false, "es7",
"module": "commonjs", "es6",
"target": "es6", "dom"
"jsx": "react" ],
}, "outDir": "dist/",
"exclude": [ "noImplicitAny": true,
"node_modules", "module": "commonjs",
"dist" "target": "es6",
] "jsx": "react"
} },
"include": [
"./src/**/*"
],
"exclude": [
"node_modules",
"dist"
]
}

View file

@ -1,25 +1,19 @@
const CopyWebpackPlugin = require("copy-webpack-plugin");
const path = require('path');
module.exports = { module.exports = {
mode: 'development', mode: "development",
entry: './index.ts', watch: true,
module: { entry: "./src/index.ts",
rules: [ output: {
{ filename: "bundle.js",
test: /\.tsx?$/, path: __dirname + "/dist"
use: 'ts-loader', },
exclude: /node_modules/ resolve: {
} extensions: [".ts", ".tsx", ".js", ".json"]
] },
}, devtool: "source-map",
resolve: { module: {
extensions: [ '.tsx', '.ts', '.js', '.wasm' ] rules: [
}, { test: /\.scss$/, use: ["style-loader", "css-loader", "sass-loader"] },
output: { { test: /\.ts?$/, loader: "ts-loader" }
filename: 'index.js' ]
}, }
plugins: [ };
new CopyWebpackPlugin(['index.html'])
],
};