edge_framework 1.3.1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/assets/sass/edge.scss +1 -1
- data/lib/edge/version.rb +1 -1
- data/template/ghost/author.hbs +34 -0
- data/template/ghost/default.hbs +30 -0
- data/template/ghost/index.hbs +3 -0
- data/template/ghost/package.json +4 -0
- data/template/ghost/page.hbs +15 -0
- data/template/ghost/partials/foot.hbs +12 -0
- data/template/ghost/partials/head.hbs +23 -0
- data/template/ghost/partials/posts.hbs +24 -0
- data/template/ghost/post.hbs +54 -0
- data/template/ghost/tag.hbs +10 -0
- data/template/wordpress/404.php +3 -1
- data/template/wordpress/archive.php +21 -0
- data/template/wordpress/code/main.php +25 -33
- data/template/wordpress/config.rb +15 -0
- data/template/wordpress/functions.php +9 -11
- data/template/wordpress/index.php +4 -11
- data/template/wordpress/page.php +5 -1
- data/template/wordpress/search.php +5 -2
- data/template/wordpress/single.php +6 -1
- data/template/wordpress/style.css +6 -11
- data/template/wordpress/views/404.twig +8 -0
- data/template/wordpress/views/archive.twig +7 -0
- data/template/wordpress/views/index.twig +7 -0
- data/template/wordpress/views/layout.twig +52 -0
- data/template/wordpress/views/page.twig +16 -0
- data/template/wordpress/views/partials/_foot.twig +12 -0
- data/template/wordpress/views/partials/_head.twig +24 -0
- data/template/wordpress/views/partials/_pagination.twig +19 -0
- data/template/wordpress/views/partials/_posts.twig +13 -0
- data/template/wordpress/views/search.twig +7 -0
- data/template/wordpress/views/single.twig +40 -0
- metadata +25 -10
- data/template/wordpress/category.php +0 -3
- data/template/wordpress/code/query.php +0 -34
- data/template/wordpress/comments.php +0 -24
- data/template/wordpress/content-post.php +0 -15
- data/template/wordpress/content-posts.php +0 -15
- data/template/wordpress/footer.php +0 -20
- data/template/wordpress/header.php +0 -31
- data/template/wordpress/searchform.php +0 -4
data/assets/sass/edge.scss
CHANGED
data/lib/edge/version.rb
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{{!< default }}
|
|
2
|
+
|
|
3
|
+
{{#author }}
|
|
4
|
+
<header>
|
|
5
|
+
{{#if image }}
|
|
6
|
+
<figure>
|
|
7
|
+
<img src="{{ image }}" alt="{{ name }}'s Picture">
|
|
8
|
+
</figure>
|
|
9
|
+
{{/if }}
|
|
10
|
+
<h1>{{ name }}</h1>
|
|
11
|
+
<p>{{ bio }}</p>
|
|
12
|
+
|
|
13
|
+
<address>
|
|
14
|
+
{{#if location }}
|
|
15
|
+
<p>
|
|
16
|
+
{{ location }}
|
|
17
|
+
</p>
|
|
18
|
+
{{/if }}
|
|
19
|
+
{{#if website }}
|
|
20
|
+
<p>
|
|
21
|
+
<a href="{{ website }}" target="_blank">
|
|
22
|
+
{{ website }}
|
|
23
|
+
</a>
|
|
24
|
+
</p>
|
|
25
|
+
{{/if }}
|
|
26
|
+
<p>
|
|
27
|
+
{{ plural ../pagination.total empty="No posts" singular="% post" plural="% posts" }}
|
|
28
|
+
</p>
|
|
29
|
+
</address>
|
|
30
|
+
|
|
31
|
+
</header>
|
|
32
|
+
{{/author }}
|
|
33
|
+
|
|
34
|
+
{{> "posts" }}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
{{> "head" }}
|
|
5
|
+
|
|
6
|
+
<body class="{{ body_class }}">
|
|
7
|
+
|
|
8
|
+
<div id="main-wrapper">
|
|
9
|
+
|
|
10
|
+
<nav role="banner" style="background-image: url({{ @blog.cover }})">
|
|
11
|
+
<a href="{{ @blog.url }}">
|
|
12
|
+
<img src="{{ @blog.logo }}" alt="{{ @blog.title }}'s Logo">
|
|
13
|
+
<h1>{{ @blog.title }}</h1>
|
|
14
|
+
</a>
|
|
15
|
+
</nav>
|
|
16
|
+
|
|
17
|
+
{{{ body }}}
|
|
18
|
+
|
|
19
|
+
<div id="footer-push"></div>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<footer class="main-footer">
|
|
23
|
+
{{ @blog.title }} © {{ date format="YYYY" }}
|
|
24
|
+
<a href="{{ @blog.url }}/rss/">Subscribe</a>
|
|
25
|
+
</footer>
|
|
26
|
+
|
|
27
|
+
{{> "foot" }}
|
|
28
|
+
|
|
29
|
+
</body>
|
|
30
|
+
</html>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{{ ghost_foot }}
|
|
2
|
+
|
|
3
|
+
<!-- JAVASCRIPT LIBRARY -->
|
|
4
|
+
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
|
|
5
|
+
<script>
|
|
6
|
+
// Fallback if Google's one doesn't load
|
|
7
|
+
if (!window.jQuery) {
|
|
8
|
+
document.write("<script src='{{asset 'js/vendor/jquery.min.js' }}'><\/script>");
|
|
9
|
+
}
|
|
10
|
+
</script>
|
|
11
|
+
<script src={{asset "js/vendor/fastclick.min.js" }}></script>
|
|
12
|
+
<script src={{asset "js/app.js" }}></script>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<head>
|
|
2
|
+
<meta charset="UTF-8">
|
|
3
|
+
<meta name="viewport" content="width=device-width">
|
|
4
|
+
|
|
5
|
+
<!-- WEBSITE DETAIL -->
|
|
6
|
+
<title>
|
|
7
|
+
{{ meta_title }}
|
|
8
|
+
</title>
|
|
9
|
+
<meta name="description" content="{{ @blog.description }}">
|
|
10
|
+
|
|
11
|
+
<!-- FAVICON -->
|
|
12
|
+
<link rel="icon" href={{asset "img/favicon.png" }}>
|
|
13
|
+
<link rel="apple-touch-icon-precomposed" href={{asset "img/favicon-big.png" }}>
|
|
14
|
+
|
|
15
|
+
<!-- JAVASCRIPT that must load first -->
|
|
16
|
+
<script src={{asset "js/vendor/custom.modernizr.js" }}></script>
|
|
17
|
+
|
|
18
|
+
<!-- STYLESHEET -->
|
|
19
|
+
<link rel="stylesheet" href={{asset "css/framework.css" }}>
|
|
20
|
+
<link rel="stylesheet" href={{asset "css/app.css" }}>
|
|
21
|
+
|
|
22
|
+
{{ ghost_head }}
|
|
23
|
+
</head>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{{#foreach posts }}
|
|
2
|
+
<article class="{{ post_class }}">
|
|
3
|
+
<header>
|
|
4
|
+
<h2>
|
|
5
|
+
<a href="{{url}}">{{{ title }}}</a>
|
|
6
|
+
</h2>
|
|
7
|
+
</header>
|
|
8
|
+
<p>
|
|
9
|
+
{{ excerpt words="30" }}
|
|
10
|
+
</p>
|
|
11
|
+
<footer>
|
|
12
|
+
{{#if author.image }}
|
|
13
|
+
<img src="{{ author.image }}" alt="Author image" nopin="nopin">
|
|
14
|
+
{{/if}}
|
|
15
|
+
{{author}}
|
|
16
|
+
{{tags prefix=" on "}}
|
|
17
|
+
<time datetime="{{ date format='YYYY-MM-DD' }}">
|
|
18
|
+
{{ date format="DD MMMM YYYY" }}
|
|
19
|
+
</time>
|
|
20
|
+
</footer>
|
|
21
|
+
</article>
|
|
22
|
+
{{/foreach }}
|
|
23
|
+
|
|
24
|
+
{{ pagination }}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{{!< default }}
|
|
2
|
+
|
|
3
|
+
<article class="{{ post_class }}">
|
|
4
|
+
{{#post }}
|
|
5
|
+
|
|
6
|
+
<header>
|
|
7
|
+
<h1>{{ title }}</h1>
|
|
8
|
+
<time datetime="{{ date format='YYYY-MM-DD' }}">
|
|
9
|
+
{{ date format="DD MMMM YYYY" }}
|
|
10
|
+
</time>
|
|
11
|
+
</header>
|
|
12
|
+
|
|
13
|
+
<section>
|
|
14
|
+
{{ content }}
|
|
15
|
+
</section>
|
|
16
|
+
|
|
17
|
+
<footer>
|
|
18
|
+
<p>{{ tags }}</p>
|
|
19
|
+
|
|
20
|
+
{{#author }}
|
|
21
|
+
{{#if image }}
|
|
22
|
+
<figure>
|
|
23
|
+
<img src="{{ image }}" alt="{{ name }}'s Picture">
|
|
24
|
+
</a>
|
|
25
|
+
</figure>
|
|
26
|
+
{{/if}}
|
|
27
|
+
|
|
28
|
+
<h4>
|
|
29
|
+
<a href="{{ url }}">
|
|
30
|
+
{{ name }}
|
|
31
|
+
</a>
|
|
32
|
+
</h4>
|
|
33
|
+
{{/author}}
|
|
34
|
+
|
|
35
|
+
<div>
|
|
36
|
+
<h4>Share</h4>
|
|
37
|
+
<a href="https://twitter.com/share?text={{ encode title }}&url={{ url absolute='true' }}"
|
|
38
|
+
onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
|
|
39
|
+
Twitter
|
|
40
|
+
</a>
|
|
41
|
+
<a href="https://www.facebook.com/sharer/sharer.php?u={{ url absolute='true' }}"
|
|
42
|
+
onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;">
|
|
43
|
+
Facebook
|
|
44
|
+
</a>
|
|
45
|
+
<a href="https://plus.google.com/share?url={{ url absolute='true' }}"
|
|
46
|
+
onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;">
|
|
47
|
+
Google+
|
|
48
|
+
</a>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
</footer>
|
|
52
|
+
|
|
53
|
+
{{/post }}
|
|
54
|
+
</article>
|
data/template/wordpress/404.php
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
$context = Timber::get_context();
|
|
3
|
+
$context["posts"] = Timber::get_posts();
|
|
4
|
+
|
|
5
|
+
$context["title"] = "Archive";
|
|
6
|
+
$templates = array("archive.twig");
|
|
7
|
+
|
|
8
|
+
// set title and template
|
|
9
|
+
if (is_tag() ) {
|
|
10
|
+
$context["title"] = single_tag_title("", false);
|
|
11
|
+
}
|
|
12
|
+
else if (is_category() ){
|
|
13
|
+
$context["title"] = single_cat_title("", false);
|
|
14
|
+
array_unshift($templates, "archive-" . get_query_var("cat") . ".twig")
|
|
15
|
+
}
|
|
16
|
+
else if (is_post_type_archive() ){
|
|
17
|
+
$context["title"] = post_type_archive_title("", false);
|
|
18
|
+
array_unshift($templates, "archive-" . get_post_type() . ".twig");
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
Timber::render($templates, $context);
|
|
@@ -1,43 +1,35 @@
|
|
|
1
1
|
<?php
|
|
2
|
-
/* -------------------------------------------
|
|
3
|
-
EDGE Press v1.0
|
|
4
|
-
- Cleaner code for Wordpress Theme
|
|
5
|
-
- Requirement: Wordpress 3.8 and PHP 5.3
|
|
6
|
-
------------------------------------------- */
|
|
7
2
|
include "inflector.php";
|
|
8
3
|
include "cpt.php";
|
|
9
|
-
include "query.php";
|
|
10
4
|
|
|
11
|
-
|
|
12
|
-
function root() { return get_template_directory_uri()."/"; }
|
|
13
|
-
function img() { echo root()."assets/img/"; }
|
|
14
|
-
function css() { echo root()."assets/css/"; }
|
|
15
|
-
function js() { echo root()."assets/js/"; }
|
|
16
|
-
function files() { echo root()."assets/files/"; }
|
|
5
|
+
class TimberEdge extends TimberSite {
|
|
17
6
|
|
|
7
|
+
function __construct(){
|
|
8
|
+
add_filter("timber_context", array($this, "add_to_context") );
|
|
9
|
+
add_filter("get_twig", array($this, "add_to_twig") );
|
|
10
|
+
parent::__construct();
|
|
11
|
+
}
|
|
18
12
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
function add_to_context($context) {
|
|
14
|
+
$context["menu"] = new TimberMenu();
|
|
15
|
+
$context["site"] = $this;
|
|
22
16
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
17
|
+
$context["home"] = home_url()."/";
|
|
18
|
+
$context["root"] = get_template_directory_uri();
|
|
19
|
+
$context["img"] = $context["root"]."/assets/img";
|
|
20
|
+
$context["css"] = $context["root"]."/assets/css";
|
|
21
|
+
$context["js"] = $context["root"]."/assets/js";
|
|
22
|
+
$context["files"] = $context["root"]."/assets/files";
|
|
23
|
+
|
|
24
|
+
return $context;
|
|
25
|
+
}
|
|
32
26
|
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
function add_to_twig($twig) {
|
|
28
|
+
return $twig;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
35
31
|
|
|
32
|
+
new TimberEdge();
|
|
36
33
|
|
|
37
|
-
/*
|
|
38
|
-
|
|
39
|
-
get_header();
|
|
40
|
-
include $template;
|
|
41
|
-
get_footer();
|
|
42
|
-
return FALSE;
|
|
43
|
-
});
|
|
34
|
+
/* REMOVE MENU ITEMS */
|
|
35
|
+
add_action("admin_menu", "remove_menu_items");
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
gem "edge_framework", "~> 1.3"
|
|
2
|
+
require "edge_framework"
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
http_path = "/"
|
|
6
|
+
css_dir = "assets/css"
|
|
7
|
+
images_dir = "assets/img"
|
|
8
|
+
sass_dir = "assets/sass"
|
|
9
|
+
javascripts_dir = "assets/js"
|
|
10
|
+
fonts_dir = "assets/fonts"
|
|
11
|
+
output_style = :nested
|
|
12
|
+
# output_style = :expanded or :nested or :compact or :compressed
|
|
13
|
+
|
|
14
|
+
relative_assets = true
|
|
15
|
+
line_comments = false
|
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
<?php include "code/main.php";
|
|
2
2
|
|
|
3
|
+
/* -------------------------------------------
|
|
4
|
+
WordEdge
|
|
5
|
+
- Requirement: Wordpress 3.8 and PHP 5.3
|
|
6
|
+
------------------------------------------- */
|
|
7
|
+
|
|
3
8
|
// THEME SUPPORT
|
|
4
|
-
add_theme_support("post-thumbnails");
|
|
5
|
-
add_theme_support("menus");
|
|
6
9
|
|
|
10
|
+
add_theme_support("post-thumbnails");
|
|
11
|
+
add_theme_support("menus");
|
|
7
12
|
|
|
13
|
+
// CUSTOM POST TYPE
|
|
14
|
+
// post-type-name, <icon>, <taxonomy-name>
|
|
8
15
|
|
|
9
|
-
/* CUSTOM POST TYPE
|
|
10
|
-
1: Type name, MUST be singular
|
|
11
|
-
2: (opt) Icon name, check http://melchoyce.github.io/dashicons/
|
|
12
|
-
3: (opt) Taxonomy name, MUST be singular
|
|
13
|
-
*/
|
|
14
|
-
// Example:
|
|
15
16
|
add_post_type("Product", "cart", "Brand");
|
|
16
|
-
class Product extends Post {};
|
|
17
|
-
|
|
18
|
-
|
|
19
17
|
|
|
20
18
|
/* Remove Unnecessary ADMIN SIDEBAR
|
|
21
19
|
- Use the slug
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
<?php
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
$context = Timber::get_context();
|
|
3
|
+
$context["posts"] = Timber::get_posts();
|
|
4
|
+
$context["pagination"] = Timber::get_pagination();
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
<div class="large-6 column large-centered">
|
|
7
|
-
<?php if($posts->have_posts() ): while($posts->have_posts() ): $posts->the_post(); ?>
|
|
6
|
+
Timber::render("index.twig", $context);
|
|
8
7
|
|
|
9
|
-
<h1><?php the_title(); ?></h1>
|
|
10
|
-
<?php the_content(); ?>
|
|
11
|
-
|
|
12
|
-
<?php endwhile; endif; ?>
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
data/template/wordpress/page.php
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
<?php
|
|
2
|
+
$context = Timber::get_context();
|
|
3
|
+
$context["query"] = get_search_query();
|
|
4
|
+
$context["posts"] = Timber::get_posts();
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
Timber::render("search.twig", $context);
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
<?php
|
|
1
|
+
<?php
|
|
2
|
+
$context = Timber::get_context();
|
|
3
|
+
$context["post"] = Timber::get_post();
|
|
4
|
+
$context["comment_form"] = TimberHelper::get_comment_form();
|
|
5
|
+
|
|
6
|
+
Timber::render(array("single-" . $post->post_type . ".twig", "single.twig"), $context);
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Theme Name:
|
|
3
|
-
|
|
4
|
-
Author:
|
|
5
|
-
|
|
6
|
-
Description: -
|
|
2
|
+
Theme Name: WordEdge
|
|
3
|
+
Author: Edge
|
|
4
|
+
Author URI: http://edge.setyono.net
|
|
5
|
+
Description: Plain-text template to be used in conjunction with Edge Framework. Built using Timber.
|
|
7
6
|
Version: 1.0
|
|
8
|
-
Tags: -
|
|
9
|
-
|
|
10
|
-
License: -
|
|
11
|
-
License URI: -
|
|
12
7
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
|
|
9
|
+
/* All stylesheets are located in /assets directory. This file is only for meta description */
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html {{ site.language_attributes }}>
|
|
3
|
+
|
|
4
|
+
{% include "partials/_head.twig" %}
|
|
5
|
+
|
|
6
|
+
<body class="{{ body_class }}">
|
|
7
|
+
|
|
8
|
+
<div id="main-wrapper">
|
|
9
|
+
|
|
10
|
+
<!-- Main Navigation Menu -->
|
|
11
|
+
<nav class="main-menu">
|
|
12
|
+
{% for item in menu.get_items %}
|
|
13
|
+
<a href="{{ item.get_link }}"
|
|
14
|
+
{% if "current-menu-item" in item.classes %}
|
|
15
|
+
class="active"
|
|
16
|
+
{% endif %}>
|
|
17
|
+
|
|
18
|
+
{{ item.title }}
|
|
19
|
+
|
|
20
|
+
{% if item.get_children %}
|
|
21
|
+
<ul>
|
|
22
|
+
{% for child in item.get_children %}
|
|
23
|
+
<li>
|
|
24
|
+
<a href="{{ child.get_link }}">{{ child.title }}</a>
|
|
25
|
+
</li>
|
|
26
|
+
{% endfor %}
|
|
27
|
+
</ul>
|
|
28
|
+
{% endif %}
|
|
29
|
+
</a>
|
|
30
|
+
{% endfor %}
|
|
31
|
+
</nav>
|
|
32
|
+
|
|
33
|
+
<!-- Search -->
|
|
34
|
+
<form method="get" action="{{ home }}" role="search">
|
|
35
|
+
<input type="search" name="s" placeholder="Enter keyword">
|
|
36
|
+
<input type="submit" value="Search">
|
|
37
|
+
</form>
|
|
38
|
+
|
|
39
|
+
<!-- Main Content -->
|
|
40
|
+
{% block content %}{% endblock %}
|
|
41
|
+
|
|
42
|
+
<div id="footer-push"></div>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<footer class="main-footer">
|
|
46
|
+
{{ site.name }} © {{ "now" | date("Y") }}
|
|
47
|
+
</footer>
|
|
48
|
+
|
|
49
|
+
{% include "partials/_foot.twig" %}
|
|
50
|
+
|
|
51
|
+
</body>
|
|
52
|
+
</html>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!-- JAVASCRIPT LIBRARY -->
|
|
2
|
+
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
|
|
3
|
+
<script>
|
|
4
|
+
// Fallback if Google's one doesn't load
|
|
5
|
+
if (!window.jQuery) {
|
|
6
|
+
document.write("<script src='{{ js }}/vendor/jquery.min.js'><\/script>");
|
|
7
|
+
}
|
|
8
|
+
</script>
|
|
9
|
+
<script src="{{ js }}/vendor/fastclick.min.js"></script>
|
|
10
|
+
<script src="{{ js }}/app.js"></script>
|
|
11
|
+
|
|
12
|
+
{{ wp_footer }}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<head>
|
|
2
|
+
<meta charset="UTF-8">
|
|
3
|
+
<meta name="viewport" content="width=device-width">
|
|
4
|
+
|
|
5
|
+
<!-- WEBSITE DETAIL -->
|
|
6
|
+
<title>
|
|
7
|
+
{{ site.name }}
|
|
8
|
+
{% if wp_title %} | {{ wp_title }} {% endif %}
|
|
9
|
+
</title>
|
|
10
|
+
<meta name="description" content="{{ site.description }}">
|
|
11
|
+
|
|
12
|
+
<!-- FAVICON -->
|
|
13
|
+
<link rel="icon" href="{{ img }}/favicon.png">
|
|
14
|
+
<link rel="apple-touch-icon-precomposed" href="{{ img }}/favicon-big.png">
|
|
15
|
+
|
|
16
|
+
<!-- JAVASCRIPT that must load first -->
|
|
17
|
+
<script src="{{ js }}/vendor/custom.modernizr.js"></script>
|
|
18
|
+
|
|
19
|
+
<!-- STYLESHEET -->
|
|
20
|
+
<link rel="stylesheet" href="{{ css }}/framework.css">
|
|
21
|
+
<link rel="stylesheet" href="{{ css }}/app.css">
|
|
22
|
+
|
|
23
|
+
{{ wp_head }}
|
|
24
|
+
</head>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<footer class="pagination">
|
|
2
|
+
{% if pagination.prev %}
|
|
3
|
+
<a href="{{ pagination.prev.link }}">Prev</a>
|
|
4
|
+
{% endif %}
|
|
5
|
+
|
|
6
|
+
{% for page in pagination.pages %}
|
|
7
|
+
|
|
8
|
+
{% if page.link %}
|
|
9
|
+
<a href="{{ page.link }}">{{ page.title }}</a>
|
|
10
|
+
{% else %}
|
|
11
|
+
<span>{{ page.title }}</span>
|
|
12
|
+
{% endif %}
|
|
13
|
+
|
|
14
|
+
{% endfor %}
|
|
15
|
+
|
|
16
|
+
{% if pagination.next %}
|
|
17
|
+
<a href="{{pagination.next.link}}">Next</a>
|
|
18
|
+
{% endif %}
|
|
19
|
+
</footer>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{% extends "layout.twig" %}
|
|
2
|
+
{% block content %}
|
|
3
|
+
|
|
4
|
+
<!-- Post Section -->
|
|
5
|
+
<article>
|
|
6
|
+
|
|
7
|
+
<header>
|
|
8
|
+
<h1>{{ post.title }}</h1>
|
|
9
|
+
<time datetime="{{ post.post_date | date('Y F d') }}">
|
|
10
|
+
{{ post.post_date | date("d M y") }}
|
|
11
|
+
</time>
|
|
12
|
+
</header>
|
|
13
|
+
|
|
14
|
+
<section>
|
|
15
|
+
{{ post.content }}
|
|
16
|
+
</section>
|
|
17
|
+
|
|
18
|
+
<footer>
|
|
19
|
+
<p>
|
|
20
|
+
By <a href="{{ post.author.path }}">{{ post.author.name }}</a>
|
|
21
|
+
</p>
|
|
22
|
+
</footer>
|
|
23
|
+
|
|
24
|
+
</article>
|
|
25
|
+
|
|
26
|
+
<!-- Comment Section -->
|
|
27
|
+
<section>
|
|
28
|
+
{{ comment_form }}
|
|
29
|
+
|
|
30
|
+
<ul>
|
|
31
|
+
{% for comment in post.get_comments() %}
|
|
32
|
+
<li>
|
|
33
|
+
<h5> {{ comment.author.name }} says </h5>
|
|
34
|
+
{{ comment.comment_content | wpautop }}
|
|
35
|
+
</li>
|
|
36
|
+
{% endfor %}
|
|
37
|
+
</ul>
|
|
38
|
+
</section>
|
|
39
|
+
|
|
40
|
+
{% endblock %}
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: edge_framework
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.2
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2014-
|
|
12
|
+
date: 2014-09-01 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: sass
|
|
@@ -185,28 +185,43 @@ files:
|
|
|
185
185
|
- template/email/config.rb
|
|
186
186
|
- template/email/index.html
|
|
187
187
|
- template/email/robots.txt
|
|
188
|
+
- template/ghost/author.hbs
|
|
189
|
+
- template/ghost/default.hbs
|
|
190
|
+
- template/ghost/index.hbs
|
|
191
|
+
- template/ghost/package.json
|
|
192
|
+
- template/ghost/page.hbs
|
|
193
|
+
- template/ghost/partials/foot.hbs
|
|
194
|
+
- template/ghost/partials/head.hbs
|
|
195
|
+
- template/ghost/partials/posts.hbs
|
|
196
|
+
- template/ghost/post.hbs
|
|
197
|
+
- template/ghost/tag.hbs
|
|
188
198
|
- template/html/index.html
|
|
189
199
|
- template/rails/application.html.erb
|
|
190
200
|
- template/wordpress/404.php
|
|
191
|
-
- template/wordpress/
|
|
201
|
+
- template/wordpress/archive.php
|
|
192
202
|
- template/wordpress/code/cpt.php
|
|
193
203
|
- template/wordpress/code/inflector.php
|
|
194
204
|
- template/wordpress/code/main.php
|
|
195
|
-
- template/wordpress/code/query.php
|
|
196
205
|
- template/wordpress/code/util.php
|
|
197
|
-
- template/wordpress/
|
|
198
|
-
- template/wordpress/content-post.php
|
|
199
|
-
- template/wordpress/content-posts.php
|
|
200
|
-
- template/wordpress/footer.php
|
|
206
|
+
- template/wordpress/config.rb
|
|
201
207
|
- template/wordpress/functions.php
|
|
202
|
-
- template/wordpress/header.php
|
|
203
208
|
- template/wordpress/index.php
|
|
204
209
|
- template/wordpress/page.php
|
|
205
210
|
- template/wordpress/screenshot.png
|
|
206
211
|
- template/wordpress/search.php
|
|
207
|
-
- template/wordpress/searchform.php
|
|
208
212
|
- template/wordpress/single.php
|
|
209
213
|
- template/wordpress/style.css
|
|
214
|
+
- template/wordpress/views/404.twig
|
|
215
|
+
- template/wordpress/views/archive.twig
|
|
216
|
+
- template/wordpress/views/index.twig
|
|
217
|
+
- template/wordpress/views/layout.twig
|
|
218
|
+
- template/wordpress/views/page.twig
|
|
219
|
+
- template/wordpress/views/partials/_foot.twig
|
|
220
|
+
- template/wordpress/views/partials/_head.twig
|
|
221
|
+
- template/wordpress/views/partials/_pagination.twig
|
|
222
|
+
- template/wordpress/views/partials/_posts.twig
|
|
223
|
+
- template/wordpress/views/search.twig
|
|
224
|
+
- template/wordpress/views/single.twig
|
|
210
225
|
homepage: http://edge.setyono.net
|
|
211
226
|
licenses:
|
|
212
227
|
- MIT
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
Custom WP Query
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
class Post {
|
|
8
|
-
public static function find($args = null) {
|
|
9
|
-
wp_reset_postdata();
|
|
10
|
-
|
|
11
|
-
if(empty($args) ) {
|
|
12
|
-
$args = array(
|
|
13
|
-
"post_type" => get_called_class()
|
|
14
|
-
);
|
|
15
|
-
} else {
|
|
16
|
-
$args["post_type"] = get_called_class();
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
return new WP_Query($args);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
public static function find_by($key, $value) {
|
|
24
|
-
wp_reset_postdata();
|
|
25
|
-
|
|
26
|
-
$args = array(
|
|
27
|
-
$key => $value,
|
|
28
|
-
"post_type" => get_called_class()
|
|
29
|
-
);
|
|
30
|
-
return new WP_Query($args);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
class Page extends Post {}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<?php // If not page, comment allowed, and comment supported
|
|
2
|
-
if(!is_page() && comments_open() && post_type_supports(get_post_type(), "comments") ): ?>
|
|
3
|
-
|
|
4
|
-
<?php if(have_comments() ): ?>
|
|
5
|
-
<h2><?php comments_number(); ?></h2>
|
|
6
|
-
|
|
7
|
-
<ul>
|
|
8
|
-
<?php foreach($comments as $comment): ?>
|
|
9
|
-
<li>
|
|
10
|
-
<?php comment_text(); ?>
|
|
11
|
-
|
|
12
|
-
<cite><?php comment_type(); ?> by <?php comment_author_link(); ?> on <?php comment_date(); ?> at <?php comment_time(); ?></cite>
|
|
13
|
-
|
|
14
|
-
<?php if ($comment->comment_approved == "0") : ?>
|
|
15
|
-
<p>Your comment is awaiting approval</p>
|
|
16
|
-
<?php endif; ?>
|
|
17
|
-
</li>
|
|
18
|
-
<?php endforeach; ?>
|
|
19
|
-
</ul>
|
|
20
|
-
<?php endif; ?>
|
|
21
|
-
|
|
22
|
-
<?php comment_form(); ?>
|
|
23
|
-
|
|
24
|
-
<?php endif; ?>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<?php if(have_posts() ): while (have_posts() ) : the_post(); ?>
|
|
2
|
-
|
|
3
|
-
<h1><?php the_title(); ?></h1>
|
|
4
|
-
|
|
5
|
-
<?php if(has_post_thumbnail() ): ?>
|
|
6
|
-
<figure>
|
|
7
|
-
<?php the_post_thumbnail(); ?>
|
|
8
|
-
</figure>
|
|
9
|
-
<?php endif; ?>
|
|
10
|
-
|
|
11
|
-
<?php the_content(); ?>
|
|
12
|
-
|
|
13
|
-
<?php comments_template(); ?>
|
|
14
|
-
|
|
15
|
-
<?php endwhile; endif; ?>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<ul>
|
|
2
|
-
<?php if (have_posts() ): ?>
|
|
3
|
-
<?php while (have_posts() ): the_post(); ?>
|
|
4
|
-
<li>
|
|
5
|
-
<a href="<?php the_permalink(); ?>">
|
|
6
|
-
<?php the_title(); ?>
|
|
7
|
-
</a>
|
|
8
|
-
</li>
|
|
9
|
-
<?php endwhile; ?>
|
|
10
|
-
<?php else: ?>
|
|
11
|
-
<li>
|
|
12
|
-
<a>Not found</a>
|
|
13
|
-
</li>
|
|
14
|
-
<?php endif; ?>
|
|
15
|
-
</ul>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<div id="footer-push"></div>
|
|
2
|
-
</div>
|
|
3
|
-
<footer class="main-footer">
|
|
4
|
-
<!-- Write footer here -->
|
|
5
|
-
</footer>
|
|
6
|
-
|
|
7
|
-
<!-- JAVASCRIPT LIBRARY -->
|
|
8
|
-
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
|
|
9
|
-
<script>
|
|
10
|
-
// Fallback if Google's one doesn't load
|
|
11
|
-
if (!window.jQuery) {
|
|
12
|
-
document.write("<script src='<?php js(); ?>/vendor/jquery.min.js'><\/script>");
|
|
13
|
-
}
|
|
14
|
-
</script>
|
|
15
|
-
<script src="<?php js(); ?>/vendor/fastclick.min.js"></script>
|
|
16
|
-
<script src="<?php js(); ?>/app.js"></script>
|
|
17
|
-
|
|
18
|
-
<?php wp_footer(); ?>
|
|
19
|
-
</body>
|
|
20
|
-
</html>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html <?php language_attributes(); ?>>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width">
|
|
6
|
-
|
|
7
|
-
<!-- WEBSITE DETAIL -->
|
|
8
|
-
<title><?php bloginfo("name"); ?> <?php wp_title(); ?></title>
|
|
9
|
-
<meta name="description" content="<?php bloginfo('description'); ?>">
|
|
10
|
-
|
|
11
|
-
<!-- FAVICON -->
|
|
12
|
-
<link rel="icon" href="<?php img(); ?>/favicon.png">
|
|
13
|
-
<link rel="apple-touch-icon-precomposed" href="<?php img(); ?>/favicon-big.png">
|
|
14
|
-
|
|
15
|
-
<!-- JAVASCRIPT that must load first -->
|
|
16
|
-
<script src="<?php js(); ?>/vendor/custom.modernizr.js"></script>
|
|
17
|
-
|
|
18
|
-
<!-- STYLESHEET -->
|
|
19
|
-
<link rel="stylesheet" href="<?php css(); ?>/framework.css">
|
|
20
|
-
<link rel="stylesheet" href="<?php css(); ?>/app.css">
|
|
21
|
-
|
|
22
|
-
<?php wp_head(); ?>
|
|
23
|
-
</head>
|
|
24
|
-
<body>
|
|
25
|
-
<div id="main-wrapper">
|
|
26
|
-
|
|
27
|
-
<header class="main-header">
|
|
28
|
-
<?php edge_nav_menu(); ?>
|
|
29
|
-
</header>
|
|
30
|
-
|
|
31
|
-
<?php get_template_part("searchform"); ?>
|