Skip to content
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

Merged
merged 1 commit into from
Mar 7, 2022

Conversation

Garfield-fr
Copy link
Contributor

Co-Authored-by: Bertrand Zuchuat bertrand.zuchuat@rero.ch

Why are you opening this PR?

  • Which task/US does it implement?
  • Which issue does it fix?

How to test?

  • What command should I have to run to test your PR?
  • What should I test through the UI?

Code review check list

  • Commit message template compliance.
  • Commit message without typos.
  • File names.
  • Functions names.
  • Functions docstrings.
  • Unnecessary commited files?
  • Extracted translations?

@Garfield-fr Garfield-fr self-assigned this Feb 10, 2022
@app.route('/<org_code:view>')
def index(view):
"""Homepage."""
return render_template('sonar/frontpage.html')
Copy link
Contributor

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) %}
Copy link
Contributor

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' }}"
Copy link
Contributor

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.

@pronguen
Copy link
Contributor

pronguen commented Mar 1, 2022

* Closes rero#641.

Co-Authored-by: Bertrand Zuchuat <bertrand.zuchuat@rero.ch>
@pronguen pronguen self-requested a review March 3, 2022 11:18
@Garfield-fr Garfield-fr merged commit b92de9e into rero:staging Mar 7, 2022
@Garfield-fr Garfield-fr deleted the zub-shared-header branch March 8, 2022 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adjust header size in SONAR shared home pages [2]
4 participants