Skip to content

Instantly share code, notes, and snippets.

@buncis
Last active September 16, 2021 11:45
Show Gist options
  • Save buncis/a681e85268876c098d664fb1b60a9b51 to your computer and use it in GitHub Desktop.
Save buncis/a681e85268876c098d664fb1b60a9b51 to your computer and use it in GitHub Desktop.
add admin-lte 3.1 to rails 6
<!DOCTYPE html>
<html>
<head>
<title>Summarizer</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= stylesheet_pack_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
</head>
<body>
<%= yield %>
</body>
</html>
// This file is automatically compiled by Webpack, along with any other files
// present in this directory. You're encouraged to place your actual application logic in
// a relevant structure within app/javascript and only use these pack files to reference
// that code so it'll be compiled.
import "../stylesheets/application";
import Rails from "@rails/ujs"
import Turbolinks from "turbolinks"
import * as ActiveStorage from "@rails/activestorage"
import "channels"
import "bootstrap"
import "admin-lte"
import "@fortawesome/fontawesome-free/js/all";
$(document).on('turbolinks:load', function () {
$('[data-toggle="tooltip"]').tooltip()
})
Rails.start()
Turbolinks.start()
ActiveStorage.start()
@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback");
@import "admin-lte";
const { environment } = require('@rails/webpacker')
const webpack = require('webpack')
environment.plugins.append('Provide',
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
Popper: ['popper.js', 'default']
})
)
module.exports = environment
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: app/javascript/packs/application.js
modified: app/views/layouts/application.html.erb
modified: config/webpack/environment.js
modified: package.json
modified: yarn.lock
Untracked files:
(use "git add <file>..." to include in what will be committed)
app/javascript/stylesheets/
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: app/javascript/packs/application.js
new file: app/javascript/stylesheets/application.scss
modified: app/views/layouts/application.html.erb
modified: config/webpack/environment.js
modified: package.json
modified: yarn.lock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment