From 262be4a3191299ebca403ab8dfb6e45fd65f0444 Mon Sep 17 00:00:00 2001 From: SkyeN Date: Sun, 21 Oct 2018 18:02:45 -0700 Subject: [PATCH] Fix heights for landing page cards Create a new class to give a card fixed height instead of allowing the size of the text to determine its height. The exact value of the fixed height is determined by the screen size. --- app/assets/stylesheets/materialize-overrides.scss | 14 ++++++++++++++ .../cards/intros/_content_type_intro.html.erb | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/materialize-overrides.scss b/app/assets/stylesheets/materialize-overrides.scss index b933aa22..51e74700 100644 --- a/app/assets/stylesheets/materialize-overrides.scss +++ b/app/assets/stylesheets/materialize-overrides.scss @@ -2,3 +2,17 @@ .row .col { padding: 0 0.25rem !important; } + +@media only screen and (min-width: 1024px) { + .fixed-card-content + { + height: 8em; + } +} + +@media only screen and (max-width: 1024px) { + .fixed-card-content + { + height: 10em; + } +} \ No newline at end of file diff --git a/app/views/cards/intros/_content_type_intro.html.erb b/app/views/cards/intros/_content_type_intro.html.erb index 2fb004d2..1ff8d87c 100644 --- a/app/views/cards/intros/_content_type_intro.html.erb +++ b/app/views/cards/intros/_content_type_intro.html.erb @@ -8,7 +8,7 @@ <%= image_tag "card-headers/#{content_name.pluralize}.jpg", height: 300, width: 300 %> Create <%= content_name == "magic" ? 'magic' : content_name.pluralize %> -
+

<%= t("content_descriptions.#{content_name}") %>