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

Use a modal to show sponsors #465

Merged
merged 9 commits into from
Apr 21, 2023
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
5 changes: 5 additions & 0 deletions app/assets/javascripts/footer_modal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
document.addEventListener("turbolinks:load", () => {
if (window.location.hash == "#sponsors") {
$('#sponsors').modal('show');
}
});
111 changes: 111 additions & 0 deletions app/views/main/_sponsors.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<h3 class="mb-4">
<%= t('sponsors.sponsorships') %>
</h3>
<h5>
<%= t('sponsors.uni_hd') %>
</h5>
<ul>
<li class="d-block">
<strong>
2022-2023:
</strong>
<%= t('sponsors.heiquality_html',
hendrik: link_to('Hendrik Kasten',
'https://www.mathi.uni-heidelberg.de/~kasten/',
target: :_blank),
denis: link_to('Denis Vogel',
'https://www.mathi.uni-heidelberg.de/~vogel/',
target: :_blank)) %>
</li>
<li class="d-block">
<strong>
2019-2020:
</strong>
<%= t('sponsors.heistart_html',
hendrik: link_to('Hendrik Kasten',
'https://www.mathi.uni-heidelberg.de/~kasten/',
target: :_blank),
oli: link_to('Oliver Thomas',
'https://www.mathi.uni-heidelberg.de/~othomas/',
target: :_blank),
denis: link_to('Denis Vogel',
'https://www.mathi.uni-heidelberg.de/~vogel/',
target: :_blank),
fs_mathphysinfo: link_to('Fachschaft MathPhysInfo',
'https://mathphys.fsk.uni-heidelberg.de/w/',
target: :_blank)) %>
</li>
<li class="d-block">
<strong>
2018:
</strong>
<%= t('sponsors.physics_html',
physics_faculty: link_to('Fakultät für Physik und Astronomie',
'https://www.physik.uni-heidelberg.de/',
target: :_blank)) %>
</li>
<li class="d-block">
<strong>
<%= t('basics.since') %> 2017:
</strong>
<%= t('sponsors.math_html',
math_faculty: link_to('Fakultät für Mathematik und Informatik',
'https://mathinf.uni-heidelberg.de/',
target: :_blank)) %>
</li>
</ul>
<h5>
<%= t('sponsors.hse') %>
</h5>
<ul>
<li class="d-block">
<strong>
2019:
</strong>
<%= t('sponsors.go_digital_html',
digital_now: link_to('HSE: Go digital! Now!',
'https://hse-heidelberg.de/ueber-uns/hse-go-digital-now',
target: :_blank)) %>
</li>
<li class="d-block">
<strong>
2018-2019:
</strong>
<%= t('sponsors.fellowship_html',
place: link_to('PLACE',
'https://www.hse-heidelberg.de/ueber-uns/place',
target: :_blank),
hendrik: link_to('Hendrik Kasten',
'https://www.mathi.uni-heidelberg.de/~kasten/',
target: :_blank),
fellowship_project: link_to('"Geometrie und Unterricht - Ausgestaltung eines
profillinienübergreifenden Verschränkungsmoduls im
Fach Mathematik"',
'https://hse-heidelberg.de/forschung/forschungsprojekte/geometrie-und-unterricht-ausgestaltung-eines',
target: :_blank)) %>
</li>
<li class="d-block">
<strong>
2018:
</strong>
<%= t('sponsors.zurlamitmu_html',
place: link_to('PLACE',
'https://www.hse-heidelberg.de/ueber-uns/place',
target: :_blank),
markus: link_to('Markus Vogel',
'https://www.ph-heidelberg.de/vogel-markus.html',
target: :_blank),
denis: link_to('Denis Vogel',
'https://www.mathi.uni-heidelberg.de/~vogel/',
target: :_blank),
zurlamitmu_project: link_to('"ZurLAmitMU"',
'https://hse-heidelberg.de/forschung/forschungsprojekte/zurlamitmu-zugaenge-zur-linearen-algebra-mit-multimedia-erleichtern',
target: :_blank)) %>
</li>
</ul>

<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">
&times;
</span>
</button>
107 changes: 0 additions & 107 deletions app/views/main/sponsors.html.erb

This file was deleted.

18 changes: 15 additions & 3 deletions app/views/shared/_footer.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
<%= javascript_include_tag :footer_modal %>

<% I18n.with_locale(current_user.try(:locale)) do %>

<%# Sponsors modal %>
<div id="sponsors" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="Sponsors list modal" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content p-4">
<%= render partial: 'main/sponsors' %>
</div>
</div>
</div>

<%# Footbar %>
<div class="container-fluid bg-grey-lighten-6 p-3">
<div class="row">
<div class="col text-md-left">
Expand Down Expand Up @@ -39,9 +52,8 @@
target: :_blank)) %>
</div>
<div class="col text-md-right">
<%= t('footer.sponsors_html',
sponsors: link_to(t('basics.sponsors'),
sponsors_path)) %>
<a href="#sponsors" data-toggle="modal"
data-target="#sponsors"><%= t('basics.sponsors') %></a>
<span style="margin-left: 20px;"></span>
<a href="https://hse-heidelberg.de/"
target="_blank"
Expand Down
2 changes: 0 additions & 2 deletions config/locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ de:
Bugs meldest Du am besten %{bugs}.
Weiteres Feedback kannst Du gerne auch an %{feedback} schicken.
Hintergrundbild von %{background_photo_credit}.
sponsors_html: >
%{sponsors}:
sponsors:
sponsorships: 'Projektförderungen'
hse: 'Heidelberg School of Education (HSE)'
Expand Down
2 changes: 0 additions & 2 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@ en:
Bugs can be reported %{bugs}.
We encourage you to send further feedback to %{feedback}.
Background image by %{background_photo_credit}.
sponsors_html: >
%{sponsors}:
sponsors:
sponsorships: 'Projekt funding'
hse: 'Heidelberg School of Education (HSE)'
Expand Down
4 changes: 0 additions & 4 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -883,10 +883,6 @@
to: 'main#comments',
as: 'comments'

get 'main/sponsors',
to: 'main#sponsors',
as: 'sponsors'

get 'main/start',
to: 'main#start',
as: 'start'
Expand Down