-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
143 lines (127 loc) · 3.73 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!doctype html>
<html <?php language_attributes(); ?>>
<?php
get_template_part('head');
?>
<body <?php body_class(); ?>>
<div class="site">
<div class="site-upper">
<?php
// HEADER
do_action('get_header');
get_template_part('header');
?>
<div class="site-main" role="document">
<main class="main frame">
<div class="measure">
<?php
if (is_home()) :
?>
<h1 class="site-tagline"><?php echo get_bloginfo('description'); ?></h1>
<?php
endif;
?>
<?php
/*
START WORDPRESS LOOP
All main content (e.g. posts, pages) is accessed via the WP Loop.
*/
if ( have_posts() ) :
while ( have_posts() ) : the_post();
?>
<?php
// SINGLE VIEW
// e.g. post
if (is_single()) :
?>
<article class="entry">
<header class="entry-header">
<time class="publish-date" datetime="<?php echo get_post_time('c', true); ?>"><?php the_time('F j, Y'); ?></time>
<h1 class="title"><?php the_title(); ?></h1>
</header>
<div class="entry-content typeset">
<?php the_content(); ?>
</div>
</article>
<?php
// PAGE
elseif (is_page()) :
?>
<article class="entry">
<header class="entry-header">
<h1 class="title"><?php the_title(); ?></h1>
</header>
<div class="entry-content typeset">
<?php the_content(); ?>
</div>
</article>
<?php
// ARCHIVE VIEW
// Home page, archive page, etc.
else :
?>
<article class="entry-block">
<header class="preview-entry-header">
<a class="entry-link" href="<?php the_permalink(); ?>" title="Go to post">
<h2 class="preview-title title"><?php the_title(); ?></h2>
<time class="preview-publish-date" datetime="<?php echo get_post_time('c', true); ?>"><?php the_time('M'); ?> <?php the_time('j/y'); ?></time>
</a>
</header>
<?php
/*
<div class="preview-content typeset">
<?php the_excerpt(); ?>
</div>
*/
?>
</article>
<?php
endif;
?>
<?php
endwhile;
else :
?>
<p><?php esc_html_e( 'Sorry, no content matched your criteria.' ); ?></p>
<?php
endif;
/*
END WORDPRESS LOOP
*/
?>
</div> <!-- /.measure -->
</main> <!-- /.main -->
</div> <!-- /.site-main -->
</div>
<div class="site-lower">
<?php
// FOOTER
do_action('get_footer');
get_template_part('footer');
wp_footer();
?>
</div>
</div>
<?php
/*
Below (between) the <script> tag is the jQuery code
used for the menu nav icon.
*/
?>
<script>
(function($) {
$('#js-menu-control').click(function() {
$me = $(this);
if ($me.hasClass('menu-control-active')) {
$('#main-nav').removeClass('show');
$me.removeClass('menu-control-active');
}
else {
$('#main-nav').addClass('show');
$me.addClass('menu-control-active');
}
});
})(jQuery);
</script>
</body>
</html>