Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

creating homepage and seperate from get started #9

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"dependencies": {
"core-js": "^2.6.5",
"prismjs": "^1.16.0",
"vue": "^2.6.10"
"vue": "^2.6.10",
"vue-router": "^3.0.7"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.9.0",
Expand Down
100 changes: 100 additions & 0 deletions src/components/Framework.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<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>
<pre>
<code class="language-javascript" v-html="$options.filters.highlight(code)">
</code>
</pre>
<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-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>

<script>
export default {
name: "Framework",
props: {
msg: String,
code: String
}
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
</style>
64 changes: 1 addition & 63 deletions src/components/HomePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,76 +10,14 @@
rel="noopener"
>vue-cli documentation</a>.
</p>
<pre>
<code class="language-javascript" v-html="$options.filters.highlight(code)">
</code>
</pre>
<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-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>

<script>
export default {
name: "HomePage",
props: {
msg: String,
code: String
msg: String
}
};
</script>
Expand Down
18 changes: 16 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
import Vue from 'vue'
import App from './App.vue'
import Prism from 'prismjs'
import VueRouter from 'vue-router'
require('../node_modules/prismjs/themes/prism.css')
// require('../node_modules/prismjs/themes/prism-okaidia.css')

// Import Pages
import Framework from './pages/Framework.vue'
import HomePage from './pages/HomePage.vue'

Vue.config.productionTip = false

Vue.filter('highlight', (code, lang = 'javascript') => {
return Prism.highlight(code, Prism.languages[lang], lang)
})

Vue.use(VueRouter)

const router = new VueRouter({
routes: [
{ path: '/', component: HomePage },
{ path: '/get-started', component: Framework }
]
})

new Vue({
render: h => h(App),
router,
render: h => h(Framework)
}).$mount('#app')
10 changes: 5 additions & 5 deletions src/App.vue → src/pages/Framework.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<div class="parent">
<nav class="top-navbar">
<a href="/">
<img src="./assets/logo.png" id="logo-image" alt="kemboijs organization logo" />
<img src="../assets/logo.png" id="logo-image" alt="kemboijs organization logo" />
</a>
<a href="/">About Us</a>
<a href="/">Get Started</a>
<a href="/">Guide</a>
<a href="/">FAQs</a>
<a href="/">Community</a>
<a href="/">
<img src="./assets/github.svg" alt="kemboijs organization logo" />
<img src="../assets/github.svg" alt="kemboijs organization logo" />
</a>
</nav>
</div>
Expand All @@ -26,7 +26,7 @@
<p>Advanced Totorial</p>
</div>
<div class="main-page" id="app">
<HomePage
<Framework
msg="Welcome to KemboiJS Organization"
code="
const kemboijs = require('kemboijs');
Expand All @@ -48,12 +48,12 @@
</template>

<script>
import HomePage from "./components/HomePage.vue";
import Framework from "../components/Framework.vue";

export default {
name: "app",
components: {
HomePage
Framework
}
};
</script>
Expand Down
Empty file added src/pages/HomePage.vue
Empty file.