-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e2948b4
Showing
33 changed files
with
7,128 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
> 1% | ||
last 2 versions | ||
not ie <= 8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.DS_Store | ||
node_modules | ||
/dist | ||
|
||
# local env files | ||
.env.local | ||
.env.*.local | ||
|
||
# Log files | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Editor directories and files | ||
.idea | ||
.vscode | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# personalsite | ||
|
||
## Project setup | ||
``` | ||
yarn install | ||
``` | ||
|
||
### Compiles and hot-reloads for development | ||
``` | ||
yarn run serve | ||
``` | ||
|
||
### Compiles and minifies for production | ||
``` | ||
yarn run build | ||
``` | ||
|
||
### Run your tests | ||
``` | ||
yarn run test | ||
``` | ||
|
||
### Lints and fixes files | ||
``` | ||
yarn run lint | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
presets: [ | ||
'@vue/app' | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"name": "personalsite", | ||
"version": "0.1.0", | ||
"private": true, | ||
"scripts": { | ||
"serve": "vue-cli-service serve", | ||
"build": "vue-cli-service build", | ||
"lint": "vue-cli-service lint" | ||
}, | ||
"dependencies": { | ||
"@types/vue-material": "calebsander/vue-material-types", | ||
"buttercms": "^1.1.1", | ||
"vue": "^2.5.17", | ||
"vue-class-component": "^6.0.0", | ||
"vue-material": "^1.0.0-beta-10.2", | ||
"vue-property-decorator": "^7.0.0", | ||
"vue-router": "^3.0.1" | ||
}, | ||
"devDependencies": { | ||
"@vue/cli-plugin-babel": "^3.0.5", | ||
"@vue/cli-plugin-typescript": "^3.0.5", | ||
"@vue/cli-service": "^3.0.5", | ||
"typescript": "^3.0.0", | ||
"vue-template-compiler": "^2.5.17" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
plugins: { | ||
autoprefixer: {} | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!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.0"> | ||
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> | ||
<link rel="stylesheet" type="text/css" href="/static/butter.css"> | ||
<!-- Global site tag (gtag.js) - Google Analytics --> | ||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-63824506-1"></script> | ||
<script> | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag(){dataLayer.push(arguments);} | ||
gtag('js', new Date()); | ||
|
||
gtag('config', 'UA-63824506-1'); | ||
</script> | ||
<title>Max Prettyjohns</title> | ||
</head> | ||
<body> | ||
<noscript> | ||
<strong>We're sorry but my site doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> | ||
</noscript> | ||
<div id="app"></div> | ||
<!-- built files will be auto injected --> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
User-agent: * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<template> | ||
<div id="app"> | ||
<Header></Header> | ||
<router-view class="content"/> | ||
<Footer class="footer"/> | ||
</div> | ||
</template> | ||
<script> | ||
import { Component, Prop, Vue } from 'vue-property-decorator'; | ||
import Header from '@/components/header'; | ||
import Footer from '@/components/footer'; | ||
@Component({components: {Header, Footer}}) | ||
export default class App extends Vue {} | ||
</script> | ||
<style> | ||
#app { | ||
font-family: 'Avenir', Helvetica, Arial, sans-serif; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
text-align: center; | ||
color: #2c3e50; | ||
display: flex; | ||
min-height: 100vh; | ||
flex-direction: column; | ||
} | ||
#buttercms { | ||
height: 40px; | ||
} | ||
p { | ||
font-size: 1.5em; | ||
line-height: 1.6; | ||
} | ||
#nav { | ||
padding: 30px; | ||
} | ||
#nav a { | ||
font-weight: bold; | ||
color: #2c3e50; | ||
} | ||
#nav a.router-link-exact-active { | ||
color: #42b983; | ||
} | ||
.content { | ||
flex: 1; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
.post-container { | ||
h1, h2, h3, h4, h5 { | ||
font-weight: 600; | ||
margin-bottom: 1em; | ||
margin-top: 1.5em; | ||
} | ||
|
||
ul, ol { | ||
margin-bottom: 1.25em; | ||
|
||
li { | ||
margin-bottom: 0.25em; | ||
} | ||
} | ||
|
||
p { | ||
font-family: Georgia, Cambria, "Times New Roman", Times, serif; | ||
font-size: 1.25em; | ||
line-height: 1.58; | ||
margin-bottom: 1.25em; | ||
font-weight: 400; | ||
letter-spacing: -.003em; | ||
} | ||
|
||
/* Responsive default image width */ | ||
img { | ||
max-width: 100%; | ||
height: auto; | ||
} | ||
|
||
/* Responsive floating */ | ||
@media only screen and (min-width: 720px) { | ||
.butter-float-left { | ||
float: left; | ||
margin: 0px 10px 10px 0px; | ||
} | ||
|
||
.butter-float-right { | ||
float: right; | ||
margin: 0px 0px 10px 10px; | ||
} | ||
} | ||
|
||
/* Image caption */ | ||
figcaption { | ||
font-style: italic; | ||
text-align: center; | ||
color: #ccc; | ||
} | ||
|
||
p code { | ||
padding: 2px 4px; | ||
font-size: 90%; | ||
color: #c7254e; | ||
background-color: #f9f2f4; | ||
border-radius: 4px; | ||
font-family: Menlo, Monaco, Consolas, "Courier New", monospace; | ||
} | ||
|
||
pre { | ||
display: block; | ||
padding: 1em; | ||
margin: 0 0 2em; | ||
font-size: 1em; | ||
line-height: 1.4; | ||
word-break: break-all; | ||
word-wrap: break-word; | ||
color: #333333; | ||
background-color: #f5f5f5; | ||
font-family: Menlo, Monaco,Consolas, "Courier New", monospace; | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
declare module 'buttercms'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import Butter from 'buttercms'; | ||
export const butter = Butter('572d9d9c6fa11b51079f7980e26f123c971a2f2a'); | ||
|
||
export interface ButterInternal { | ||
data: object; | ||
} | ||
|
||
export interface ButterData { | ||
data: ButterInternal; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<template> | ||
<div id="blog-home"> | ||
<h1>{{ page_title }}</h1> | ||
<!-- Create v-for and apply a key for Vue. Example is using a combination of the slug and index --> | ||
<div v-for="(post,index) in posts" :key="post.slug + '_' + index"> | ||
<router-link :to="'/blog/' + post.slug"> | ||
<md-card class="blogpost"> | ||
<article class="media"> | ||
<figure> | ||
<!-- Bind results using a ':' --> | ||
<!-- Use a v-if/else if their is a featured_image --> | ||
<img v-if="post.featured_image" :src="post.featured_image" alt=""> | ||
<img v-else src="http://via.placeholder.com/250x250" alt=""> | ||
</figure> | ||
<h2>{{ post.title }}</h2> | ||
<p>{{ post.summary }}</p> | ||
</article> | ||
</md-card> | ||
</router-link> | ||
</div> | ||
</div> | ||
</template> | ||
<script lang="ts"> | ||
import { Component, Prop, Vue } from 'vue-property-decorator'; | ||
import { butter, ButterData} from '@/buttercms'; | ||
@Component | ||
export default class HelloWorld extends Vue { | ||
@Prop() private slug!: string; | ||
private posts: object = []; | ||
private mounted() { | ||
this.getPosts(); | ||
} | ||
private getPosts() { | ||
const vueM = this; | ||
butter.post.list({page: 1, page_size: 10}).then((resp: ButterData) => { | ||
vueM.posts = resp.data.data; | ||
}); | ||
} | ||
} | ||
</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; | ||
} | ||
a { | ||
color: #42b983; | ||
} | ||
.about { | ||
padding: 2em; | ||
margin: 2em auto; | ||
max-width: 80em; | ||
} | ||
.cards { | ||
width: 40em; | ||
margin: 1em; | ||
display: inline-block; | ||
} | ||
|
||
.blogpost { | ||
padding: 0.5em; | ||
max-width: 60em; | ||
margin: 2em auto; | ||
} | ||
|
||
#blog-home { | ||
max-width: 80em; | ||
margin: auto auto; | ||
} | ||
</style> |
Oops, something went wrong.