Skip to content

Commit af8d184

Browse files
committed
adjustment new assasment 2
0 parents  commit af8d184

File tree

7 files changed

+233
-0
lines changed

7 files changed

+233
-0
lines changed

footer.php

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
/**
3+
* Website Footer Assastment
4+
*
5+
* @author Ricko
6+
* @subpackage Core
7+
* @version 1.0.0
8+
*/
9+
10+
// Do not allow directly accessing this file.
11+
if ( ! defined( 'ABSPATH' ) ) {
12+
exit( 'Direct script access denied.' );
13+
} ?>
14+
15+
<footer id="footer" role="contentinfo">
16+
</footer>
17+
18+
<script>
19+
jQuery(document).ready(function(){
20+
jQuery('#home').append('target edit 1<br>');
21+
});
22+
jQuery(document).ready(function(){
23+
jQuery('#sample-page-1').append('target edit 2<br>');
24+
});
25+
jQuery(document).ready(function(){
26+
jQuery('#sample-page-2').append('target edit 3<br>');
27+
});
28+
</script>
29+
30+
<?php wp_footer(); ?>
31+
</body>
32+
</html>

function.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
/**
3+
* Main Theme Functions File
4+
*
5+
* Extra files & functions are hooked here.
6+
*
7+
* @author Ricko
8+
* @subpackage Core
9+
* @version 1.0.0
10+
*/
11+
12+
// Do not allow directly accessing this file.
13+
if ( ! defined( 'ABSPATH' ) ) {
14+
exit( 'Dont do that !!!.' );
15+
}
16+
17+
18+
function register_my_menu() {
19+
register_nav_menu('header-menu',__( 'Header Menu' ));
20+
}
21+
add_action( 'init', 'register_my_menu' );
22+
23+
function register_my_menus() {
24+
register_nav_menus(
25+
array(
26+
'header-menu' => __( 'Header Menu' ),
27+
)
28+
);
29+
}
30+
add_action( 'init', 'register_my_menus' );

header.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
/**
3+
* Website Header Assastment
4+
*
5+
* @author Ricko
6+
* @subpackage Core
7+
* @version 1.0.0
8+
*/
9+
10+
// Do not allow directly accessing this file.
11+
if ( ! defined( 'ABSPATH' ) ) {
12+
exit( 'Direct script access denied.' );
13+
}
14+
?>
15+
<!DOCTYPE html>
16+
<html xmlns="http://www.w3.org/1999/xhtml" prefix="og: http://ogp.me/ns#" itemscope="" itemtype="http://schema.org/blog" <?php language_attributes(); ?>>
17+
<head profile="http://gmpg.org/xfn/11">
18+
<?php wp_head(); ?>
19+
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
20+
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
21+
</head>
22+
23+
<body id="<?php body_css_id(); ?>" <?php body_class(); ?>>
24+
25+
<div id="page">
26+
27+
<header id="header" role="banner">
28+
29+
<div class="hgroup">
30+
<div class="group">
31+
<nav class="nav" role="navigation"><?php wp_nav_menu(array('theme_location'=>'header-menu','container'=>false)); ?></nav>
32+
<div class="clear"></div>
33+
</div>
34+
</div>
35+
</header>

index.php

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<?php
2+
/**
3+
* main template
4+
*
5+
* @author Ricko
6+
* @subpackage Core
7+
* @version 1.0.0
8+
*/
9+
10+
// Do not allow directly accessing this file.
11+
if ( ! defined( 'ABSPATH' ) ) {
12+
exit( 'Direct script access denied.' );
13+
}
14+
15+
get_header(); ?>
16+
17+
<div role="main">
18+
<div class="link-back">
19+
<a title="Back" href="javascript:history.go(-1)"><i class="fa fa-arrow-left"></i></i> Back</a>
20+
</div>
21+
22+
<?php if ( is_home() && ! is_front_page() ) : ?>
23+
<header id="lead">
24+
<div class="group">
25+
<h1 class="page-title screen-reader-text">
26+
<span class="the-title"><?php single_post_title(); ?></span>
27+
</h1>
28+
</div>
29+
</header>
30+
<?php endif; ?>
31+
32+
<section class="blog_wrap">
33+
<article id="entry">
34+
35+
<div id="post-entry" class="index borderbox left">
36+
37+
<?php if (have_posts()) :
38+
39+
$i = 0; while (have_posts()) : the_post(); $i++;
40+
get_template_part( 'template-parts/content', 'blog' );
41+
endwhile; ?>
42+
43+
<div class="post-nav">
44+
<p class="left"><?php previous_posts_link('<span class="aquo">&laquo;</span> Previous Entries') ?></p>
45+
<p class="right"><?php next_posts_link('Next Entries <span class="aquo">&raquo;</span>','') ?></p>
46+
<div class="clear"></div>
47+
</div>
48+
49+
<?php // If no content, include the "No posts found" template.
50+
else :
51+
get_template_part( 'template-parts/content', 'none' );
52+
endif; ?>
53+
54+
</div><!-- .post-entry -->
55+
56+
<?php get_sidebar(); ?>
57+
58+
</article>
59+
</section><!-- .blog_wrap -->
60+
61+
</div>
62+
63+
<?php get_footer();
64+
65+
66+
/* Omit closing PHP tag to avoid "Headers already sent" issues. */

page.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
get_header();
3+
?>
4+
5+
<div role="main">
6+
7+
</div>
8+
9+
<?php get_footer(); ?>

sidebar.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
/**
3+
* The template for the sidebar containing the main widget area
4+
*
5+
* @author Ricko
6+
* @subpackage Core
7+
* @version 1.0.0
8+
*/
9+
10+
// Do not allow directly accessing this file.
11+
if ( ! defined( 'ABSPATH' ) ) {
12+
exit( 'Direct script access denied.' );
13+
}
14+
15+
if ( is_active_sidebar( 'blog-sidebar' ) ) : ?>
16+
17+
<aside id="sidebar" class="sidebar borderbox right" role="complementary">
18+
<?php if (is_home() || is_category() || is_archive() || is_tag() || is_search() || is_single() || is_date()) dynamic_sidebar('blog-sidebar'); ?>
19+
</aside>
20+
<p>X</p>
21+
22+
<div class="clear"></div>
23+
24+
<?php endif; ?>

style.css

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
Theme Name: Assesment 2 Ricko
3+
Theme URI: http://rickostefan.com/
4+
Description: Ricko Theme
5+
Author: Ricko Stefan
6+
Author URI: -
7+
Version: 1.0.0
8+
Tags: -
9+
*/
10+
11+
/* Add a black background color to the top navigation */
12+
.topnav {
13+
background-color: #333;
14+
overflow: hidden;
15+
}
16+
17+
/* Style the links inside the navigation bar */
18+
.topnav a {
19+
float: left;
20+
color: #f2f2f2;
21+
text-align: center;
22+
padding: 14px 16px;
23+
text-decoration: none;
24+
font-size: 17px;
25+
}
26+
27+
/* Change the color of links on hover */
28+
.topnav a:hover {
29+
background-color: #ddd;
30+
color: black;
31+
}
32+
33+
/* Add a color to the active/current link */
34+
.topnav a.active {
35+
background-color: #4CAF50;
36+
color: white;
37+
}

0 commit comments

Comments
 (0)