Merge branch 'master' into deploy/prod

This commit is contained in:
Aaron Yarborough 2018-12-20 20:28:59 +00:00
commit b3f84d4999
3 changed files with 24 additions and 9 deletions

View file

@ -50,6 +50,11 @@ add_action('template_redirect', function () {
}
});
add_action('init', function () {
register_nav_menu('header-menu', __('Header Menu'));
});
// Register Custom Post Type
add_action('init', function () {

View file

@ -5,22 +5,22 @@
<meta charset="<?php bloginfo('charset'); ?>"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="description" content="A collection of scripts and other content made by Graal Online players"/>
<title>G-Archive - Graal's player-made content archive</title>
<title><?php echo get_bloginfo('name'); ?> - <?php echo get_bloginfo('description'); ?></title>
<?php wp_head() ?>
</head>
<body <?php body_class(); ?>>
<?php
$curr_user = wp_get_current_user();
$curr_user = wp_get_current_user();
?>
<div class="gar-userbox">
<?php if ($curr_user->ID !== 0): ?>
<?php if ($curr_user->ID !== 0) : ?>
<span class="gar-userbox-username"><?php echo $curr_user->user_login ?></span>
<a href="<?php echo wp_logout_url(esc_url(home_url('/'))) ?>">Logout</a>
<?php else: ?>
<?php else : ?>
<a href="<?php echo wp_login_url(esc_url(home_url('/'))) ?>">Login</a>
<?php endif; ?>
</div>
@ -53,14 +53,23 @@
<div class="col-sm-12">
<div class="text-center">
<nav>
<ul class="gar-list-flat gar-header-nav">
<!-- <ul class="gar-list-flat gar-header-nav">
<li><a href="<?php echo esc_url(home_url('/category/scripts')) ?>">Scripts</a></li>
<li><a href="<?php echo esc_url(home_url('/category/server-backups')) ?>">Backups</a></li>
<li><a href="<?php echo esc_url(home_url('/category/tools')) ?>">Tools</a></li>
<li><a href="<?php echo esc_url(home_url('/category/levels')) ?>">Other</a></li>
<li><a href="#" data-toggle="search"><span class="fa fa-search"></span></a></li>
<li class="gar-menu-submit"><a href="<?php echo esc_url(home_url('/submit')) ?>">Submit</a></li>
</ul>
</ul> -->
<div class="gar-header-nav">
<?php
wp_nav_menu(array(
'theme_location' => 'header-menu'
));
?>
</div>
</nav>
</div>
</div>

View file

@ -52,12 +52,13 @@ a:hover {
color: #111;
}
.gar-header-nav {
.gar-header-nav ul {
margin: 20px 0;
}
.gar-header-nav li {
.gar-header-nav ul li {
margin: 0 10px;
display: inline-block;
}
#postGrid .gar-post-box {
@ -192,7 +193,7 @@ pre {
.gar-userbox {
position: absolute;
right: 10%;
right: 8%;
padding: 5px 15px;
background-color: #111;
top: 0;