From 4abfc08e5282441bba4eee5ed0ba85cc0fe6f637 Mon Sep 17 00:00:00 2001 From: Splines Date: Mon, 1 Jul 2024 16:48:24 +0200 Subject: [PATCH] Use buttons for media card actions --- app/assets/stylesheets/media.scss | 20 +++++- app/views/media/medium/_buttons.html.erb | 91 ++++++++++-------------- 2 files changed, 54 insertions(+), 57 deletions(-) diff --git a/app/assets/stylesheets/media.scss b/app/assets/stylesheets/media.scss index df7c527df..106cadb0d 100644 --- a/app/assets/stylesheets/media.scss +++ b/app/assets/stylesheets/media.scss @@ -28,7 +28,7 @@ display: flex; justify-content: flex-start; flex-wrap: wrap; - padding: 0.5rem 1.25rem; + padding: 0.5rem var(--bs-card-cap-padding-x); } .media-card-header { @@ -51,7 +51,23 @@ } .card-text-end { - padding: 0.5rem 1.25rem; + padding: 0.75rem var(--bs-card-cap-padding-x); +} + +.media-download-buttons { + display: flex; + flex-direction: column; + align-items: center; + margin: 0.25rem; + justify-content: space-around; +} + +.download-button { + padding: 0 0.5em; + font-size: 0.75em; + width: 3.8em; + height: 1.4em; + border: none; } .mampf-card { diff --git a/app/views/media/medium/_buttons.html.erb b/app/views/media/medium/_buttons.html.erb index 3beeef784..032acb55a 100644 --- a/app/views/media/medium/_buttons.html.erb +++ b/app/views/media/medium/_buttons.html.erb @@ -1,10 +1,9 @@ <% if medium.video.present? %>
- + class="btn btn-secondary" role="button" + target="_blank" title="<%= t('video.play') %>"> +
<% end %> @@ -12,10 +11,9 @@ <% if medium.manuscript.present? %>
- + class="btn btn-secondary" role="button" + target="_blank" title="<%= t('manuscript.view') %>"> +
<% end %> @@ -23,10 +21,9 @@ <% if medium.geogebra.present? %>
- + class="btn btn-secondary" role="button" + target="_blank" title="<%= t('geogebra.view') %>"> +
<% end %> @@ -34,10 +31,9 @@ <% if medium.external_reference_link.present? %>
- + class="btn btn-secondary" role="button" + target="_blank" title="<%= external_link_description_not_empty(medium) %>"> +
<% end %> @@ -45,56 +41,41 @@ <% if medium.sort == 'Quiz' && medium.quiz_graph %>
- + class="btn btn-secondary" role="button" + target="_blank" title="<%= t('quiz.start') %>"> +
<% end %>
- + class="btn btn-secondary" role="button" + title="<%= t('medium.details') %>"> +
-<% if medium.video.present? %> -
+ -<% end %> + <% end %> -<% if medium.manuscript.present? %> - -<% end %> + <% end %> +