Commit 297e5139 authored by allan's avatar allan

merge intergalactic into dev

parents 50cde958 b0394be4
Pipeline #1477 passed with stage
in 0 seconds
<?php
/**
* The template for displaying 404 pages (not found).
*
* @package Intergalactic
*/
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<section class="error-404 not-found">
<header class="page-header">
<h1 class="page-title"><?php _e( 'Oops! That page can&rsquo;t be found.', 'intergalactic' ); ?></h1>
</header><!-- .page-header -->
<div class="page-content">
<p><?php _e( 'It looks like nothing was found at this location. Maybe try a search?', 'intergalactic' ); ?></p>
<?php get_search_form(); ?>
</div><!-- .page-content -->
</section><!-- .error-404 -->
</main><!-- #main -->
</div><!-- #primary -->
<?php get_footer(); ?>
<?php
/**
* The template for displaying archive pages.
*
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package Intergalactic
*/
get_header(); ?>
<section id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php if ( have_posts() ) : ?>
<header class="page-header">
<h1 class="page-title">
<?php
if ( is_category() ) :
single_cat_title();
elseif ( is_tag() ) :
single_tag_title();
elseif ( is_author() ) :
printf( __( 'Author: %s', 'intergalactic' ), '<span class="vcard">' . get_the_author() . '</span>' );
elseif ( is_day() ) :
printf( __( 'Day: %s', 'intergalactic' ), '<span>' . get_the_date() . '</span>' );
elseif ( is_month() ) :
printf( __( 'Month: %s', 'intergalactic' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'intergalactic' ) ) . '</span>' );
elseif ( is_year() ) :
printf( __( 'Year: %s', 'intergalactic' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'intergalactic' ) ) . '</span>' );
elseif ( is_tax( 'post_format', 'post-format-aside' ) ) :
_e( 'Asides', 'intergalactic' );
elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) :
_e( 'Galleries', 'intergalactic' );
elseif ( is_tax( 'post_format', 'post-format-image' ) ) :
_e( 'Images', 'intergalactic' );
elseif ( is_tax( 'post_format', 'post-format-video' ) ) :
_e( 'Videos', 'intergalactic' );
elseif ( is_tax( 'post_format', 'post-format-quote' ) ) :
_e( 'Quotes', 'intergalactic' );
elseif ( is_tax( 'post_format', 'post-format-link' ) ) :
_e( 'Links', 'intergalactic' );
elseif ( is_tax( 'post_format', 'post-format-status' ) ) :
_e( 'Statuses', 'intergalactic' );
elseif ( is_tax( 'post_format', 'post-format-audio' ) ) :
_e( 'Audios', 'intergalactic' );
elseif ( is_tax( 'post_format', 'post-format-chat' ) ) :
_e( 'Chats', 'intergalactic' );
else :
_e( 'Archives', 'intergalactic' );
endif;
?>
</h1>
<?php
// Show an optional term description.
$term_description = term_description();
if ( ! empty( $term_description ) ) :
printf( '<div class="taxonomy-description">%s</div>', $term_description );
endif;
?>
</header><!-- .page-header -->
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
/* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'content', 'home' );
?>
<?php endwhile; ?>
<?php intergalactic_paging_nav(); ?>
<?php else : ?>
<?php get_template_part( 'content', 'none' ); ?>
<?php endif; ?>
</main><!-- #main -->
</section><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
<?php
/**
* The template for displaying comments.
*
* The area of the page that contains both current comments
* and the comment form.
*
* @package Intergalactic
*/
/*
* If the current post is protected by a password and
* the visitor has not yet entered the password we will
* return early without loading the comments.
*/
if ( post_password_required() ) {
return;
}
?>
<div id="comments" class="comments-area">
<?php // You can start editing here -- including this comment! ?>
<?php if ( have_comments() ) : ?>
<h2 class="comments-title">
<?php
printf( _nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'intergalactic' ),
number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
?>
</h2>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
<nav id="comment-nav-above" class="comment-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'intergalactic' ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'intergalactic' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'intergalactic' ) ); ?></div>
</nav><!-- #comment-nav-above -->
<?php endif; // check for comment navigation ?>
<ol class="comment-list">
<?php
wp_list_comments( array(
'style' => 'ol',
'short_ping' => true,
'avatar_size'=> 75,
) );
?>
</ol><!-- .comment-list -->
<?php endif; // have_comments() ?>
<?php
// If comments are closed and there are comments, let's leave a little note, shall we?
if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
?>
<p class="no-comments"><?php _e( 'Comments are closed.', 'intergalactic' ); ?></p>
<?php endif; ?>
<?php comment_form(); ?>
</div><!-- #comments -->
<?php
/**
* @package Intergalactic
*/
$formats = get_theme_support( 'post-formats' );
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( has_post_thumbnail() ) {
$thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'intergalactic-large' ); ?>
<div class="entry-background" style="background-image:url(<?php echo esc_url( $thumbnail[0] ); ?>)"></div>
<?php } ?>
<header class="entry-header">
<?php if ( 'link' == get_post_format() ) : ?>
<?php the_title( sprintf( '<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url( intergalactic_get_link_url() ) ), '</a></h1>' ); ?>
<?php else : ?>
<?php the_title( sprintf( '<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' ); ?>
<?php endif; ?>
</header><!-- .entry-header -->
<?php if ( has_post_format( $formats[0] ) ) : ?>
<div class="entry-content">
<?php the_content( __( 'Read More', 'intergalactic' ) ); ?>
<?php if( ! strpos( $post->post_content, '<!--more-->' ) ) : ?>
<a class="more-link" href="<?php the_permalink(); ?>" rel="bookmark">
<?php
/* translators: %s: Name of current post */
printf(
__( 'Read more %s', 'intergalactic' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
); ?>
</a>
<?php endif; ?>
</div><!-- .entry-content -->
<?php else : ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
<a class="more-link" href="<?php the_permalink(); ?>" rel="bookmark">
<?php
/* translators: %s: Name of current post */
printf(
__( 'Read more %s', 'intergalactic' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
); ?>
</a>
</div><!-- .entry-summary -->
<?php endif; ?>
<footer class="entry-footer">
<div class="entry-meta">
<?php edit_post_link( __( 'Edit', 'intergalactic' ), '<span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-meta -->
</footer>
</article><!-- #post-## -->
<?php
/**
* The template part for displaying a message that posts cannot be found.
*
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package Intergalactic
*/
?>
<section class="no-results not-found">
<header class="page-header">
<h1 class="page-title"><?php _e( 'Nothing Found', 'intergalactic' ); ?></h1>
</header><!-- .page-header -->
<div class="page-content">
<?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
<p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'intergalactic' ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
<?php elseif ( is_search() ) : ?>
<p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'intergalactic' ); ?></p>
<?php get_search_form(); ?>
<?php else : ?>
<p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'intergalactic' ); ?></p>
<?php get_search_form(); ?>
<?php endif; ?>
</div><!-- .page-content -->
</section><!-- .no-results -->
<?php
/**
* The template used for displaying page content in page.php
*
* @package Intergalactic
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header><!-- .entry-header -->
<div class="entry-content">
<?php the_content(); ?>
<?php
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'intergalactic' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php edit_post_link( __( 'Edit', 'intergalactic' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->
<?php
/**
* @package Intergalactic
*/
?>
<?php if ( has_post_thumbnail() && 'post' == get_post_type() ) {
$thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'intergalactic-large' ); ?>
<div class="entry-background" style="background-image:url(<?php echo esc_url( $thumbnail[0] ); ?>)">
<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header><!-- .entry-header -->
</div>
<?php } else { ?>
<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header><!-- .entry-header -->
<?php } ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="entry-content-wrapper">
<div class="entry-meta">
<?php intergalactic_posted_on(); ?>
</div><!-- .entry-meta -->
<div class="entry-content">
<?php the_content(); ?>
<?php
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'intergalactic' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php
/* translators: used between list items, there is a space after the comma */
$category_list = get_the_category_list( __( ', ', 'intergalactic' ) );
/* translators: used between list items, there is a space after the comma */
$tag_list = get_the_tag_list( '', __( ', ', 'intergalactic' ) );
if ( '' != $tag_list ) {
printf( '<span class="entry-tags">' . __( '<span class="heading">Tags:</span> %1$s', 'intergalactic' ) . '</span>', $tag_list );
}
if ( 'true' == intergalactic_categorized_blog() ) {
printf( '<span class="entry-categories">' . __( '<span class="heading">Categories:</span> %1$s', 'intergalactic' ) . '</span>', $category_list );
}
?>
<?php intergalactic_post_format(); ?>
<?php edit_post_link( __( 'Edit', 'intergalactic' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-footer -->
</div><!-- .entry-content-wrapper -->
</article><!-- #post-## -->
<?php
/**
* @package Intergalactic
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title( sprintf( '<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' ); ?>
<?php if ( 'post' == get_post_type() ) : ?>
<div class="entry-meta">
<?php intergalactic_posted_on(); ?>
</div><!-- .entry-meta -->
<?php endif; ?>
</header><!-- .entry-header -->
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
the_content( sprintf(
__( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'intergalactic' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
) );
?>
<?php
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'intergalactic' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>
<?php
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ', ', 'intergalactic' ) );
if ( $categories_list && intergalactic_categorized_blog() ) :
?>
<span class="cat-links">
<?php printf( __( 'Posted in %1$s', 'intergalactic' ), $categories_list ); ?>
</span>
<?php endif; // End if categories ?>
<?php
/* translators: used between list items, there is a space after the comma */
$tags_list = get_the_tag_list( '', __( ', ', 'intergalactic' ) );
if ( $tags_list ) :
?>
<span class="tags-links">
<?php printf( __( 'Tagged %1$s', 'intergalactic' ), $tags_list ); ?>
</span>
<?php endif; // End if $tags_list ?>
<?php endif; // End if 'post' == get_post_type() ?>
<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'intergalactic' ), __( '1 Comment', 'intergalactic' ), __( '% Comments', 'intergalactic' ) ); ?></span>
<?php endif; ?>
<?php edit_post_link( __( 'Edit', 'intergalactic' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->
\ No newline at end of file
/*
Theme Name: Intergalactic
Description: Used to style the TinyMCE editor.
*/
img {
max-width: 100%;
height: auto;
}
\ No newline at end of file
<?php
/**
* The template for displaying the footer.
*
* Contains the closing of the #content div and all content after
*
* @package Intergalactic
*/
?>
</div><!-- #content -->
<footer id="colophon" class="site-footer" role="contentinfo">
<div class="site-info">
<a href="<?php echo esc_url( __( 'http://wordpress.org/', 'intergalactic' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'intergalactic' ), 'WordPress' ); ?></a>
<span class="sep"> | </span>
<?php printf( __( 'Theme: %1$s by %2$s.', 'intergalactic' ), 'Intergalactic', '<a href="http://wordpress.com/themes/intergalactic/" rel="designer">WordPress.com</a>' ); ?>
</div><!-- .site-info -->
</footer><!-- #colophon -->
</div><!-- #page -->
<?php wp_footer(); ?>
</body>
</html>
<?php
/**
* Intergalactic functions and definitions
*
* @package Intergalactic
*/
/**
* Set the content width based on the theme's design and stylesheet.
*/
if ( ! isset( $content_width ) ) {
$content_width = 1000; /* pixels */
}
if ( ! function_exists( 'intergalactic_setup' ) ) :
/**
* Sets up theme defaults and registers support for various WordPress features.
*
* Note that this function is hooked into the after_setup_theme hook, which
* runs before the init hook. The init hook is too late for some features, such
* as indicating support for post thumbnails.
*/
function intergalactic_setup() {
/*
* Make theme available for translation.
* Translations can be filed in the /languages/ directory.
* If you're building a theme based on Intergalactic, use a find and replace
* to change 'intergalactic' to the name of your theme in all the template files
*/
load_theme_textdomain( 'intergalactic', get_template_directory() . '/languages' );
// Add default posts and comments RSS feed links to head.
add_theme_support( 'automatic-feed-links' );
/*
* Enable support for Post Thumbnails on posts and pages.
*
* @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
*/
add_theme_support( 'post-thumbnails' );
add_image_size( 'intergalactic-large', '1440', '960', false );
// This theme uses wp_nav_menu() in two locations.
register_nav_menus( array(
'primary' => __( 'Primary Menu', 'intergalactic' ),
'social' => __( 'Social Links Menu', 'intergalactic' ),
) );
/*
* Switch default core markup for search form, comment form, and comments
* to output valid HTML5.
*/
add_theme_support( 'html5', array(
'search-form', 'comment-form', 'comment-list', 'gallery', 'caption',
) );
/*
* Enable support for Post Formats.
* See http://codex.wordpress.org/Post_Formats
*/
add_theme_support( 'post-formats', array(
'aside', 'image', 'video', 'quote', 'link', 'gallery',
) );
// Setup the WordPress core custom background feature.
add_theme_support( 'custom-background', apply_filters( 'intergalactic_custom_background_args', array(
'default-color' => 'ffffff',
'default-image' => '',
) ) );
/*
* This theme styles the visual editor to resemble the theme style.
*/
add_editor_style( array( 'editor-style.css' ) );
}
endif; // intergalactic_setup
add_action( 'after_setup_theme', 'intergalactic_setup' );
/**
* Register widget area.
*
* @link http://codex.wordpress.org/Function_Reference/register_sidebar
*/
function intergalactic_widgets_init() {
register_sidebar( array(
'name' => __( 'Sidebar', 'intergalactic' ),
'id' => 'sidebar-1',
'description' => '',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h1 class="widget-title">',
'after_title' => '</h1>',
) );
}
add_action( 'widgets_init', 'intergalactic_widgets_init' );
/**
* Enqueue scripts and styles.
*/
function intergalactic_scripts() {
wp_enqueue_style( 'intergalactic-style', get_stylesheet_uri() );
wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.4.1' );
wp_enqueue_script( 'intergalactic-script', get_template_directory_uri() . '/js/intergalactic.js', array( 'jquery' ), '20140905', true );
wp_enqueue_script( 'intergalactic-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
wp_enqueue_style( 'intergalactic-lato', intergalactic_fonts_url(), array(), null );
}
add_action( 'wp_enqueue_scripts', 'intergalactic_scripts' );
/**
* Register Google Fonts
*/
function intergalactic_fonts_url() {
$fonts_url = '';
/* Translators: If there are characters in your language that are not
* supported by Lato, translate this to 'off'. Do not translate
* into your own language.
*/
$arimo = _x( 'on', 'Lato font: on or off', 'intergalactic' );
if ( 'off' !== $arimo ) {
$font_families = array();
$font_families[] = 'Lato:300,400,700,300italic,400italic,700italic&subset=latin,latin-ext';
$query_args = array(
'family' => urlencode( implode( '|', $font_families ) ),
'subset' => urlencode( 'latin,latin-ext' ),
);
$fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
}
return $fonts_url;
}
if ( ! function_exists( 'intergalactic_editor_styles' ) ) {
/**
* Enqueue Google Fonts for Editor Styles
*/
function intergalactic_editor_styles() {
add_editor_style( array( 'editor-style.css', intergalactic_fonts_url() ) );
}
add_action( 'after_setup_theme', 'intergalactic_editor_styles' );
} // if ! function_exists( 'intergalactic_editor_styles' )
if ( ! function_exists( 'intergalactic_admin_scripts' ) ) {
/**
* Enqueue Google Fonts for custom headers
*/
function intergalactic_admin_scripts( $hook_suffix ) {
wp_enqueue_style( 'intergalactic-lato', intergalactic_fonts_url(), array(), null );
}
add_action( 'admin_print_styles-appearance_page_custom-header', 'intergalactic_admin_scripts' );
} // if ! function_exists( 'intergalactic_admin_scripts' )
/**
* Implement the Custom Header feature.
*/
require get_template_directory() . '/inc/custom-header.php';
/**
* Custom template tags for this theme.
*/
require get_template_directory() . '/inc/template-tags.php';
/**
* Custom functions that act independently of the theme templates.
*/
require get_template_directory() . '/inc/extras.php';
/**
* Customizer additions.
*/
require get_template_directory() . '/inc/customizer.php';
/**
* Load Jetpack compatibility file.
*/
require get_template_directory() . '/inc/jetpack.php';
Genericons is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
The fonts are distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
As a special exception, if you create a document which uses this font, and embed this font or unaltered portions of this font into the document, this font does not by itself cause the resulting document to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the document might be covered by the GNU General Public License. If you modify this font, you may extend this exception to your version of the font, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.
This license does not convey any intellectual property rights to third party trademarks that may be included in the icon font; such marks remain subject to all rights and guidelines of use of their owner.
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
@import url('genericons/genericons.css');
/*
This file location is deprecated