webbuild-status-page: own header without exit check and top menu instead of links (requires updated autodists)

This commit is contained in:
Silvan Calarco 2016-08-20 18:32:19 +02:00
parent 81df6e406b
commit 02d1645ad9
5 changed files with 359 additions and 147 deletions

View File

@ -1,10 +1,9 @@
<?php <?php
// Exit if accessed directly // Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) { if ( !defined( 'ABSPATH' ) ) {
exit; exit;
} }
function openmamba_breadcrumbs() { function openmamba_breadcrumbs() {
$text['category'] = ''; $text['category'] = '';

135
header-webbuild-status.php Normal file
View File

@ -0,0 +1,135 @@
<?php
/**
* Header Template
*
*
* @file header.php
* @package Responsive
* @author Emil Uzelac
* @copyright 2003 - 2014 CyberChimps
* @license license.txt
* @version Release: 1.3
* @filesource wp-content/themes/responsive/header.php
* @link http://codex.wordpress.org/Theme_Development#Document_Head_.28header.php.29
* @since available since Release 1.0
*/
// Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) {
exit;
}
?>
<!doctype html>
<!--[if !IE]>
<html class="no-js non-ie" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 7 ]>
<html class="no-js ie7" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 8 ]>
<html class="no-js ie8" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 9 ]>
<html class="no-js ie9" <?php language_attributes(); ?>> <![endif]-->
<!--[if gt IE 9]><!-->
<html class="no-js" <?php language_attributes(); ?>> <!--<![endif]-->
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?php wp_title( '&#124;', true, 'right' ); ?></title>
<link rel="profile" href="http://gmpg.org/xfn/11"/>
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>"/>
<?php
remove_action('wp_head', '_admin_bar_bump_cb');
add_filter('show_admin_bar', '__return_false' );
# wordpress header code - make sure it includes jquery
wp_head();
print '<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">' . PHP_EOL;
print '<link rel="shortcut icon" type="image/x-icon" href="' . get_stylesheet_directory_uri() . '/images/webbuild.ico" />' . PHP_EOL;
# webbuild css
print '<link rel="stylesheet" type="text/css" href="' . get_stylesheet_directory_uri() . '/styles/webbuild.css">' . PHP_EOL;
# webbuild
#print '<script type="text/javascript" src="' . get_stylesheet_directory_uri() . '/scripts/webbuild.js"></script>';
# distroquery
print '<script type="text/javascript" src="' . get_stylesheet_directory_uri() . '/scripts/distroquery.js"></script>' . PHP_EOL;
$file = fopen(get_stylesheet_directory() . "/webbuild.js.inc", "r");
print fread($file, 20000);
fclose($file);
# webbuild css
print '<link rel="stylesheet" type="text/css" href="' . get_stylesheet_directory_uri() . '/styles/webbuild-post.css"/>';
?>
</head>
<body <?php body_class(); ?>>
<?php responsive_container(); // before container hook ?>
<div id="container" class="hfeed">
<?php responsive_header(); // before header hook ?>
<div class="skip-container cf">
<a class="skip-link screen-reader-text focusable" href="#content"><?php _e( '&darr; Skip to Main Content', 'responsive' ); ?></a>
</div><!-- .skip-container -->
<div id="header">
<?php responsive_header_top(); // before header content hook ?>
<?php if ( has_nav_menu( 'top-menu', 'responsive' ) ) {
wp_nav_menu( array(
'container' => '',
'fallback_cb' => false,
'menu_class' => 'top-menu',
'theme_location' => 'top-menu'
) );
} ?>
<?php responsive_in_header(); // header hook ?>
<?php if ( get_header_image() != '' ) : ?>
<div id="logo">
<a href="<?php echo home_url( '/' ); ?>"><img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="<?php bloginfo( 'name' ); ?>"/></a>
</div><!-- end of #logo -->
<?php endif; // header image was removed ?>
<?php if ( !get_header_image() ) : ?>
<div id="logo">
<span class="site-name"><a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span>
<span class="site-description"><?php bloginfo( 'description' ); ?></span>
</div><!-- end of #logo -->
<?php endif; // header image was removed (again) ?>
<?php get_sidebar( 'top' ); ?>
<?php wp_nav_menu( array(
'container' => 'div',
'container_class' => 'main-nav',
'fallback_cb' => 'responsive_fallback_menu',
'theme_location' => 'header-menu'
) ); ?>
<?php if ( has_nav_menu( 'sub-header-menu', 'responsive' ) ) {
wp_nav_menu( array(
'container' => '',
'menu_class' => 'sub-header-menu',
'theme_location' => 'sub-header-menu'
) );
} ?>
<?php responsive_header_bottom(); // after header content hook ?>
</div><!-- end of #header -->
<?php responsive_header_end(); // after header container hook ?>
<?php responsive_wrapper(); // before wrapper container hook ?>
<div id="wrapper" class="clearfix">
<?php responsive_wrapper_top(); // before wrapper content hook ?>
<?php responsive_in_wrapper(); // wrapper hook ?>

View File

@ -451,3 +451,81 @@ input {
.socialbox hr { margin:0; color:#FFF; } .socialbox hr { margin:0; color:#FFF; }
.downloadbox table { font-size: 9pt; border:1px solid #2b6600; margin: 4px; padding:4; background-color: #e0f2d0; } .downloadbox table { font-size: 9pt; border:1px solid #2b6600; margin: 4px; padding:4; background-color: #e0f2d0; }
div.speccreate { display:inline-block; } div.speccreate { display:inline-block; }
/* simple pull-down menu */
#primary_nav_wrap
{
margin-top:15px
}
#primary_nav_wrap ul
{
list-style:none;
position:relative;
float:left;
margin:0;
padding:0
}
#primary_nav_wrap ul a
{
display:block;
color:#333;
text-decoration:none;
font-weight:700;
font-size:12px;
line-height:32px;
padding:0 15px;
font-family:"HelveticaNeue","Helvetica Neue",Helvetica,Arial,sans-serif
}
#primary_nav_wrap ul li
{
position:relative;
float:left;
margin:0;
padding:0
}
#primary_nav_wrap ul li.current-menu-item
{
background:#ddd
}
#primary_nav_wrap ul li:hover
{
background:#f6f6f6
}
#primary_nav_wrap ul ul
{
display:none;
position:absolute;
top:100%;
left:0;
background:#fff;
padding:0
}
#primary_nav_wrap ul ul li
{
float:none;
width:200px
}
#primary_nav_wrap ul ul a
{
line-height:120%;
padding:10px 15px
}
#primary_nav_wrap ul ul ul
{
top:0;
left:100%
}
#primary_nav_wrap ul li:hover > ul
{
display:block
}

View File

@ -1,76 +1,76 @@
<?php <?php
if (!is_user_logged_in()) { if (!is_user_logged_in()) {
wp_redirect( wp_login_url( "http://".$_SERVER[HTTP_HOST].$_SERVER[REQUEST_URI] )); wp_redirect( wp_login_url( "http://".$_SERVER[HTTP_HOST].$_SERVER[REQUEST_URI] ));
} }
// Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) {
exit;
}
/**
* Full Content Template
*
Template Name: Webbuild Page (no sidebar, no title)
*
* @file webbuild-page.php
* @package Responsive
* @author Emil Uzelac
* @copyright 2003 - 2014 CyberChimps
* @license license.txt
* @version Release: 1.0
* @filesource wp-content/themes/responsive/webbuild-page.php
* @link http://codex.wordpress.org/Theme_Development#Pages_.28page.php.29
* @since available since Release 1.0
*/
get_header("webbuild"); ?> // Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) {
<div id="content-full" class="grid col-940"> exit;
}
<?php if ( have_posts() ) : ?>
/**
<?php while( have_posts() ) : the_post(); ?> * Full Content Template
*
<?php get_template_part( 'loop-header', get_post_type() ); ?> Template Name: Webbuild Page (no sidebar, no title)
*
<?php responsive_entry_before(); ?> * @file webbuild-page.php
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> * @package Responsive
<?php responsive_entry_top(); ?> * @author Emil Uzelac
* @copyright 2003 - 2014 CyberChimps
<!--?php get_template_part( 'post-meta', get_post_type() ); ?--> * @license license.txt
* @version Release: 1.0
<div class="post-entry"> * @filesource wp-content/themes/responsive/webbuild-page.php
<?php the_content( __( 'Read more &#8250;', 'responsive' ) ); ?> * @link http://codex.wordpress.org/Theme_Development#Pages_.28page.php.29
<?php wp_link_pages( array( 'before' => '<div class="pagination">' . __( 'Pages:', 'responsive' ), 'after' => '</div>' ) ); ?> * @since available since Release 1.0
</div> */
<!-- end of .post-entry -->
<?php get_template_part( 'post-data', get_post_type() ); ?> get_header("webbuild"); ?>
<?php responsive_entry_bottom(); ?> <div id="content-full" class="grid col-940">
</div><!-- end of #post-<?php the_ID(); ?> -->
<?php responsive_entry_after(); ?> <?php if ( have_posts() ) : ?>
<?php responsive_comments_before(); ?> <?php while( have_posts() ) : the_post(); ?>
<?php comments_template( '', true ); ?>
<?php responsive_comments_after(); ?> <?php get_template_part( 'loop-header', get_post_type() ); ?>
<?php <?php responsive_entry_before(); ?>
endwhile; <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php responsive_entry_top(); ?>
get_template_part( 'loop-nav', get_post_type() );
<!--?php get_template_part( 'post-meta', get_post_type() ); ?-->
else :
<div class="post-entry">
get_template_part( 'loop-no-posts', get_post_type() ); <?php the_content( __( 'Read more &#8250;', 'responsive' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="pagination">' . __( 'Pages:', 'responsive' ), 'after' => '</div>' ) ); ?>
endif; </div>
?> <!-- end of .post-entry -->
</div><!-- end of #content-full --> <?php get_template_part( 'post-data', get_post_type() ); ?>
<?php get_footer(); ?> <?php responsive_entry_bottom(); ?>
</div><!-- end of #post-<?php the_ID(); ?> -->
<?php responsive_entry_after(); ?>
<?php responsive_comments_before(); ?>
<?php comments_template( '', true ); ?>
<?php responsive_comments_after(); ?>
<?php
endwhile;
get_template_part( 'loop-nav', get_post_type() );
else :
get_template_part( 'loop-no-posts', get_post_type() );
endif;
?>
</div><!-- end of #content-full -->
<?php get_footer(); ?>

View File

@ -1,70 +1,70 @@
<?php <?php
// Exit if accessed directly // Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) { if ( !defined( 'ABSPATH' ) ) {
exit; exit;
} }
/** /**
* Full Content Template * Full Content Template
* *
Template Name: Webbuild Status Page (no sidebar, no title) Template Name: Webbuild Status Page (no sidebar, no title)
* *
* @file webbuild-status-page.php * @file webbuild-status-page.php
* @package Responsive * @package Responsive
* @author Emil Uzelac * @author Emil Uzelac
* @copyright 2003 - 2014 CyberChimps * @copyright 2003 - 2014 CyberChimps
* @license license.txt * @license license.txt
* @version Release: 1.0 * @version Release: 1.0
* @filesource wp-content/themes/responsive/webbuild-page.php * @filesource wp-content/themes/responsive/webbuild-page.php
* @link http://codex.wordpress.org/Theme_Development#Pages_.28page.php.29 * @link http://codex.wordpress.org/Theme_Development#Pages_.28page.php.29
* @since available since Release 1.0 * @since available since Release 1.0
*/ */
get_header("webbuild"); ?> get_header("webbuild-status"); ?>
<div id="content-full" class="grid col-940"> <div id="content-full" class="grid col-940">
<?php if ( have_posts() ) : ?> <?php if ( have_posts() ) : ?>
<?php while( have_posts() ) : the_post(); ?> <?php while( have_posts() ) : the_post(); ?>
<?php get_template_part( 'loop-header', get_post_type() ); ?> <?php get_template_part( 'loop-header', get_post_type() ); ?>
<?php responsive_entry_before(); ?> <?php responsive_entry_before(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php responsive_entry_top(); ?> <?php responsive_entry_top(); ?>
<!--?php get_template_part( 'post-meta', get_post_type() ); ?--> <!--?php get_template_part( 'post-meta', get_post_type() ); ?-->
<div class="post-entry"> <div class="post-entry">
<?php the_content( __( 'Read more &#8250;', 'responsive' ) ); ?> <?php the_content( __( 'Read more &#8250;', 'responsive' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="pagination">' . __( 'Pages:', 'responsive' ), 'after' => '</div>' ) ); ?> <?php wp_link_pages( array( 'before' => '<div class="pagination">' . __( 'Pages:', 'responsive' ), 'after' => '</div>' ) ); ?>
</div> </div>
<!-- end of .post-entry --> <!-- end of .post-entry -->
<?php get_template_part( 'post-data', get_post_type() ); ?> <?php get_template_part( 'post-data', get_post_type() ); ?>
<?php responsive_entry_bottom(); ?> <?php responsive_entry_bottom(); ?>
</div><!-- end of #post-<?php the_ID(); ?> --> </div><!-- end of #post-<?php the_ID(); ?> -->
<?php responsive_entry_after(); ?> <?php responsive_entry_after(); ?>
<?php responsive_comments_before(); ?> <?php responsive_comments_before(); ?>
<?php comments_template( '', true ); ?> <?php comments_template( '', true ); ?>
<?php responsive_comments_after(); ?> <?php responsive_comments_after(); ?>
<?php <?php
endwhile; endwhile;
get_template_part( 'loop-nav', get_post_type() ); get_template_part( 'loop-nav', get_post_type() );
else : else :
get_template_part( 'loop-no-posts', get_post_type() ); get_template_part( 'loop-no-posts', get_post_type() );
endif; endif;
?> ?>
</div><!-- end of #content-full --> </div><!-- end of #content-full -->
<?php get_footer(); ?> <?php get_footer(); ?>