Skip to content

Instantly share code, notes, and snippets.

Avatar

Sandi Rosyandi sandi-racy

View GitHub Profile
View script.js
import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
import App from './components/App.vue'
import Home from './components/Home.vue'
import Technologies from './components/Technologies.vue'
import Projects from './components/Projects.vue'
import OpenSources from './components/OpenSources.vue'
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Sandi Rosyandi</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
</head>
View package.json
{
"name": "vue-cosmic-portfolio",
"version": "0.0.1",
"main": "index.js",
"repository": "git@github.com:sandi-racy/vue-cosmic-portfolio.git",
"author": "Sandi Rosyandi <ndi_racy@rocketmail.com>",
"license": "MIT",
"scripts": {
"build": "webpack",
"start": "node app.js"
View OpenSources.vue
<template lang="jade">
.page
.row
.col-md-8.col-md-offset-2
.row.projects__introduction
.col-md-12
h1 My open source projects
.row.projects__list(v-for="project in projects")
.col-md-12
View Technologies.vue
<template lang="jade">
.page
.row
.col-md-8.col-md-offset-2
.row.technology__introduction
.col-md-12
h1 Technologies that I use
.row
.col-md-4(v-for="technology in technologies")
View Home.vue
<template lang="jade">
.page
.row.introduction
.col-md-8.col-md-offset-2
h1.introduction__text {{ metadata.introduction }}
.row
.col-md-12
img(:src="metadata.image.url").img-responsive
View MainMenu.vue
<template lang="jade">
ul.main-menu
li.main-menu__list
router-link(to="/").main-menu__link Home
li.main-menu__list
router-link(to="/technologies").main-menu__link Technologies
li.main-menu__list
router-link(to="/projects").main-menu__link Projects
li.main-menu__list
router-link(to="/open-sources").main-menu__link Open Sources
View App.vue
<template lang="jade">
.container
.row
.col-md-5.col-md-offset-7
main-menu
router-view
.row.footer.text-center
.col-md-12.social-media
View script.js
import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
window.cosmicJsConfig = {
bucket: {
slug: 'c4ce2db0-e2f9-11e7-b8ae-3589834ee233'
}
}
View script.js
import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
window.cosmicJsConfig = {
bucket: {
slug: 'yourSlug'
}
}