From 2988fab0920e0f94953cf15e03121f1983f7cd71 Mon Sep 17 00:00:00 2001 From: Splines <37160523+Splines@users.noreply.github.com> Date: Sat, 23 Mar 2024 11:33:45 +0100 Subject: [PATCH] Redesign comments page (#602) * Fix unnecessary "xxxl" gridpoints * Redesign comments page * Add slight box shadow to comments --- app/assets/javascripts/lectures.coffee | 4 +-- app/assets/stylesheets/application.scss | 17 ++++++---- app/assets/stylesheets/comments.scss | 17 ++++++++++ app/controllers/media_controller.rb | 2 +- app/views/administration/index.html.erb | 4 +-- app/views/commontator/comments/_form.html.erb | 4 +-- app/views/commontator/comments/_list.html.erb | 3 +- app/views/commontator/threads/_show.html.erb | 3 +- app/views/commontator/threads/show.js.erb | 2 +- ...cation_no_sidebar_with_background.html.erb | 33 +++++++++++++++++++ app/views/lectures/edit/_form.html.erb | 6 ++-- app/views/main/start.html.erb | 6 ++-- app/views/main/start/_talks.html.erb | 2 +- app/views/media/comments/_comments.html.erb | 3 +- app/views/media/show_comments.html.erb | 2 +- app/views/notifications/index.html.erb | 2 +- 16 files changed, 83 insertions(+), 27 deletions(-) create mode 100644 app/views/layouts/application_no_sidebar_with_background.html.erb diff --git a/app/assets/javascripts/lectures.coffee b/app/assets/javascripts/lectures.coffee index 5e47d4fea..20b6cc98c 100644 --- a/app/assets/javascripts/lectures.coffee +++ b/app/assets/javascripts/lectures.coffee @@ -103,13 +103,13 @@ $(document).on 'turbolinks:load', -> # hide the media tab if hide media button is clicked $('#hide-media-button').on 'click', -> $('#lecture-media-card').hide() - $('#lecture-content-card').removeClass('col-xxxl-9') + $('#lecture-content-card').removeClass('col-xxl-9') $('#show-media-button').show() return # display the media tab if show media button is clicked $('#show-media-button').on 'click', -> - $('#lecture-content-card').addClass('col-xxxl-9') + $('#lecture-content-card').addClass('col-xxl-9') $('#lecture-media-card').show() $('#show-media-button').hide() return diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 4fed1ddea..66e6312e3 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -27,9 +27,6 @@ $grid-breakpoints: ( lg: 992px, xl: 1200px, xxl: 1440px, - xxxl: 1600px, - xxxxl: 1920px, - xxxxxl: 2160px ); $container-max-widths: ( @@ -41,9 +38,6 @@ $container-max-widths: ( lg: 992px, xl: 1200px, xxl: 1440px, - xxxl: 1600px, - xxxxl: 1920px, - xxxxxl: 2160px ); @@ -306,4 +300,15 @@ a { .toast { background-color: white; +} + +.small-width { + max-width: 900px; +} + +.subtle-background { + flex: 1; + background: radial-gradient(circle at top right, transparent 10%, #fafdff 10%, #fafdff 20%, transparent 21%), radial-gradient(circle at left bottom, transparent 10%, #fafdff 10%, #fafdff 20%, transparent 21%), radial-gradient(circle at top left, transparent 10%, #fafdff 10%, #fafdff 20%, transparent 21%), radial-gradient(circle at right bottom, transparent 10%, #fafdff 10%, #fafdff 20%, transparent 21%), radial-gradient(circle at center, #fafdff 30%, transparent 31%); + background-size: 6em 6em; + background-color: #ffffff; } \ No newline at end of file diff --git a/app/assets/stylesheets/comments.scss b/app/assets/stylesheets/comments.scss index ee5fabfe1..1788da423 100644 --- a/app/assets/stylesheets/comments.scss +++ b/app/assets/stylesheets/comments.scss @@ -3,4 +3,21 @@ #toggleCommentPreviewWrapper { padding-left: $form-check-padding-start + $form-check-input-width; +} + +.form-control.commentForm { + border-color: #4173b4; + border-width: 1.5px; +} + +.comment-field { + backdrop-filter: blur(8px); + background-color: rgba(255, 255, 255, 0.44); + padding: 6px !important; +} + +.comment { + border: solid 1.5px #d2d2d2 !important; + border-radius: 4px; + box-shadow: rgba(0,0,0,0.025) 0px 2px 5px; } \ No newline at end of file diff --git a/app/controllers/media_controller.rb b/app/controllers/media_controller.rb index a8efdbd2c..ffefdc701 100644 --- a/app/controllers/media_controller.rb +++ b/app/controllers/media_controller.rb @@ -441,7 +441,7 @@ def statistics def show_comments commontator_thread_show(@medium) - render layout: "application_no_sidebar" + render layout: "application_no_sidebar_with_background" end def cancel_publication diff --git a/app/views/administration/index.html.erb b/app/views/administration/index.html.erb index 57306b6f3..ec2af45c1 100644 --- a/app/views/administration/index.html.erb +++ b/app/views/administration/index.html.erb @@ -1,10 +1,10 @@
diff --git a/app/views/notifications/index.html.erb b/app/views/notifications/index.html.erb index e9b91e522..617528541 100644 --- a/app/views/notifications/index.html.erb +++ b/app/views/notifications/index.html.erb @@ -28,7 +28,7 @@ data-nonotifications="<%= t('notifications.no_notifications') %>"> <% if @notifications.present? %> <% @notifications.each do |n| %> -
<%= render partial: 'notifications/notification',
locals: { notification: n } %>