diff --git a/Makefile b/Makefile index 2c12ee4e67becfd7713ae305c4ab7432bda84391..90861ce4f569c81ae28ebedf7528f4f895c918da 100644 --- a/Makefile +++ b/Makefile @@ -52,9 +52,9 @@ LIBS_SUBDIRS = $(addprefix $(LIBS_DIR)/, js css fonts) ALL: install -install: clean-ignore-zips install-sss cp-src cp-ext cp-conf $(addprefix $(PUBLIC_DIR)/, $(LIBS)) build_properties merge_xsl merge_js +install: clean-ignore-zips install-sss cp-src cp-ext cp-conf $(addprefix $(PUBLIC_DIR)/, $(LIBS)) merge_js build_properties merge_xsl -test: clean-ignore-zips install-sss cp-src cp-ext cp-ext-test cp-conf $(addprefix $(PUBLIC_DIR)/, $(TEST_LIBS)) build_properties merge_xsl merge_js +test: clean-ignore-zips install-sss cp-src cp-ext cp-ext-test cp-conf $(addprefix $(PUBLIC_DIR)/, $(TEST_LIBS)) merge_js build_properties merge_xsl @for f in $(shell find $(TEST_EXT_DIR) -type f -iname *.js) ; do \ sed -i "/EXTENSIONS/a \<script src=\"$${f#$(TEST_EXT_DIR)/}\" ></script>" $(PUBLIC_DIR)/index.html ; \ echo include $$f; \ diff --git a/misc/merge_js.sh b/misc/merge_js.sh index 375529fe472a05caafb12981a6fb17aef0ae8db9..c24ac6e246de49b2459175ceef97dae8224fd016 100755 --- a/misc/merge_js.sh +++ b/misc/merge_js.sh @@ -35,6 +35,25 @@ CORE_MODULES=$@ SOURCE_DIR=public/js/ TARGET=public/webcaosdb.dist.js +JSHEADER_TARGET=public/xsl/jsheader.xsl + +_create_jsheader () { + echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> +<!-- THIS FILE IS AUTO-GENERATED BY THE merge_js.sh SCRIPT --> +<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"> + <xsl:output method=\"html\"/> + <xsl:template name=\"caosdb-head-js\"> + <script> + window.sessionStorage.caosdbBasePath = \"<xsl:value-of select=\"\$basepath\"/>\"; + </script> + <xsl:element name=\"script\"> + <xsl:attribute name=\"src\"> + <xsl:value-of select=\"concat(\$basepath,'webinterface/\${BUILD_NUMBER}/webcaosdb.dist.js')\"/> + </xsl:attribute> + </xsl:element> + </xsl:template> +</xsl:stylesheet>" > ${JSHEADER_TARGET} +} function _merge () { _SOURCE=$2 @@ -68,3 +87,4 @@ for _SOURCE in $(find ${SOURCE_DIR} -ipath "${SOURCE_DIR}modules/*.js") ; do _merge "extension" ${_SOURCE} $TARGET done +_create_jsheader diff --git a/misc/merge_xsl.sh b/misc/merge_xsl.sh index 07cc6d7ce8dc690eaa58ad8a42e6c883e5eda149..abf95444de1ca550f5cd66ae1f02e2f0587503f0 100755 --- a/misc/merge_xsl.sh +++ b/misc/merge_xsl.sh @@ -30,7 +30,7 @@ SOURCE_DIR=public/ -MERGE="xsl/footer.xsl xsl/filesystem.xsl xsl/entity.xsl xsl/query.xsl xsl/messages.xsl xsl/navbar.xsl xsl/main.xsl xsl/welcome.xsl xsl/common.xsl" +MERGE="xsl/jsheader.xsl xsl/footer.xsl xsl/filesystem.xsl xsl/entity.xsl xsl/query.xsl xsl/messages.xsl xsl/navbar.xsl xsl/main.xsl xsl/welcome.xsl xsl/common.xsl" TARGET=public/webcaosdb.xsl diff --git a/src/core/css/webcaosdb.css b/src/core/css/webcaosdb.css index cecc8e5bfdf3191f4138c3a3df6f29f9fef9bfeb..fba184df8995548818ca41e5f340a6678d162967 100644 --- a/src/core/css/webcaosdb.css +++ b/src/core/css/webcaosdb.css @@ -31,7 +31,7 @@ body { } .background { - background-color: #1a4548; + background-color: white; min-height: 60vh; } @@ -490,7 +490,10 @@ h5 { } .caosdb-logo { + margin-top: auto; + margin-bottom: auto; margin-right: 8px; + height: 30px; } .caosdb-comment-action-item { @@ -518,6 +521,10 @@ h5 { padding-right: 1rem; padding-top: 0.3ex; padding-bottom: 0.3ex; + border-radius: none; + border-left: none; + border-right: none; + } @keyframes appear { diff --git a/src/core/webcaosdb.xsl b/src/core/webcaosdb.xsl index 9d0dd2e235ca59ce6f4e7b75acd59e063e322751..9a0d6769f1901e860c7a2318fce28957d6461496 100644 --- a/src/core/webcaosdb.xsl +++ b/src/core/webcaosdb.xsl @@ -27,6 +27,7 @@ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" /> + <xsl:include href="xsl/jsheader.xsl" /> <xsl:include href="xsl/main.xsl" /> <xsl:include href="xsl/navbar.xsl" /> <xsl:include href="xsl/messages.xsl" /> @@ -45,10 +46,6 @@ <h3>Tour</h3> </div> <div class="caosdb-f-tour-toc-body"></div> - <!--<button class="btn btn-light caosdb-f-leave-tour">Leave Tour</button>--> - <!--<div class="caosdb-v-tour-footer">--> - <!--<button class="caosdb-f-tour-toc-toggle btn btn-light">Hide</button>--> - <!--</div>--> </div> </xsl:template> diff --git a/src/core/xsl/main.xsl b/src/core/xsl/main.xsl index 205cc1dbc8ab7decfecca3f9690196bac09e8dbb..1a0bdb812afb18ad6ab291acb975de994c5d3e47 100644 --- a/src/core/xsl/main.xsl +++ b/src/core/xsl/main.xsl @@ -93,16 +93,6 @@ </xsl:element> <!--CSS_EXTENSIONS--> </xsl:template> - <xsl:template name="caosdb-head-js"> - <script> - window.sessionStorage.caosdbBasePath = "<xsl:value-of select="$basepath"/>"; - </script> - <xsl:element name="script"> - <xsl:attribute name="src"> - <xsl:value-of select="concat($basepath,'webinterface/${BUILD_NUMBER}/webcaosdb.dist.js')"/> - </xsl:attribute> - </xsl:element> - </xsl:template> <xsl:template name="caosdb-data-container"> <div class="container d-flex flex-column-reverse flex-lg-row caosdb-f-main"> <div class="flex-grow-1 caosdb-f-main-entities"> diff --git a/src/core/xsl/welcome.xsl b/src/core/xsl/welcome.xsl index 249c2f8e873e83dc4db3132fc22152211fd87965..c3c80222492abaf243cbf227b143a9c13546a3f1 100644 --- a/src/core/xsl/welcome.xsl +++ b/src/core/xsl/welcome.xsl @@ -25,7 +25,7 @@ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html"/> <xsl:template name="welcome"> - <div class="caosdb-v-welcome-panel bg-light"> + <div class="caosdb-v-welcome-panel bg-light container"> <h1>Welcome</h1> <p>This is CaosDB.</p> <p>This is the default welcome message. If you are an administrator you can override it. Just copy <code>src/core/xsl/welcome.xsl</code> to <code>src/ext/xsl/welcome.xsl</code> and change this content. Then run <code>make</code> again in CaosdDB's web interface's root directory.</p>