Commit d9d8b527 authored by o's avatar o

do more with less crap

* remove dependencies which are not used
* import bootstrap manually, without the bootstrap gem
* don't include autoprefixer anymore. this might cause some issues with older browsers and bootstrap...
* remove pinning of sass
* fix duplicate ids which break toggling of menu
* remove pinning of coffee, the update requires the following fixes:
* fix issues with broken coffee files which are actuall js files
parent e2412e08
Pipeline #3864 failed with stage
in 7 minutes
......@@ -8,5 +8,5 @@ test:
script:
- cp test/local_conf.yml config/
- yum install -y rh-ruby25-ruby-devel libxml2-devel gcc openssl-devel postgresql-devel gcc-c++ libsodium sqlite3-devel libsqlite3x-devel easy-rsa tinycdb-devel tar gzip patch git bzip2
- bundle install --jobs $(nproc) || bundle update rails
- bundle install --jobs $(nproc) --with=test --with=development || bundle update rails
- bundle exec rails test
......@@ -5,36 +5,22 @@ ruby '~> 2.5'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.0'
# nodejs version too old on EL7, TODO: remove once migrated
gem 'autoprefixer-rails', '~> 9.7.6'
gem 'libv8', '~> 7.3.492.27.1'
gem 'mini_racer', '= 0.2.14'
# END EL7 fixes
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.3', '< 1.4'
# Use Puma as the app server
gem 'puma', '~> 4.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0',
gem 'sass-rails',
require: (ENV['RAILS_ENV'].to_s.downcase != 'production' ||
ENV['PRECOMPILE'].to_s == '1')
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use ActiveStorage variant
# gem 'mini_magick', '~> 4.8'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
gem 'coffee-rails'
gem 'rqrcode'
gem 'rotp'
......@@ -47,18 +33,7 @@ gem 'ruby-saml', '~> 1.9.0'
gem 'unidecoder'
gem 'bootstrap', '~> 4.4.1',
require: (ENV['RAILS_ENV'].to_s.downcase != 'production' ||
ENV['PRECOMPILE'].to_s == '1')
gem 'jquery-rails'
gem 'sprockets-rails', '>= 2.3.2'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
# See https://github.com/rails/execjs#readme for more supported runtimes
#gem 'mini_racer', platforms: :ruby
end
group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
......@@ -70,14 +45,7 @@ group :development do
end
group :test do
gem "i18n-tasks"
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15', '< 4.0'
gem 'selenium-webdriver'
# Easy installation and use of chromedriver to run system tests with Chrome
gem 'chromedriver-helper'
gem 'webmock'
end
# there is no timezone info in containers
......
......@@ -44,36 +44,14 @@ GEM
tzinfo (~> 1.1)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
archive-zip (0.12.0)
io-like (~> 0.3.0)
arel (9.0.0)
ast (2.4.1)
autoprefixer-rails (9.7.6)
execjs
base32 (0.3.4)
bindex (0.8.1)
bootstrap (4.4.1)
autoprefixer-rails (>= 9.1.0)
popper_js (>= 1.14.3, < 2)
sassc-rails (>= 2.0.0)
builder (3.2.4)
byebug (11.1.3)
capybara (3.33.0)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (~> 1.5)
xpath (~> 3.2)
childprocess (3.0.0)
chromedriver-helper (2.1.1)
archive-zip (~> 0.10)
nokogiri (~> 1.8)
chunky_png (1.3.12)
coffee-rails (4.2.2)
coffee-rails (5.0.0)
coffee-script (>= 2.2.0)
railties (>= 4.0.0)
railties (>= 5.2.0)
coffee-script (2.4.1)
coffee-script-source
execjs
......@@ -91,30 +69,15 @@ GEM
gpgme (2.0.20)
mini_portile2 (~> 2.3)
hashdiff (1.0.1)
highline (2.0.3)
http-accept (1.7.0)
http-cookie (1.0.3)
domain_name (~> 0.5)
i18n (1.8.5)
concurrent-ruby (~> 1.0)
i18n-tasks (0.9.31)
activesupport (>= 4.0.2)
ast (>= 2.1.0)
erubi
highline (>= 2.0.0)
i18n
parser (>= 2.2.3.0)
rails-i18n
rainbow (>= 2.2.2, < 4.0)
terminal-table (>= 1.5.1)
io-like (0.3.1)
jbuilder (2.10.1)
activesupport (>= 5.0.0)
jquery-rails (4.4.0)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
libv8 (7.3.492.27.1)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
......@@ -133,16 +96,11 @@ GEM
mimemagic (0.3.5)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
mini_racer (0.2.14)
libv8 (> 7.3)
minitest (5.14.2)
netrc (0.11.0)
nio4r (2.5.4)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
parser (2.7.1.4)
ast (~> 2.4.1)
popper_js (1.16.0)
public_suffix (4.0.6)
puma (4.3.6)
nio4r (~> 2.0)
......@@ -167,21 +125,16 @@ GEM
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
rails-i18n (5.1.3)
i18n (>= 0.7, < 2)
railties (>= 5.0, < 6)
railties (5.2.4.4)
actionpack (= 5.2.4.4)
activesupport (= 5.2.4.4)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rainbow (3.0.0)
rake (13.0.1)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
regexp_parser (1.8.0)
rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0)
http-cookie (>= 1.0.2, < 2.0)
......@@ -195,18 +148,8 @@ GEM
ruby-saml (1.9.0)
nokogiri (>= 1.5.10)
ruby_dep (1.5.0)
rubyzip (2.3.0)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sass-rails (5.1.0)
railties (>= 5.2.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sass-rails (6.0.0)
sassc-rails (~> 2.1, >= 2.1.1)
sassc (2.4.0)
ffi (~> 1.9)
sassc-rails (2.1.2)
......@@ -215,14 +158,11 @@ GEM
sprockets (> 3.0)
sprockets-rails
tilt
selenium-webdriver (3.142.7)
childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2)
spring (2.1.1)
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
spring (>= 1.2, < 3.0)
sprockets (3.7.2)
sprockets (4.0.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.2)
......@@ -230,8 +170,6 @@ GEM
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.3.13)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thor (1.0.1)
thread_safe (0.3.6)
tilt (2.0.10)
......@@ -244,7 +182,6 @@ GEM
unf (0.1.4)
unf_ext
unf_ext (0.0.7.7)
unicode-display_width (1.7.0)
unidecoder (1.1.2)
web-console (3.7.0)
actionview (>= 5.0)
......@@ -258,39 +195,26 @@ GEM
websocket-driver (0.7.3)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
zxcvbn-ruby (1.1.0)
PLATFORMS
ruby
DEPENDENCIES
autoprefixer-rails (~> 9.7.6)
base32
bootstrap (~> 4.4.1)
byebug
capybara (>= 2.15, < 4.0)
chromedriver-helper
coffee-rails (~> 4.2)
coffee-rails
gpgme
i18n-tasks
jbuilder (~> 2.5)
jquery-rails
libv8 (~> 7.3.492.27.1)
listen (>= 3.0.5, < 3.2)
mini_racer (= 0.2.14)
puma (~> 4.0)
rails (~> 5.2.0)
rest-client
rotp
rqrcode
ruby-saml (~> 1.9.0)
sass-rails (~> 5.0)
selenium-webdriver
sass-rails
spring
spring-watcher-listen (~> 2.0.0)
sprockets-rails (>= 2.3.2)
sqlite3 (~> 1.3, < 1.4)
tzinfo-data
uglifier (>= 1.3.0)
......@@ -303,4 +227,4 @@ RUBY VERSION
ruby 2.5.5p157
BUNDLED WITH
1.16.1
1.17.3
......@@ -13,8 +13,7 @@
//= require rails-ujs
//= require activestorage
//= require jquery3
//= require popper
//= require bootstrap-sprockets
//= require bootstrap.min
function fadeOutNotice() {
(function() {
......
This diff is collapsed.
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
//= require userlist
//= require qrtoggle
//= require userlist
//= require qrtoggle
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
//= require pwstrength
//= require pwhelp
//= require pwstrength
//= require pwhelp
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
//= require sha256.min
//= require proofofwork
//= require sha256.min
//= require proofofwork
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
//= require pwstrength
//= require signup_helpers
//= require pwhelp
......
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
//= require userlist
......@@ -22,12 +22,14 @@
} %>
<% end %>
<% @navbar_instance ||= 1; @navbar_instance = @navbar_instance + 1 %>
<a class="navbar-brand logo d-block d-md-none" href="#"></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarToggler" aria-controls="navbarToggler" aria-expanded="false" aria-label="Toggle navigation">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarToggler-<%= @navbar_instance %>" aria-controls="navbarToggler" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarToggler">
<div class="collapse navbar-collapse" id="navbarToggler-<%= @navbar_instance %>">
<div class="nav flex-column">
<b><%= current_user %></b>
<% menu.each do |name, opts| %>
......
//
// Base styles
//
.alert {
position: relative;
padding: $alert-padding-y $alert-padding-x;
margin-bottom: $alert-margin-bottom;
border: $alert-border-width solid transparent;
@include border-radius($alert-border-radius);
}
// Headings for larger alerts
.alert-heading {
// Specified to prevent conflicts of changing $headings-color
color: inherit;
}
// Provide class for links that match alerts
.alert-link {
font-weight: $alert-link-font-weight;
}
// Dismissible alerts
//
// Expand the right padding and account for the close button's positioning.
.alert-dismissible {
padding-right: ($close-font-size + $alert-padding-x * 2);
// Adjust close link position
.close {
position: absolute;
top: 0;
right: 0;
padding: $alert-padding-y $alert-padding-x;
color: inherit;
}
}
// Alternate styles
//
// Generate contextual modifier classes for colorizing the alert.
@each $color, $value in $theme-colors {
.alert-#{$color} {
@include alert-variant(theme-color-level($color, $alert-bg-level), theme-color-level($color, $alert-border-level), theme-color-level($color, $alert-color-level));
}
}
// Base class
//
// Requires one of the contextual, color modifier classes for `color` and
// `background-color`.
.badge {
display: inline-block;
padding: $badge-padding-y $badge-padding-x;
font-size: $badge-font-size;
font-weight: $badge-font-weight;
line-height: 1;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
@include border-radius($badge-border-radius);
// Empty badges collapse automatically
&:empty {
display: none;
}
}
// Quick fix for badges in buttons
.btn .badge {
position: relative;
top: -1px;
}
// Pill badges
//
// Make them extra rounded with a modifier to replace v3's badges.
.badge-pill {
padding-right: $badge-pill-padding-x;
padding-left: $badge-pill-padding-x;
@include border-radius($badge-pill-border-radius);
}
// Colors
//
// Contextual variations (linked badges get darker on :hover).
@each $color, $value in $theme-colors {
.badge-#{$color} {
@include badge-variant($value);
}
}
.breadcrumb {
display: flex;
flex-wrap: wrap;
padding: $breadcrumb-padding-y $breadcrumb-padding-x;
margin-bottom: $breadcrumb-margin-bottom;
list-style: none;
background-color: $breadcrumb-bg;
@include border-radius($border-radius);
}
.breadcrumb-item {
// The separator between breadcrumbs (by default, a forward-slash: "/")
+ .breadcrumb-item::before {
display: inline-block; // Suppress underlining of the separator in modern browsers
padding-right: $breadcrumb-item-padding;
padding-left: $breadcrumb-item-padding;
color: $breadcrumb-divider-color;
content: "#{$breadcrumb-divider}";
}
// IE9-11 hack to properly handle hyperlink underlines for breadcrumbs built
// without `<ul>`s. The `::before` pseudo-element generates an element
// *within* the .breadcrumb-item and thereby inherits the `text-decoration`.
//
// To trick IE into suppressing the underline, we give the pseudo-element an
// underline and then immediately remove it.
+ .breadcrumb-item:hover::before {
text-decoration: underline;
}
// stylelint-disable-next-line no-duplicate-selectors
+ .breadcrumb-item:hover::before {
text-decoration: none;
}
&.active {
color: $breadcrumb-active-color;
}
}
// stylelint-disable selector-no-qualifying-type
// Make the div behave like a button
.btn-group,
.btn-group-vertical {
position: relative;
display: inline-flex;
vertical-align: middle; // match .btn alignment given font-size hack above
> .btn {
position: relative;
flex: 0 1 auto;
// Bring the hover, focused, and "active" buttons to the front to overlay
// the borders properly
@include hover {
z-index: 1;
}
&:focus,
&:active,
&.active {
z-index: 1;
}
}
// Prevent double borders when buttons are next to each other
.btn + .btn,
.btn + .btn-group,
.btn-group + .btn,
.btn-group + .btn-group {
margin-left: -$btn-border-width;
}
}
// Optional: Group multiple button groups together for a toolbar
.btn-toolbar {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
.input-group {
width: auto;
}
}
.btn-group {
> .btn:first-child {
margin-left: 0;
}
// Reset rounded corners
> .btn:not(:last-child):not(.dropdown-toggle),
> .btn-group:not(:last-child) > .btn {
@include border-right-radius(0);
}
> .btn:not(:first-child),
> .btn-group:not(:first-child) > .btn {
@include border-left-radius(0);
}
}
// Sizing
//
// Remix the default button sizing classes into new ones for easier manipulation.
.btn-group-sm > .btn { @extend .btn-sm; }
.btn-group-lg > .btn { @extend .btn-lg; }
//
// Split button dropdowns
//
.dropdown-toggle-split {
padding-right: $btn-padding-x * .75;
padding-left: $btn-padding-x * .75;
&::after {
margin-left: 0;
}
}
.btn-sm + .dropdown-toggle-split {
padding-right: $btn-padding-x-sm * .75;
padding-left: $btn-padding-x-sm * .75;
}
.btn-lg + .dropdown-toggle-split {
padding-right: $btn-padding-x-lg * .75;
padding-left: $btn-padding-x-lg * .75;
}