mirror of
https://github.com/scratchfoundation/scratch-desktop.git
synced 2024-12-22 21:52:31 -05:00
new welcome page
This commit is contained in:
parent
70562a0c51
commit
a10c1752b7
1 changed files with 2 additions and 10 deletions
|
@ -1,10 +1,2 @@
|
|||
// Initial landing page
|
||||
document.write(`
|
||||
<h1>Hello world!</h1>
|
||||
<p>
|
||||
You are using Node.js ${process.versions.node},
|
||||
Chromium ${process.versions.chrome},
|
||||
Electron ${process.versions.electron},
|
||||
and <code>electron-webpack</code> ${require('electron-webpack/package.json').version}.
|
||||
</p>
|
||||
`)
|
||||
// Initial welcome page. Delete the following line to remove it.
|
||||
'use strict';const styles=document.createElement('style');styles.innerText=`@import url(https://unpkg.com/spectre.css/dist/spectre.min.css);.empty{display:flex;flex-direction:column;justify-content:center;height:100vh;position:relative}.footer{bottom:0;font-size:13px;left:50%;opacity:.9;position:absolute;transform:translateX(-50%);width:100%}`;const vueScript=document.createElement('script');vueScript.setAttribute('type','text/javascript'),vueScript.setAttribute('src','https://unpkg.com/vue'),vueScript.onload=init,document.head.appendChild(vueScript),document.head.appendChild(styles);function init(){const a=document.createElement('div');a.setAttribute('id','app'),document.body.appendChild(a),new Vue({data:{versions:{electron:process.versions.electron,electronWebpack:require('electron-webpack/package.json').version}},methods:{open(b){require('electron').shell.openExternal(b)}},template:`<div><div class=empty><p class="empty-title h5">Welcome to your new project!<p class=empty-subtitle>Get started now and take advantage of the great documentation at hand.<div class=empty-action><button @click="open('https://webpack.electron.build')"class="btn btn-primary">Documentation</button> <button @click="open('https://electron.atom.io/docs/')"class="btn btn-primary">Electron</button><br><ul class=breadcrumb><li class=breadcrumb-item>electron-webpack v{{ versions.electronWebpack }}<li class=breadcrumb-item>electron v{{ versions.electron }}</ul></div><p class=footer>This intitial landing page can be easily removed from <code>src/renderer/index.js</code>.</div></div>`}).$mount('#app')}
|
||||
|
|
Loading…
Reference in a new issue