-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EJS 1.0 support via ejsify + page title change + refactoring
+ Designer-friendly development via EJS! (Closes #37) + Support for changing the page's title (Closes #45) + Made `v-link`'s prettier + Added `js/Include` in attempt to hack #46, but it seems webpack might be needed (#44) - rm'd `App.vue`, `Button.vue` and `Input.vue` (Per #37)
- Loading branch information
Showing
17 changed files
with
214 additions
and
247 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,14 +1,44 @@ | ||
<!doctype html> | ||
<html class="no-js" lang=""> | ||
<head> | ||
<!--# include file="/head.html" --> | ||
</head> | ||
<body> | ||
<!--[if lt IE 8]> | ||
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p> | ||
<![endif]--> | ||
<div id="app" class="wrapper"></div> | ||
<script src="/js/vendor/jquery-1.12.0.min.js"></script> | ||
<script src="/simple/app.js"></script> | ||
</body> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="x-ua-compatible" content="ie=edge"> | ||
<title v-if="!$route.title">Group Income Simple</title> | ||
<template v-else> | ||
<title>{{ $route.title }}</title> | ||
</template> | ||
<meta name="description" content=""> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<!-- TODO: should these be here? am guessing not? --> | ||
<link href='//fonts.googleapis.com/css?family=Lato:300,700' rel='stylesheet' type='text/css'> | ||
<link rel="stylesheet" href="/css/normalize.css"> | ||
<link rel="stylesheet" href="/css/main.css"> | ||
<script src="/js/vendor/modernizr-2.8.3.min.js"></script> | ||
</head> | ||
<body> | ||
<!--[if lt IE 8]> | ||
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p> | ||
<![endif]--> | ||
<div id="app" class="wrapper"> | ||
<header> | ||
<div class="groupincome-logo"> | ||
<img class="black" src="/images/groupincome-logo-black.png"> | ||
</div> | ||
<nav> | ||
<ul> | ||
<li><a v-link="'/new-user'">New User</a></li> | ||
<li><a v-link="'/user'">User Profile</a></li> | ||
<li><a v-link="'/user-group'">User Group</a></li> | ||
<li><a v-link="'/new-income'">New Income</a></li> | ||
<li><a v-link="'/pay-group'">Pay Group</a></li> | ||
<li><a v-link="'/ejs-page'">EJS page test</a></li> | ||
</ul> | ||
</nav> | ||
</header> | ||
<div class="container"> | ||
<router-view></router-view> | ||
</div> | ||
</div> | ||
<script src="/simple/app.js"></script> | ||
</body> | ||
</html> |
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,24 @@ | ||
const _ = require('lodash') | ||
export default { | ||
install (Vue, options) { | ||
var include = function (path) { | ||
console.log(`include ${path} is template? ${__dirname}`) // TODO: delete out once it works | ||
// no prefix I tried works, probably b/c of browserify. Might need webpack for this to work | ||
var str = require('./' + path) | ||
// ejsify will return a template *function* | ||
return _.isString(str) ? str : str() | ||
} | ||
// none of these work, at least not with browserify | ||
Vue.filter('include', include) | ||
Vue.component('include', { | ||
template: '{{ file }}', | ||
props: { | ||
file: { | ||
type: String, | ||
required: true, | ||
coerce: include | ||
} | ||
} | ||
}) | ||
} | ||
} |
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 @@ | ||
// wrap to prevent fragment instances: | ||
// http://vuejs.org/guide/components.html#Fragment-Instance | ||
export function wrap (s, tag = 'div') { | ||
return `<${tag}>${s}</${tag}>` | ||
} |
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
File renamed without changes.
File renamed without changes.
Oops, something went wrong.