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

Issue27 split init project #72

Merged
merged 4 commits into from
Jan 11, 2017
Merged
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
7 changes: 7 additions & 0 deletions src/Scaffold/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ require('laravel-elixir-imagemin');

elixir.config.assetsPath = 'source/_assets';
elixir.config.publicPath = 'source';
elixir.config.images = {
folder: 'img',
outputFolder: 'img'
};

elixir(function (mix) {
var env = argv.e || argv.env || 'local';
Expand All @@ -14,6 +18,9 @@ elixir(function (mix) {
mix.less('main.less')
.imagemin()
.copy(elixir.config.assetsPath + '/img/favicon.ico', elixir.config.publicPath + '/img/favicon.ico')
.scripts([
'app.js'
])
.exec('php ../bin/tapestry.php build --quiet --env=' + env, ['./source/*', './source/**/*', '!./source/_assets/**/*'])
.browserSync({
port: port,
Expand Down
17 changes: 16 additions & 1 deletion src/Scaffold/kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Tapestry\Tapestry;
use Tapestry\Modules\Kernel\KernelInterface;

class kernel implements KernelInterface
class SiteKernel implements KernelInterface
{
/**
* @var Tapestry
Expand All @@ -22,6 +22,21 @@ public function __construct(Tapestry $tapestry)
$this->tapestry = $tapestry;
}

/**
* This method is executed by Tapestry when the Kernel is registered.
*
* @return void
*/
public function register()
{
// ...
}

/**
* This method of executed by Tapestry as part of the build process.
*
* @return void
*/
public function boot()
{
// ...
Expand Down
3 changes: 1 addition & 2 deletions src/Scaffold/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"private": true,
"dependencies": {
"basscss": "^8.0.3",
"normalize.css": "^5.0.0"
"basscss": "^8.0.3"
},
"devDependencies": {
"gulp": "^3.8.8",
Expand Down
76 changes: 11 additions & 65 deletions src/Scaffold/source/_assets/less/main.less
Original file line number Diff line number Diff line change
@@ -1,74 +1,20 @@
@import (inline) "../../../node_modules/normalize.css/normalize.css";
@import (inline) "../../../node_modules/basscss/css/basscss.css";

body {
font-family:
Palatino,
Georgia,
serif;
line-height: 1.5;
margin: 0;
color: #111;
background-color: #fff;
}

.list-inline li{
display: inline-block;
}

a { color: #e40 }

p {
font-size: 1.125rem;
body, html {
border:0;
margin:0;
font-family: Roboto, sans-serif;
background-color: #f9f9f9;
}

.sans { font-family: Roboto, sans-serif }
.mono { font-family: 'Roboto Mono', monospace }

.h0 {
font-size: 3rem;
line-height: 1;
}
@media screen and (min-width: 37.5em) {
.h0 { font-size: 8vw }
.bg-black{
background-color: #2e3436;
}

.btn {
font-family: Roboto, sans-serif;
font-size: .875rem;
font-weight: 700;
line-height: 1;
text-decoration: none;
display: inline-block;
padding: .5rem .625rem;
margin: 0;
color: #fff;
background-color: #111;
border: 0;
border-radius: 2px;
.white{
color: #f9f9f9;
}

.btn:hover {
background-color: #e40;
header a {
color: #f9f9f9;
}

.black { color: #111 }
.white { color: #fff }
.gray { color: #777 }
.red { color: #e40 }

.bg-black { background-color: #111 }
.bg-white { background-color: #fff }
.bg-gray { background-color: #777 }
.bg-red { background-color: #e40 }

.v40 { min-height: 40vh }
.v60 { min-height: 60vh }
.bg-cover { background-size: cover }
.bg-center { background-position: center }
.bg-top { background-position: top }
.bg-right { background-position: right }
.bg-bottom { background-position: bottom }
.bg-left { background-position: left }
.vignette { box-shadow: inset 0 0 64px rgba(64, 32, 0, .5) }
.normal { font-style: normal }
2 changes: 1 addition & 1 deletion src/Scaffold/source/_blog/2016-01-01-hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ categories:
- misc
---

Hello World!
This is your first blog post. Visit [tapestry.cloud](http://tapestry.cloud) for documentation on how to use Tapestry.
14 changes: 3 additions & 11 deletions src/Scaffold/source/_templates/default.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,17 @@
<body class="text-center">

<header>
<div class="flex justify-end bg-black clearfix">
<div class="flex justify-end bg-black white clearfix">
<div class="flex items-center max-width-4 col-11 p2 mx-auto">
<h1 class="h5 m0 flex flex-column col-6 caps white"><?= $this->site('title') ?></h1>
<nav class="flex flex-column col-6 right-align">
<ul class="list-reset list-inline m0">
<li class="px1"><a href="<?= $this->url() ?>">Home</a></li>
<li class="px1"><a href="<?= $this->url('/blog') ?>">Archive</a></li>
<li class="px1"><a href="<?= $this->url('/blog/categories') ?>">Categories</a></li>
<li class="px1"><a href="<?= $this->url('/blog/tags') ?>">Tags</a></li>
<li class="px1"><a href="<?= $this->url('/atom.xml') ?>" target="_blank">Feed</a></li>
</ul>
<a href="<?= $this->url() ?>">Home</a>
</nav>
</div>
</div>

<div class="v40 bg-cover bg-center vignette" style="background-image: url(http://jxnblk.s3.amazonaws.com/basscss/assets/bkly-map.jpg)"></div>
</header>

<main class="max-width-4 mx-auto px3">
<main class="max-width-4 mx-auto p3">
<?= $this->section('content') ?>
</main>
</body>
Expand Down
26 changes: 5 additions & 21 deletions src/Scaffold/source/_views/blog.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,20 @@ generator:
<?php

/**
* @var stdClass $previous_next
* @var \Tapestry\Entities\Pagination $previous_next
* @var string $title
* @var string $content
* @var \Tapestry\Entities\ViewFileTrait|\Tapestry\Plates\Template $this
*/

$this->layout('_templates\default', ['title' => $title]);
?>

<article>
<header>
<ul class="h6 mt4 caps m0 list-inline list-reset">
<?php foreach($categories as $category) { ?>
<li><a href="<?= $this->url('blog/categories/' . $category) ?>"><?= $category ?></a></li>
<?php } ?>
</ul>
<h1 class="h1 regular m0"><?= $title ?></h1>
<div class="h6 mono pt1 red border-top">
<?= $date->format('l jS \of F Y') ?>
<div>
<?= $this->getDate()->format('l jS \of F Y') ?>
</div>
</header>
<div class="border-bottom pb3"><?= $content ?></div>
<footer class="center">
<ul class="list-reset list-inline">
<?php if (! is_null($previous_next->previous)){ ?>
<li><a href="<?= $previous_next->previous->getUrl() ?>">Previous</a></li>
<?php } ?>
<li><a href="/">Home</a></li>
<?php if (! is_null($previous_next->next)){ ?>
<li><a href="<?= $previous_next->next->getUrl() ?>">Next</a></li>
<?php } ?>
</ul>
</footer>
<div><?= $this->getContent() ?></div>
</article>
22 changes: 0 additions & 22 deletions src/Scaffold/source/_views/pagination.phtml

This file was deleted.

35 changes: 0 additions & 35 deletions src/Scaffold/source/atom.phtml

This file was deleted.

20 changes: 0 additions & 20 deletions src/Scaffold/source/blog/categories.phtml

This file was deleted.

44 changes: 0 additions & 44 deletions src/Scaffold/source/blog/categories/category.phtml

This file was deleted.

42 changes: 0 additions & 42 deletions src/Scaffold/source/blog/index.phtml

This file was deleted.

Loading