Permalink
Browse files

Simplified for new model

  • Loading branch information...
awmartin committed Mar 12, 2016
1 parent 6d787ef commit ddc5201fce27f8e0ee3163d9cb3aadcc3c05e80a
Showing with 351 additions and 755 deletions.
  1. +19 −36 README.md
  2. +0 −11 null.archive.php
  3. +0 −85 null.entry.php
  4. +0 −58 null.extras.php
  5. +0 −30 null.footer.php
  6. +0 −13 null.header.php
  7. +1 −9 null.html.php
  8. +9 −62 null.layout.php
  9. +140 −28 null.loop.php
  10. +0 −56 null.panel.php
  11. +1 −11 null.php
  12. +139 −140 null.post.php
  13. +0 −73 null.postexcerpt.php
  14. +0 −27 null.postthumb.php
  15. +0 −27 null.posttitle.php
  16. +0 −38 null.primary.php
  17. +0 −36 null.sidebar.php
  18. +30 −13 null.site.php
  19. +12 −2 null.widgets.php
@@ -1,63 +1,46 @@
# Null Wordpress Framework
"Null" is a Wordpress theme framework that takes the HTML out of Wordpress theme authoring. Here
"Null" is a Wordpress theme framework that takes the HTML out of Wordpress theme authoring. Here
is a sample `single.php` page:
<?php
NullHeader();
function SingleContent() {
return NullArticle(
NullPostHeader(
NullPostTitle()
.NullBreadcrumb()
),
NullExcerpt(),
NullPostThumbnail('full'),
NullHeaderClear(),
NullContentWithoutExcerpt(
NullPostedOn()
.NullClear()
.NullComments()
),
NullSidebar()
);
}
NullPrimary('SingleContent');
NullFooter();
echo NullHeader();
echo NullPostTitle().NullBreadcrumb();
echo NullPostThumbnail('large');
echo NullContentSidebarLayout(
NullPostContent(),
NullPostSidebar()
);
echo NullFooter();
?>
Instead of using embedded PHP, inconsistenly named and functioning Wordpress theme functions,
and HTML, you can use Null functions with a consistent naming scheme, which are named after what
they display. CSS is standardized to make it easier to use typical layout schemes like grids,
Instead of using embedded PHP, inconsistenly named and functioning Wordpress theme functions,
and HTML, you can use Null functions with a consistent naming scheme, which are named after what
they display. CSS is standardized to make it easier to use typical layout schemes like grids,
sidebars, etc.
## Example
For a sample theme using Null and a theme you can start with as a base theme (with CSS), see
For a sample theme using Null and a theme you can start with as a base theme (with CSS), see
[Spatial Pixel](https://github.com/awmartin/spatialpixel).
## Using Null
Null is designed to be added to an existing theme and migrated carefully. Or, you can start with a
Null is designed to be added to an existing theme and migrated carefully. Or, you can start with a
new theme entirely. Add a folder `null` to your existing theme, then require `null.php` from your
`functions.php` file. E.g.
require( get_template_directory() . '/null/null.php' );
## Contributing
If you'd like to contribute, please fork the repo and send a pull request with
If you'd like to contribute, please fork the repo and send a pull request with
a nice commit message. Screenshots are great. Try to fit the naming conventions. :)
## License
MIT License. See LICENSE.txt.
@@ -1,16 +1,5 @@
<?php
function NullArchiveHeader() {
return NullStack( array(
NullTag('h1', NullArchiveTitle(), array('class' => 'page-title')),
NullCategoryDescription(),
NullTagDescription()
),
'header',
array('class' => 'page-header')
);
}
function NullArchiveTitle(){
if ( is_category() ) :

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.
@@ -21,12 +21,4 @@ function NullFlag($flag, $attr=array()) {
$end = ">";
return $start.$end;
}
function NullClear(){
return NullTag('div', "", array('class' => 'clear'));
}
function NullHeaderClear(){
return NullTag('div', "", array('class' => 'header-clear'));
}
?>
?>
@@ -1,74 +1,21 @@
<?php
function NullContentOnly($content, $layout_class='threeup') {
$contentAttr = array(
'class' => 'post-group-content'
);
$outerContent = NullTag('div', $content, $contentAttr);
/* Placeholders for future layout methods. */
$attr = array(
'class' => $layout_class.' post-group row'
);
$content = NullTag(
'div',
$outerContent,
$attr
);
$mainAttr = array('id' => 'content', 'class' => 'home');
return NullTag('main', $content, $mainAttr);
function NullFullPage($content) {
return $content;
}
function NullContentSidebar($content, $sidebar, $layout_class='threeup') {
$contentAttr = array(
'class' => 'post-group-content'
);
$outerContent = NullTag('div', $content, $contentAttr);
$attr = array(
'class' => $layout_class.' post-group withsidebar row'
);
$contentAndSidebar = NullStack(
array($outerContent, $sidebar),
'div',
$attr
);
$mainAttr = array('id' => 'content', 'class' => 'home');
return NullTag('main', $contentAndSidebar, $mainAttr);
function NullContentSidebar($content, $sidebar) {
return $content.$sidebar;
}
function NullSidebarContent($sidebar, $content, $layout_class='threeup') {
$contentAttr = array(
'class' => 'post-group-content'
);
$outerContent = NullTag('div', $content, $contentAttr);
$attr = array(
'class' => $layout_class.' post-group withsidebar row'
);
$contentAndSidebar = NullStack(
array($sidebar, $outerContent),
'div',
$attr
);
$mainAttr = array('id' => 'content', 'class' => 'content');
return NullTag('main', $contentAndSidebar, $mainAttr);
function NullSidebarContent($sidebar, $content) {
return $sidebar.$content;
}
function NullOnePage($menu, $panel, $content) {
$contentAttr = array(
'class' => 'post-group-content'
);
$outerContent = NullTag('div', $content, $contentAttr);
$mainAttr = array('id' => 'content', 'class' => 'content');
return NullTag('main', $menu.$panel.$outerContent, $mainAttr);
function NullSection($content) {
return $content;
}
?>
Oops, something went wrong.

0 comments on commit ddc5201

Please sign in to comment.