Skip to content

Commit 4317782

Browse files
Arpan-KreetiArp-G
authored andcommitted
remove cdns to local path for bootstrap, jquery , etc
1 parent fadf218 commit 4317782

File tree

5 files changed

+64
-32
lines changed

5 files changed

+64
-32
lines changed

apps/dashboard/assets/css/app.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
/* This file is for your main application css. */
22
@import "./phoenix.css";
33
@import "../node_modules/nprogress/nprogress.css";
4+
@import "~bootstrap/scss/bootstrap.scss";
5+
@import '~microtip/microtip.min.css';
6+
$fa-font-path: "~font-awesome/fonts/";
7+
@import "~font-awesome/scss/font-awesome";
48

59
/* LiveView specific classes for your customizations */
10+
611
.invalid-feedback {
712
color: #a94442;
813
display: block;

apps/dashboard/assets/package-lock.json

Lines changed: 50 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/dashboard/assets/package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,16 @@
77
"watch": "webpack --mode development --watch"
88
},
99
"dependencies": {
10+
"bootstrap": "4.5.2",
11+
"file-loader": "^6.1.0",
12+
"font-awesome": "^4.7.0",
13+
"jquery": "3.5.1",
1014
"microtip": "^0.2.2",
1115
"nprogress": "^0.2.0",
1216
"phoenix": "file:../../../deps/phoenix",
1317
"phoenix_html": "file:../../../deps/phoenix_html",
14-
"phoenix_live_view": "file:../../../deps/phoenix_live_view"
18+
"phoenix_live_view": "file:../../../deps/phoenix_live_view",
19+
"popper.js": "1.16.1"
1520
},
1621
"devDependencies": {
1722
"@babel/core": "^7.0.0",
@@ -22,7 +27,7 @@
2227
"sass-loader": "^8.0.2",
2328
"node-sass": "^4.13.1",
2429
"mini-css-extract-plugin": "^0.9.0",
25-
"optimize-css-assets-webpack-plugin": "^5.0.1",
30+
"optimize-css-assets-webpack-plugin": "^5.0.3",
2631
"terser-webpack-plugin": "^2.3.2",
2732
"webpack": "4.41.5",
2833
"webpack-cli": "^3.3.2"

apps/dashboard/assets/webpack.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
44
const TerserPlugin = require('terser-webpack-plugin');
55
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
66
const CopyWebpackPlugin = require('copy-webpack-plugin');
7-
const webpack = require('webpack');
87

98
module.exports = (env, options) => {
109
const devMode = options.mode !== 'production';
@@ -42,7 +41,8 @@ module.exports = (env, options) => {
4241
'css-loader',
4342
'sass-loader',
4443
],
45-
}
44+
},
45+
{ test: /\.(eot|svg|ttf|woff|woff2)$/, loader: 'file-loader?name=public/fonts/[name].[ext]' }
4646
]
4747
},
4848
plugins: [

apps/dashboard/lib/dashboard_web/templates/layout/root.html.leex

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,7 @@
66
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
77
<%= csrf_meta_tag() %>
88
<%= live_title_tag assigns[:page_title] || "🔥 csv2sql 🔥" %>
9-
<link rel="stylesheet" href="https://unpkg.com/microtip/microtip.css" />
109
<link rel="stylesheet" href="<%= Routes.static_path(@conn, "/css/app.css") %>"/>
11-
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
12-
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
13-
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
14-
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
15-
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
1610
<script defer type="text/javascript" src="<%= Routes.static_path(@conn, "/js/app.js") %>"></script>
1711
<link rel="stylesheet" href=" <%= Routes.static_path(@conn, "/css/custom.css") %>"/>
1812
</head>

0 commit comments

Comments
 (0)