diff --git a/Makefile b/Makefile index cd541a9a7..ea743dd35 100644 --- a/Makefile +++ b/Makefile @@ -58,15 +58,16 @@ test.shell: dockerfiles/docker-entrypoint.sh $(Q)shellcheck -x -s bash \ utils/brand.env \ - ./manage \ + $(MTOOLS) \ utils/lib.sh \ + utils/lib_static.sh \ utils/filtron.sh \ utils/searx.sh \ utils/morty.sh \ utils/lxc.sh \ utils/lxc-searx.env \ .config.sh - $(Q)./manage build_msg TEST "$@ OK" + $(Q)$(MTOOLS) build_msg TEST "$@ OK" # wrap ./manage script @@ -83,12 +84,14 @@ MANAGE += pyenv pyenv.install pyenv.uninstall MANAGE += pypi.upload pypi.upload.test 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 += static.build.commit static.build.drop static.build.restore PHONY += $(MANAGE) $(MANAGE): $(Q)$(MTOOLS) $@ + # deprecated PHONY += docs docs-clean docs-live docker themes diff --git a/docs/dev/quickstart.rst b/docs/dev/quickstart.rst index 74bb52960..8132bccc4 100644 --- a/docs/dev/quickstart.rst +++ b/docs/dev/quickstart.rst @@ -29,7 +29,7 @@ If you implement themes, you will need to compile styles and JavaScript before .. code:: sh - make themes + make themes.all Don't forget to install npm_ first. @@ -53,3 +53,24 @@ Don't forget to install npm_ first. 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 diff --git a/manage b/manage index f9e6861b0..7ddf3b7c2 100755 --- a/manage +++ b/manage @@ -9,6 +9,9 @@ source "$(dirname "${BASH_SOURCE[0]}")/utils/lib.sh" source "${REPO_ROOT}/utils/brand.env" source_dot_config +# shellcheck source=utils/lib_static.sh +source "$(dirname "${BASH_SOURCE[0]}")/utils/lib_static.sh" + # config PYOBJECTS="searx" @@ -42,53 +45,54 @@ PYLINT_OPTIONS="-m pylint -j 0 --rcfile .pylintrc" help() { cat < | <%= process.env.GIT_URL %> */\n' }, dist: { files: { diff --git a/searx/static/themes/oscar/js/searx.min.js b/searx/static/themes/oscar/js/searx.min.js index 550be7ca2..d6bc50df1 100644 Binary files a/searx/static/themes/oscar/js/searx.min.js and b/searx/static/themes/oscar/js/searx.min.js differ diff --git a/searx/static/themes/oscar/js/searx.min.js.map b/searx/static/themes/oscar/js/searx.min.js.map index c8ea109b5..f42ad570e 100644 Binary files a/searx/static/themes/oscar/js/searx.min.js.map and b/searx/static/themes/oscar/js/searx.min.js.map differ diff --git a/searx/static/themes/simple/css/searx-rtl.css b/searx/static/themes/simple/css/searx-rtl.css index 265d41340..82f464484 100644 --- a/searx/static/themes/simple/css/searx-rtl.css +++ b/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 * @@ -1181,7 +1180,7 @@ html.js .show_if_nojs { text-align: center; } .right { - float: right ; + float: right; } .left { float: left; @@ -1239,11 +1238,11 @@ tr:hover { background: #ececec; } div.selectable_url { + display: block; border: 1px solid #888; padding: 4px; color: #444; width: 100%; - display: block; margin: 0.1em; overflow: hidden; height: 1.2em; @@ -1263,7 +1262,7 @@ div.selectable_url pre { position: relative; width: 70%; padding: 1em 1em 1em 2.7em; - margin: 0em 8% 1em 8%; + margin: 0 8% 1em 8%; border: 1px solid black; border-radius: 4px; text-align: left; @@ -1271,7 +1270,7 @@ div.selectable_url pre { background: #fae1e1; border-color: #db3434; } -.dialog-error:before { +.dialog-error::before { position: absolute; top: 0.5em; left: 0.5em; @@ -1313,7 +1312,7 @@ div.selectable_url pre { position: relative; width: 70%; padding: 1em 1em 1em 2.7em; - margin: 0em 8% 1em 8%; + margin: 0 8% 1em 8%; border: 1px solid black; border-radius: 4px; text-align: left; @@ -1321,7 +1320,7 @@ div.selectable_url pre { background: #faf5e1; border-color: #dbba34; } -.dialog-warning:before { +.dialog-warning::before { position: absolute; top: 0.5em; left: 0.5em; @@ -1363,7 +1362,7 @@ div.selectable_url pre { position: relative; width: 70%; padding: 1em 1em 1em 2.7em; - margin: 0em 8% 1em 8%; + margin: 0 8% 1em 8%; border: 1px solid black; border-radius: 4px; text-align: left; @@ -1377,7 +1376,7 @@ div.selectable_url pre { margin: 0 50% 0 0; box-shadow: 0 0 1em; } -.dialog-modal:before { +.dialog-modal::before { position: absolute; top: 0.5em; left: 0.5em; @@ -1423,7 +1422,7 @@ div.selectable_url pre { margin: 0; border: none; } -/* -- tabs --*/ +/* -- tabs -- */ .tabs .tabs > label { font-size: 90%; } @@ -1450,7 +1449,7 @@ div.selectable_url pre { letter-spacing: 0.5px; text-transform: uppercase; border: solid white; - border-width: 0px 0px 2px 0; + border-width: 0 0 2px 0; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; @@ -1552,10 +1551,10 @@ select:focus { top: -5px; cursor: pointer; 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; left: 27px; - background-color: #3498DB; + background-color: #3498db; } .checkbox-onoff input[type=checkbox] { visibility: hidden; @@ -1565,7 +1564,7 @@ select:focus { background: #dcdcdc; } } -/* -- checkbox --*/ +/* -- checkbox -- */ @supports (transform: rotate(-45deg)) { .checkbox { width: 20px; @@ -1581,9 +1580,9 @@ select:focus { left: 0; background: white; 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: ''; width: 9px; height: 5px; @@ -1600,8 +1599,8 @@ select:focus { .checkbox input[type=checkbox] { visibility: hidden; } - .checkbox input[type=checkbox]:checked + label:after { - border-color: #3498DB; + .checkbox input[type=checkbox]:checked + label::after { + border-color: #3498db; opacity: 1; } .checkbox input[disabled] + label { @@ -1620,7 +1619,7 @@ select:focus { } /* -- loader -- */ .loader, -.loader:after { +.loader::after { border-radius: 50%; width: 2em; height: 2em; @@ -1665,9 +1664,9 @@ select:focus { display: none; position: absolute; padding: 0.5rem 1rem; - margin: 0rem 0 0 2rem; + margin: 0 0 0 2rem; 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; font-size: 14px; font-weight: normal; @@ -1806,22 +1805,6 @@ td:hover .engine-tooltip, 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 { text-align: center; } @@ -1974,7 +1957,7 @@ td:hover .engine-tooltip, border-bottom: 1px solid #3498DB; border-right: none; border-left: none; - border-radius: 0px; + border-radius: 0; outline: none; color: #222; font-size: 16px; @@ -1986,10 +1969,6 @@ td:hover .engine-tooltip, #clear_search.empty * { display: none; } -#q::-ms-clear, -#q::-webkit-search-cancel-button { - display: none; -} #q, #send_search { display: block !important; @@ -2000,7 +1979,7 @@ td:hover .engine-tooltip, height: 2.2em; background: none repeat scroll 0 0 #FFF; border: 1px solid #3498DB; - border-radius: 0px; + border-radius: 0; outline: none; color: #222; font-size: 16px; @@ -2009,10 +1988,14 @@ td:hover .engine-tooltip, #q { outline: medium none; padding-left: 8px; - padding-right: 0px !important; + padding-right: 0 !important; border-right: none; width: 40em; } +#q::-ms-clear, +#q::-webkit-search-cancel-button { + display: none; +} #send_search { border-left: none; width: 2.2em; @@ -2035,8 +2018,8 @@ td:hover .engine-tooltip, clear: both; } #categories .checkbox_container { - margin-top: 2px; margin: auto; + margin-top: 2px; } html.touch #main_index #categories_container, html.touch #main_results #categories_container { @@ -2115,10 +2098,10 @@ td:hover .engine-tooltip, display: inline-block; position: relative; margin: 0 3px; - padding: 0px; - /*label:hover { + padding: 0; + /* label:hover { border-bottom: 2px solid @color-categories-item-border-unselected-hover; - }*/ + } */ } .category input { display: none; @@ -2139,7 +2122,7 @@ td:hover .engine-tooltip, user-select: none; } .category input[type="checkbox"]:focus + label { - box-shadow: 0px 0px 8px #3498DB; + box-shadow: 0 0 8px #3498db; } .category input[type="checkbox"]:checked + label { background: #3498DB; @@ -2157,13 +2140,29 @@ td:hover .engine-tooltip, opacity: 0; transition: opacity 1s ease; font-size: 0.8em; - text-position: center; + text-align: center; background: white; } #categories_container:hover .help { opacity: 0.8; 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 { font-family: arial, sans-serif; font-size: 0.9em; @@ -2183,11 +2182,6 @@ main { main { width: 100%; } -footer { - bottom: 0; - width: 100%; - height: 50px; -} #main_preferences, #main_about, #main_stats { @@ -2512,7 +2506,7 @@ article.result-images[data-vim-selected]::before { margin: 10px 8px 10px 8px; border: 1px solid #ddd; padding: 0.9em; - box-shadow: 0px 0px 5px #CCC; + box-shadow: 0 0 5px #ccc; } #answers h4 { display: none; @@ -2530,8 +2524,8 @@ article.result-images[data-vim-selected]::before { position: absolute; top: 100px; left: 57em; - margin: 0px 2px 5px 5px; - padding: 0px 2px 2px; + margin: 0 2px 5px 5px; + padding: 0 2px 2px; max-width: 25em; word-wrap: break-word; } @@ -2540,7 +2534,7 @@ article.result-images[data-vim-selected]::before { border: 1px solid #ddd; padding: 0.9em; font-size: 0.9em; - box-shadow: 0px 0px 5px #CCC; + box-shadow: 0 0 5px #ccc; } #sidebar .infobox h2 { margin: 0 0 0.5em 0; @@ -2613,7 +2607,7 @@ article.result-images[data-vim-selected]::before { margin: 0 0 0 2em; padding: 0; font-size: 1em; - box-shadow: 0px 0px 5px #CCC; + box-shadow: 0 0 5px #ccc; background: white; position: fixed; bottom: 85px; @@ -2733,9 +2727,9 @@ article.result-images[data-vim-selected]::before { } #linkto_preferences { display: none; - postion: fixed !important; + position: fixed !important; top: 100px; - right: 0px; + right: 0; } #sidebar { margin: 0 5px 2px 5px; diff --git a/searx/static/themes/simple/css/searx-rtl.min.css b/searx/static/themes/simple/css/searx-rtl.min.css index 1220b1114..5fdaad4a5 100644 Binary files a/searx/static/themes/simple/css/searx-rtl.min.css and b/searx/static/themes/simple/css/searx-rtl.min.css differ diff --git a/searx/static/themes/simple/css/searx-rtl.min.css.map b/searx/static/themes/simple/css/searx-rtl.min.css.map index ba9ce6ba5..94eadb43f 100644 Binary files a/searx/static/themes/simple/css/searx-rtl.min.css.map and b/searx/static/themes/simple/css/searx-rtl.min.css.map differ diff --git a/searx/static/themes/simple/css/searx.css b/searx/static/themes/simple/css/searx.css index 1a8acfb10..8aa506bca 100644 --- a/searx/static/themes/simple/css/searx.css +++ b/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 * @@ -1181,7 +1180,7 @@ html.js .show_if_nojs { text-align: center; } .right { - float: right ; + float: right; } .left { float: left; @@ -1239,11 +1238,11 @@ tr:hover { background: #ececec; } div.selectable_url { + display: block; border: 1px solid #888; padding: 4px; color: #444; width: 100%; - display: block; margin: 0.1em; overflow: hidden; height: 1.2em; @@ -1263,7 +1262,7 @@ div.selectable_url pre { position: relative; width: 70%; padding: 1em 1em 1em 2.7em; - margin: 0em 8% 1em 8%; + margin: 0 8% 1em 8%; border: 1px solid black; border-radius: 4px; text-align: left; @@ -1271,7 +1270,7 @@ div.selectable_url pre { background: #fae1e1; border-color: #db3434; } -.dialog-error:before { +.dialog-error::before { position: absolute; top: 0.5em; left: 0.5em; @@ -1313,7 +1312,7 @@ div.selectable_url pre { position: relative; width: 70%; padding: 1em 1em 1em 2.7em; - margin: 0em 8% 1em 8%; + margin: 0 8% 1em 8%; border: 1px solid black; border-radius: 4px; text-align: left; @@ -1321,7 +1320,7 @@ div.selectable_url pre { background: #faf5e1; border-color: #dbba34; } -.dialog-warning:before { +.dialog-warning::before { position: absolute; top: 0.5em; left: 0.5em; @@ -1363,7 +1362,7 @@ div.selectable_url pre { position: relative; width: 70%; padding: 1em 1em 1em 2.7em; - margin: 0em 8% 1em 8%; + margin: 0 8% 1em 8%; border: 1px solid black; border-radius: 4px; text-align: left; @@ -1377,7 +1376,7 @@ div.selectable_url pre { margin: 0 50% 0 0; box-shadow: 0 0 1em; } -.dialog-modal:before { +.dialog-modal::before { position: absolute; top: 0.5em; left: 0.5em; @@ -1423,7 +1422,7 @@ div.selectable_url pre { margin: 0; border: none; } -/* -- tabs --*/ +/* -- tabs -- */ .tabs .tabs > label { font-size: 90%; } @@ -1450,7 +1449,7 @@ div.selectable_url pre { letter-spacing: 0.5px; text-transform: uppercase; border: solid white; - border-width: 0px 0px 2px 0; + border-width: 0 0 2px 0; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; @@ -1552,10 +1551,10 @@ select:focus { top: -5px; cursor: pointer; 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; left: 27px; - background-color: #3498DB; + background-color: #3498db; } .checkbox-onoff input[type=checkbox] { visibility: hidden; @@ -1565,7 +1564,7 @@ select:focus { background: #dcdcdc; } } -/* -- checkbox --*/ +/* -- checkbox -- */ @supports (transform: rotate(-45deg)) { .checkbox { width: 20px; @@ -1581,9 +1580,9 @@ select:focus { left: 0; background: white; 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: ''; width: 9px; height: 5px; @@ -1600,8 +1599,8 @@ select:focus { .checkbox input[type=checkbox] { visibility: hidden; } - .checkbox input[type=checkbox]:checked + label:after { - border-color: #3498DB; + .checkbox input[type=checkbox]:checked + label::after { + border-color: #3498db; opacity: 1; } .checkbox input[disabled] + label { @@ -1620,7 +1619,7 @@ select:focus { } /* -- loader -- */ .loader, -.loader:after { +.loader::after { border-radius: 50%; width: 2em; height: 2em; @@ -1665,9 +1664,9 @@ select:focus { display: none; position: absolute; padding: 0.5rem 1rem; - margin: 0rem 0 0 2rem; + margin: 0 0 0 2rem; 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; font-size: 14px; font-weight: normal; @@ -1806,22 +1805,6 @@ td:hover .engine-tooltip, 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 { text-align: center; } @@ -1974,7 +1957,7 @@ td:hover .engine-tooltip, border-bottom: 1px solid #3498DB; border-right: none; border-left: none; - border-radius: 0px; + border-radius: 0; outline: none; color: #222; font-size: 16px; @@ -1986,10 +1969,6 @@ td:hover .engine-tooltip, #clear_search.empty * { display: none; } -#q::-ms-clear, -#q::-webkit-search-cancel-button { - display: none; -} #q, #send_search { display: block !important; @@ -2000,7 +1979,7 @@ td:hover .engine-tooltip, height: 2.2em; background: none repeat scroll 0 0 #FFF; border: 1px solid #3498DB; - border-radius: 0px; + border-radius: 0; outline: none; color: #222; font-size: 16px; @@ -2009,10 +1988,14 @@ td:hover .engine-tooltip, #q { outline: medium none; padding-left: 8px; - padding-right: 0px !important; + padding-right: 0 !important; border-right: none; width: 40em; } +#q::-ms-clear, +#q::-webkit-search-cancel-button { + display: none; +} #send_search { border-left: none; width: 2.2em; @@ -2035,8 +2018,8 @@ td:hover .engine-tooltip, clear: both; } #categories .checkbox_container { - margin-top: 2px; margin: auto; + margin-top: 2px; } html.touch #main_index #categories_container, html.touch #main_results #categories_container { @@ -2115,10 +2098,10 @@ td:hover .engine-tooltip, display: inline-block; position: relative; margin: 0 3px; - padding: 0px; - /*label:hover { + padding: 0; + /* label:hover { border-bottom: 2px solid @color-categories-item-border-unselected-hover; - }*/ + } */ } .category input { display: none; @@ -2139,7 +2122,7 @@ td:hover .engine-tooltip, user-select: none; } .category input[type="checkbox"]:focus + label { - box-shadow: 0px 0px 8px #3498DB; + box-shadow: 0 0 8px #3498db; } .category input[type="checkbox"]:checked + label { background: #3498DB; @@ -2157,13 +2140,29 @@ td:hover .engine-tooltip, opacity: 0; transition: opacity 1s ease; font-size: 0.8em; - text-position: center; + text-align: center; background: white; } #categories_container:hover .help { opacity: 0.8; 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 { font-family: arial, sans-serif; font-size: 0.9em; @@ -2183,11 +2182,6 @@ main { main { width: 100%; } -footer { - bottom: 0; - width: 100%; - height: 50px; -} #main_preferences, #main_about, #main_stats { @@ -2512,7 +2506,7 @@ article.result-images[data-vim-selected]::before { margin: 10px 8px 10px 8px; border: 1px solid #ddd; padding: 0.9em; - box-shadow: 0px 0px 5px #CCC; + box-shadow: 0 0 5px #ccc; } #answers h4 { display: none; @@ -2530,8 +2524,8 @@ article.result-images[data-vim-selected]::before { position: absolute; top: 100px; left: 57em; - margin: 0px 2px 5px 5px; - padding: 0px 2px 2px; + margin: 0 2px 5px 5px; + padding: 0 2px 2px; max-width: 25em; word-wrap: break-word; } @@ -2540,7 +2534,7 @@ article.result-images[data-vim-selected]::before { border: 1px solid #ddd; padding: 0.9em; font-size: 0.9em; - box-shadow: 0px 0px 5px #CCC; + box-shadow: 0 0 5px #ccc; } #sidebar .infobox h2 { margin: 0 0 0.5em 0; @@ -2613,7 +2607,7 @@ article.result-images[data-vim-selected]::before { margin: 0 0 0 2em; padding: 0; font-size: 1em; - box-shadow: 0px 0px 5px #CCC; + box-shadow: 0 0 5px #ccc; background: white; position: fixed; bottom: 85px; @@ -2733,9 +2727,9 @@ article.result-images[data-vim-selected]::before { } #linkto_preferences { display: none; - postion: fixed !important; + position: fixed !important; top: 100px; - right: 0px; + right: 0; } #sidebar { margin: 0 5px 2px 5px; diff --git a/searx/static/themes/simple/css/searx.min.css b/searx/static/themes/simple/css/searx.min.css index 7064d1675..8d9a9b95c 100644 Binary files a/searx/static/themes/simple/css/searx.min.css and b/searx/static/themes/simple/css/searx.min.css differ diff --git a/searx/static/themes/simple/css/searx.min.css.map b/searx/static/themes/simple/css/searx.min.css.map index fe81d8423..b897639a1 100644 Binary files a/searx/static/themes/simple/css/searx.min.css.map and b/searx/static/themes/simple/css/searx.min.css.map differ diff --git a/searx/static/themes/simple/gruntfile.js b/searx/static/themes/simple/gruntfile.js index 130f406d9..7e5ad5466 100644 --- a/searx/static/themes/simple/gruntfile.js +++ b/searx/static/themes/simple/gruntfile.js @@ -71,7 +71,6 @@ module.exports = function(grunt) { }, uglify: { options: { - banner: '/*! simple/searx.min.js | <%= grunt.template.today("dd-mm-yyyy") %> | <%= process.env.GIT_URL %> */\n', output: { comments: 'some' }, @@ -156,7 +155,6 @@ module.exports = function(grunt) { development: { options: { paths: ["less"], - banner: '/*! searx | <%= grunt.template.today("dd-mm-yyyy") %> | <%= process.env.GIT_URL %> */\n' }, files: { "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';}, outputSourceFiles: false, sourceMapRootpath: '../', - banner: '/*! searx | <%= grunt.template.today("dd-mm-yyyy") %> | <%= process.env.GIT_URL %> */\n' }, files: { "css/searx.min.css": "src/less/style.less", diff --git a/searx/static/themes/simple/js/searx.head.min.js b/searx/static/themes/simple/js/searx.head.min.js index 9d09496e6..692083d59 100644 Binary files a/searx/static/themes/simple/js/searx.head.min.js and b/searx/static/themes/simple/js/searx.head.min.js differ diff --git a/searx/static/themes/simple/js/searx.head.min.js.map b/searx/static/themes/simple/js/searx.head.min.js.map index 7a4dc8ca4..04525c616 100644 Binary files a/searx/static/themes/simple/js/searx.head.min.js.map and b/searx/static/themes/simple/js/searx.head.min.js.map differ diff --git a/searx/static/themes/simple/js/searx.min.js b/searx/static/themes/simple/js/searx.min.js index f47665ebe..428aa8a49 100644 Binary files a/searx/static/themes/simple/js/searx.min.js and b/searx/static/themes/simple/js/searx.min.js differ diff --git a/searx/static/themes/simple/js/searx.min.js.map b/searx/static/themes/simple/js/searx.min.js.map index beb478449..4579e5907 100644 Binary files a/searx/static/themes/simple/js/searx.min.js.map and b/searx/static/themes/simple/js/searx.min.js.map differ diff --git a/utils/lib_static.sh b/utils/lib_static.sh new file mode 100755 index 000000000..0d4ba9bad --- /dev/null +++ b/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 </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[@]}" +}