Browse Source

Merge pull request #174 from searxng/static_script

[mod] add make targets to manage the build files in the /searx/static directory
Alexandre Flament 3 years ago
parent
commit
30e4a2a224

+ 5 - 2
Makefile

@@ -58,15 +58,16 @@ test.shell:
 		dockerfiles/docker-entrypoint.sh
 		dockerfiles/docker-entrypoint.sh
 	$(Q)shellcheck -x -s bash \
 	$(Q)shellcheck -x -s bash \
 		utils/brand.env \
 		utils/brand.env \
-		./manage \
+		$(MTOOLS) \
 		utils/lib.sh \
 		utils/lib.sh \
+		utils/lib_static.sh \
 	        utils/filtron.sh \
 	        utils/filtron.sh \
 	        utils/searx.sh \
 	        utils/searx.sh \
 	        utils/morty.sh \
 	        utils/morty.sh \
 	        utils/lxc.sh \
 	        utils/lxc.sh \
 	        utils/lxc-searx.env \
 	        utils/lxc-searx.env \
 	        .config.sh
 	        .config.sh
-	$(Q)./manage build_msg TEST "$@ OK"
+	$(Q)$(MTOOLS) build_msg TEST "$@ OK"
 
 
 
 
 # wrap ./manage script
 # wrap ./manage script
@@ -83,12 +84,14 @@ MANAGE += pyenv pyenv.install pyenv.uninstall
 MANAGE += pypi.upload pypi.upload.test
 MANAGE += pypi.upload pypi.upload.test
 MANAGE += test.yamllint test.pylint test.pep8 test.unit test.coverage test.robot test.clean
 MANAGE += test.yamllint test.pylint test.pep8 test.unit test.coverage test.robot test.clean
 MANAGE += themes.all themes.oscar themes.simple pygments.less
 MANAGE += themes.all themes.oscar themes.simple pygments.less
+MANAGE += static.build.commit static.build.drop static.build.restore
 
 
 PHONY += $(MANAGE)
 PHONY += $(MANAGE)
 
 
 $(MANAGE):
 $(MANAGE):
 	$(Q)$(MTOOLS) $@
 	$(Q)$(MTOOLS) $@
 
 
+
 # deprecated
 # deprecated
 
 
 PHONY += docs docs-clean docs-live docker themes
 PHONY += docs docs-clean docs-live docker themes

+ 22 - 1
docs/dev/quickstart.rst

@@ -29,7 +29,7 @@ If you implement themes, you will need to compile styles and JavaScript before
 
 
 .. code:: sh
 .. code:: sh
 
 
-   make themes
+   make themes.all
 
 
 Don't forget to install npm_ first.
 Don't forget to install npm_ first.
 
 
@@ -53,3 +53,24 @@ Don't forget to install npm_ first.
 
 
 	 sudo -H dnf install npm
 	 sudo -H dnf install npm
 
 
+If you finished your *tests* you can start to commit your changes.  To separate
+the changed code from the build products first run:
+
+.. code:: sh
+
+   make static.build.restore
+
+This will restore the old build products and only your changes of the code
+remain in the working tree which can now be added & commited.  When all sources
+are commited, you can commit the build products simply by:
+
+.. code:: sh
+
+   make static.build.commit
+
+Commiting the build products should be the last step, just before you send us
+your PR.  There is also a make target to rewind this last build commit:
+
+.. code:: sh
+
+   make static.build.drop

+ 16 - 12
manage

@@ -9,6 +9,9 @@ source "$(dirname "${BASH_SOURCE[0]}")/utils/lib.sh"
 source "${REPO_ROOT}/utils/brand.env"
 source "${REPO_ROOT}/utils/brand.env"
 source_dot_config
 source_dot_config
 
 
+# shellcheck source=utils/lib_static.sh
+source "$(dirname "${BASH_SOURCE[0]}")/utils/lib_static.sh"
+
 # config
 # config
 
 
 PYOBJECTS="searx"
 PYOBJECTS="searx"
@@ -42,53 +45,54 @@ PYLINT_OPTIONS="-m pylint -j 0 --rcfile .pylintrc"
 
 
 help() {
 help() {
     cat <<EOF
     cat <<EOF
-buildenv
+buildenv:
   rebuild ./utils/brand.env
   rebuild ./utils/brand.env
-babel.compile
+babel.compile:
   pybabel compile ./searx/translations
   pybabel compile ./searx/translations
-data.*
+data.:
   all       : update searx/languages.py and ./data/*
   all       : update searx/languages.py and ./data/*
   languages : update searx/data/engines_languages.json & searx/languages.py
   languages : update searx/data/engines_languages.json & searx/languages.py
   useragents: update searx/data/useragents.json with the most recent versions of Firefox.
   useragents: update searx/data/useragents.json with the most recent versions of Firefox.
-docs.*
+docs.:
   html      : build HTML documentation
   html      : build HTML documentation
   live      : autobuild HTML documentation while editing
   live      : autobuild HTML documentation while editing
   gh-pages  : deploy on gh-pages branch
   gh-pages  : deploy on gh-pages branch
   prebuild  : build reST include files (./${DOCS_BUILD}/includes)
   prebuild  : build reST include files (./${DOCS_BUILD}/includes)
   clean     : clean documentation build
   clean     : clean documentation build
-docker
+docker.:
   build     : build docker image
   build     : build docker image
   push      : build and push docker image
   push      : build and push docker image
-gecko.driver
+gecko.driver:
   download & install geckodriver if not already installed (required for
   download & install geckodriver if not already installed (required for
   robot_tests)
   robot_tests)
-node.*
+node.:
   env       : download & install npm dependencies locally
   env       : download & install npm dependencies locally
   clean     : drop npm installations
   clean     : drop npm installations
-py.*
+py.:
   build     : Build python packages at ./${PYDIST}
   build     : Build python packages at ./${PYDIST}
   clean     : delete virtualenv and intermediate py files
   clean     : delete virtualenv and intermediate py files
-pyenv.* :
+pyenv.:
   install   : developer install of searx into virtualenv
   install   : developer install of searx into virtualenv
   uninstall : uninstall developer installation
   uninstall : uninstall developer installation
   cmd ...   : run command ... in virtualenv
   cmd ...   : run command ... in virtualenv
   OK        : test if virtualenv is OK
   OK        : test if virtualenv is OK
 pypi.upload:
 pypi.upload:
   Upload python packages to PyPi (to test use pypi.upload.test)
   Upload python packages to PyPi (to test use pypi.upload.test)
-test.* :
+test.:
   pylint    : lint PYLINT_FILES, searx/engines, searx & tests
   pylint    : lint PYLINT_FILES, searx/engines, searx & tests
   pep8      : pycodestyle (pep8) for all files except PYLINT_FILES
   pep8      : pycodestyle (pep8) for all files except PYLINT_FILES
   unit      : run unit tests
   unit      : run unit tests
   coverage  : run unit tests with coverage
   coverage  : run unit tests with coverage
   robot     : run robot test
   robot     : run robot test
   clean     : clean intermediate test stuff
   clean     : clean intermediate test stuff
-themes.* :
+themes.:
   all       : build all themes
   all       : build all themes
   oscar     : build oscar theme
   oscar     : build oscar theme
   simple    : build simple theme
   simple    : build simple theme
-pygments.* :
+pygments.:
   less      : build LESS files for pygments
   less      : build LESS files for pygments
 EOF
 EOF
+    static_help
 }
 }
 
 
 
 

File diff suppressed because it is too large
+ 0 - 0
searx/static/themes/oscar/css/logicodev-dark.min.css.map


File diff suppressed because it is too large
+ 0 - 0
searx/static/themes/oscar/css/pointhi.min.css.map


+ 0 - 1
searx/static/themes/oscar/gruntfile.js

@@ -67,7 +67,6 @@ module.exports = function(grunt) {
     uglify: {
     uglify: {
       options: {
       options: {
         sourceMap: true,
         sourceMap: true,
-        banner: '/*! oscar/searx.min.js | <%= grunt.template.today("dd-mm-yyyy") %> | <%= process.env.GIT_URL %>  */\n'
       },
       },
       dist: {
       dist: {
         files: {
         files: {

File diff suppressed because it is too large
+ 0 - 2
searx/static/themes/oscar/js/searx.min.js


File diff suppressed because it is too large
+ 0 - 0
searx/static/themes/oscar/js/searx.min.js.map


+ 56 - 62
searx/static/themes/simple/css/searx-rtl.css

@@ -1,4 +1,3 @@
-/*! searx | 22-06-2021 | https://github.com/searxng/searxng */
 /*
 /*
 * searx, A privacy-respecting, hackable metasearch engine
 * searx, A privacy-respecting, hackable metasearch engine
 *
 *
@@ -1181,7 +1180,7 @@ html.js .show_if_nojs {
   text-align: center;
   text-align: center;
 }
 }
 .right {
 .right {
-  float: right ;
+  float: right;
 }
 }
 .left {
 .left {
   float: left;
   float: left;
@@ -1239,11 +1238,11 @@ tr:hover {
   background: #ececec;
   background: #ececec;
 }
 }
 div.selectable_url {
 div.selectable_url {
+  display: block;
   border: 1px solid #888;
   border: 1px solid #888;
   padding: 4px;
   padding: 4px;
   color: #444;
   color: #444;
   width: 100%;
   width: 100%;
-  display: block;
   margin: 0.1em;
   margin: 0.1em;
   overflow: hidden;
   overflow: hidden;
   height: 1.2em;
   height: 1.2em;
@@ -1263,7 +1262,7 @@ div.selectable_url pre {
   position: relative;
   position: relative;
   width: 70%;
   width: 70%;
   padding: 1em 1em 1em 2.7em;
   padding: 1em 1em 1em 2.7em;
-  margin: 0em 8% 1em 8%;
+  margin: 0 8% 1em 8%;
   border: 1px solid black;
   border: 1px solid black;
   border-radius: 4px;
   border-radius: 4px;
   text-align: left;
   text-align: left;
@@ -1271,7 +1270,7 @@ div.selectable_url pre {
   background: #fae1e1;
   background: #fae1e1;
   border-color: #db3434;
   border-color: #db3434;
 }
 }
-.dialog-error:before {
+.dialog-error::before {
   position: absolute;
   position: absolute;
   top: 0.5em;
   top: 0.5em;
   left: 0.5em;
   left: 0.5em;
@@ -1313,7 +1312,7 @@ div.selectable_url pre {
   position: relative;
   position: relative;
   width: 70%;
   width: 70%;
   padding: 1em 1em 1em 2.7em;
   padding: 1em 1em 1em 2.7em;
-  margin: 0em 8% 1em 8%;
+  margin: 0 8% 1em 8%;
   border: 1px solid black;
   border: 1px solid black;
   border-radius: 4px;
   border-radius: 4px;
   text-align: left;
   text-align: left;
@@ -1321,7 +1320,7 @@ div.selectable_url pre {
   background: #faf5e1;
   background: #faf5e1;
   border-color: #dbba34;
   border-color: #dbba34;
 }
 }
-.dialog-warning:before {
+.dialog-warning::before {
   position: absolute;
   position: absolute;
   top: 0.5em;
   top: 0.5em;
   left: 0.5em;
   left: 0.5em;
@@ -1363,7 +1362,7 @@ div.selectable_url pre {
   position: relative;
   position: relative;
   width: 70%;
   width: 70%;
   padding: 1em 1em 1em 2.7em;
   padding: 1em 1em 1em 2.7em;
-  margin: 0em 8% 1em 8%;
+  margin: 0 8% 1em 8%;
   border: 1px solid black;
   border: 1px solid black;
   border-radius: 4px;
   border-radius: 4px;
   text-align: left;
   text-align: left;
@@ -1377,7 +1376,7 @@ div.selectable_url pre {
   margin: 0 50% 0 0;
   margin: 0 50% 0 0;
   box-shadow: 0 0 1em;
   box-shadow: 0 0 1em;
 }
 }
-.dialog-modal:before {
+.dialog-modal::before {
   position: absolute;
   position: absolute;
   top: 0.5em;
   top: 0.5em;
   left: 0.5em;
   left: 0.5em;
@@ -1423,7 +1422,7 @@ div.selectable_url pre {
   margin: 0;
   margin: 0;
   border: none;
   border: none;
 }
 }
-/* -- tabs --*/
+/* -- tabs -- */
 .tabs .tabs > label {
 .tabs .tabs > label {
   font-size: 90%;
   font-size: 90%;
 }
 }
@@ -1450,7 +1449,7 @@ div.selectable_url pre {
   letter-spacing: 0.5px;
   letter-spacing: 0.5px;
   text-transform: uppercase;
   text-transform: uppercase;
   border: solid white;
   border: solid white;
-  border-width: 0px 0px 2px 0;
+  border-width: 0 0 2px 0;
   -webkit-touch-callout: none;
   -webkit-touch-callout: none;
   -webkit-user-select: none;
   -webkit-user-select: none;
   -khtml-user-select: none;
   -khtml-user-select: none;
@@ -1552,10 +1551,10 @@ select:focus {
     top: -5px;
     top: -5px;
     cursor: pointer;
     cursor: pointer;
     border-radius: 50px;
     border-radius: 50px;
-    box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.3);
+    box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.3);
     transition: all 0.4s ease;
     transition: all 0.4s ease;
     left: 27px;
     left: 27px;
-    background-color: #3498DB;
+    background-color: #3498db;
   }
   }
   .checkbox-onoff input[type=checkbox] {
   .checkbox-onoff input[type=checkbox] {
     visibility: hidden;
     visibility: hidden;
@@ -1565,7 +1564,7 @@ select:focus {
     background: #dcdcdc;
     background: #dcdcdc;
   }
   }
 }
 }
-/* -- checkbox --*/
+/* -- checkbox -- */
 @supports (transform: rotate(-45deg)) {
 @supports (transform: rotate(-45deg)) {
   .checkbox {
   .checkbox {
     width: 20px;
     width: 20px;
@@ -1581,9 +1580,9 @@ select:focus {
     left: 0;
     left: 0;
     background: white;
     background: white;
     border-radius: 4px;
     border-radius: 4px;
-    box-shadow: inset 0px 1px 1px white, 0px 1px 4px rgba(0, 0, 0, 0.5);
+    box-shadow: inset 0 1px 1px white, 0 1px 4px rgba(0, 0, 0, 0.5);
   }
   }
-  .checkbox label:after {
+  .checkbox label::after {
     content: '';
     content: '';
     width: 9px;
     width: 9px;
     height: 5px;
     height: 5px;
@@ -1600,8 +1599,8 @@ select:focus {
   .checkbox input[type=checkbox] {
   .checkbox input[type=checkbox] {
     visibility: hidden;
     visibility: hidden;
   }
   }
-  .checkbox input[type=checkbox]:checked + label:after {
-    border-color: #3498DB;
+  .checkbox input[type=checkbox]:checked + label::after {
+    border-color: #3498db;
     opacity: 1;
     opacity: 1;
   }
   }
   .checkbox input[disabled] + label {
   .checkbox input[disabled] + label {
@@ -1620,7 +1619,7 @@ select:focus {
 }
 }
 /* -- loader -- */
 /* -- loader -- */
 .loader,
 .loader,
-.loader:after {
+.loader::after {
   border-radius: 50%;
   border-radius: 50%;
   width: 2em;
   width: 2em;
   height: 2em;
   height: 2em;
@@ -1665,9 +1664,9 @@ select:focus {
   display: none;
   display: none;
   position: absolute;
   position: absolute;
   padding: 0.5rem 1rem;
   padding: 0.5rem 1rem;
-  margin: 0rem 0 0 2rem;
+  margin: 0 0 0 2rem;
   border: 1px solid #ddd;
   border: 1px solid #ddd;
-  box-shadow: 2px 2px 2px 0px rgba(0, 0, 0, 0.1);
+  box-shadow: 2px 2px 2px 0 rgba(0, 0, 0, 0.1);
   background: white;
   background: white;
   font-size: 14px;
   font-size: 14px;
   font-weight: normal;
   font-weight: normal;
@@ -1806,22 +1805,6 @@ td:hover .engine-tooltip,
     text-align: left;
     text-align: left;
   }
   }
 }
 }
-.ion-icon-big {
-  display: inline-block;
-  line-height: 1;
-  font-weight: normal;
-  font-style: normal;
-  speak: none;
-  text-decoration: inherit;
-  text-transform: none;
-  text-rendering: auto;
-  -webkit-font-smoothing: antialiased;
-  -moz-osx-font-smoothing: grayscale;
-  font-size: 149%;
-}
-.ion-icon-big:before {
-  font-family: "ion";
-}
 .index {
 .index {
   text-align: center;
   text-align: center;
 }
 }
@@ -1974,7 +1957,7 @@ td:hover .engine-tooltip,
   border-bottom: 1px solid #3498DB;
   border-bottom: 1px solid #3498DB;
   border-right: none;
   border-right: none;
   border-left: none;
   border-left: none;
-  border-radius: 0px;
+  border-radius: 0;
   outline: none;
   outline: none;
   color: #222;
   color: #222;
   font-size: 16px;
   font-size: 16px;
@@ -1986,10 +1969,6 @@ td:hover .engine-tooltip,
 #clear_search.empty * {
 #clear_search.empty * {
   display: none;
   display: none;
 }
 }
-#q::-ms-clear,
-#q::-webkit-search-cancel-button {
-  display: none;
-}
 #q,
 #q,
 #send_search {
 #send_search {
   display: block !important;
   display: block !important;
@@ -2000,7 +1979,7 @@ td:hover .engine-tooltip,
   height: 2.2em;
   height: 2.2em;
   background: none repeat scroll 0 0 #FFF;
   background: none repeat scroll 0 0 #FFF;
   border: 1px solid #3498DB;
   border: 1px solid #3498DB;
-  border-radius: 0px;
+  border-radius: 0;
   outline: none;
   outline: none;
   color: #222;
   color: #222;
   font-size: 16px;
   font-size: 16px;
@@ -2009,10 +1988,14 @@ td:hover .engine-tooltip,
 #q {
 #q {
   outline: medium none;
   outline: medium none;
   padding-left: 8px;
   padding-left: 8px;
-  padding-right: 0px !important;
+  padding-right: 0 !important;
   border-right: none;
   border-right: none;
   width: 40em;
   width: 40em;
 }
 }
+#q::-ms-clear,
+#q::-webkit-search-cancel-button {
+  display: none;
+}
 #send_search {
 #send_search {
   border-left: none;
   border-left: none;
   width: 2.2em;
   width: 2.2em;
@@ -2035,8 +2018,8 @@ td:hover .engine-tooltip,
     clear: both;
     clear: both;
   }
   }
   #categories .checkbox_container {
   #categories .checkbox_container {
-    margin-top: 2px;
     margin: auto;
     margin: auto;
+    margin-top: 2px;
   }
   }
   html.touch #main_index #categories_container,
   html.touch #main_index #categories_container,
   html.touch #main_results #categories_container {
   html.touch #main_results #categories_container {
@@ -2115,10 +2098,10 @@ td:hover .engine-tooltip,
   display: inline-block;
   display: inline-block;
   position: relative;
   position: relative;
   margin: 0 3px;
   margin: 0 3px;
-  padding: 0px;
-  /*label:hover {
+  padding: 0;
+  /* label:hover {
   border-bottom: 2px solid @color-categories-item-border-unselected-hover;
   border-bottom: 2px solid @color-categories-item-border-unselected-hover;
-  }*/
+  } */
 }
 }
 .category input {
 .category input {
   display: none;
   display: none;
@@ -2139,7 +2122,7 @@ td:hover .engine-tooltip,
   user-select: none;
   user-select: none;
 }
 }
 .category input[type="checkbox"]:focus + label {
 .category input[type="checkbox"]:focus + label {
-  box-shadow: 0px 0px 8px #3498DB;
+  box-shadow: 0 0 8px #3498db;
 }
 }
 .category input[type="checkbox"]:checked + label {
 .category input[type="checkbox"]:checked + label {
   background: #3498DB;
   background: #3498DB;
@@ -2157,13 +2140,29 @@ td:hover .engine-tooltip,
   opacity: 0;
   opacity: 0;
   transition: opacity 1s ease;
   transition: opacity 1s ease;
   font-size: 0.8em;
   font-size: 0.8em;
-  text-position: center;
+  text-align: center;
   background: white;
   background: white;
 }
 }
 #categories_container:hover .help {
 #categories_container:hover .help {
   opacity: 0.8;
   opacity: 0.8;
   transition: opacity 1s ease;
   transition: opacity 1s ease;
 }
 }
+.ion-icon-big {
+  display: inline-block;
+  line-height: 1;
+  font-weight: normal;
+  font-style: normal;
+  speak: none;
+  text-decoration: inherit;
+  text-transform: none;
+  text-rendering: auto;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+  font-size: 149%;
+}
+.ion-icon-big:before {
+  font-family: "ion";
+}
 html {
 html {
   font-family: arial, sans-serif;
   font-family: arial, sans-serif;
   font-size: 0.9em;
   font-size: 0.9em;
@@ -2183,11 +2182,6 @@ main {
 main {
 main {
   width: 100%;
   width: 100%;
 }
 }
-footer {
-  bottom: 0;
-  width: 100%;
-  height: 50px;
-}
 #main_preferences,
 #main_preferences,
 #main_about,
 #main_about,
 #main_stats {
 #main_stats {
@@ -2512,7 +2506,7 @@ article.result-images[data-vim-selected]::before {
   margin: 10px 8px 10px 8px;
   margin: 10px 8px 10px 8px;
   border: 1px solid #ddd;
   border: 1px solid #ddd;
   padding: 0.9em;
   padding: 0.9em;
-  box-shadow: 0px 0px 5px #CCC;
+  box-shadow: 0 0 5px #ccc;
 }
 }
 #answers h4 {
 #answers h4 {
   display: none;
   display: none;
@@ -2530,8 +2524,8 @@ article.result-images[data-vim-selected]::before {
   position: absolute;
   position: absolute;
   top: 100px;
   top: 100px;
   left: 57em;
   left: 57em;
-  margin: 0px 2px 5px 5px;
-  padding: 0px 2px 2px;
+  margin: 0 2px 5px 5px;
+  padding: 0 2px 2px;
   max-width: 25em;
   max-width: 25em;
   word-wrap: break-word;
   word-wrap: break-word;
 }
 }
@@ -2540,7 +2534,7 @@ article.result-images[data-vim-selected]::before {
   border: 1px solid #ddd;
   border: 1px solid #ddd;
   padding: 0.9em;
   padding: 0.9em;
   font-size: 0.9em;
   font-size: 0.9em;
-  box-shadow: 0px 0px 5px #CCC;
+  box-shadow: 0 0 5px #ccc;
 }
 }
 #sidebar .infobox h2 {
 #sidebar .infobox h2 {
   margin: 0 0 0.5em 0;
   margin: 0 0 0.5em 0;
@@ -2613,7 +2607,7 @@ article.result-images[data-vim-selected]::before {
   margin: 0 0 0 2em;
   margin: 0 0 0 2em;
   padding: 0;
   padding: 0;
   font-size: 1em;
   font-size: 1em;
-  box-shadow: 0px 0px 5px #CCC;
+  box-shadow: 0 0 5px #ccc;
   background: white;
   background: white;
   position: fixed;
   position: fixed;
   bottom: 85px;
   bottom: 85px;
@@ -2733,9 +2727,9 @@ article.result-images[data-vim-selected]::before {
   }
   }
   #linkto_preferences {
   #linkto_preferences {
     display: none;
     display: none;
-    postion: fixed !important;
+    position: fixed !important;
     top: 100px;
     top: 100px;
-    right: 0px;
+    right: 0;
   }
   }
   #sidebar {
   #sidebar {
     margin: 0 5px 2px 5px;
     margin: 0 5px 2px 5px;

File diff suppressed because it is too large
+ 0 - 0
searx/static/themes/simple/css/searx-rtl.min.css


File diff suppressed because it is too large
+ 0 - 0
searx/static/themes/simple/css/searx-rtl.min.css.map


+ 56 - 62
searx/static/themes/simple/css/searx.css

@@ -1,4 +1,3 @@
-/*! searx | 22-06-2021 | https://github.com/searxng/searxng */
 /*
 /*
 * searx, A privacy-respecting, hackable metasearch engine
 * searx, A privacy-respecting, hackable metasearch engine
 *
 *
@@ -1181,7 +1180,7 @@ html.js .show_if_nojs {
   text-align: center;
   text-align: center;
 }
 }
 .right {
 .right {
-  float: right ;
+  float: right;
 }
 }
 .left {
 .left {
   float: left;
   float: left;
@@ -1239,11 +1238,11 @@ tr:hover {
   background: #ececec;
   background: #ececec;
 }
 }
 div.selectable_url {
 div.selectable_url {
+  display: block;
   border: 1px solid #888;
   border: 1px solid #888;
   padding: 4px;
   padding: 4px;
   color: #444;
   color: #444;
   width: 100%;
   width: 100%;
-  display: block;
   margin: 0.1em;
   margin: 0.1em;
   overflow: hidden;
   overflow: hidden;
   height: 1.2em;
   height: 1.2em;
@@ -1263,7 +1262,7 @@ div.selectable_url pre {
   position: relative;
   position: relative;
   width: 70%;
   width: 70%;
   padding: 1em 1em 1em 2.7em;
   padding: 1em 1em 1em 2.7em;
-  margin: 0em 8% 1em 8%;
+  margin: 0 8% 1em 8%;
   border: 1px solid black;
   border: 1px solid black;
   border-radius: 4px;
   border-radius: 4px;
   text-align: left;
   text-align: left;
@@ -1271,7 +1270,7 @@ div.selectable_url pre {
   background: #fae1e1;
   background: #fae1e1;
   border-color: #db3434;
   border-color: #db3434;
 }
 }
-.dialog-error:before {
+.dialog-error::before {
   position: absolute;
   position: absolute;
   top: 0.5em;
   top: 0.5em;
   left: 0.5em;
   left: 0.5em;
@@ -1313,7 +1312,7 @@ div.selectable_url pre {
   position: relative;
   position: relative;
   width: 70%;
   width: 70%;
   padding: 1em 1em 1em 2.7em;
   padding: 1em 1em 1em 2.7em;
-  margin: 0em 8% 1em 8%;
+  margin: 0 8% 1em 8%;
   border: 1px solid black;
   border: 1px solid black;
   border-radius: 4px;
   border-radius: 4px;
   text-align: left;
   text-align: left;
@@ -1321,7 +1320,7 @@ div.selectable_url pre {
   background: #faf5e1;
   background: #faf5e1;
   border-color: #dbba34;
   border-color: #dbba34;
 }
 }
-.dialog-warning:before {
+.dialog-warning::before {
   position: absolute;
   position: absolute;
   top: 0.5em;
   top: 0.5em;
   left: 0.5em;
   left: 0.5em;
@@ -1363,7 +1362,7 @@ div.selectable_url pre {
   position: relative;
   position: relative;
   width: 70%;
   width: 70%;
   padding: 1em 1em 1em 2.7em;
   padding: 1em 1em 1em 2.7em;
-  margin: 0em 8% 1em 8%;
+  margin: 0 8% 1em 8%;
   border: 1px solid black;
   border: 1px solid black;
   border-radius: 4px;
   border-radius: 4px;
   text-align: left;
   text-align: left;
@@ -1377,7 +1376,7 @@ div.selectable_url pre {
   margin: 0 50% 0 0;
   margin: 0 50% 0 0;
   box-shadow: 0 0 1em;
   box-shadow: 0 0 1em;
 }
 }
-.dialog-modal:before {
+.dialog-modal::before {
   position: absolute;
   position: absolute;
   top: 0.5em;
   top: 0.5em;
   left: 0.5em;
   left: 0.5em;
@@ -1423,7 +1422,7 @@ div.selectable_url pre {
   margin: 0;
   margin: 0;
   border: none;
   border: none;
 }
 }
-/* -- tabs --*/
+/* -- tabs -- */
 .tabs .tabs > label {
 .tabs .tabs > label {
   font-size: 90%;
   font-size: 90%;
 }
 }
@@ -1450,7 +1449,7 @@ div.selectable_url pre {
   letter-spacing: 0.5px;
   letter-spacing: 0.5px;
   text-transform: uppercase;
   text-transform: uppercase;
   border: solid white;
   border: solid white;
-  border-width: 0px 0px 2px 0;
+  border-width: 0 0 2px 0;
   -webkit-touch-callout: none;
   -webkit-touch-callout: none;
   -webkit-user-select: none;
   -webkit-user-select: none;
   -khtml-user-select: none;
   -khtml-user-select: none;
@@ -1552,10 +1551,10 @@ select:focus {
     top: -5px;
     top: -5px;
     cursor: pointer;
     cursor: pointer;
     border-radius: 50px;
     border-radius: 50px;
-    box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.3);
+    box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.3);
     transition: all 0.4s ease;
     transition: all 0.4s ease;
     left: 27px;
     left: 27px;
-    background-color: #3498DB;
+    background-color: #3498db;
   }
   }
   .checkbox-onoff input[type=checkbox] {
   .checkbox-onoff input[type=checkbox] {
     visibility: hidden;
     visibility: hidden;
@@ -1565,7 +1564,7 @@ select:focus {
     background: #dcdcdc;
     background: #dcdcdc;
   }
   }
 }
 }
-/* -- checkbox --*/
+/* -- checkbox -- */
 @supports (transform: rotate(-45deg)) {
 @supports (transform: rotate(-45deg)) {
   .checkbox {
   .checkbox {
     width: 20px;
     width: 20px;
@@ -1581,9 +1580,9 @@ select:focus {
     left: 0;
     left: 0;
     background: white;
     background: white;
     border-radius: 4px;
     border-radius: 4px;
-    box-shadow: inset 0px 1px 1px white, 0px 1px 4px rgba(0, 0, 0, 0.5);
+    box-shadow: inset 0 1px 1px white, 0 1px 4px rgba(0, 0, 0, 0.5);
   }
   }
-  .checkbox label:after {
+  .checkbox label::after {
     content: '';
     content: '';
     width: 9px;
     width: 9px;
     height: 5px;
     height: 5px;
@@ -1600,8 +1599,8 @@ select:focus {
   .checkbox input[type=checkbox] {
   .checkbox input[type=checkbox] {
     visibility: hidden;
     visibility: hidden;
   }
   }
-  .checkbox input[type=checkbox]:checked + label:after {
-    border-color: #3498DB;
+  .checkbox input[type=checkbox]:checked + label::after {
+    border-color: #3498db;
     opacity: 1;
     opacity: 1;
   }
   }
   .checkbox input[disabled] + label {
   .checkbox input[disabled] + label {
@@ -1620,7 +1619,7 @@ select:focus {
 }
 }
 /* -- loader -- */
 /* -- loader -- */
 .loader,
 .loader,
-.loader:after {
+.loader::after {
   border-radius: 50%;
   border-radius: 50%;
   width: 2em;
   width: 2em;
   height: 2em;
   height: 2em;
@@ -1665,9 +1664,9 @@ select:focus {
   display: none;
   display: none;
   position: absolute;
   position: absolute;
   padding: 0.5rem 1rem;
   padding: 0.5rem 1rem;
-  margin: 0rem 0 0 2rem;
+  margin: 0 0 0 2rem;
   border: 1px solid #ddd;
   border: 1px solid #ddd;
-  box-shadow: 2px 2px 2px 0px rgba(0, 0, 0, 0.1);
+  box-shadow: 2px 2px 2px 0 rgba(0, 0, 0, 0.1);
   background: white;
   background: white;
   font-size: 14px;
   font-size: 14px;
   font-weight: normal;
   font-weight: normal;
@@ -1806,22 +1805,6 @@ td:hover .engine-tooltip,
     text-align: left;
     text-align: left;
   }
   }
 }
 }
-.ion-icon-big {
-  display: inline-block;
-  line-height: 1;
-  font-weight: normal;
-  font-style: normal;
-  speak: none;
-  text-decoration: inherit;
-  text-transform: none;
-  text-rendering: auto;
-  -webkit-font-smoothing: antialiased;
-  -moz-osx-font-smoothing: grayscale;
-  font-size: 149%;
-}
-.ion-icon-big:before {
-  font-family: "ion";
-}
 .index {
 .index {
   text-align: center;
   text-align: center;
 }
 }
@@ -1974,7 +1957,7 @@ td:hover .engine-tooltip,
   border-bottom: 1px solid #3498DB;
   border-bottom: 1px solid #3498DB;
   border-right: none;
   border-right: none;
   border-left: none;
   border-left: none;
-  border-radius: 0px;
+  border-radius: 0;
   outline: none;
   outline: none;
   color: #222;
   color: #222;
   font-size: 16px;
   font-size: 16px;
@@ -1986,10 +1969,6 @@ td:hover .engine-tooltip,
 #clear_search.empty * {
 #clear_search.empty * {
   display: none;
   display: none;
 }
 }
-#q::-ms-clear,
-#q::-webkit-search-cancel-button {
-  display: none;
-}
 #q,
 #q,
 #send_search {
 #send_search {
   display: block !important;
   display: block !important;
@@ -2000,7 +1979,7 @@ td:hover .engine-tooltip,
   height: 2.2em;
   height: 2.2em;
   background: none repeat scroll 0 0 #FFF;
   background: none repeat scroll 0 0 #FFF;
   border: 1px solid #3498DB;
   border: 1px solid #3498DB;
-  border-radius: 0px;
+  border-radius: 0;
   outline: none;
   outline: none;
   color: #222;
   color: #222;
   font-size: 16px;
   font-size: 16px;
@@ -2009,10 +1988,14 @@ td:hover .engine-tooltip,
 #q {
 #q {
   outline: medium none;
   outline: medium none;
   padding-left: 8px;
   padding-left: 8px;
-  padding-right: 0px !important;
+  padding-right: 0 !important;
   border-right: none;
   border-right: none;
   width: 40em;
   width: 40em;
 }
 }
+#q::-ms-clear,
+#q::-webkit-search-cancel-button {
+  display: none;
+}
 #send_search {
 #send_search {
   border-left: none;
   border-left: none;
   width: 2.2em;
   width: 2.2em;
@@ -2035,8 +2018,8 @@ td:hover .engine-tooltip,
     clear: both;
     clear: both;
   }
   }
   #categories .checkbox_container {
   #categories .checkbox_container {
-    margin-top: 2px;
     margin: auto;
     margin: auto;
+    margin-top: 2px;
   }
   }
   html.touch #main_index #categories_container,
   html.touch #main_index #categories_container,
   html.touch #main_results #categories_container {
   html.touch #main_results #categories_container {
@@ -2115,10 +2098,10 @@ td:hover .engine-tooltip,
   display: inline-block;
   display: inline-block;
   position: relative;
   position: relative;
   margin: 0 3px;
   margin: 0 3px;
-  padding: 0px;
-  /*label:hover {
+  padding: 0;
+  /* label:hover {
   border-bottom: 2px solid @color-categories-item-border-unselected-hover;
   border-bottom: 2px solid @color-categories-item-border-unselected-hover;
-  }*/
+  } */
 }
 }
 .category input {
 .category input {
   display: none;
   display: none;
@@ -2139,7 +2122,7 @@ td:hover .engine-tooltip,
   user-select: none;
   user-select: none;
 }
 }
 .category input[type="checkbox"]:focus + label {
 .category input[type="checkbox"]:focus + label {
-  box-shadow: 0px 0px 8px #3498DB;
+  box-shadow: 0 0 8px #3498db;
 }
 }
 .category input[type="checkbox"]:checked + label {
 .category input[type="checkbox"]:checked + label {
   background: #3498DB;
   background: #3498DB;
@@ -2157,13 +2140,29 @@ td:hover .engine-tooltip,
   opacity: 0;
   opacity: 0;
   transition: opacity 1s ease;
   transition: opacity 1s ease;
   font-size: 0.8em;
   font-size: 0.8em;
-  text-position: center;
+  text-align: center;
   background: white;
   background: white;
 }
 }
 #categories_container:hover .help {
 #categories_container:hover .help {
   opacity: 0.8;
   opacity: 0.8;
   transition: opacity 1s ease;
   transition: opacity 1s ease;
 }
 }
+.ion-icon-big {
+  display: inline-block;
+  line-height: 1;
+  font-weight: normal;
+  font-style: normal;
+  speak: none;
+  text-decoration: inherit;
+  text-transform: none;
+  text-rendering: auto;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+  font-size: 149%;
+}
+.ion-icon-big:before {
+  font-family: "ion";
+}
 html {
 html {
   font-family: arial, sans-serif;
   font-family: arial, sans-serif;
   font-size: 0.9em;
   font-size: 0.9em;
@@ -2183,11 +2182,6 @@ main {
 main {
 main {
   width: 100%;
   width: 100%;
 }
 }
-footer {
-  bottom: 0;
-  width: 100%;
-  height: 50px;
-}
 #main_preferences,
 #main_preferences,
 #main_about,
 #main_about,
 #main_stats {
 #main_stats {
@@ -2512,7 +2506,7 @@ article.result-images[data-vim-selected]::before {
   margin: 10px 8px 10px 8px;
   margin: 10px 8px 10px 8px;
   border: 1px solid #ddd;
   border: 1px solid #ddd;
   padding: 0.9em;
   padding: 0.9em;
-  box-shadow: 0px 0px 5px #CCC;
+  box-shadow: 0 0 5px #ccc;
 }
 }
 #answers h4 {
 #answers h4 {
   display: none;
   display: none;
@@ -2530,8 +2524,8 @@ article.result-images[data-vim-selected]::before {
   position: absolute;
   position: absolute;
   top: 100px;
   top: 100px;
   left: 57em;
   left: 57em;
-  margin: 0px 2px 5px 5px;
-  padding: 0px 2px 2px;
+  margin: 0 2px 5px 5px;
+  padding: 0 2px 2px;
   max-width: 25em;
   max-width: 25em;
   word-wrap: break-word;
   word-wrap: break-word;
 }
 }
@@ -2540,7 +2534,7 @@ article.result-images[data-vim-selected]::before {
   border: 1px solid #ddd;
   border: 1px solid #ddd;
   padding: 0.9em;
   padding: 0.9em;
   font-size: 0.9em;
   font-size: 0.9em;
-  box-shadow: 0px 0px 5px #CCC;
+  box-shadow: 0 0 5px #ccc;
 }
 }
 #sidebar .infobox h2 {
 #sidebar .infobox h2 {
   margin: 0 0 0.5em 0;
   margin: 0 0 0.5em 0;
@@ -2613,7 +2607,7 @@ article.result-images[data-vim-selected]::before {
   margin: 0 0 0 2em;
   margin: 0 0 0 2em;
   padding: 0;
   padding: 0;
   font-size: 1em;
   font-size: 1em;
-  box-shadow: 0px 0px 5px #CCC;
+  box-shadow: 0 0 5px #ccc;
   background: white;
   background: white;
   position: fixed;
   position: fixed;
   bottom: 85px;
   bottom: 85px;
@@ -2733,9 +2727,9 @@ article.result-images[data-vim-selected]::before {
   }
   }
   #linkto_preferences {
   #linkto_preferences {
     display: none;
     display: none;
-    postion: fixed !important;
+    position: fixed !important;
     top: 100px;
     top: 100px;
-    right: 0px;
+    right: 0;
   }
   }
   #sidebar {
   #sidebar {
     margin: 0 5px 2px 5px;
     margin: 0 5px 2px 5px;

File diff suppressed because it is too large
+ 0 - 0
searx/static/themes/simple/css/searx.min.css


File diff suppressed because it is too large
+ 0 - 0
searx/static/themes/simple/css/searx.min.css.map


+ 0 - 3
searx/static/themes/simple/gruntfile.js

@@ -71,7 +71,6 @@ module.exports = function(grunt) {
     },
     },
     uglify: {
     uglify: {
       options: {
       options: {
-        banner: '/*! simple/searx.min.js | <%= grunt.template.today("dd-mm-yyyy") %> | <%= process.env.GIT_URL %> */\n',
         output: {
         output: {
 	        comments: 'some'
 	        comments: 'some'
         },
         },
@@ -156,7 +155,6 @@ module.exports = function(grunt) {
       development: {
       development: {
         options: {
         options: {
           paths: ["less"],
           paths: ["less"],
-          banner: '/*! searx | <%= grunt.template.today("dd-mm-yyyy") %> | <%= process.env.GIT_URL %> */\n'
         },
         },
         files: {
         files: {
           "css/searx.css": "src/less/style.less",
           "css/searx.css": "src/less/style.less",
@@ -173,7 +171,6 @@ module.exports = function(grunt) {
           sourceMapURL: (name) => { const s = name.split('/'); return s[s.length - 1] + '.map';},
           sourceMapURL: (name) => { const s = name.split('/'); return s[s.length - 1] + '.map';},
           outputSourceFiles: false,
           outputSourceFiles: false,
           sourceMapRootpath: '../',
           sourceMapRootpath: '../',
-          banner: '/*! searx | <%= grunt.template.today("dd-mm-yyyy") %> | <%= process.env.GIT_URL %> */\n'
         },
         },
         files: {
         files: {
           "css/searx.min.css": "src/less/style.less",
           "css/searx.min.css": "src/less/style.less",

+ 0 - 2
searx/static/themes/simple/js/searx.head.min.js

@@ -1,4 +1,2 @@
-/*! simple/searx.min.js | 22-06-2021 | https://github.com/searxng/searxng */
-
 (function(t,e){"use strict";var a=e.currentScript||function(){var t=e.getElementsByTagName("script");return t[t.length-1]}();t.searx={touch:"ontouchstart"in t||t.DocumentTouch&&document instanceof DocumentTouch||false,method:a.getAttribute("data-method"),autocompleter:a.getAttribute("data-autocompleter")==="true",search_on_category_select:a.getAttribute("data-search-on-category-select")==="true",infinite_scroll:a.getAttribute("data-infinite-scroll")==="true",static_path:a.getAttribute("data-static-path"),translations:JSON.parse(a.getAttribute("data-translations"))};e.getElementsByTagName("html")[0].className=t.searx.touch?"js touch":"js"})(window,document);
 (function(t,e){"use strict";var a=e.currentScript||function(){var t=e.getElementsByTagName("script");return t[t.length-1]}();t.searx={touch:"ontouchstart"in t||t.DocumentTouch&&document instanceof DocumentTouch||false,method:a.getAttribute("data-method"),autocompleter:a.getAttribute("data-autocompleter")==="true",search_on_category_select:a.getAttribute("data-search-on-category-select")==="true",infinite_scroll:a.getAttribute("data-infinite-scroll")==="true",static_path:a.getAttribute("data-static-path"),translations:JSON.parse(a.getAttribute("data-translations"))};e.getElementsByTagName("html")[0].className=t.searx.touch?"js touch":"js"})(window,document);
 //# sourceMappingURL=searx.head.min.js.map
 //# sourceMappingURL=searx.head.min.js.map

+ 1 - 1
searx/static/themes/simple/js/searx.head.min.js.map

@@ -1 +1 @@
-{"version":3,"file":"searx.head.min.js","sources":["searx.head.js"],"names":["w","d","script","currentScript","scripts","getElementsByTagName","length","searx","touch","DocumentTouch","document","method","getAttribute","autocompleter","search_on_category_select","infinite_scroll","static_path","translations","JSON","parse","className","window"],"mappings":";;CAiBA,SAAUA,EAAGC,gBAIT,IAAIC,EAASD,EAAEE,eAAkB,WAC7B,IAAIC,EAAUH,EAAEI,qBAAqB,UACrC,OAAOD,EAAQA,EAAQE,OAAS,GAFH,GAMjCN,EAAEO,MAAQ,CACNC,MAAS,iBAAkBR,GAAMA,EAAES,eAAiBC,oBAAoBD,eAAkB,MAC1FE,OAAQT,EAAOU,aAAa,eAC5BC,cAAeX,EAAOU,aAAa,wBAA0B,OAC7DE,0BAA2BZ,EAAOU,aAAa,oCAAsC,OACrFG,gBAAiBb,EAAOU,aAAa,0BAA4B,OACjEI,YAAad,EAAOU,aAAa,oBACjCK,aAAcC,KAAKC,MAAMjB,EAAOU,aAAa,uBAIjDX,EAAEI,qBAAqB,QAAQ,GAAGe,UAAapB,EAAEO,MAAW,MAAE,WAAW,MArB7E,CAsBGc,OAAQX"}
+{"version":3,"file":"searx.head.min.js","sources":["searx.head.js"],"names":["w","d","script","currentScript","scripts","getElementsByTagName","length","searx","touch","DocumentTouch","document","method","getAttribute","autocompleter","search_on_category_select","infinite_scroll","static_path","translations","JSON","parse","className","window"],"mappings":"CAiBA,SAAUA,EAAGC,gBAIT,IAAIC,EAASD,EAAEE,eAAkB,WAC7B,IAAIC,EAAUH,EAAEI,qBAAqB,UACrC,OAAOD,EAAQA,EAAQE,OAAS,GAFH,GAMjCN,EAAEO,MAAQ,CACNC,MAAS,iBAAkBR,GAAMA,EAAES,eAAiBC,oBAAoBD,eAAkB,MAC1FE,OAAQT,EAAOU,aAAa,eAC5BC,cAAeX,EAAOU,aAAa,wBAA0B,OAC7DE,0BAA2BZ,EAAOU,aAAa,oCAAsC,OACrFG,gBAAiBb,EAAOU,aAAa,0BAA4B,OACjEI,YAAad,EAAOU,aAAa,oBACjCK,aAAcC,KAAKC,MAAMjB,EAAOU,aAAa,uBAIjDX,EAAEI,qBAAqB,QAAQ,GAAGe,UAAapB,EAAEO,MAAW,MAAE,WAAW,MArB7E,CAsBGc,OAAQX"}

File diff suppressed because it is too large
+ 0 - 2
searx/static/themes/simple/js/searx.min.js


File diff suppressed because it is too large
+ 0 - 0
searx/static/themes/simple/js/searx.min.js.map


+ 124 - 0
utils/lib_static.sh

@@ -0,0 +1,124 @@
+#!/usr/bin/env bash
+# SPDX-License-Identifier: AGPL-3.0-or-later
+
+
+STATIC_BUILD_COMMIT="[build] /static"
+STATIC_BUILT_PATHS=(
+    searx/static/themes/oscar/css
+    searx/static/themes/oscar/js
+    searx/static/themes/oscar/src/generated/pygments-logicodev.less
+    searx/static/themes/oscar/src/generated/pygments-pointhi.less
+    searx/static/themes/simple/css
+    searx/static/themes/simple/js
+    searx/static/themes/simple/src/generated/pygments.less
+)
+
+static_help(){
+    cat <<EOF
+static.build.:  ${STATIC_BUILD_COMMIT}
+  commit    : build & commit /static folder
+  drop      : drop last commit if it was previously done by static.build.commit
+  restore   : git restore of the /static folder (after themes.all)
+EOF
+}
+
+is.static.build.commit() {
+
+    local commit_sha="$1"
+    local commit_message
+    local commit_files
+
+    # check commit message
+    commit_message=$(git show -s --format=%s "${commit_sha}")
+    if [ "${commit_message}" != "${STATIC_BUILD_COMMIT}" ]; then
+        err_msg "expecting commit message: '${STATIC_BUILD_COMMIT}'"
+        err_msg "commit message of ${commit_sha} is: '${commit_message}'"
+        return 1
+    fi
+
+    # check all files of the commit belongs to $STATIC_BUILT_PATHS
+    commit_files=$(git diff-tree --no-commit-id --name-only -r "${commit_sha}")
+    for i in ${STATIC_BUILT_PATHS[*]}; do
+        # remove files of ${STATIC_BUILT_PATHS}
+        commit_files=$(echo "${commit_files}" | grep -v "^${i}")
+    done
+
+    if [ -n "${commit_files}" ]; then
+        err_msg "commit ${commit_sha} contains files not a part of ${STATIC_BUILD_COMMIT}"
+        echo "${commit_files}" | prefix_stdout "  "
+        return 2
+    fi
+    return 0
+}
+
+static.build.drop() {
+    # drop last commit if it was made by the static.build.commit command
+
+    local last_commit_id
+    local branch
+
+    build_msg STATIC "drop last commit if it was previously done by static.build.commit"
+
+    # get only last (option -n1) local commit not in remotes
+    branch="$(git branch --show-current)"
+    last_commit_id="$(git log -n1 "${branch}" --pretty=format:'%h'\
+     --not --exclude="${branch}" --branches --remotes)"
+
+    if [ -z "${last_commit_id}" ]; then
+        err_msg "there are no local commits"
+        return 1
+    fi
+
+    if ! is.static.build.commit "${last_commit_id}"; then
+        return $?
+    fi
+
+    build_msg STATIC "drop last commit ${last_commit_id}"
+    git reset --hard HEAD~1
+}
+
+static.build.commit() {
+    # call the "static.build.drop" command, then "themes.all" then commit the
+    # built files ($BUILT_PATHS).
+
+    build_msg STATIC "build & commit /static files"
+
+    # check for not commited files
+    if [ -n "$(git diff --name-only)" ]; then
+        err_msg "some files are not commited:"
+        git diff --name-only | prefix_stdout "  "
+        return 1
+    fi
+
+    # check for staged files
+    if [ -n "$(git diff --name-only --cached)" ]; then
+        err_msg "some files are staged:"
+        git diff --name-only --cached | prefix_stdout "  "
+        return 1
+    fi
+
+    # drop existing commit from previos build
+    static.build.drop &>/dev/null
+
+    (   set -e
+        # build the themes
+        themes.all
+
+        # add build files
+        for built_path in "${STATIC_BUILT_PATHS[@]}"; do
+            git add -v "${built_path}"
+        done
+
+        # check for modified files that are not staged
+        if [ -n "$(git diff --name-only)" ]; then
+            die 42 "themes.all has created files that are not in STATIC_BUILT_PATHS"
+        fi
+        git commit -m "${STATIC_BUILD_COMMIT}"
+    )
+}
+
+static.build.restore() {
+    build_msg STATIC "git-restore of the built files (/static)"
+    git restore --staged "${STATIC_BUILT_PATHS[@]}"
+    git restore --worktree "${STATIC_BUILT_PATHS[@]}"
+}

Some files were not shown because too many files changed in this diff