From fab8cee3f2ad0bcaf85ee9dfc5f89cc23b4076f6 Mon Sep 17 00:00:00 2001 From: Bart Mesuere Date: Thu, 26 Oct 2023 14:31:49 +0200 Subject: [PATCH 1/4] add blur class to css --- app/assets/stylesheets/components.css.scss | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/assets/stylesheets/components.css.scss b/app/assets/stylesheets/components.css.scss index c5958e7234..2f5413f04f 100644 --- a/app/assets/stylesheets/components.css.scss +++ b/app/assets/stylesheets/components.css.scss @@ -126,3 +126,11 @@ blockquote { border-left: var(--d-divider) 3px solid; color: var(--d-on-surface-muted); } + +.blur { + filter: blur(5px); + + &:hover { + filter: none; + } +} From b9b8dbed1244ece8c9734e3608fc543a4e261675 Mon Sep 17 00:00:00 2001 From: Bart Mesuere Date: Thu, 26 Oct 2023 14:57:04 +0200 Subject: [PATCH 2/4] add blur to recent exercises --- app/views/pages/_user_card.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/pages/_user_card.html.erb b/app/views/pages/_user_card.html.erb index d398f4dc0b..523ed169a8 100644 --- a/app/views/pages/_user_card.html.erb +++ b/app/views/pages/_user_card.html.erb @@ -72,12 +72,12 @@ <% end %> <%= submission_status_icon(submission) %> <% if exercise.accessible?(current_user, submission.course) %> - <%= link_to exercise.name, activity_scoped_path(course: submission.course, activity: exercise), class: "course-link", title: exercise.name %> + <%= link_to exercise.name, activity_scoped_path(course: submission.course, activity: exercise), class: "course-link #{'blur' if Current.demo_mode }", title: exercise.name %> <% else %> - <%= exercise.name %> + ><%= exercise.name %> <% end %> <% unless submission.course.nil? %> - <%= link_to submission.course.name, course_path(submission.course), class: "small text-muted course-link", title: submission.course.name %> + <%= link_to submission.course.name, course_path(submission.course), class: "small text-muted course-link #{'blur' if Current.demo_mode }", title: submission.course.name %> <% end %>

<% end %> From e242ebb7e60d7eea8d60e47b86ee4d13a39957cf Mon Sep 17 00:00:00 2001 From: Bart Mesuere Date: Thu, 26 Oct 2023 14:59:25 +0200 Subject: [PATCH 3/4] add blur to draft exercises --- app/views/pages/_user_card.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/pages/_user_card.html.erb b/app/views/pages/_user_card.html.erb index 523ed169a8..361b65d424 100644 --- a/app/views/pages/_user_card.html.erb +++ b/app/views/pages/_user_card.html.erb @@ -25,8 +25,8 @@ <% end %> <%= activity_icon exercise %> - <%= link_to exercise.name, activity_path(exercise), class: "course-link", title: exercise.name %> - <%= link_to exercise.repository.name, repository_path(exercise.repository), class: "small text-muted course-link", title: exercise.repository.name %> + <%= link_to exercise.name, activity_path(exercise), class: "course-link #{'blur' if Current.demo_mode }", title: exercise.name %> + <%= link_to exercise.repository.name, repository_path(exercise.repository), class: "small text-muted course-link #{'blur' if Current.demo_mode }", title: exercise.repository.name %>

<% end %> <% if @draft_exercises.count > 5 %> From 7ace13bcdf88e47b0759f804f6477dc8d2587f36 Mon Sep 17 00:00:00 2001 From: Bart Mesuere Date: Thu, 26 Oct 2023 15:09:59 +0200 Subject: [PATCH 4/4] add blur to hidden and closed series --- app/views/activities/_series_activities_table.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/activities/_series_activities_table.html.erb b/app/views/activities/_series_activities_table.html.erb index 810c16d2ce..d17d3e0d8c 100644 --- a/app/views/activities/_series_activities_table.html.erb +++ b/app/views/activities/_series_activities_table.html.erb @@ -52,7 +52,7 @@ <%= "#{index + 1}." if local_assigns[:series]&.activity_numbers_enabled? %> <% if activity.accessible?(current_user, @course) %> - <%= link_to activity.name, get_activity_path.call(activity) %> + <%= link_to activity.name, get_activity_path.call(activity), class: ('blur' if (local_assigns[:series].hidden? || local_assigns[:series].closed?) && Current.demo_mode) %> <% else %> <%= activity.name %> <% if current_user&.course_admin?(@course) && current_user&.repository_admin?(activity.repository) %>