diff --git a/documentation/changelog.rst b/documentation/changelog.rst index e5a7054de..8f39c30b4 100644 --- a/documentation/changelog.rst +++ b/documentation/changelog.rst @@ -9,6 +9,8 @@ v0.7.0 | October XX, 2021 New features ----------- +* Set a logo for the top left corner with the new FLEXMEASURES_MENU_LOGO_PATH setting [see `PR #184 `_] + Bugfixes ----------- diff --git a/documentation/configuration.rst b/documentation/configuration.rst index c68ca3d15..ed68682e2 100644 --- a/documentation/configuration.rst +++ b/documentation/configuration.rst @@ -106,6 +106,15 @@ For example, ``("MyMDCApp", ["MDC"]), "MyApp"]`` would show the name "MyMDCApp" Default: ``"FlexMeasures"`` +FLEXMEASURES_MENU_LOGO_PATH +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +A URL path to identify an image being used as logo in the upper left corner (replacing some generic text made from platform name and the page title). +The path can be a complete URL or a relative from the app root. + +Default: "" + + FLEXMEASURES_ROOT_VIEW ^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/flexmeasures/ui/static/css/flexmeasures.css b/flexmeasures/ui/static/css/flexmeasures.css index 1f8677512..faab9cf98 100644 --- a/flexmeasures/ui/static/css/flexmeasures.css +++ b/flexmeasures/ui/static/css/flexmeasures.css @@ -2,6 +2,11 @@ body { padding-top: 100px; /* This default is overridden by flexmeasures.js to support a fluid navbar */ } +#menu-logo { + height: 50px; + position: fixed; top: 0; left: 0; +} + #alerts { position: absolute; right: 10px; diff --git a/flexmeasures/ui/templates/base.html b/flexmeasures/ui/templates/base.html index bc714d0da..6b184ae9c 100644 --- a/flexmeasures/ui/templates/base.html +++ b/flexmeasures/ui/templates/base.html @@ -63,7 +63,15 @@ - {{ FLEXMEASURES_PLATFORM_NAME }} {% if not "Error" in self.title() %} - {{ self.title() }} {% endif %} + + + {% if menu_logo %} + + {% else %} + {{ FLEXMEASURES_PLATFORM_NAME }} {% if not "Error" in self.title() %} - {{ self.title() }} {% endif %} + {% endif %} + +