-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
frontend: header size for shared organisation #771
Conversation
@app.route('/<org_code:view>') | ||
def index(view): | ||
"""Homepage.""" | ||
return render_template('sonar/frontpage.html') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need to put a default view?
@@ -18,7 +18,8 @@ | |||
<nav class="navbar navbar-expand-lg bg-{{ 'header' if page == 'home' else 'organisation' }}"> | |||
<div class="container"> | |||
{% if page != 'home' %} | |||
<a class="navbar-brand" href="{{ url_for('index', view=view_code) }}"> | |||
{% set url = url_for('index') if (not view or view == config.SONAR_APP_DEFAULT_ORGANISATION) else url_for('index', view=view_code) %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the default org code can be set in the python code.
@@ -29,11 +30,10 @@ | |||
{% endif %} | |||
{% else %} | |||
<img src="{{ url_for('static', filename='images/global-logo.svg') }}" | |||
height="{{ '30' if g.get('organisation') else '50' }}" | |||
class="d-inline-block align-top {{ '' if g.get('organisation') else 'my-2' }}" alt="{{ _('SONAR logo') }}"> | |||
height="{{ '30' if g.get('organisation') and page == 'home' else '50' }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better with a css class.
|
* Closes rero#641. Co-Authored-by: Bertrand Zuchuat <bertrand.zuchuat@rero.ch>
f7282b3
to
6dbc82e
Compare
Co-Authored-by: Bertrand Zuchuat bertrand.zuchuat@rero.ch
Why are you opening this PR?
How to test?
Code review check list