[main.js] now asynchronous page data loading

This commit is contained in:
xdrm-brackets 2018-04-07 15:51:27 +02:00
parent c84037e2eb
commit 51875ca4e8
3 changed files with 43 additions and 5 deletions

View File

@ -7,7 +7,7 @@
"private": true, "private": true,
"scripts": { "scripts": {
"clean": "rm ./public_html/*.{js,css,html,svg,map}", "clean": "rm ./public_html/*.{js,css,html,svg,map}",
"dev": "parcel ./parcel/index.html --out-dir ./public_html", "dev": "parcel watch ./parcel/index.html --out-dir ./public_html",
"build": "parcel build ./parcel/index.html --out-dir ./public_html" "build": "parcel build ./parcel/index.html --out-dir ./public_html"
}, },
"dependencies": { "dependencies": {

View File

@ -21,11 +21,11 @@ gs.get.router.beforeEach((to, from, next) => {
// {3} Load page script // // {3} Load page script //
if( fullpath === 'noauth/login') if( fullpath === 'noauth/login')
require('./page/noauth/login.js'); import('./page/noauth/login.js').then(next);
else if( fullpath === 'noauth/register') else if( fullpath === 'noauth/register')
require('./page/noauth/register.js'); import('./page/noauth/register.js').then(next);
else if( fullpath === 'auth/channel') else if( fullpath === 'auth/channel')
require('./page/auth/channel.js'); import('./page/auth/channel.js').then(next);
// {4} Let VueRouter do the magic // // {4} Let VueRouter do the magic //
next(); next();

View File

@ -1 +1,39 @@
<html> <head> <title>Douscord</title> <meta charset="utf-8"> <meta name="author" content="xdrm-brackets (Adrien Marquès)"> <meta name="description" content="[Home] Home page"> <link type="text/css" rel="stylesheet" href="/layout.ab4d0007.css"> <link type="text/css" rel="stylesheet" href="/global.e5bd38cf.css"> <link type="text/css" rel="stylesheet" href="/menu.1327e60a.css"> <link type="text/css" rel="stylesheet" href="/dialog.238473dc.css"> <link type="text/css" rel="stylesheet" href="/side-menu.e104f256.css"> <link type="text/css" rel="stylesheet" href="/container.26b1a746.css"> <link type="text/css" rel="stylesheet" href="/pop-up.abd69e60.css"> <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro" rel="stylesheet"> <script type="/text/javascript" src="/channel.05d413ba.js"></script> <script type="/text/javascript" src="/login.1fe58520.js"></script> </head> <body> <div id="vue"></div> <script src="/main.5bc99d34.js"></script> </body> </html> <html>
<!-- HEADER -->
<head>
<title>Douscord</title>
<!-- META -->
<meta charset="utf-8">
<meta name="author" content="xdrm-brackets (Adrien Marquès)">
<meta name="description" content="[Home] Home page">
<!-- STYLESHEET -->
<link type="text/css" rel="stylesheet" href="/layout.cfeadd38.css">
<link type="text/css" rel="stylesheet" href="/global.1134b6ec.css">
<link type="text/css" rel="stylesheet" href="/menu.51cb4bbf.css">
<link type="text/css" rel="stylesheet" href="/dialog.d78ff447.css">
<link type="text/css" rel="stylesheet" href="/side-menu.5571ace8.css">
<link type="text/css" rel="stylesheet" href="/container.092a4394.css">
<link type="text/css" rel="stylesheet" href="/pop-up.3f26035e.css">
<!-- FONT -->
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro" rel="stylesheet">
<!-- SCRIPTS -->
<script type="/text/javascript" src="/channel.74ffbe70.js"></script>
<script type="/text/javascript" src="/login.16af7879.js"></script>
<!-- BODY -->
<script src="/layout.cfeadd38.js"></script><script src="/global.1134b6ec.js"></script><script src="/menu.51cb4bbf.js"></script><script src="/dialog.d78ff447.js"></script><script src="/side-menu.5571ace8.js"></script><script src="/container.092a4394.js"></script><script src="/pop-up.3f26035e.js"></script></head>
<body>
<div id="vue"></div>
<script type="text/javascript" src="/main.b4020c8a.js"></script>
</body>
</html>