Improve loading and prevent flicker on load

This commit is contained in:
Marvin Scholz 2017-01-20 02:55:07 +01:00
parent 623bedfad0
commit 9e37f644c3
3 changed files with 6 additions and 3 deletions

View file

@ -34,7 +34,7 @@
<body> <body>
<div class="mdl-layout mdl-js-layout mdl-layout--no-desktop-drawer-button mdl-layout--fixed-header"> <div class="mdl-layout mdl-js-layout mdl-layout--no-desktop-drawer-button mdl-layout--fixed-header">
{{ template "menu.html" . }} {{ template "menu.html" . }}
<main class="mdl-layout__content" id="app"> <main class="mdl-layout__content" id="app" v-cloak="v-cloak">
<div class="mdl-grid"> <div class="mdl-grid">
<div class="mdl-cell mdl-cell--3-col" v-for="item in items"> <div class="mdl-cell mdl-cell--3-col" v-for="item in items">
<a v-on:click="detailPopup(item)"> <a v-on:click="detailPopup(item)">

View file

@ -1,6 +1,5 @@
</main> </main>
</div> </div>
<script src="/static/js/vendor/vue.min.js"></script>
<script src="/static/js/app.js"></script> <script src="/static/js/app.js"></script>
</body> </body>
</html> </html>

View file

@ -10,7 +10,11 @@
<link rel="stylesheet" href="/static/css/vendor/material.min.css"> <link rel="stylesheet" href="/static/css/vendor/material.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="/static/css/app.css"> <link rel="stylesheet" href="/static/css/app.css">
<style media="screen">
[v-cloak] { display: none; }
</style>
<!-- Scripts --> <!-- Scripts -->
<script src="/static/js/vendor/material.min.js"></script> <script src="/static/js/vendor/material.min.js"></script>
<script src="/static/js/vendor/vue.min.js"></script>
</head> </head>