mirror of
https://github.com/Lissy93/dashy.git
synced 2024-09-11 14:17:02 +03:00
Right, that's the first quater done
This commit is contained in:
parent
cbd0d714be
commit
b7b8addd83
@ -3,13 +3,16 @@
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"start":"node server",
|
||||
"dev": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"connect": "^3.7.0",
|
||||
"core-js": "^2.6.5",
|
||||
"register-service-worker": "^1.6.2",
|
||||
"serve-static": "^1.14.1",
|
||||
"vue": "^2.6.10",
|
||||
"vue-router": "^3.0.3"
|
||||
},
|
||||
|
14
server.js
Normal file
14
server.js
Normal file
@ -0,0 +1,14 @@
|
||||
var connect = require('connect');
|
||||
var serveStatic = require('serve-static');
|
||||
|
||||
const port = process.env.PORT || 3002;
|
||||
|
||||
try {
|
||||
connect()
|
||||
.use(serveStatic(__dirname+'/dist'))
|
||||
.listen(port, () =>
|
||||
console.log(`Boom, app is running on port ${port}`)
|
||||
);
|
||||
} catch(error) {
|
||||
console.log('Something fucked up', error);
|
||||
}
|
36
src/App.vue
36
src/App.vue
@ -5,25 +5,29 @@
|
||||
<router-link to="/about">About</router-link>
|
||||
</div>
|
||||
<router-view/>
|
||||
<Footer />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
<style lang="scss">
|
||||
#app {
|
||||
font-family: 'Avenir', Helvetica, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-align: center;
|
||||
color: #2c3e50;
|
||||
}
|
||||
#nav {
|
||||
padding: 30px;
|
||||
a {
|
||||
font-weight: bold;
|
||||
color: #2c3e50;
|
||||
&.router-link-exact-active {
|
||||
color: #42b983;
|
||||
}
|
||||
import Footer from '@/components/Footer.vue'
|
||||
|
||||
export default {
|
||||
name: 'app',
|
||||
components: {
|
||||
Footer
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import url('../src/global-styles.scss');
|
||||
|
||||
#app {
|
||||
margin: 1em;
|
||||
.footer {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
35
src/components/Footer.vue
Normal file
35
src/components/Footer.vue
Normal file
@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<div class="footer">
|
||||
Developed by <a :href="authorUrl">{{authorName}}</a>.
|
||||
Licensed under <a :href="licenseUrl">{{license}}</a>
|
||||
{{ showCopyright? '©': '' }} {{date}}.
|
||||
Get the <a :href="repoUrl">Source Code</a>.
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Footer',
|
||||
props: {
|
||||
authorName: { type: String, default: 'Alicia Sykes' },
|
||||
authorUrl: { type: String, default: 'https://aliciasykes.com' },
|
||||
license: { type: String, default: 'MIT' },
|
||||
licenseUrl: { type: String, default: 'https://gist.github.com/Lissy93/143d2ee01ccc5c052a17' },
|
||||
date: { type: String, default: `${new Date().getFullYear()}` },
|
||||
showCopyright: { type: Boolean, default: true },
|
||||
repoUrl: { type: String, default: 'https://github.com/lissy93/panel' }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style scoped lang="scss">
|
||||
|
||||
.footer, .footer a {
|
||||
color: #5e6474;
|
||||
}
|
||||
.footer a:hover {
|
||||
color: #9F86FF;
|
||||
}
|
||||
|
||||
</style>
|
@ -1,33 +1,7 @@
|
||||
<template>
|
||||
<div class="hello">
|
||||
<h1>{{ msg }}</h1>
|
||||
<p>
|
||||
For a guide and recipes on how to configure / customize this project,<br>
|
||||
check out the
|
||||
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
|
||||
</p>
|
||||
<h3>Installed CLI Plugins</h3>
|
||||
<ul>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-pwa" target="_blank" rel="noopener">pwa</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
|
||||
</ul>
|
||||
<h3>Essential Links</h3>
|
||||
<ul>
|
||||
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
|
||||
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
|
||||
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
|
||||
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
|
||||
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
|
||||
</ul>
|
||||
<h3>Ecosystem</h3>
|
||||
<ul>
|
||||
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
|
||||
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
|
||||
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
|
||||
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
64
src/components/ItemGroup.vue
Normal file
64
src/components/ItemGroup.vue
Normal file
@ -0,0 +1,64 @@
|
||||
<template>
|
||||
<div class="item-group-outer">
|
||||
<h2>{{ title }}</h2>
|
||||
<div class="item-group-inner">
|
||||
<span v-if="!items || items.length < 1" class="no-items">No Items to Show Yet</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ItemGroup',
|
||||
props: {
|
||||
title: String,
|
||||
items: Array
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style scoped lang="scss">
|
||||
|
||||
.item-group-outer {
|
||||
width: 300px;
|
||||
height: 500px;
|
||||
border-radius: 10px;
|
||||
padding: 5px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: #1CA8DD;
|
||||
background: -webkit-linear-gradient(to left top, #9F86FF, #1CA8DD, #007AE1);
|
||||
background: linear-gradient(to left top, #9F86FF, #1CA8DD, #007AE1);
|
||||
box-shadow: 1px 1px 2px #130f23;
|
||||
|
||||
h2 {
|
||||
color: #2f323ae6;
|
||||
font-size: 1.5em;
|
||||
margin: 0.4em;
|
||||
text-shadow: 1px 1px 2px #056bc1;
|
||||
}
|
||||
}
|
||||
.item-group-inner {
|
||||
color: #1CA8DD;
|
||||
background: #2f323ae6;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
border-radius: 0 0 10px 10px;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.no-items {
|
||||
background: #607d8b33;
|
||||
width: 100px;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
padding: 0.8em;
|
||||
border-radius: 10px;
|
||||
box-shadow: 1px 1px 2px #373737;
|
||||
}
|
||||
|
||||
</style>
|
22
src/global-styles.scss
Normal file
22
src/global-styles.scss
Normal file
@ -0,0 +1,22 @@
|
||||
@import url('https://fonts.googleapis.com/css?family=Comfortaa|Righteous&display=swap');
|
||||
|
||||
|
||||
html {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background:#2F323A;
|
||||
font-family: 'Comfortaa', cursive;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5 {
|
||||
font-family: 'Righteous', cursive;
|
||||
}
|
||||
|
||||
p, a, span, div {
|
||||
font-family: 'Comfortaa', cursive;
|
||||
}
|
@ -1,18 +1,52 @@
|
||||
<template>
|
||||
<div class="home">
|
||||
<img alt="Vue logo" src="../assets/logo.png">
|
||||
<HelloWorld msg="Welcome to Your Vue.js App"/>
|
||||
<h1>{{title}}</h1>
|
||||
<span class="subtitle">{{subtitle}}</span>
|
||||
<div class="item-group-container">
|
||||
<ItemGroup title="Server Management"/>
|
||||
<ItemGroup title="External Infrastructure"/>
|
||||
<ItemGroup title="Utilities"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// @ is an alias to /src
|
||||
import HelloWorld from '@/components/HelloWorld.vue'
|
||||
|
||||
import ItemGroup from '@/components/ItemGroup.vue'
|
||||
|
||||
export default {
|
||||
name: 'home',
|
||||
components: {
|
||||
HelloWorld
|
||||
ItemGroup
|
||||
},
|
||||
props: {
|
||||
title: { default: 'Panel', type: String },
|
||||
subtitle: { default: 'All server management tools in one place', type: String }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
h1 {
|
||||
background: -webkit-linear-gradient(to left top, #9F86FF, #1CA8DD, #007AE1);
|
||||
background: linear-gradient(to left top, #9F86FF, #1CA8DD, #007AE1);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
font-size: 3em;
|
||||
margin: 0;
|
||||
display: inline;
|
||||
}
|
||||
span.subtitle {
|
||||
color: #9F86FF;
|
||||
margin: 10px;
|
||||
font-style: italic;
|
||||
text-shadow: 1px 1px 2px #130f23;
|
||||
}
|
||||
.item-group-container {
|
||||
display: flex;
|
||||
margin: 2em 0;
|
||||
.item-group-outer {
|
||||
margin: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
13
yarn.lock
13
yarn.lock
@ -2024,6 +2024,15 @@ connect-history-api-fallback@^1.6.0:
|
||||
version "1.6.0"
|
||||
resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc"
|
||||
|
||||
connect@^3.7.0:
|
||||
version "3.7.0"
|
||||
resolved "https://registry.yarnpkg.com/connect/-/connect-3.7.0.tgz#5d49348910caa5e07a01800b030d0c35f20484f8"
|
||||
dependencies:
|
||||
debug "2.6.9"
|
||||
finalhandler "1.1.2"
|
||||
parseurl "~1.3.3"
|
||||
utils-merge "1.0.1"
|
||||
|
||||
console-browserify@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10"
|
||||
@ -3205,7 +3214,7 @@ fill-range@^7.0.1:
|
||||
dependencies:
|
||||
to-regex-range "^5.0.1"
|
||||
|
||||
finalhandler@~1.1.2:
|
||||
finalhandler@1.1.2, finalhandler@~1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d"
|
||||
dependencies:
|
||||
@ -6295,7 +6304,7 @@ serve-index@^1.9.1:
|
||||
mime-types "~2.1.17"
|
||||
parseurl "~1.3.2"
|
||||
|
||||
serve-static@1.14.1:
|
||||
serve-static@1.14.1, serve-static@^1.14.1:
|
||||
version "1.14.1"
|
||||
resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9"
|
||||
dependencies:
|
||||
|
Loading…
Reference in New Issue
Block a user