edge_framework 0.6.0 → 0.6.1
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/.gitignore +0 -3
- data/Gemfile +3 -3
- data/LICENSE.txt +22 -22
- data/README.md +39 -35
- data/Rakefile +6 -6
- data/assets/js/edge/edge.collect.js +13 -13
- data/assets/js/edge/edge.ie8.js +4 -13
- data/assets/js/edge/edge.prism.js +692 -0
- data/assets/js/edge/edge.template.js +15 -0
- data/assets/js/edge.js +15 -15
- data/{template/base/assets → assets}/js/vendor/custom.modernizr.js +4 -4
- data/assets/js/vendor/jquery.min.js +6 -0
- data/assets/sass/edge/_base.scss +54 -26
- data/assets/sass/edge/_components.scss +2 -1
- data/assets/sass/edge/_helpers.scss +1 -0
- data/assets/sass/edge/components/_code.scss +320 -0
- data/assets/sass/edge/components/_normalize.scss +7 -16
- data/assets/sass/edge/components/_typography.scss +11 -16
- data/assets/sass/edge/helpers/_sticky-footer.scss +13 -13
- data/assets/test.html +74 -0
- data/assets/test2.html +28 -16
- data/edge.gemspec +26 -26
- data/lib/edge/version.rb +4 -4
- data/lib/edge_framework.rb +85 -85
- data/template/base/assets/sass/_setting.scss +33 -23
- data/template/html/index.html +1 -1
- data/template/php/partials/header.php +1 -1
- data/template/wordpress/404.php +6 -5
- data/template/wordpress/category.php +20 -20
- data/template/wordpress/footer.php +2 -1
- data/template/wordpress/functions.php +24 -10
- data/template/wordpress/header.php +8 -9
- data/template/wordpress/index.php +53 -6
- data/template/wordpress/page.php +18 -0
- data/template/wordpress/single.php +19 -3
- data/template/wordpress/style.css +12 -0
- metadata +31 -22
- checksums.yaml +0 -15
- data/Gemfile.lock +0 -40
- data/assets/js/edge/edge.notification.js +0 -0
- data/assets/js/sh/clipboard.swf +0 -0
- data/assets/js/sh/shBrushCss.js +0 -91
- data/assets/js/sh/shBrushJScript.js +0 -52
- data/assets/js/sh/shBrushPhp.js +0 -88
- data/assets/js/sh/shBrushRuby.js +0 -55
- data/assets/js/sh/shBrushSass.js +0 -94
- data/assets/js/sh/shBrushXml.js +0 -71
- data/assets/js/sh/shCore.js +0 -17
- data/assets/sass/for-test.scss +0 -169
- data/template/base/config.rb +0 -16
- /data/{template/base/assets/js/vendor → assets/js-docs}/jquery.min.js +0 -0
data/lib/edge_framework.rb
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
root = File.join(File.dirname(__FILE__), "..")
|
|
2
|
-
require "edge/version"
|
|
3
|
-
require "win32console" # Command line color for Windows
|
|
4
|
-
require "fileutils" # Copy files
|
|
5
|
-
|
|
6
|
-
module Edge
|
|
7
|
-
require "edge/console"
|
|
8
|
-
require "edge/version"
|
|
9
|
-
require "edge/message"
|
|
10
|
-
|
|
11
|
-
@console = Edge::Console.new
|
|
12
|
-
|
|
13
|
-
# Create project
|
|
14
|
-
def self.create(type, name)
|
|
15
|
-
# If name is specified, create new directory
|
|
16
|
-
if name
|
|
17
|
-
puts "Creating #{ @console.magenta(name) } as #{ @console.yellow(type) } project..."
|
|
18
|
-
|
|
19
|
-
FileUtils.mkdir( name )
|
|
20
|
-
destination = File.join( Dir.pwd, name )
|
|
21
|
-
# If type is specified, create new file in the current directory
|
|
22
|
-
elsif type
|
|
23
|
-
puts "Generating #{ @console.yellow(type) } template..."
|
|
24
|
-
destination = Dir.pwd
|
|
25
|
-
else
|
|
26
|
-
puts CREATE_WRONG_SYNTAX
|
|
27
|
-
return false
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
# Gem home directory
|
|
31
|
-
home = File.expand_path( "..", File.dirname(__FILE__) )
|
|
32
|
-
template = File.join( home, "template" )
|
|
33
|
-
|
|
34
|
-
# Copy template files
|
|
35
|
-
template_type = File.join( template, type )
|
|
36
|
-
# If directory doesn't exist
|
|
37
|
-
if !File.directory?(template_type)
|
|
38
|
-
puts "#{ @console.red('Template not found') }"
|
|
39
|
-
puts AVAILABLE_TEMPLATE
|
|
40
|
-
return false
|
|
41
|
-
end
|
|
42
|
-
FileUtils.cp_r( Dir["#{template_type}/*"], destination )
|
|
43
|
-
|
|
44
|
-
# Copy base files
|
|
45
|
-
base = File.join( template, "base" )
|
|
46
|
-
FileUtils.cp_r( Dir["#{base}/*"], destination )
|
|
47
|
-
|
|
48
|
-
# Copy javascript files
|
|
49
|
-
js_source = File.join( home, "assets", "js" )
|
|
50
|
-
js_destination = File.join( destination, "assets", "js")
|
|
51
|
-
FileUtils.cp_r( Dir["#{js_source}/*"], js_destination )
|
|
52
|
-
|
|
53
|
-
if name.nil?
|
|
54
|
-
compass_command = "#{ @console.cyan('compass watch') }"
|
|
55
|
-
elsif name.match(/\s/)
|
|
56
|
-
compass_command = "#{ @console.cyan('compass watch') } #{ @console.cyan('"'+name+'"') }"
|
|
57
|
-
elsif name
|
|
58
|
-
compass_command = "#{ @console.cyan('compass watch') } #{ @console.cyan(name) }"
|
|
59
|
-
else
|
|
60
|
-
compass_command = "#{ @console.cyan('compass watch') }"
|
|
61
|
-
end
|
|
62
|
-
puts "#{ @console.green('Done!') } For starter, you can run #{ @console.cyan(compass_command) } to generate the CSS"
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
# Help message
|
|
66
|
-
def self.help()
|
|
67
|
-
puts HELP
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
# Error message for non-existance command
|
|
71
|
-
def self.not_found(command)
|
|
72
|
-
puts "The command '#{command}' does not exist. Run #{ @console.cyan("edge -h") } for available commands."
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
# Generic message for command that is too long
|
|
76
|
-
def self.command_too_long()
|
|
77
|
-
puts "Passed parameters exceed limits. If your #{ @console.cyan("project_name") } contains space, enclose it with double-quote (\")"
|
|
78
|
-
end
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
if defined?(Compass)
|
|
82
|
-
Compass::Frameworks.register("edge",
|
|
83
|
-
:stylesheets_directory => File.join(root,"assets/sass"),
|
|
84
|
-
:templates_directory => File.join(root,"templates")
|
|
85
|
-
)
|
|
1
|
+
root = File.join(File.dirname(__FILE__), "..")
|
|
2
|
+
require "edge/version"
|
|
3
|
+
require "win32console" # Command line color for Windows
|
|
4
|
+
require "fileutils" # Copy files
|
|
5
|
+
|
|
6
|
+
module Edge
|
|
7
|
+
require "edge/console"
|
|
8
|
+
require "edge/version"
|
|
9
|
+
require "edge/message"
|
|
10
|
+
|
|
11
|
+
@console = Edge::Console.new
|
|
12
|
+
|
|
13
|
+
# Create project
|
|
14
|
+
def self.create(type, name)
|
|
15
|
+
# If name is specified, create new directory
|
|
16
|
+
if name
|
|
17
|
+
puts "Creating #{ @console.magenta(name) } as #{ @console.yellow(type) } project..."
|
|
18
|
+
|
|
19
|
+
FileUtils.mkdir( name )
|
|
20
|
+
destination = File.join( Dir.pwd, name )
|
|
21
|
+
# If type is specified, create new file in the current directory
|
|
22
|
+
elsif type
|
|
23
|
+
puts "Generating #{ @console.yellow(type) } template..."
|
|
24
|
+
destination = Dir.pwd
|
|
25
|
+
else
|
|
26
|
+
puts CREATE_WRONG_SYNTAX
|
|
27
|
+
return false
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Gem home directory
|
|
31
|
+
home = File.expand_path( "..", File.dirname(__FILE__) )
|
|
32
|
+
template = File.join( home, "template" )
|
|
33
|
+
|
|
34
|
+
# Copy template files
|
|
35
|
+
template_type = File.join( template, type )
|
|
36
|
+
# If directory doesn't exist
|
|
37
|
+
if !File.directory?(template_type)
|
|
38
|
+
puts "#{ @console.red('Template not found') }"
|
|
39
|
+
puts AVAILABLE_TEMPLATE
|
|
40
|
+
return false
|
|
41
|
+
end
|
|
42
|
+
FileUtils.cp_r( Dir["#{template_type}/*"], destination )
|
|
43
|
+
|
|
44
|
+
# Copy base files
|
|
45
|
+
base = File.join( template, "base" )
|
|
46
|
+
FileUtils.cp_r( Dir["#{base}/*"], destination )
|
|
47
|
+
|
|
48
|
+
# Copy javascript files
|
|
49
|
+
js_source = File.join( home, "assets", "js" )
|
|
50
|
+
js_destination = File.join( destination, "assets", "js")
|
|
51
|
+
FileUtils.cp_r( Dir["#{js_source}/*"], js_destination )
|
|
52
|
+
|
|
53
|
+
if name.nil?
|
|
54
|
+
compass_command = "#{ @console.cyan('compass watch') }"
|
|
55
|
+
elsif name.match(/\s/)
|
|
56
|
+
compass_command = "#{ @console.cyan('compass watch') } #{ @console.cyan('"'+name+'"') }"
|
|
57
|
+
elsif name
|
|
58
|
+
compass_command = "#{ @console.cyan('compass watch') } #{ @console.cyan(name) }"
|
|
59
|
+
else
|
|
60
|
+
compass_command = "#{ @console.cyan('compass watch') }"
|
|
61
|
+
end
|
|
62
|
+
puts "#{ @console.green('Done!') } For starter, you can run #{ @console.cyan(compass_command) } to generate the CSS"
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Help message
|
|
66
|
+
def self.help()
|
|
67
|
+
puts HELP
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Error message for non-existance command
|
|
71
|
+
def self.not_found(command)
|
|
72
|
+
puts "The command '#{command}' does not exist. Run #{ @console.cyan("edge -h") } for available commands."
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Generic message for command that is too long
|
|
76
|
+
def self.command_too_long()
|
|
77
|
+
puts "Passed parameters exceed limits. If your #{ @console.cyan("project_name") } contains space, enclose it with double-quote (\")"
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
if defined?(Compass)
|
|
82
|
+
Compass::Frameworks.register("edge",
|
|
83
|
+
:stylesheets_directory => File.join(root,"assets/sass"),
|
|
84
|
+
:templates_directory => File.join(root,"templates")
|
|
85
|
+
)
|
|
86
86
|
end
|
|
@@ -16,36 +16,41 @@
|
|
|
16
16
|
|
|
17
17
|
// ------------------------------
|
|
18
18
|
// COLOR
|
|
19
|
-
//
|
|
19
|
+
// Two main colors of your site
|
|
20
20
|
// ------------------------------
|
|
21
|
-
// $main-color : #
|
|
22
|
-
// $sub-color : #
|
|
21
|
+
// $main-color : #0173bc;
|
|
22
|
+
// $sub-color : #e9e9e9;
|
|
23
23
|
|
|
24
24
|
// -----------------------
|
|
25
25
|
// COLOR PALETTE
|
|
26
|
-
//
|
|
27
|
-
//
|
|
26
|
+
// These colors below should NEVER be used directly to style
|
|
27
|
+
// set to another variable like $header-color: $blue-color;
|
|
28
28
|
// ----------------------------------------------------------
|
|
29
|
-
// $passive-color : #
|
|
30
|
-
// $blue-color : #
|
|
31
|
-
// $yellow-color : #
|
|
32
|
-
// $red-color : #
|
|
33
|
-
// $green-color : #
|
|
29
|
+
// $passive-color : #e9e9e9;
|
|
30
|
+
// $blue-color : #0173bc;
|
|
31
|
+
// $yellow-color : #dba924;
|
|
32
|
+
// $red-color : #da2e18;
|
|
33
|
+
// $green-color : #2cae34;
|
|
34
34
|
|
|
35
|
-
//
|
|
35
|
+
// ---------------------------
|
|
36
36
|
// OUTPUT CONFIG
|
|
37
|
-
//
|
|
38
|
-
//
|
|
37
|
+
// debug - if true : disable em conversion (will add neat effect in the future)
|
|
38
|
+
// responsive - if false: disable the grid from shrinking down
|
|
39
|
+
// include - if false: remove the CSS output, but can still use the mixin
|
|
40
|
+
// ------------------------------------------------------------------------------
|
|
41
|
+
// $debug : false;
|
|
42
|
+
// $responsive : true;
|
|
39
43
|
|
|
40
|
-
// $include-
|
|
44
|
+
// $include-typography : true;
|
|
41
45
|
// $include-grid : true;
|
|
42
46
|
// $include-block-grid : true;
|
|
43
47
|
// $include-visibility : true;
|
|
44
48
|
|
|
45
|
-
// $include-button
|
|
46
|
-
// $include-form
|
|
47
|
-
// $include-
|
|
48
|
-
|
|
49
|
+
// $include-button : true;
|
|
50
|
+
// $include-form : true;
|
|
51
|
+
// $include-print : true;
|
|
52
|
+
|
|
53
|
+
// $include-code : false;
|
|
49
54
|
|
|
50
55
|
// ------
|
|
51
56
|
// BODY
|
|
@@ -56,7 +61,7 @@
|
|
|
56
61
|
// $body-font-style : normal;
|
|
57
62
|
|
|
58
63
|
// $body-font-size : 16px; // Also being used as base-value for pixel->em converter
|
|
59
|
-
// $body-line-height : 1;
|
|
64
|
+
// $body-line-height : 1.5;
|
|
60
65
|
|
|
61
66
|
// ---------------
|
|
62
67
|
// GLOBAL VALUE
|
|
@@ -69,7 +74,7 @@
|
|
|
69
74
|
// --------
|
|
70
75
|
// $row-max-width : 1140px;
|
|
71
76
|
// $total-columns : 12;
|
|
72
|
-
// $column-distance :
|
|
77
|
+
// $column-distance : 20px;
|
|
73
78
|
|
|
74
79
|
// ------------
|
|
75
80
|
// BLOCK-GRID
|
|
@@ -78,7 +83,7 @@
|
|
|
78
83
|
// $block-distance : 15px;
|
|
79
84
|
|
|
80
85
|
// ---------------
|
|
81
|
-
//
|
|
86
|
+
// TYPOGRAPHY
|
|
82
87
|
// ---------------
|
|
83
88
|
// $h1-font-size : 44px;
|
|
84
89
|
// $h2-font-size : 36px;
|
|
@@ -90,7 +95,12 @@
|
|
|
90
95
|
// $header-font-color : $body-font-color;
|
|
91
96
|
// $header-font-weight : 700;
|
|
92
97
|
|
|
93
|
-
// $p-margin-bottom :
|
|
98
|
+
// $p-margin-bottom : 1.5em;
|
|
99
|
+
|
|
100
|
+
// -----------------
|
|
101
|
+
// CODE Highlighter
|
|
102
|
+
// -----------------
|
|
103
|
+
// $code-theme : light; // light or dark
|
|
94
104
|
|
|
95
105
|
// -------------------
|
|
96
106
|
// MEDIA QUERIES
|
|
@@ -104,7 +114,7 @@
|
|
|
104
114
|
// ----------
|
|
105
115
|
// BUTTON
|
|
106
116
|
// ----------
|
|
107
|
-
// $button-padding :
|
|
117
|
+
// $button-padding : 10px 20px;
|
|
108
118
|
|
|
109
119
|
// ------------------
|
|
110
120
|
// TEXT DIRECTION
|
data/template/html/index.html
CHANGED
data/template/wordpress/404.php
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
<?php
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*/
|
|
2
|
+
/* ----------------------
|
|
3
|
+
Error 404 Template
|
|
4
|
+
---------------------- */
|
|
5
5
|
get_header(); ?>
|
|
6
6
|
|
|
7
|
-
<
|
|
8
|
-
|
|
7
|
+
<p><small>404.php</small></p>
|
|
8
|
+
|
|
9
|
+
<h1>Page Not Found</h1>
|
|
9
10
|
|
|
10
11
|
<?php get_footer(); ?>
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
<?php
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*/
|
|
5
|
-
get_header();
|
|
6
|
-
// Get all posts under this category
|
|
7
|
-
$args = array (
|
|
8
|
-
"category" => ID
|
|
9
|
-
"orderby" => "post_date",
|
|
10
|
-
"order" => "ASC", );
|
|
11
|
-
$myposts = get_posts($args);
|
|
12
|
-
?>
|
|
2
|
+
/* -------------------------
|
|
3
|
+
View Category Template
|
|
4
|
+
------------------------- */
|
|
5
|
+
get_header(); ?>
|
|
13
6
|
|
|
14
|
-
<
|
|
15
|
-
|
|
7
|
+
<p><small>category.php</small></p>
|
|
8
|
+
|
|
9
|
+
<p><a href="<?php home(); ?>">← Home</a></p>
|
|
10
|
+
|
|
11
|
+
<h1><?php echo ucfirst(single_cat_title('', false) ); ?></h1>
|
|
16
12
|
|
|
17
13
|
<?php // If the category has description
|
|
18
14
|
if(category_description() ): ?>
|
|
19
|
-
<p><?php category_description(); ?></p>
|
|
15
|
+
<p><?php echo category_description(); ?></p>
|
|
20
16
|
<?php endif; ?>
|
|
21
17
|
|
|
22
|
-
<?php
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
?>
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
<?php if (have_posts() ): ?>
|
|
19
|
+
<h3>Posts</h3>
|
|
20
|
+
<ul>
|
|
21
|
+
<?php while (have_posts() ): the_post(); ?>
|
|
22
|
+
<a href="<?php echo get_permalink(); ?>">
|
|
23
|
+
<li><?php echo get_the_title(); ?></li>
|
|
24
|
+
</a>
|
|
25
|
+
<?php endwhile; ?>
|
|
26
|
+
</ul>
|
|
27
|
+
<?php endif; ?>
|
|
28
28
|
|
|
29
29
|
<?php get_footer(); ?>
|
|
@@ -4,27 +4,28 @@ EDGE Press v0.1
|
|
|
4
4
|
- Extend functionality to Word Press
|
|
5
5
|
--------------------------------------- */
|
|
6
6
|
|
|
7
|
-
add_theme_support(
|
|
7
|
+
add_theme_support("post-thumbnails");
|
|
8
8
|
|
|
9
9
|
function root() {
|
|
10
|
-
return get_template_directory_uri().
|
|
10
|
+
return get_template_directory_uri()."/";
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
/*
|
|
14
|
-
|
|
14
|
+
Echo path to assets directory
|
|
15
15
|
@return = relative path to specified assets directory
|
|
16
16
|
*/
|
|
17
|
-
function
|
|
18
|
-
function
|
|
19
|
-
function
|
|
20
|
-
function
|
|
17
|
+
function home() { echo home_url()."/"; }
|
|
18
|
+
function img() { echo root()."assets/img/"; }
|
|
19
|
+
function css() { echo root()."assets/css/"; }
|
|
20
|
+
function js() { echo root()."assets/js/"; }
|
|
21
|
+
function files() { echo root()."assets/files/"; }
|
|
21
22
|
|
|
22
23
|
/*
|
|
23
24
|
Get the last word from the URL, useful for Header-menu's active state
|
|
24
25
|
@return = the last word from the current page
|
|
25
26
|
*/
|
|
26
27
|
function get_current_page() {
|
|
27
|
-
$pageURL =
|
|
28
|
+
$pageURL = "http";
|
|
28
29
|
if ($_SERVER["SERVER_PORT"] != "80") {
|
|
29
30
|
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
|
|
30
31
|
} else {
|
|
@@ -48,7 +49,7 @@ function ellipsize($text, $char_number, $etc = "...") {
|
|
|
48
49
|
$text = substr($text, 0, $char_number);
|
|
49
50
|
$text = substr($text,0,strrpos($text," "));
|
|
50
51
|
|
|
51
|
-
$punctuation = ".!?:;,-"; //punctuation you want removed
|
|
52
|
+
$punctuation = ".!?:;,-"; // punctuation you want removed
|
|
52
53
|
|
|
53
54
|
$text = (strspn(strrev($text), $punctuation) != 0)
|
|
54
55
|
?
|
|
@@ -60,4 +61,17 @@ function ellipsize($text, $char_number, $etc = "...") {
|
|
|
60
61
|
}
|
|
61
62
|
$text = htmlentities($text, ENT_QUOTES);
|
|
62
63
|
return $text;
|
|
63
|
-
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/*
|
|
67
|
+
Automatically use "single-{category_slug}.php" as post template for that category
|
|
68
|
+
Example:
|
|
69
|
+
"single-product.php" is used as template for post with category "product"
|
|
70
|
+
*/
|
|
71
|
+
add_filter("single_template", create_function(
|
|
72
|
+
'$the_template',
|
|
73
|
+
'foreach( (array) get_the_category() as $cat ) {
|
|
74
|
+
if ( file_exists(TEMPLATEPATH . "/single-{$cat->slug}.php") )
|
|
75
|
+
return TEMPLATEPATH . "/single-{$cat->slug}.php"; }
|
|
76
|
+
return $the_template;' )
|
|
77
|
+
);
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
<!
|
|
1
|
+
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width" />
|
|
6
|
-
<title><?php
|
|
7
|
-
<meta name="description" content="
|
|
8
|
-
<meta name="keywords" content="search, key, word," /> <!-- Comma-separated list for Search keyword -->
|
|
6
|
+
<title><?php bloginfo('name'); ?> <?php wp_title(); ?></title>
|
|
7
|
+
<meta name="description" content="<?php bloginfo('description'); ?>" />
|
|
9
8
|
|
|
10
9
|
<!-- FAVICON -->
|
|
11
|
-
<link rel="icon" type="image/png" href="<?php
|
|
12
|
-
<link rel="apple-touch-icon-precomposed" href="<?php
|
|
10
|
+
<link rel="icon" type="image/png" href="<?php img(); ?>/favicon.ico">
|
|
11
|
+
<link rel="apple-touch-icon-precomposed" href="<?php img(); ?>/favicon-big.png" />
|
|
13
12
|
|
|
14
13
|
<!-- VENDOR -->
|
|
15
|
-
<script type="text/javascript" src="<?php
|
|
16
|
-
<link rel="stylesheet" href="<?php
|
|
14
|
+
<script type="text/javascript" src="<?php js(); ?>/vendor/custom.modernizr.js"></script>
|
|
15
|
+
<link rel="stylesheet" href="<?php css(); ?>/edge-framework.css">
|
|
17
16
|
|
|
18
17
|
<!-- APP Specific -->
|
|
19
|
-
<link rel="stylesheet" href="<?php
|
|
18
|
+
<link rel="stylesheet" href="<?php css(); ?>/app.css">
|
|
20
19
|
</head>
|
|
21
20
|
<body>
|
|
22
21
|
<div id="main-wrapper">
|
|
@@ -1,10 +1,57 @@
|
|
|
1
1
|
<?php
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*/
|
|
5
|
-
get_header();
|
|
2
|
+
/* ----------------------
|
|
3
|
+
Home / Landing page
|
|
4
|
+
---------------------- */
|
|
5
|
+
get_header();
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
// Get list of all categories
|
|
8
|
+
$args = array(
|
|
9
|
+
"child_of" => 0,
|
|
10
|
+
"hide_empty" => false,
|
|
11
|
+
);
|
|
12
|
+
$categories = get_categories($args);
|
|
13
|
+
|
|
14
|
+
// Get list of all pages
|
|
15
|
+
$page_args = array(
|
|
16
|
+
'child_of' => 0,
|
|
17
|
+
'sort_order' => 'ASC',
|
|
18
|
+
'sort_column' => 'post_title',
|
|
19
|
+
);
|
|
20
|
+
$pages = get_pages($args);
|
|
21
|
+
?>
|
|
22
|
+
|
|
23
|
+
<p><small>index.php</small></p>
|
|
24
|
+
|
|
25
|
+
<h1>Welcome to <?php bloginfo('name'); ?></h1>
|
|
26
|
+
|
|
27
|
+
<h3>Category</h3>
|
|
28
|
+
<ul>
|
|
29
|
+
<?php foreach ($categories as $category): ?>
|
|
30
|
+
<li>
|
|
31
|
+
<a href="<?php echo get_category_link( $category->ID ); ?> ">
|
|
32
|
+
<?php echo $category->name; ?>
|
|
33
|
+
</a>
|
|
34
|
+
</li>
|
|
35
|
+
<?php endforeach; ?>
|
|
36
|
+
</ul>
|
|
37
|
+
|
|
38
|
+
<h3>Pages</h3>
|
|
39
|
+
<ul>
|
|
40
|
+
<?php foreach ($pages as $page): ?>
|
|
41
|
+
<li>
|
|
42
|
+
<a href="<?php echo get_page_link( $page->ID ); ?> ">
|
|
43
|
+
<?php echo $page->post_title; ?>
|
|
44
|
+
</a>
|
|
45
|
+
</li>
|
|
46
|
+
<?php endforeach; ?>
|
|
47
|
+
</ul>
|
|
48
|
+
|
|
49
|
+
<!-- How to get Page content outside "page" template -->
|
|
50
|
+
<h3>About Us</h3>
|
|
51
|
+
<?php
|
|
52
|
+
$page = get_page_by_title("About Us");
|
|
53
|
+
$content = apply_filters('the_content', $page->post_content);
|
|
54
|
+
echo $content;
|
|
55
|
+
?>
|
|
9
56
|
|
|
10
57
|
<?php get_footer(); ?>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
/* ----------------------
|
|
3
|
+
Pages Template
|
|
4
|
+
---------------------- */
|
|
5
|
+
get_header(); ?>
|
|
6
|
+
|
|
7
|
+
<p><small>page.php</small></p>
|
|
8
|
+
|
|
9
|
+
<?php while (have_posts() ) : the_post(); ?>
|
|
10
|
+
<h1><?php echo get_the_title(); ?></h1>
|
|
11
|
+
<?php echo get_the_content(); ?>
|
|
12
|
+
|
|
13
|
+
<a href="<?php home(); ?> ">
|
|
14
|
+
← Home
|
|
15
|
+
</a>
|
|
16
|
+
<?php endwhile; ?>
|
|
17
|
+
|
|
18
|
+
<?php get_footer(); ?>
|
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
<?php
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*/
|
|
2
|
+
/* ----------------------
|
|
3
|
+
Single Post Template
|
|
4
|
+
---------------------- */
|
|
5
5
|
get_header(); ?>
|
|
6
6
|
|
|
7
|
+
<p><small>single.php</small></p>
|
|
8
|
+
|
|
9
|
+
<?php while (have_posts() ) : the_post(); ?>
|
|
10
|
+
<h1><?php echo get_the_title(); ?></h1>
|
|
11
|
+
<h4><?php echo date("D, d M Y" , strtotime(get_the_date() ) ); ?></h4>
|
|
12
|
+
<?php echo get_the_content(); ?>
|
|
13
|
+
|
|
14
|
+
<?php
|
|
15
|
+
$categories = get_the_category();
|
|
16
|
+
$category = $categories[0];
|
|
17
|
+
?>
|
|
18
|
+
<a href="<?php echo get_category_link($category->cat_ID); ?> ">
|
|
19
|
+
← Back
|
|
20
|
+
</a>
|
|
21
|
+
<?php endwhile; ?>
|
|
22
|
+
|
|
7
23
|
<?php get_footer(); ?>
|