Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
robbinjohansson committed Feb 26, 2017
2 parents 5fc8141 + f821098 commit f082533
Show file tree
Hide file tree
Showing 21 changed files with 1,278 additions and 97 deletions.
16 changes: 13 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
# v0.2.0
## 02/26/2017

1. [](#improved)
* Add [vuejs](http://vuejs.org/)
* Add vue example component (`/js/vue/components/Example.vue`)
* Support `.vue` files
2. [](#bugfix)
* Remove footer from item template

# v0.1.9
## 02/24/2017

1. [](#improved)
* Removed bower (use yarn instead) [PR #3](https://github.com/robbinfellow/haywire-grav/pull/3)
* Modified gulp imports [PR #3](https://github.com/robbinfellow/haywire-grav/pull/3)
* Improved `item.yaml` template
* Remove bower (use yarn instead) [PR #3](https://github.com/robbinfellow/haywire-grav/pull/3)
* Modify gulp imports [PR #3](https://github.com/robbinfellow/haywire-grav/pull/3)
* Improve `item.yaml` template
2. [](#bugfix)
* Gulp should require jquery first [PR #3](https://github.com/robbinfellow/haywire-grav/pull/3)

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Boilerplate/theme for getgrav CMS

Haywire is a modern starter theme/boilerplate for [Grav](https://getgrav.org/). The idea behind the theme is to help developers get started quickly on their new getgrav projects using modern frameworks and tools such as [yarn](https://yarnpkg.com/), [laravel-elixir](https://laravel.com/docs/5.3/elixir), [bootstrap](https://github.com/twbs/bootstrap-sass).
Haywire is a modern starter theme for [Grav](https://getgrav.org/). The idea behind the theme is to help developers get started quickly on their new grav projects using modern frameworks and tools such as [yarn](https://yarnpkg.com/), [laravel-elixir](https://laravel.com/docs/5.3/elixir), [vuejs](http://vuejs.org/), [bootstrap](https://github.com/twbs/bootstrap-sass).

**_It is recommended that you install the [admin-plugin package](https://github.com/getgrav/grav-plugin-admin) when using this theme._**

Expand All @@ -16,6 +16,7 @@ Haywire is a modern starter theme/boilerplate for [Grav](https://getgrav.org/).
* Bootstrap-sass
* Laravel-elixir
* Gulp
* Vuejs

## Installation / Usage

Expand Down
2 changes: 1 addition & 1 deletion _demo/pages/01.home/default.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ visible: true
---

# Hello, world!
> Haywire is a modern starter theme for Grav developers. The idea behind the theme is to help developers get up and running quickly on new grav projects using modern frameworks and tools such as yarn, laravel-elixir, bootstrap.
> Haywire is a modern starter theme for [Grav](https://getgrav.org/). The idea behind the theme is to help developers get started quickly on their new grav projects using modern frameworks and tools such as [yarn](https://yarnpkg.com/), [laravel-elixir](https://laravel.com/docs/5.3/elixir), [vuejs](http://vuejs.org/), [bootstrap](https://github.com/twbs/bootstrap-sass).
6 changes: 3 additions & 3 deletions blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Haywire
version: 0.1.9
description: Starter theme/boilerplate for developers to get up and running quickly on new projects using modern frameworks and tools such as yarn, laravel-elixir & bootstrap-sass.
version: 0.2.0
description: Starter theme/boilerplate for developers to get up and running quickly on new projects using modern frameworks and tools such as yarn, laravel-elixir, vuejs & bootstrap-sass.
icon: empire
author:
name: Robbin Johansson
email: robbinfellow@gmail.com
url: http://haywire.me
homepage: https://github.com/robbinfellow/haywire-grav
demo: http://haywire.me/haywire-grav-demo/
keywords: haywire, boilerplate, starter-theme, yarn, laravel-elixir, bootstrap-sass, gulp
keywords: haywire, boilerplate, starter-theme, vuejs, vue, yarn, laravel-elixir, bootstrap-sass, gulp
bugs: https://github.com/robbinfellow/haywire-grav/issues
docs: https://github.com/robbinfellow/haywire-grav/blob/master/README.md
license: MIT
Expand Down
2 changes: 1 addition & 1 deletion dist/css/main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/main.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/main.js.map

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

6 changes: 6 additions & 0 deletions dist/js/vue.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const elixir = require('laravel-elixir');

require('laravel-elixir-vue-2');

var vendorScripts = [
'./node_modules/jquery/dist/jquery.js',
'./node_modules/bootstrap-sass/assets/javascripts/bootstrap.js'
Expand All @@ -9,6 +11,10 @@ var mainScripts = [
'./js/_main.js'
];

var vueScripts = [
'./js/vue/app.js'
];

var mainSass = './scss/main.scss';

elixir.config.publicDir = './dist/';
Expand All @@ -18,4 +24,5 @@ elixir(function(mix) {

mix.scripts(vendorScripts, './dist/js/vendor.js');
mix.scripts(mainScripts, './dist/js/main.js');
mix.webpack(vueScripts, './dist/js/vue.js');
});
2 changes: 1 addition & 1 deletion js/_main.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
$().ready(function() {
// Custom jQuery
// Happy coding! :)
});
7 changes: 7 additions & 0 deletions js/vue/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require('./bootstrap');

Vue.component('example', require('./components/Example.vue'));

const app = new Vue({
el: '#app'
});
16 changes: 16 additions & 0 deletions js/vue/bootstrap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
window._ = require('lodash');

/**
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
* for JavaScript based Bootstrap features such as modals and tabs. This
* code may be modified to fit the specific needs of your application.
*/
//window.$ = window.jQuery = require('jquery');

/**
* Vue is a modern JavaScript library for building interactive web interfaces
* using reactive data binding and reusable components. Vue's API is clean
* and simple, leaving you to focus on building your next great project.
*/
window.Vue = require('vue');
require('vue-resource');
40 changes: 40 additions & 0 deletions js/vue/components/Example.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<template>
<div class="row">
<div class="col-sm-12">
<div class="panel panel-default">
<div class="panel-heading">Example Component</div>

<div v-if="myVar" class="panel-body">
I'm an example vue-component!
</div>
<div v-else class="panel-body">
{{msg}}
</div>
</div>
</div>
</div>
</template>

<script>
export default {
mounted() {
this.myExample();
console.log('Component mounted.')
},
data: function(){
return {
myVar: false,
msg: 'This is an error!'
}
},
// props: ['content'],
methods: {
myExample(){
this.myVar = true;
}
}
}
</script>
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "haywire",
"version": "0.1.9",
"version": "0.2.0",
"main": "index.js",
"repository": "https://github.com/robbinfellow/haywire-grav.git",
"author": "Robbin Johansson <robbinfellow@gmail.com>",
Expand All @@ -11,6 +11,11 @@
"gulp": "^3.9.1",
"jquery": "^3.1.1",
"laravel-elixir": "^6.0.0-15",
"laravel-elixir-browserify-official": "^0.1.3"
"laravel-elixir-browserify-official": "^0.1.3",
"laravel-elixir-vue-2": "^0.3.0",
"laravel-elixir-webpack-official": "^1.0.10",
"lodash": "^4.17.4",
"vue": "^2.1.10",
"vue-resource": "^1.2.0"
}
}
3 changes: 2 additions & 1 deletion scss/template/_footer.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#footer {
background: #f3f3f3;
margin-top: 30px;
margin-top: 50px;
padding: 50px 0px;
}
57 changes: 30 additions & 27 deletions templates/default.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -10,43 +10,46 @@
</div>
</div>

<div class="row posts">
{# Display example vue-component #}
<example></example>

{% for post in page.find('/blog').children.order('date', 'desc').slice(0, 3) %}
<div class="row posts">

<div class="col-sm-12 post npl npr">
{% for post in page.find('/blog').children.order('date', 'desc').slice(0, 3) %}

<div class="col-md-9 post-content">
<div class="col-sm-12 post npl npr">

<h3 class="mtxs"><a href="{{ base_url }}{{ post.route }}">{{ post.title }}</a></h3>
{% if post.summary %}
<div class="summary">
{{ post.summary(320) }}
</div>
{% else %}
<div class="summary">
<em>This post has no summary!</em>
</div>
{% endif %}
<div class="col-md-9 post-content">

</div>
<h3 class="mtxs"><a href="{{ base_url }}{{ post.route }}">{{ post.title }}</a></h3>
{% if post.summary %}
<div class="summary">
{{ post.summary(320) }}
</div>
{% else %}
<div class="summary">
<em>This post has no summary!</em>
</div>
{% endif %}

<div class="col-md-3 paxs">
</div>

<a href="{{ base_url }}{{ post.route }}">
{% if post.header.featured_image %}
<img width="100%" src="{{ base_url }}/blog/{{ post.folder }}/{{ post.header.featured_image }}">
{% else %}
<img width="100%" src="https://unsplash.it/800/">
{% endif %}
</a>
<div class="col-md-3">

</div>
<a href="{{ base_url }}{{ post.route }}">
{% if post.header.featured_image %}
<img width="100%" src="{{ base_url }}/blog/{{ post.folder }}/{{ post.header.featured_image }}">
{% else %}
<img width="100%" src="https://unsplash.it/800/">
{% endif %}
</a>

</div>

{% endfor %}
</div>

</div>

{% endfor %}

</div>

{% endblock %}
21 changes: 17 additions & 4 deletions templates/partials/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
</head>
<body class="{{ page.header.body_classes }}">

{# Wrapping our content in #app to allow vue components #}
<div id="app">

<div class="container">

<div class="col-sm-8 col-sm-offset-2">
Expand All @@ -18,13 +21,23 @@

{% block content %}{% endblock %}

{% block footer %}
{% include 'partials/footer.html.twig' %}
{% endblock %}

</div>

</div>

{% if page.template != 'item' %}

{% block footer %}
{% include 'partials/footer.html.twig' %}
{% endblock %}

{% endif %}

</div>

{% block bottom %}
{{ assets.js('bottom') }}
{% endblock %}

</body>
</html>
8 changes: 4 additions & 4 deletions templates/partials/footer.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="row">
<footer id="footer" class="col-sm-12 pal mtl mbxl">
<footer id="footer" class="text-center">
<div class="container">
/* Footer content goes here */
</footer>
</div>
</div>
</footer>
1 change: 1 addition & 0 deletions templates/partials/head.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
{% block javascripts %}
{% do assets.addJs('theme://dist/js/vendor.js', 100) %}
{% do assets.addJs('theme://dist/js/main.js', 10) %}
{% do assets.addJs('theme://dist/js/vue.js', {group: 'bottom'}) %}
{% endblock %}
{{ assets.js() }}
2 changes: 1 addition & 1 deletion templates/partials/header.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</div>
<div id="navbar">
{% block header_navigation %}
{% include 'partials/navigation.html.twig' %}
{% include 'partials/navigation.html.twig' %}
{% endblock %}
</div>
</header>
Loading

0 comments on commit f082533

Please sign in to comment.