diff --git a/server/build.gradle.kts b/server/build.gradle.kts index 48da7d8..19c9e50 100644 --- a/server/build.gradle.kts +++ b/server/build.gradle.kts @@ -34,7 +34,7 @@ tasks.register("copyUi", Copy::class.java) { group = "build" description = "Copy UI files generated in :ui module to resources folder." dependsOn(":ui:buildUi") - from("${project(":ui").projectDir}/src/main/webroot") + from("${project(":ui").projectDir}/src/main/dist/webroot") into("src/main/resources/webroot") } diff --git a/ui/build.gradle b/ui/build.gradle index 3a7eeeb..64b1c8e 100644 --- a/ui/build.gradle +++ b/ui/build.gradle @@ -5,7 +5,7 @@ plugins { minifyJs { source = fileTree 'src/main/ui/script.js' - dest = file 'src/main/webroot/static/script.min.js' + dest = file 'src/main/dist/webroot/static/script.min.js' closure { compilerOptions.languageIn = 'ECMASCRIPT6_STRICT' compilerOptions.languageOut = 'ECMASCRIPT5_STRICT' @@ -14,7 +14,7 @@ minifyJs { minifyCss { source = fileTree 'src/main/ui/style.css' - dest = file 'src/main/webroot/static/style.min.css' + dest = file 'src/main/dist/style.min.css' } task buildUi { @@ -25,14 +25,15 @@ task buildUi { task copyAssets(type: Copy) { group = 'build' - description = 'Copy static resources like images to "webroot/static" folder.' + description = 'Copy static resources like images to "dist/webroot/static" folder.' from 'src/main/ui/space.png', 'src/main/ui/favicon.ico' - into 'src/main/webroot/static' + into 'src/main/dist/webroot/static' } task copyIndex(type: Copy) { group = 'build' - description = 'Copy index.html file to "webroot" folder with replacing of special tokens with proper data.' + description = 'Copy index.html file to "dist/webroot" folder with replacing of special tokens with proper data.' + dependsOn 'minifyCss' def currentTimeStamp = System.currentTimeMillis() from('src/main/ui/index.html') { filter { @@ -41,12 +42,15 @@ task copyIndex(type: Copy) { filter { it.replace('@{revisions}', file("../.revisions").text.replaceAll('\n', ',')) } + filter { + it.replace('@{style}', file('src/main/dist/style.min.css').text) + } } - into 'src/main/webroot' + into 'src/main/dist/webroot' } task cleanUi(type: Delete) { group = 'build' description = 'Clean up generated files.' - delete 'src/main/webroot' + delete 'src/main/dist' } diff --git a/ui/src/main/ui/index.html b/ui/src/main/ui/index.html index 203d45b..b5c53a2 100644 --- a/ui/src/main/ui/index.html +++ b/ui/src/main/ui/index.html @@ -7,10 +7,10 @@ - +
diff --git a/ui/src/main/ui/style.css b/ui/src/main/ui/style.css index f88141a..8486065 100644 --- a/ui/src/main/ui/style.css +++ b/ui/src/main/ui/style.css @@ -4,15 +4,11 @@ body { background: black; } -#map { - width: 100vw; - height: 100vh; - padding: 0; - margin: 0; - background: url("space.png"); +html, body, #map { + height: 100%; + width: 100%; } -.leaflet-control-layers-scrollbar { - overflow-y: hidden; - overflow-x: hidden; +#map { + background: url("static/space.png"); }