Skip to content

Commit

Permalink
Fixing Bootstrap & Devise Forms, Nav Styles
Browse files Browse the repository at this point in the history
 * Adding proper Favicon
 * Moving navigation into a partial
 * Fixing Registration form.
  • Loading branch information
kigster committed Apr 18, 2024
1 parent b22b9ca commit 55d4d52
Show file tree
Hide file tree
Showing 68 changed files with 760 additions and 480 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ gem 'annotate'
gem 'attribute_normalizer'
gem 'carrierwave'
gem 'dalli'
gem 'devise'
gem 'devise', git: 'https://github.com/heartcombo/devise.git'
gem 'mini_magick'
gem 'mini_racer'
gem 'protected_attributes_continued'
Expand Down
19 changes: 12 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
GIT
remote: [email protected]:heartcombo/devise.git
revision: a259ff3c28912a27329727f4a3c2623d3f5cb6f2
specs:
devise (5.0.0.beta)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 6.0.0)
responders
warden (~> 1.2.3)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -129,12 +140,6 @@ GEM
debug (1.9.2)
irb (~> 1.10)
reline (>= 0.3.8)
devise (4.9.4)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
diff-lcs (1.5.1)
docile (1.4.0)
drb (2.2.1)
Expand Down Expand Up @@ -451,7 +456,7 @@ DEPENDENCIES
cssbundling-rails
dalli
debug
devise
devise!
factory_bot_rails
faker
flatpickr
Expand Down
File renamed without changes
Binary file added app/assets/images/logos/fnf-large.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/logos/fnf-transparent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
4 changes: 2 additions & 2 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
*= require_tree .
*/

@import 'bootstrap/scss/bootstrap';
Expand All @@ -22,10 +21,11 @@
//@import '../../../node_modules/flatpickr/dist/flatpickr.min';
//@import '../../../node_modules/flatpickr/dist/themes/material_orange';

@import './global.css.scss';
@import './events.css.scss';
@import './home.css.scss';
@import './jobs.css.scss';
@import './payments.css.scss';
@import './shifts.css.scss';
@import './time_slots.css.scss';
@import './links.css.scss';
@import './global.css.scss';
4 changes: 2 additions & 2 deletions app/assets/stylesheets/events.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
}

img.event-preview {
border: 5px solid #999;
max-width: 200px;
max-height: 200px;
margin: 0 30px;
border-radius: 20px;
float: right !important;
}
153 changes: 138 additions & 15 deletions app/assets/stylesheets/global.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,78 @@
clear: right;
}

a {
.container-fluid, .container {
a {
color: #ff7800 !important;
text-decoration: none !important;
padding: 6px 15px !important;
margin-left: -15px;

&:focus,
&:hover {
color: #000 !important;
background-color: #ff7800 !important;
}
}
}

.muted {
font-size: 10pt;
color: #888;
margin-left: 22px;
}

a.btn {
color: #ff7800 !important;
text-decoration: none !important;
padding: 6px !important;
margin-left: -6px;
padding: 6px 15px !important;
margin-right: 10px;
margin-left: 0;
border: 1px solid #8f4603;
border-radius: 10px !important;
background-color: #462301;

&:focus,
&:hover {
color: #000 !important;
background-color: #ff7800 !important;
border-radius: 10px !important;
}
}


nav.navbar {
width: 100%;
padding-left: 20px;

a.nav-brand {
display: inline-block;
border-width: 0 !important;
padding: 0 !important;
background-color: transparent !important;
border-radius: 0;
margin-left: 30px;
}

a.nav-brand img {
display: inline-block;
position: relative;
margin-left: 50px !important;
margin-right: 30px !important;
padding: 20px !important;
}

a.nav-link {
color: #ff7800 !important;
text-decoration: none !important;
padding: 6px 15px !important;
margin: 0 10px;
background-color: #462301;

&:focus,
&:hover {
color: #000 !important;
background-color: #ff7800 !important;
}
}
}

Expand All @@ -28,26 +90,89 @@ a {
}
}

h1, h2, h3, h4, h5, legend {
margin-top: 20px;
}

.alert {
h3 {
margin: 0;
text-align: center;
}
}

.field-group {
position: relative;
width: 100%;
display: block;
border: 1px solid red;
}

.vertical-20 {
display: block;
width: 100%;
height: 20px;
}

.nowrap {
white-space: nowrap;
}

dl.dl-horizontal {
margin-top: 20px;

dt {
color: #fa2;
font-weight: 900;
}
}

form {
label {
margin-top: 25px;
margin-bottom: 2px;
display: block;
min-width: 400px;
font-size: 10pt;
min-width: auto;
font-size: 12pt;
vertical-align: top;

}

input {
background-color: #efe;
color: #000;
border: 0.5px solid #777;
border-radius: 5px;
padding: 5px;
padding: 5px 0;
margin-top: 0;
margin-bottom: 15px;
display: block !important;
margin-right: 5px;
margin-bottom: 0;
display: inline-block !important;
max-width: 80%;
min-width: 400px !important;
}

input[type=text] {
min-width: 100px;
text-align: left;
padding-left: 10px;
width: 300px;
}

input[type=submit] {
margin-top: 20px;
margin-bottom: 20px;
}

input[type=number] {
text-align: right;
width: 80px;
min-width: 30px;
}

input[type=email], input[type=password] {
padding: 9px !important;
width: 300px;
min-width: 100px;
}
}

Expand Down Expand Up @@ -86,11 +211,9 @@ body {
}

// Hide navbar text for small screens
@media (max-width: 410px) {
.user-name,
.sign-in-text,
.sign-out-text {
display: none;
@media (max-width: 600px) {
small.nowrap {
white-space: normal;
}
}

Expand Down
11 changes: 11 additions & 0 deletions app/assets/stylesheets/links.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ul.shared-user-links {
list-style-type: none;
margin-top: 40px !important;
padding-left: 0 !important;
p {
margin-left: 0;
a {
margin-left: 0;
}
}
}
4 changes: 0 additions & 4 deletions app/assets/stylesheets/users/shared/links.css.scss

This file was deleted.

6 changes: 3 additions & 3 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

# General controller configuration and helpers.
class ApplicationController < ActionController::Base
# allow_browser versions: :modern

protect_from_forgery

# Allow user to log in via authentication token
Expand Down Expand Up @@ -31,7 +29,9 @@ def require_logged_in_user
end

def configure_permitted_parameters
devise_parameter_sanitizer.permit(:sign_up, keys: [:name])
attributes = %i[name first last email avatar]
devise_parameter_sanitizer.permit(:sign_up, keys: attributes)
devise_parameter_sanitizer.permit(:account_update, keys: attributes)
end

def authenticate_user_from_token!
Expand Down
7 changes: 7 additions & 0 deletions app/helpers/time_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,15 @@

module TimeHelper
TIME_FORMAT = '%m/%d/%Y, %H:%M %p %Z'
DISPLAY_FORMAT = '%A, %d %B %Y, %h:%M %p'

class << self
def for_display(datetime)
return nil if datetime.nil?

datetime.strftime(DISPLAY_FORMAT) if [Date, DateTime, Time, ActiveSupport::TimeWithZone].include?(datetime.class)
end

def to_string_for_flatpickr(datetime)
return nil if datetime.nil?

Expand Down
7 changes: 2 additions & 5 deletions app/javascript/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,17 @@

import "@hotwired/turbo-rails"
import "@hotwired/stimulus"

import "@popperjs/core";
import "bootstrap";
// import "bootstrap/dist/css/bootstrap.min.css";

// import 'flatpickr/dist/flatpickr.min.css';
import 'flatpickr/dist/flatpickr.min.js';

import "./add_jquery"

import "./controllers"

import "./payments"
import "./popovers"
import "./ticket_requests"
import "./datepicker"

// import * as bootstrap from "bootstrap"

8 changes: 4 additions & 4 deletions app/javascript/popovers.ts → app/javascript/popovers.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import jQuery from 'jquery';

(function ($) {
const popover: JQuery<HTMLElement> = $('.help-popover');
const popover = $('.help-popover');
popover({
trigger: 'manual'
}).on('click', function (e) {
const popoverClicked: JQuery<HTMLElement> = $(this);
const popoverClicked = $(this);
popoverClicked('toggle');
e.preventDefault();
});
})(jQuery);

(function () {
jQuery(function () {
$("a[rel~=popover], .has-popover").popover();
return $("a[rel~=tooltip], .has-tooltip").tooltip();
$("a[rel~=popover], .has-popover").popover;
return $("a[rel~=tooltip], .has-tooltip").tooltip;
});

}).call(this);
Expand Down
Loading

0 comments on commit 55d4d52

Please sign in to comment.