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

[MRG] Ovh logo #286

Merged
merged 17 commits into from
Dec 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions doc/personalize.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
###################################
Personalize your RAMP front webpage
###################################

It is possible to personalize your RAMP front page.

Powered by
----------
You might be interested in displaying some images (logos) in the ``Powered by``
section in the very bottom of your RAMP webpage.

To do so, add all the images you wish to have displayed to the following
directory::

ramp-board/ramp-frontend/ramp_frontend/static/img/powered_by

Your images must have one of the following extensions:

* .png
* .jpg' (.jpeg)
* .gif
* .svg

When you reload your RAMP page the new ``Powered by`` section should appear
1 change: 1 addition & 0 deletions doc/user_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ User Guide
:numbered:

setup_server.rst
personalize.rst
create_ramp_event.rst
workers.rst
frontend.rst
Expand Down
3 changes: 3 additions & 0 deletions ramp-frontend/ramp_frontend/static/img/powered_by/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
*/
!.gitignore
Binary file not shown.
Binary file not shown.
30 changes: 9 additions & 21 deletions ramp-frontend/ramp_frontend/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -315,27 +315,15 @@ <h2 class="text-center app-content-header">Partners</h2>
<div class="container-fluid app-content-a" id="powered_by">
<div class="container">
<div class="row">
<h2 class="text-center app-content-header">Powered by</h2>
<div class="col-md-4 col-sm-6">
<center>
<a href="https://virtualdata.ias.u-psud.fr" target="_blank">
<img src="{{url_for('static', filename='img/powered_by/virtual_data.png') }}" class="img" alt="Virtual Data" height="60">
</a>
</center>
</div>
<div class="col-md-4 col-sm-6">
<center>
<a href="http://aws.amazon.com/what-is-cloud-computing"><img src="https://awsmedia.s3.amazonaws.com/AWS_Logo_PoweredBy_127px.png" alt="Powered by AWS Cloud Computing"></a>
</center>
</div>
<div class="col-md-4 col-sm-12">
<center>
<a href="https://romeo.univ-reims.fr/pages/aboutUs" target="_blank">
<img src="{{url_for('static', filename='img/powered_by/romeo.jpg') }}" class="img" alt="Romeo HPC center" height="100">
</a>
</center>
</div>
</div>
{% if images|length > 0 %}
<h2 class="text-center app-content-header">Powered by</h2>
{% for image in images %}
<div class="col-md-4 col-sm-6">
<img src="{{ url_for('static', filename='../static/img/powered_by/' + image) }}" class="img" alt='' height="60">
</div>
{% endfor %}
{% endif %}
</div>
</div>
</div>
<!-- /END THE FEATURETTES -->
Expand Down
8 changes: 7 additions & 1 deletion ramp-frontend/ramp_frontend/views/general.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from flask import Blueprint
from flask import render_template
import os as os

from ramp_database.model import Keyword

Expand All @@ -11,7 +12,12 @@
@mod.route('/')
def index():
"""Default landing page."""
return render_template('index.html')
img_ext = ('.png', '.jpg', '.jpeg', '.gif', '.svg')
images = [f for f in os.listdir(
'ramp-frontend/ramp_frontend/static/img/powered_by/')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This path should be with respect to __file__, otherwise it does not exist #300

if f.endswith(img_ext)]
print(images)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also maybe remove the print?

return render_template('index.html', images=images)


@mod.route("/description")
Expand Down