summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-05-24 14:06:38 +0200
committerGitHub <noreply@github.com>2017-05-24 14:06:38 +0200
commit868780239f7a416017f1b31fab62032050a01681 (patch)
treee26c4aa3d72e710a2eebb308a72fed3a04e8b2ea
parentff4d176341c52da4ea74364de153a20352c6a145 (diff)
parentbc91daedca5646bbc2786bd5c24152b4f723436e (diff)
Merge pull request #308 from MyIgel/themes
Themes: Moved bootstrap and improved generate script
-rw-r--r--.gitmodules2
l---------public/vendor/bootstrap2
m---------themes/assets/bootstrap (renamed from vendor/bootstrap)0
-rw-r--r--themes/base.less2
-rwxr-xr-xthemes/build-themes.sh20
-rw-r--r--themes/theme1.less2
-rw-r--r--themes/theme2.less2
-rw-r--r--themes/theme3.less2
-rw-r--r--themes/theme4.less2
9 files changed, 21 insertions, 13 deletions
diff --git a/.gitmodules b/.gitmodules
index 8684a4ee..0aa8483a 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -2,5 +2,5 @@
path = vendor/parsedown
url = https://github.com/erusev/parsedown.git
[submodule "vendor/bootstrap"]
- path = vendor/bootstrap
+ path = themes/assets/bootstrap
url = https://github.com/twbs/bootstrap.git
diff --git a/public/vendor/bootstrap b/public/vendor/bootstrap
index 66500d68..250b0a66 120000
--- a/public/vendor/bootstrap
+++ b/public/vendor/bootstrap
@@ -1 +1 @@
-../../vendor/bootstrap/dist \ No newline at end of file
+../../themes/assets/bootstrap/dist \ No newline at end of file
diff --git a/vendor/bootstrap b/themes/assets/bootstrap
-Subproject ad716b9ea9506456f28e2c1bcdd7b4a81b44c11
+Subproject ad716b9ea9506456f28e2c1bcdd7b4a81b44c11
diff --git a/themes/base.less b/themes/base.less
index 713119ff..a4fa7e77 100644
--- a/themes/base.less
+++ b/themes/base.less
@@ -1,4 +1,4 @@
-@import "../vendor/bootstrap/less/bootstrap";
+@import "assets/bootstrap/less/bootstrap";
@icon-font-path: "../fonts/";
diff --git a/themes/build-themes.sh b/themes/build-themes.sh
index 404b6890..8657b691 100755
--- a/themes/build-themes.sh
+++ b/themes/build-themes.sh
@@ -1,7 +1,15 @@
-#!/bin/sh
+#!/bin/bash
-lessc theme0.less > ../public/css/theme0.css
-lessc theme1.less > ../public/css/theme1.css
-lessc theme2.less > ../public/css/theme2.css
-lessc theme3.less > ../public/css/theme3.css
-lessc theme4.less > ../public/css/theme4.css
+FILE_PATH="$(dirname "$0")"
+
+for file in $(ls "${FILE_PATH}/"*.less); do
+ filename="${file##*/}"
+ themeName="${filename%.less}"
+
+ if [[ "$filename" == "base.less" ]]; then
+ continue;
+ fi
+
+ echo "Building ${themeName}"
+ lessc "${file}" > "${FILE_PATH}/../public/css/${themeName}.css"
+done
diff --git a/themes/theme1.less b/themes/theme1.less
index 2b13601e..134e79b7 100644
--- a/themes/theme1.less
+++ b/themes/theme1.less
@@ -1,4 +1,4 @@
-@import "../vendor/bootstrap/less/variables";
+@import "assets/bootstrap/less/variables";
/*
The MIT License (MIT)
diff --git a/themes/theme2.less b/themes/theme2.less
index d5cac763..344e23c6 100644
--- a/themes/theme2.less
+++ b/themes/theme2.less
@@ -1,4 +1,4 @@
-@import "../vendor/bootstrap/less/variables";
+@import "assets/bootstrap/less/variables";
@brand-primary: #758499;
@brand-success: #7b9c41;
diff --git a/themes/theme3.less b/themes/theme3.less
index 7029db68..7e7e0f69 100644
--- a/themes/theme3.less
+++ b/themes/theme3.less
@@ -1,4 +1,4 @@
-@import "../vendor/bootstrap/less/variables";
+@import "assets/bootstrap/less/variables";
@brand-primary: #f19224;
@brand-success: #39AB50;
diff --git a/themes/theme4.less b/themes/theme4.less
index 4d4060ca..2ad8593d 100644
--- a/themes/theme4.less
+++ b/themes/theme4.less
@@ -1,4 +1,4 @@
-@import "../vendor/bootstrap/less/variables";
+@import "assets/bootstrap/less/variables";
/*
The MIT License (MIT)