Skip to content

Commit

Permalink
footer and privacy and cookie policy
Browse files Browse the repository at this point in the history
  • Loading branch information
baldarn committed Aug 19, 2024
1 parent 0a6bd3c commit 34cd9da
Show file tree
Hide file tree
Showing 7 changed files with 124 additions and 77 deletions.
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ gem 'pg', '~> 1.5.7'
# Deployment
gem 'puma', '>= 5.0'

# Metrics
gem 'yabeda'
gem 'yabeda-prometheus'
gem 'yabeda-puma-plugin'
gem 'yabeda-rails'

# Jobs
gem 'mission_control-jobs', '~> 0.3.1'
gem 'solid_queue', '~> 0.5.0'
Expand Down
27 changes: 27 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ GEM
tzinfo (~> 2.0, >= 2.0.5)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
anyway_config (2.6.4)
ruby-next-core (~> 1.0)
ast (2.4.2)
autoprefixer-rails (10.4.16.0)
execjs (~> 2)
Expand Down Expand Up @@ -143,6 +145,7 @@ GEM
devise (>= 4.9.0)
dotenv (2.8.1)
drb (2.2.1)
dry-initializer (3.1.1)
ed25519 (1.3.0)
erubi (1.13.0)
et-orbi (1.2.11)
Expand Down Expand Up @@ -262,6 +265,8 @@ GEM
racc
pg (1.5.7)
popper_js (2.11.8)
prometheus-client (4.2.3)
base64
psych (5.1.2)
stringio
public_suffix (5.0.5)
Expand Down Expand Up @@ -347,6 +352,7 @@ GEM
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-next-core (1.0.3)
ruby-progressbar (1.13.0)
ruby-vips (2.2.1)
ffi (~> 1.12)
Expand Down Expand Up @@ -416,6 +422,23 @@ GEM
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
yabeda (0.12.0)
anyway_config (>= 1.0, < 3)
concurrent-ruby
dry-initializer
yabeda-prometheus (0.9.1)
prometheus-client (>= 3.0, < 5.0)
rack
yabeda (~> 0.10)
yabeda-puma-plugin (0.7.1)
json
puma
yabeda (~> 0.5)
yabeda-rails (0.9.0)
activesupport
anyway_config (>= 1.3, < 3)
railties
yabeda (~> 0.8)
zeitwerk (2.6.17)

PLATFORMS
Expand Down Expand Up @@ -465,6 +488,10 @@ DEPENDENCIES
turbo-rails
useragent!
web-console
yabeda
yabeda-prometheus
yabeda-puma-plugin
yabeda-rails

RUBY VERSION
ruby 3.3.4p94
Expand Down
18 changes: 18 additions & 0 deletions app/views/application/_footer.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

<div class="container-fluid">
<footer class="d-flex flex-wrap justify-content-between align-items-center py-3 my-4 border-top">
<div class="col-4 d-flex align-items-center">
<a href="https://github.com/baldarn/open-GAS">
<%= image_tag "github.svg", aria: { hidden: true }, size: 45, class: "bi d-block mx-auto mb-1" %>
</div>
<div class="nav col-md-4 justify-content-end list-unstyled d-flex">
<a href="https://www.iubenda.com/privacy-policy/35860933" class="iubenda-white iubenda-noiframe iubenda-embed iubenda-noiframe " title="Privacy Policy ">Privacy Policy</a><script type="text/javascript">
(function (w,d) {var loader = function () {var s = d.createElement("script"), tag = d.getElementsByTagName("script")[0]; s.src="https://cdn.iubenda.com/iubenda.js"; tag.parentNode.insertBefore(s,tag);}; if(w.addEventListener){w.addEventListener("load", loader, false);}else if(w.attachEvent){w.attachEvent("onload", loader);}else{w.onload = loader;}})(window, document);
</script>
<a href="https://www.iubenda.com/privacy-policy/35860933/cookie-policy" class="iubenda-white iubenda-noiframe iubenda-embed iubenda-noiframe " title="Cookie Policy ">Cookie Policy</a><script type="text/javascript">
(function (w,d) {var loader = function () {var s = d.createElement("script"), tag = d.getElementsByTagName("script")[0]; s.src="https://cdn.iubenda.com/iubenda.js"; tag.parentNode.insertBefore(s,tag);}; if(w.addEventListener){w.addEventListener("load", loader, false);}else if(w.attachEvent){w.attachEvent("onload", loader);}else{w.onload = loader;}})(window, document);
</script>
</div>
</div>
</footer>
</div>
143 changes: 68 additions & 75 deletions app/views/application/_header.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,100 +6,93 @@
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="nav col-12 col-lg-auto my-2 justify-content-center my-md-0 text-small">
<li class="nav-item">
<% if user_signed_in? %>
<% if current_user.admin? %>
<li class="nav-item">
<a href="<%= club_members_dashboard_path(@club) %>" class="nav-link text-secondary">
<%= image_tag "dashboard.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %>
<%= I18n.t('dashboard' )%>
</a>
</li>
<li class="nav-item">
<a href="<%= club_members_path(@club) %>" class="nav-link text-secondary">
<%= image_tag "person.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %>
<%= I18n.t('members.header' )%>
</a>
</li>
<li class="nav-item">
<a href="<%= club_tags_path(@club) %>" class="nav-link text-secondary">
<%= image_tag "tags.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %>
<%= I18n.t('tags.header' )%>
</a>
</li>
<li class="nav-item">
<a href="<%= club_groups_path(@club) %>" class="nav-link text-secondary">
<%= image_tag "people.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %>
<%= I18n.t('groups.header' )%>
</a>
</li>
<li class="nav-item">
<a href="<%= edit_club_path(@club) %>" class="nav-link text-secondary">
<%= image_tag "house.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %>
<%= I18n.t('clubs.header' )%>
</a>
</li>
<% end %>
<% if user_signed_in? %>
<% if current_user.admin? %>
<li class="nav-item">
<a href="<%= club_events_url(@club) %>" class="nav-link text-secondary">
<%= image_tag "calendar.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %>
<%= I18n.t('calendar' )%>
<a href="<%= club_members_dashboard_path(@club) %>" class="nav-link text-secondary">
<%= image_tag "dashboard.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %>
<%= I18n.t('dashboard' )%>
</a>
</li>
<% if current_user.admin? %>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
<%= image_tag "cash.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %>
<%= I18n.t('finance_header') %>
</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="<%= club_payments_url(@club) %>"><%= I18n.t('payments.header') %></a></li>
<li><a class="dropdown-item" href="<%= club_payment_reasons_url(@club) %>"><%= I18n.t('payment_reasons.header') %></a></li>
<li><a class="dropdown-item" href="<%= club_expenses_url(@club) %>"><%= I18n.t('expenses.header') %></a></li>
<li><a class="dropdown-item" href="<%= club_expense_reasons_url(@club) %>"><%= I18n.t('expense_reasons.header') %></a></li>
</ul>
</li>
<% end %>
<% if current_user.admin? %>
<li class="nav-item">
<a href="<%= club_users_url(@club) %>" class="nav-link text-secondary">
<%= image_tag "collaborator.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %>
<%= I18n.t('users.header' )%>
</a>
</li>
<% end %>
<li class="nav-item">
<a href="<%= edit_user_registration_url %>" class="nav-link text-secondary">
<%= image_tag "profile.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %>
<%= I18n.t('profile' )%>
<a href="<%= club_members_path(@club) %>" class="nav-link text-secondary">
<%= image_tag "person.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %>
<%= I18n.t('members.header' )%>
</a>
</li>
<li class="nav-item">
<a href="<%= destroy_user_session_url %>" class="nav-link text-secondary">
<%= image_tag "door.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %>
<%= I18n.t('sign_out' )%>
<a href="<%= club_tags_path(@club) %>" class="nav-link text-secondary">
<%= image_tag "tags.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %>
<%= I18n.t('tags.header' )%>
</a>
</li>
<% else %>
<li class="nav-item">
<a href="<%= user_session_url %>" class="nav-link text-secondary">
<%= image_tag "unlock.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %>
<%= I18n.t('log_in' )%>
<a href="<%= club_groups_path(@club) %>" class="nav-link text-secondary">
<%= image_tag "people.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %>
<%= I18n.t('groups.header' )%>
</a>
</li>
<li class="nav-item">
<a href="<%= new_user_registration_url %>" class="nav-link text-secondary">
<%= image_tag "door.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %>
<%= I18n.t('sign_up' )%>
<a href="<%= edit_club_path(@club) %>" class="nav-link text-secondary">
<%= image_tag "house.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %>
<%= I18n.t('clubs.header' )%>
</a>
</li>
<% end %>
<li class="nav-item">
<a href="https://github.com/baldarn/open-GAS" class="nav-link text-secondary">
<%= image_tag "github.svg", aria: { hidden: true }, size: 45, class: "bi d-block mx-auto mb-1" %>
<a href="<%= club_events_url(@club) %>" class="nav-link text-secondary">
<%= image_tag "calendar.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %>
<%= I18n.t('calendar' )%>
</a>
</li>
</li>
<% if current_user.admin? %>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
<%= image_tag "cash.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %>
<%= I18n.t('finance_header') %>
</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="<%= club_payments_url(@club) %>"><%= I18n.t('payments.header') %></a></li>
<li><a class="dropdown-item" href="<%= club_payment_reasons_url(@club) %>"><%= I18n.t('payment_reasons.header') %></a></li>
<li><a class="dropdown-item" href="<%= club_expenses_url(@club) %>"><%= I18n.t('expenses.header') %></a></li>
<li><a class="dropdown-item" href="<%= club_expense_reasons_url(@club) %>"><%= I18n.t('expense_reasons.header') %></a></li>
</ul>
</li>
<% end %>
<% if current_user.admin? %>
<li class="nav-item">
<a href="<%= club_users_url(@club) %>" class="nav-link text-secondary">
<%= image_tag "collaborator.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %>
<%= I18n.t('users.header' )%>
</a>
</li>
<% end %>
<li class="nav-item">
<a href="<%= edit_user_registration_url %>" class="nav-link text-secondary">
<%= image_tag "profile.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %>
<%= I18n.t('profile' )%>
</a>
</li>
<li class="nav-item">
<a href="<%= destroy_user_session_url %>" class="nav-link text-secondary">
<%= image_tag "door.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %>
<%= I18n.t('sign_out' )%>
</a>
</li>
<% else %>
<li class="nav-item">
<a href="<%= user_session_url %>" class="nav-link text-secondary">
<%= image_tag "unlock.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %>
<%= I18n.t('log_in' )%>
</a>
</li>
<li class="nav-item">
<a href="<%= new_user_registration_url %>" class="nav-link text-secondary">
<%= image_tag "door.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %>
<%= I18n.t('sign_up' )%>
</a>
</li>
<% end %>
</ul>
</div>
</div>
Expand Down
3 changes: 1 addition & 2 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
</div>
</div>
</div>
<footer id="footer">
</footer>
<%= render partial: 'footer' %>
</body>
</html>
3 changes: 3 additions & 0 deletions config/puma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,8 @@

plugin :solid_queue

activate_control_app
plugin :yabeda

# Only use a pidfile when requested
pidfile ENV['PIDFILE'] if ENV['PIDFILE']
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@
get 'up' => 'rails/health#show', as: :rails_health_check

mount MissionControl::Jobs::Engine, at: '/jobs'
mount Yabeda::Prometheus::Exporter => '/metrics'
end

0 comments on commit 34cd9da

Please sign in to comment.