1
- // We need to import the CSS so that webpack will load it.
2
- // The MiniCssExtractPlugin is used to separate it out into
3
- // its own CSS file.
4
- import "../css/app.scss" ;
1
+ import "../css/app.css" ;
5
2
6
- // webpack automatically bundles all modules in your
7
- // entry points. Those entry points can be configured
8
- // in "webpack.config.js".
9
- //
10
- // Import deps with the dep name or local files with a relative path, for example:
11
- //
12
- // import {Socket} from "phoenix"
13
- // import socket from "./socket"
14
- //
15
3
import "phoenix_html" ;
16
4
import { Socket } from "phoenix" ;
17
- import NProgress from "nprogress " ;
5
+ import topbar from "topbar " ;
18
6
import { LiveSocket } from "phoenix_live_view" ;
19
7
20
8
let csrfToken = document
@@ -25,8 +13,9 @@ let liveSocket = new LiveSocket("/live", Socket, {
25
13
} ) ;
26
14
27
15
// Show progress bar on live navigation and form submits
28
- window . addEventListener ( "phx:page-loading-start" , ( info ) => NProgress . start ( ) ) ;
29
- window . addEventListener ( "phx:page-loading-stop" , ( info ) => NProgress . done ( ) ) ;
16
+ topbar . config ( { barColors : { 0 : "#29d" } , shadowColor : "rgba(0, 0, 0, .3)" } ) ;
17
+ window . addEventListener ( "phx:page-loading-start" , ( info ) => topbar . show ( ) ) ;
18
+ window . addEventListener ( "phx:page-loading-stop" , ( info ) => topbar . hide ( ) ) ;
30
19
31
20
// connect if there are any LiveViews on the page
32
21
liveSocket . connect ( ) ;
0 commit comments