-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Completely remove usage of sprockets or propshaft (#24)
Why: - Sprockets v4 manifest file has all sorts of rough edges with rails engines - Exposing the engines assets publicly can give away details about things that should be internal only - We can easily avoid it altogether and just load the assets as part of the application layout - There are such minimal amount of asset code that there really is no benefit to any HTTP caching
- Loading branch information
1 parent
fc9b424
commit a34051a
Showing
21 changed files
with
201 additions
and
510 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<style> | ||
h1, h2, h3, h4, h5{ | ||
color: #424242; | ||
} | ||
|
||
body{ | ||
background-color: #F5F6F6; | ||
padding-top: 80px; | ||
padding-bottom: 20px; | ||
} | ||
|
||
label{ | ||
margin-right: 10px; | ||
} | ||
|
||
footer{ | ||
position: fixed; | ||
text-align: center; | ||
bottom: 10px; | ||
right: 0; | ||
left: 0; | ||
} | ||
|
||
.btn-default{ | ||
border-color: gray; | ||
background-color: gray; | ||
background-image: none; | ||
} | ||
|
||
.breadcrumb-item:before{ | ||
content: "/": | ||
} | ||
|
||
.form-group{ | ||
margin-bottom: 15px !important; | ||
} | ||
|
||
select{ | ||
min-width: 300px; | ||
} | ||
|
||
form label{ | ||
margin-bottom: 5px; | ||
font-weight: bold; | ||
} | ||
|
||
.nav-link.active{ | ||
font-weight: bold; | ||
} | ||
|
||
.navbar-nav .nav-item{ | ||
margin-left: 10px; | ||
} | ||
|
||
.navbar-brand{ | ||
font-weight: bold; | ||
text-decoration: underline; | ||
} | ||
|
||
.ss-main{ | ||
// for slimselect.js | ||
background-image: none !important; | ||
height: 38px; | ||
} | ||
|
||
.ss-option{ | ||
min-height: 32px !important; | ||
} | ||
</style> |
39 changes: 39 additions & 0 deletions
39
app/views/layouts/rails_i18n_manager/_app_javascript.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<script type="text/javascript"> | ||
window.init = function(){ | ||
$("form").attr("autocomplete", "off"); | ||
|
||
$('.field_with_errors').addClass('is-invalid'); | ||
|
||
var alerts = $(".alert:not(.permanent)") | ||
setTimeout(function(){ | ||
alerts.fadeOut(); | ||
}, 8000); | ||
|
||
autosize($('textarea')); | ||
|
||
$("select").each(function(){ | ||
$(this).removeClass("form-select"); | ||
|
||
new SlimSelect({ | ||
select: this, | ||
settings: { | ||
//contentLocation: document.body, | ||
contentLocation: this.parentElement, | ||
closeOnSelect: !this.hasAttribute("multiple"), | ||
openPosition: 'down', // options: auto, up, down | ||
//placeholderText: "Select Value", | ||
placeholderText: "Select...", | ||
//searchPlaceholder: 'Search', | ||
//searchText: 'No Results', | ||
//searchingText: 'Searching...', | ||
maxValuesShown: 999, // defaults to 20, max selected items show in multi-selects | ||
//maxValuesShown: 20, | ||
} | ||
}) | ||
}); | ||
} | ||
|
||
$(function(){ | ||
window.init(); | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" referrerpolicy="no-referrer" | ||
|
||
link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" crossorigin="anonymous" | ||
script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3" crossorigin="anonymous" | ||
|
||
= render "layouts/rails_i18n_manager/utility_css" | ||
= render "layouts/rails_i18n_manager/app_css" | ||
|
||
script src="https://cdn.jsdelivr.net/npm/@rails/[email protected]/lib/assets/compiled/rails-ujs.min.js" | ||
|
||
link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slim-select/2.4.5/slimselect.min.css" integrity="sha512-GvqWM4KWH8mbgWIyvwdH8HgjUbyZTXrCq0sjGij9fDNiXz3vJoy3jCcAaWNekH2rJe4hXVWCJKN+bEW8V7AAEQ==" crossorigin="anonymous" referrerpolicy="no-referrer" | ||
script src="https://cdnjs.cloudflare.com/ajax/libs/slim-select/2.4.5/slimselect.global.min.js" integrity="sha512-r2ujllVbPV4gVNZyqAB6LS3cnpEenEl18yFYoowmutUX5zVXQi5mp13lMWv3FQpsn96eFJTcd5VqBkZuatGtWQ==" crossorigin="anonymous" referrerpolicy="no-referrer" | ||
|
||
script src="https://cdnjs.cloudflare.com/ajax/libs/autosize.js/3.0.20/autosize.min.js" integrity="sha512-EAEoidLzhKrfVg7qX8xZFEAebhmBMsXrIcI0h7VPx2CyAyFHuDvOAUs9CEATB2Ou2/kuWEDtluEVrQcjXBy9yw==" crossorigin="anonymous" referrerpolicy="no-referrer" | ||
|
||
link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.2.1/css/font-awesome.min.css" integrity="sha512-IJ+BZHGlT4K43sqBGUzJ90pcxfkREDVZPZxeexRigVL8rzdw/gyJIflDahMdNzBww4k0WxpyaWpC2PLQUWmMUQ==" crossorigin="anonymous" referrerpolicy="no-referrer" | ||
|
||
link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha512-SfTiTlX6kk+qitfevl/7LibUOeJWlt9rbyDn92a1DqWOw9vWG2MFoays0sgObmWazO5BQPiFucnnEAjpAB+/Sw==" crossorigin="anonymous" referrerpolicy="no-referrer" | ||
|
||
= render "layouts/rails_i18n_manager/app_javascript" |
Oops, something went wrong.