Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Some more playing around with SASS

Roland Geiderfd151b66eb48
diff --git a/extras/docker/base/Dockerfile b/extras/docker/base/Dockerfile
index f9c7329d4..6029c2b62 100644
--- a/extras/docker/base/Dockerfile
+++ b/extras/docker/base/Dockerfile
@@ -25,7 +25,7 @@ RUN apt-get update \
sqlite3 \
netcat-openbsd \
&& rm -rf /var/lib/apt/lists/* \
- && npm install -g yarn \
+ && npm install -g yarn sass \
&& locale-gen en_US.UTF-8
# Environmental variables
diff --git a/wger/core/static/scss/main.scss b/wger/core/static/scss/main.scss
index 22bf041fc..feac51f7e 100644
--- a/wger/core/static/scss/main.scss
+++ b/wger/core/static/scss/main.scss
@@ -1,20 +1,45 @@
-/* import only the necessary Bootstrap files */
-@import "../yarn/bootstrap-scss/functions";
-@import "../yarn/bootstrap-scss/variables";
+/*
+ * wger customization for bootstrap
+ *
+ * https://coolors.co/e63946-a8dadc-457b9d-1d3557-cba328-296713-266dd3-a5a5b6
+ */
+$wger-blue: #2A4C7D !default;
+$wger-blue-2: #266dd3 !default;
+$wger-blue-light: #457b9d !default;
+$wger-blue-light-2: #a8dadc !default;
+$wger-light: #f4f4f6 !default;
+$wger-light-2: #dddde3 !default;
+$wger-light-3: #a5a5b6 !default;
+$wger-red: #e63946 !default;
+$wger-yellow: #cba328 !default;
+$wger-green: #307916 !default;
+
+
+$blue: $wger-blue !default;
+$red: $wger-red;
+$yellow: $wger-yellow !default;
+$green: $wger-green !default;
-/* -------begin customization-------- */
-$teal: #f1faee !default;
-$red: #e63946 !default;
-$blue: #1d3557 !default;
-$green: #a8dadc !default;
-$cyan: #457b9d !default;
$theme-colors: (
- primary: $red,
- success: $blue
-);
+ "wger-primary": $wger-blue,
+ "wger-red": $wger-red,
+ "wger-yellow": $wger-yellow,
+ "wger-green": $wger-green,
+ "wger-light": $wger-light,
+ "wger-light-2": $wger-light-2,
+ "wger-light-3": $wger-light-3,
+) !default;
+
+$link-color: $wger-blue-2 !default;
+
+
-/* finally, import Bootstrap to set the changes! */
-@import "../yarn/bootstrap-scss/bootstrap";
+/*
+ * Import the rest of the bootstrap files
+ */
+@import "../yarn/bootstrap/scss/_functions";
+@import "../yarn/bootstrap/scss/_variables";
+@import "../yarn/bootstrap/scss/bootstrap";
diff --git a/wger/core/templates/misc/contact.html b/wger/core/templates/misc/contact.html
index 25b42588b..fe0814acb 100644
--- a/wger/core/templates/misc/contact.html
+++ b/wger/core/templates/misc/contact.html
@@ -16,7 +16,7 @@ a bug, consider doing it through the <a href="{{issues}}">issue tracker</a>
</div>
<div class="col-sm-6">
- <div class="alert alert-block alert-info">
+ <div class="alert alert-block alert-wger-green">
{% blocktrans %}If you want to further help and improve this project,
you might also be interested <a href="{{contribute}}">in contributing</a>.{% endblocktrans %}
</div>
diff --git a/wger/core/templates/navigation.html b/wger/core/templates/navigation.html
index 976bfe0d0..d949e820a 100644
--- a/wger/core/templates/navigation.html
+++ b/wger/core/templates/navigation.html
@@ -1,5 +1,5 @@
{% load i18n cache wger_extras %}
- <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
+ <nav class="navbar navbar-expand-lg navbar-dark bg-wger-primary">
<div class="container">
<a class="navbar-brand" href="{% url 'core:index' %}" style="font-family: 'Open Sans Bold';">wger</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#main-navbar-navigation" aria-controls="main-navbar-navigation" aria-label="Toggle navigation">
diff --git a/wger/core/templates/template.html b/wger/core/templates/template.html
index 99a2fdbee..986cdcd95 100644
--- a/wger/core/templates/template.html
+++ b/wger/core/templates/template.html
@@ -49,7 +49,7 @@
{% compress css %}
<link rel="stylesheet" type="text/css" href="{% static 'css/workout-manager.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'css/workout-manager-common.css' %}">
- <link rel="stylesheet" type="text/css" href="{% static 'yarn/bootstrap-scss/bootstrap.css' %}">
+ <link rel="stylesheet" type="text/css" href="{% static 'yarn/bootstrap-compiled.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'yarn/components-font-awesome/css/all.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'css/bootstrap-custom.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'yarn/shariff/build/shariff.min.css' %}">
@@ -160,7 +160,7 @@
-<footer id="main-footer" class="bg-light border-top">
+<footer id="main-footer" class="bg-wger-light border-top">
<div class="container">
<div class="row">
<div class="col-md-8">
diff --git a/wger/software/templates/contribute.html b/wger/software/templates/contribute.html
index 33e23228c..28ce5547b 100644
--- a/wger/software/templates/contribute.html
+++ b/wger/software/templates/contribute.html
@@ -62,7 +62,7 @@ on this.{% endblocktrans %}</p>
{% block sidebar %}
-<div class="card text-white bg-info mb-3">
+<div class="card text-white bg-wger-green mb-3">
<div class="card-header">
{% trans "Our goal" %}
</div>
diff --git a/wger/tasks.py b/wger/tasks.py
index 27590b81c..4634822a8 100644
--- a/wger/tasks.py
+++ b/wger/tasks.py
@@ -109,6 +109,7 @@ def bootstrap(context,
# Download JS and CSS libraries
context.run("yarn install")
+ context.run("sass wger/core/static/scss/main.scss:wger/core/static/yarn/bootstrap-compiled.css")
# Start the webserver
if start_server:
diff --git a/yarn.lock b/yarn.lock
index 27e941a8e..9d353c7d8 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -9,18 +9,11 @@
Sortable@RubaXa/Sortable#1.10.2:
version "1.10.2"
- uid "2addddd67387b6e4b6b5e51806eb698f0a3eee88"
resolved "https://codeload.github.com/RubaXa/Sortable/tar.gz/2addddd67387b6e4b6b5e51806eb698f0a3eee88"
- version "4.5.0"
- resolved "https://registry.yarnpkg.com/bootstrap-scss/-/bootstrap-scss-4.5.0.tgz#c1e48d4050dec7885cc9acfc61d3df7827a134ca"
- integrity sha512-6vCW3JBfOW7v9EQwyV0kWdEyvk2hf7U8TIojRgz19/nJoJGe8BQa1L/Tk7B0wmKEqHR/lA93Lhp+dLRphZt3vg==
-
-bootstrap@bootstrap-scss#4.x:
+bootstrap@twbs/bootstrap#4.x:
version "4.5.2"
- resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.5.2.tgz#a85c4eda59155f0d71186b6e6ad9b875813779ab"
- integrity sha512-vlGn0bcySYl/iV+BGA544JkkZP5LB3jsmkeKLFQakCOwCM3AOk7VkldBz4jrzSe+Z0Ezn99NVXa1o45cQY4R6A==
+ resolved "https://codeload.github.com/twbs/bootstrap/tar.gz/5f2480a90ab911babc53039835fe78c6fc12646d"
commander@2:
version "2.20.3"
@@ -29,7 +22,6 @@ commander@2:
components-font-awesome@components/font-awesome#5.14.0:
version "5.14.0"
- uid "75afe9bc19a5944b4700e723e0646a8efb4591a1"
resolved "https://codeload.github.com/components/font-awesome/tar.gz/75afe9bc19a5944b4700e723e0646a8efb4591a1"
d3-array@1, d3-array@^1.2.0:
@@ -373,7 +365,6 @@ d3@^4:
d3@mbostock-bower/d3-bower#>=5:
version "0.0.0"
- uid c15b85ce115be200bd4ca473f97fcd0bb43bba07
resolved "https://codeload.github.com/mbostock-bower/d3-bower/tar.gz/c15b85ce115be200bd4ca473f97fcd0bb43bba07"
datatables@DataTables/DataTables#1.10.x:
@@ -384,7 +375,6 @@ datatables@DataTables/DataTables#1.10.x:
devbridge-autocomplete@devbridge/jQuery-Autocomplete#v1.4.11:
version "1.4.11"
- uid "9b30e414dd8b87e1831f9f28870b88d646f3553c"
resolved "https://codeload.github.com/devbridge/jQuery-Autocomplete/tar.gz/9b30e414dd8b87e1831f9f28870b88d646f3553c"
dependencies:
"@types/jquery" "^2.0.32"