aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2019-03-05 18:19:53 +0100
committerRobert Jaros <rjaros@finn.pl>2019-03-05 18:19:53 +0100
commitf96b7263a4ad5409b9d8eeea8e7b6359085203d1 (patch)
treee58caf1b4628347b83144fb5a04a7087401ee1ba
parent7f551dd4494ed3585180dcf06b5a8ce347019826 (diff)
downloadkvision-f96b7263a4ad5409b9d8eeea8e7b6359085203d1.tar.gz
kvision-f96b7263a4ad5409b9d8eeea8e7b6359085203d1.tar.bz2
kvision-f96b7263a4ad5409b9d8eeea8e7b6359085203d1.zip
Refactor kvision-bootstrap module.
-rw-r--r--kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/KVManagerBootstrap.kt6
-rw-r--r--kvision-modules/kvision-bootstrap/src/main/resources/css/paper.css4
-rw-r--r--kvision-modules/kvision-bootstrap/src/main/resources/css/style.css (renamed from src/main/resources/css/style.css)4
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/KVManager.kt4
4 files changed, 8 insertions, 10 deletions
diff --git a/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/KVManagerBootstrap.kt b/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/KVManagerBootstrap.kt
index 105fa507..01e1f3c3 100644
--- a/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/KVManagerBootstrap.kt
+++ b/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/KVManagerBootstrap.kt
@@ -33,17 +33,19 @@ internal object KVManagerBootstrap {
private val bootstrapWebpack = try {
val bootswatch = links.asList().find { it.getAttribute("href")?.contains("bootstrap.min.css") ?: false }
if (bootswatch != null) {
+ require("bootstrap-webpack!./js/bootstrap.config.js")
if (bootswatch.getAttribute("href")?.contains("/paper/") == true) {
require("./css/paper.css")
}
- require("bootstrap-webpack!./js/bootstrap.config.js")
+ require("./css/style.css")
} else {
require("bootstrap-webpack")
+ require("./css/style.css")
}
} catch (e: Throwable) {
}
private val fontAwesomeWebpack = try {
- require("font-awesome-webpack")
+ require("font-awesome-webpack-4")
} catch (e: Throwable) {
}
private val awesomeBootstrapCheckbox = try {
diff --git a/kvision-modules/kvision-bootstrap/src/main/resources/css/paper.css b/kvision-modules/kvision-bootstrap/src/main/resources/css/paper.css
index 6e923117..1c783608 100644
--- a/kvision-modules/kvision-bootstrap/src/main/resources/css/paper.css
+++ b/kvision-modules/kvision-bootstrap/src/main/resources/css/paper.css
@@ -10,3 +10,7 @@ body {
.radio label, .checkbox label {
white-space: nowrap;
}
+
+.modal-title {
+ font-size: 18px;
+}
diff --git a/src/main/resources/css/style.css b/kvision-modules/kvision-bootstrap/src/main/resources/css/style.css
index 472e4b5d..fbb6f00a 100644
--- a/src/main/resources/css/style.css
+++ b/kvision-modules/kvision-bootstrap/src/main/resources/css/style.css
@@ -132,10 +132,6 @@ trix-toolbar .trix-button-group {
white-space: nowrap;
}
-.modal-title {
- font-size: 18px;
-}
-
ul.dropdown-menu li a {
cursor: pointer;
}
diff --git a/src/main/kotlin/pl/treksoft/kvision/KVManager.kt b/src/main/kotlin/pl/treksoft/kvision/KVManager.kt
index de819c98..faa0b77c 100644
--- a/src/main/kotlin/pl/treksoft/kvision/KVManager.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/KVManager.kt
@@ -65,10 +65,6 @@ internal object KVManager {
)
)
private val sdVirtualize = require("snabbdom-virtualize/strings").default
- private val styleCss = try {
- require("./css/style.css")
- } catch (e: Throwable) {
- }
internal fun patch(id: String, vnode: VNode): VNode {
val container = document.getElementById(id)