Skip to content

Commit

Permalink
Merge branch 'mampf-next' into annotation-tool
Browse files Browse the repository at this point in the history
  • Loading branch information
Splines committed Oct 17, 2023
2 parents cc741a2 + 5b28b04 commit c313dd2
Show file tree
Hide file tree
Showing 49 changed files with 224 additions and 238 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ gem "activerecord-nulldb-adapter"
# Use sqlite3 as the database for Active Record
gem "sqlite3", "~> 1.4"
# Use Puma as the app server
gem "puma", "~> 4.1"
gem "puma", "< 7"
# Use SCSS for stylesheets
gem "sass-rails", ">= 6"
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
Expand Down
44 changes: 23 additions & 21 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/rails/sprockets-rails
revision: 73e7351abff3506f6dca6b2da8abedfd5c7c0d77
revision: 065cbe83989c44019eca7161782ed4fdb6473517
branch: master
specs:
sprockets-rails (3.4.2)
Expand Down Expand Up @@ -142,9 +142,9 @@ GEM
bindex (0.8.1)
bootsnap (1.16.0)
msgpack (~> 1.2)
bootstrap (5.2.1)
bootstrap (5.3.1)
autoprefixer-rails (>= 9.1.0)
popper_js (>= 2.11.6, < 3)
popper_js (>= 2.11.8, < 3)
sassc-rails (>= 2.0.0)
bootstrap_form (5.1.0)
actionpack (>= 5.2)
Expand Down Expand Up @@ -278,7 +278,7 @@ GEM
http-accept (1.7.0)
http-cookie (1.0.5)
domain_name (~> 0.5)
i18n (1.12.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
image_processing (1.12.2)
mini_magick (>= 4.9.5, < 5)
Expand Down Expand Up @@ -329,9 +329,9 @@ GEM
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
loofah (2.19.1)
loofah (2.21.3)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
nokogiri (>= 1.12.0)
mail (2.8.1)
mini_mime (>= 0.1.1)
net-imap
Expand All @@ -344,7 +344,7 @@ GEM
mime-types-data (3.2023.0218.1)
mini_magick (4.12.0)
mini_mime (1.1.2)
minitest (5.18.0)
minitest (5.19.0)
msgpack (1.7.0)
multi_json (1.15.0)
multipart-post (2.3.0)
Expand All @@ -360,7 +360,7 @@ GEM
net-protocol
netrc (0.11.0)
nio4r (2.5.8)
nokogiri (1.14.3-x86_64-linux)
nokogiri (1.15.4-x86_64-linux)
racc (~> 1.4)
onebox (2.2.19)
addressable (~> 2.8.0)
Expand All @@ -383,7 +383,7 @@ GEM
ttfunk
pg (1.4.6)
pgreset (0.3)
popper_js (2.11.6)
popper_js (2.11.8)
pr_geohash (1.0.0)
premailer (1.21.0)
addressable
Expand All @@ -399,13 +399,13 @@ GEM
prometheus_exporter (2.0.8)
webrick
public_suffix (5.0.1)
puma (4.3.12)
puma (6.3.1)
nio4r (~> 2.0)
pundit (2.3.0)
activesupport (>= 3.0.0)
raabro (1.4.0)
racc (1.6.2)
rack (2.2.7)
racc (1.7.1)
rack (2.2.8)
rack-proxy (0.7.6)
rack
rack-test (2.1.0)
Expand All @@ -424,16 +424,18 @@ GEM
activesupport (= 7.0.4.3)
bundler (>= 1.15.0)
railties (= 7.0.4.3)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-erd (1.7.2)
activerecord (>= 4.2)
activesupport (>= 4.2)
choice (~> 0.2.0)
ruby-graphviz (~> 1.2)
rails-html-sanitizer (1.5.0)
loofah (~> 2.19, >= 2.19.1)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
rails-i18n (7.0.6)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 8)
Expand Down Expand Up @@ -587,7 +589,7 @@ GEM
tins (~> 1.0)
terser (1.1.14)
execjs (>= 0.3.0, < 3)
thor (1.2.1)
thor (1.2.2)
thredded (1.1.0)
active_record_union (>= 1.3.0)
autoprefixer-rails
Expand All @@ -609,7 +611,7 @@ GEM
sassc-rails (>= 2.0.0)
sprockets-es6
timeago_js (>= 3.0.2.2)
tilt (2.1.0)
tilt (2.2.0)
timeago_js (3.0.2.2)
timeout (0.3.2)
tins (1.32.1)
Expand Down Expand Up @@ -648,7 +650,7 @@ GEM
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
will_paginate (3.3.1)
zeitwerk (2.6.7)
zeitwerk (2.6.11)

PLATFORMS
x86_64-linux
Expand Down Expand Up @@ -705,7 +707,7 @@ DEPENDENCIES
premailer-rails
progress_bar
prometheus_exporter
puma (~> 4.1)
puma (< 7)
rack
rails (~> 7.0.4.3)
rails-erd
Expand Down Expand Up @@ -734,7 +736,7 @@ DEPENDENCIES
sunspot_rails!
sunspot_solr
terser
thredded!
thredded
thredded-markdown_katex!
trix-rails
turbolinks (~> 5)
Expand Down
1 change: 1 addition & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
//= require announcements
//= require answers
//= require bootstrap_modal_turbolinks_fix
//= require bootstrap_popovers
//= require chapters
//= require clickers
//= require courses
Expand Down
24 changes: 0 additions & 24 deletions app/assets/javascripts/bootstrap_modal_turbolinks_fix.coffee

This file was deleted.

16 changes: 16 additions & 0 deletions app/assets/javascripts/bootstrap_modal_turbolinks_fix.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
$(document).on('turbolinks:load', function () {
// show all active modals
$('.activeModal').modal('show');
// remove active status (this needs to be reestablished before caching)
$('.activeModal').removeClass('activeModal');
});

$(document).on('turbolinks:before-cache', function () {
// if some modal is open
if ($('body').hasClass('modal-open')) {
$('.modal.show').addClass('activeModal');
$('.modal.show').modal('hide');
// remove the greyed out background
$('.modal-backdrop').remove();
}
});
18 changes: 18 additions & 0 deletions app/assets/javascripts/bootstrap_popovers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
$(document).on('turbolinks:load', function () {
initBootstrapPopovers();
});

/**
* Initializes all Bootstrap popovers on the page.
*
* This function might be used for the first initialization of popovers as well
* as for reinitialization on page changes.
*
* See: https://getbootstrap.com/docs/5.3/components/popovers/#enable-popovers
*/
function initBootstrapPopovers() {
const popoverHtmlElements = document.querySelectorAll('[data-bs-toggle="popover"]');
for (const element of popoverHtmlElements) {
new bootstrap.Popover(element);
}
}
4 changes: 1 addition & 3 deletions app/assets/javascripts/lectures.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ disableExceptOrganizational = ->
return

$(document).on 'turbolinks:load', ->
# activate all popovers
$('[data-bs-toggle="popover"]').popover()

initBootstrapPopovers()
# if any input is given to the lecture form (for people in lecture),
# disable other input
$('#lecture-form :input').on 'change', ->
Expand Down
6 changes: 2 additions & 4 deletions app/assets/javascripts/upload.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,7 @@ directUpload provides an interface to upload (multiple) files to an endpoint
hiddenInputElement
single
) ->
# update helpdesk
$('[data-bs-toggle="popover"]').popover()
initBootstrapPopovers()
hiddenInput = document.getElementById(hiddenInputElement)
hiddenInput2 = document.getElementById('upload-userManuscript-hidden2')
fileInput =document.getElementById(fileInputElement)
Expand Down Expand Up @@ -439,8 +438,7 @@ directUpload provides an interface to upload (multiple) files to an endpoint
###
@result = undefined
@userManuscriptUpload = (fileInput) ->
# update helpdesk
$('[data-bs-toggle="popover"]').popover()
initBootstrapPopovers()
hiddenInput = document.getElementById('upload-userManuscript-hidden')
hiddenInput2 = document.getElementById('upload-userManuscript-hidden2')
fileInput.style.display = 'none'
Expand Down
4 changes: 4 additions & 0 deletions app/assets/stylesheets/admin.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.admin-background {
background-size: 20px 20px;
background-image: radial-gradient(circle, #bebebe 1px, #ffffff00 1px);
}
54 changes: 37 additions & 17 deletions app/assets/stylesheets/navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
background: linear-gradient(110deg, #223e62 0%, #405d75 100%);
}

.admin-navbars-container {
background: linear-gradient(110deg, #821A3B 0%, #8d1c40 100%);
}

#mampfbrand {
color: white;
font-weight: bold;
Expand All @@ -12,10 +16,6 @@
width: 35px;
}

.navbar-nav a {
filter: drop-shadow(1px 4px 7px rgba(0, 0, 0, 0.2));
}

.navbar {
box-shadow: 1px 4px 7px -2px rgba(0, 0, 0, 0.1);
z-index: 1000; // place navbar and its shadow on top of everything
Expand All @@ -24,21 +24,41 @@
.new-comment {
color: #ffc107 !important;
}
}

#navbar-buttons a {
text-decoration: none;
font-size: 1.35rem;
padding: 0 9px;
color: white;
.nav-item {
position: relative;
}

.navbar-nav .nav-link {
filter: drop-shadow(1px 4px 7px rgba(0, 0, 0, 0.2));

&::after {
&.active-item {
content: "\2022";
font-size: 1rem;
position: absolute;
top: 21px;
left: 16px;
&:hover {
color: #cee2ff;
}

&:focus {
color: white;
}

text-decoration: none;
font-size: 1.35rem;
padding: 0 9px;
color: white;

&::after {
&.active-item {
content: "\2022"; // dot
font-size: 1rem;
position: absolute;
top: 21px;
left: 16px;
}
}
}
}

.admin-navbars-container .navbar-nav .nav-link {
&:hover {
color: #ffe5ed;
}
}
Loading

0 comments on commit c313dd2

Please sign in to comment.