diff --git a/invenio_theme_tuw/assets/semantic-ui/less/invenio_theme_tuw/theme.less b/invenio_theme_tuw/assets/semantic-ui/less/invenio_theme_tuw/theme.less index c1149106a69a334535c11ba5282a160d1ed35dd4..51637c90e1e2582029c1a5dc17390eb2a6a11a1e 100644 --- a/invenio_theme_tuw/assets/semantic-ui/less/invenio_theme_tuw/theme.less +++ b/invenio_theme_tuw/assets/semantic-ui/less/invenio_theme_tuw/theme.less @@ -75,6 +75,7 @@ span.ui.label.access-right.embargoed { --blue2: #72ADD5; --blue3: #DFF2FD; --grey1: #646363; + --orange1: #E18922; } .bold { @@ -215,6 +216,10 @@ header { padding-bottom: 30px; } +#searchbutton { + background-color: var(--orange1); +} + #login { float:right; } @@ -228,6 +233,10 @@ header { /* feature list */ +#features { + margin-bottom: 50px; +} + .feature-icon { background-color: var(--blue2); border-radius: 20px; @@ -249,6 +258,7 @@ header { .feature-text p { margin-top: 30px; text-align: center; + color: var(--grey1); } diff --git a/invenio_theme_tuw/templates/semantic-ui/invenio_theme_tuw/frontpage.html b/invenio_theme_tuw/templates/semantic-ui/invenio_theme_tuw/frontpage.html index 5f996f2b20652961c8eec44041855f2f31af0137..2af1810522635a0f3a0d72f683f18817f519d87a 100644 --- a/invenio_theme_tuw/templates/semantic-ui/invenio_theme_tuw/frontpage.html +++ b/invenio_theme_tuw/templates/semantic-ui/invenio_theme_tuw/frontpage.html @@ -30,7 +30,7 @@ </p> </section> -<section id="features" class="ui four column stackable vertically padded grid container"> +<section id="features" class="ui four column stackable grid container"> <h2 style="display: none;">Features</h2> <div class="column"> <div class="feature-icon box-shaddow"> diff --git a/invenio_theme_tuw/templates/semantic-ui/invenio_theme_tuw/header.html b/invenio_theme_tuw/templates/semantic-ui/invenio_theme_tuw/header.html index 7af2138499445b5a99fb71b8b274d34fc7c426c2..091d27c8373db9ba36d66b3184688ae8b41633e1 100644 --- a/invenio_theme_tuw/templates/semantic-ui/invenio_theme_tuw/header.html +++ b/invenio_theme_tuw/templates/semantic-ui/invenio_theme_tuw/header.html @@ -18,7 +18,6 @@ <div class="center aligned column"> <img class="signet-image" src="{{ url_for('static', filename='images/signet.png') }}"> </div> - </div> </div> @@ -27,9 +26,7 @@ {%- for item in current_menu.submenu('main').children|sort(attribute='order') if item.visible recursive %} <a class="item" href="{{ item.url }}">{{ item.text|safe }}</a></li> {%- endfor %} - <a href="{{ url_for_security('login', next=request.path) }}" class="ui button" style="color:grey"> - <i class="sign-in icon"></i> Log in - </a> + {%- include "invenio_theme_tuw/header_login.html" %} </div> </div> @@ -38,7 +35,7 @@ <form action="/search" class="ui form"> <div class="ui fluid big action input"> <input type="text" name="q" class="form-control" placeholder="Type and press enter to search"> - <button type="submit" class="ui icon search button orange"><i class="search icon"></i></button> + <button type="submit" id="searchbutton" class="ui icon search button"><i class="search icon"></i></button> </div> </form> </div> diff --git a/invenio_theme_tuw/templates/semantic-ui/invenio_theme_tuw/header_login.html b/invenio_theme_tuw/templates/semantic-ui/invenio_theme_tuw/header_login.html new file mode 100644 index 0000000000000000000000000000000000000000..bf82db22eda8fd80f3d43380d9f7e79a1b49e500 --- /dev/null +++ b/invenio_theme_tuw/templates/semantic-ui/invenio_theme_tuw/header_login.html @@ -0,0 +1,56 @@ +{# -*- coding: utf-8 -*- + + This file is part of Invenio. + Copyright (C) 2015-2018 CERN. + + Invenio is free software; you can redistribute it and/or modify it + under the terms of the MIT License; see LICENSE file for more details. + #} + {%- if config.ACCOUNTS %} + {%- if not current_user.is_authenticated %} + + <a href="{{ url_for_security('login', next=request.path) }}" + class="ui button"> + <span class="grey"> + <i class="sign-in icon"></i> + {{ _('Log in') }}</span></a> + {% if security.registerable %} + <a href="{{ url_for_security('register') }}" class="ui button signup"> + <i class="edit outline icon"></i> + {{ _('Sign up') }} + </a> + {% endif %} + + {%- else %} + {%- if config.USERPROFILES %} + <div class="ui buttons"> + <a class="ui button" + href="{{ url_for('invenio_userprofiles.profile') }}"> + <i class="user icon"></i> {{ current_user.email|truncate(31,true) }} + </a> + + <div class="ui dropdown icon button floating"> + <i class="dropdown icon"></i> + <div class="menu"> + {%- for item in current_menu.submenu('settings').children if item.visible %} + <a class="item" + style="color:black;" + href="{{ item.url }}">{{ item.text|safe }} + </a> + + {%- endfor %} + <div class="divider"></div> + <a class="item" style="color:black;" href="{{ url_for_security('logout') }}"> + <i class="sign-out icon"></i> + {{ _('Log out') }} + </a> + </div> + </div> + </div> + + {%- else %} + <a href=" {{ url_for_security('logout') }}" class="ui button"><i + class="sign-out icon"></i> {{ _('Log out') }}</a> + {%- endif %} + {%- endif %} + {%- endif %} \ No newline at end of file