Almost done

This commit is contained in:
rumperuu 2017-04-11 07:22:35 +00:00
parent b0a265ea24
commit 98ea090b9f
19 changed files with 2056 additions and 774 deletions

24
404.php
View file

@ -9,19 +9,17 @@
get_header(); ?> get_header(); ?>
<div id="primary" class="content-area"> <div id="content" class="site-content">
<main id="main" class="site-main" role="main"> <main id="main" class="site-main" role="main">
<section class="error-404 not-found">
<section class="error-404 not-found"> <header class="entry-header" id="post-header-image" style="background-image: url('/wp-content/uploads/2017/01/bum.jpg');">
<header class="page-header"> <div id="post-header-details-container">
<h1 class="page-title"><?php _e( 'Oops! That page can&rsquo;t be found.', 'twentysixteen' ); ?></h1> <div id="post-header-details">
</header><!-- .page-header --> <h1 id="post-title">404</h1>
<h2 id="page-subtitle">That's &lsquo;computer&rsquo; for <q>Oops! Something went wrong!</q></h2>
<div class="page-content"> </div>
<p><?php _e( 'It looks like nothing was found at this location. Maybe try a search?', 'twentysixteen' ); ?></p> </div><!-- .page-header -->
</header>
<?php get_search_form(); ?>
</div><!-- .page-content -->
</section><!-- .error-404 --> </section><!-- .error-404 -->
</main><!-- .site-main --> </main><!-- .site-main -->

View file

@ -21,59 +21,40 @@ if ( post_password_required() ) {
?> ?>
<div id="comments" class="comments-area"> <div id="comments" class="comments-area">
<div class="row">
<div class="col-7" id="comments-list">
<h3 id="comments-list-title">Comments</h3>
<?php if ( have_comments() ) : ?>
<?php the_comments_navigation(); ?>
<?php if ( have_comments() ) : ?> <ol class="comment-list">
<h4 class="comments-title"> <?php
wp_list_comments( array(
'style' => 'ol',
'short_ping' => true,
'avatar_size' => 42,
) );
?>
</ol><!-- .comment-list -->
<?php the_comments_navigation(); ?>
<?php else: ?>
<p id="no-comments">No comments yet.</p>
<?php endif; ?>
<?php <?php
$comments_number = get_comments_number(); // If comments are closed and there are comments, let's leave a little note, shall we?
if ( 1 === $comments_number ) { if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
/* translators: %s: post title */
printf( _x( 'One thought on &ldquo;%s&rdquo;', 'comments title', 'twentysixteen' ), get_the_title() );
} else {
printf(
/* translators: 1: number of comments, 2: post title */
_nx(
'%1$s thought on &ldquo;%2$s&rdquo;',
'%1$s thoughts on &ldquo;%2$s&rdquo;',
$comments_number,
'comments title',
'twentysixteen'
),
number_format_i18n( $comments_number ),
get_the_title()
);
}
?> ?>
</h4> <p class="no-comments"><?php _e( 'Comments are closed.', 'twentysixteen' ); ?></p>
<?php endif; ?>
<?php the_comments_navigation(); ?> </div>
<div class="col-5" id="comments-reply">
<ol class="comment-list">
<?php <?php
wp_list_comments( array( comment_form( array(
'style' => 'ol', 'title_reply_before' => '<h3 id="comments-reply-title">',
'short_ping' => true, 'title_reply_after' => '</h3>',
'avatar_size' => 42,
) ); ) );
?> ?>
</ol><!-- .comment-list --> </div>
</div>
<?php the_comments_navigation(); ?>
<?php endif; // Check for have_comments(). ?>
<?php
// If comments are closed and there are comments, let's leave a little note, shall we?
if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
?>
<p class="no-comments"><?php _e( 'Comments are closed.', 'twentysixteen' ); ?></p>
<?php endif; ?>
<?php
comment_form( array(
'title_reply_before' => '<h4 id="reply-title" class="comment-reply-title wip">',
'title_reply_after' => '</h4>',
) );
?>
</div><!-- .comments-area --> </div><!-- .comments-area -->

View file

@ -42,6 +42,16 @@
</div><!-- .site-inner --> </div><!-- .site-inner -->
</div><!-- .site --> </div><!-- .site -->
<script type="text/javascript">
// Displays and hides the top header bar on page scroll.
jQuery(document).ready(function($) {
$(window).on("scroll", function() {
var fromTop = $(window).scrollTop();
$('#header-bar').toggleClass("show", (fromTop > 200));
});
});
</script>
<?php wp_footer(); ?> <?php wp_footer(); ?>
</body> </body>
</html> </html>

View file

@ -1,116 +0,0 @@
<!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js">
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<?php if ( is_singular() && pings_open( get_queried_object() ) ) : ?>
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php endif; ?>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="content" class="site-content">
<main id="main wrapper" class="site-main wrapper-home" role="main">
<header class="row" id="header-row">
<div class="col-m-3">
<div id="frontpage-img-wrapper">
<img id="frontpage-img" src="http://www.bengoldsworthy.uk/wp-content/uploads/2016/09/mebg.png" alt="A picture of Ben Goldsworthy">
</div>
</div>
<div class="page-header col-m-9 col-w-6">
<h1 id="website-title">Ben Goldsworthy</h1>
<h2 id="page-subtitle">
~ <a href="mailto:bgoldsworthy96@gmail.com"><i class="fa fa-envelope"></i></a> ~
<a href="bitcoin:1HApEg2robrRCx4rTKKeFj25unoaX65QUc"><i class="fa fa-btc"></i></a> ~
<a href="https://uk.linkedin.com/in/rumperuu"><i class="fa fa-linkedin"></i></a> ~
<a href="https://github.com/Rumperuu"><i class="fa fa-github"></i></a> ~
<i class="fa fa-key"></i> 7FDCE988 ~
</h2>
</div>
</header>
<div class="row" id="personal-row">
<div class="col-12">
<h3 class="frontpage-section-title col-12">Personal</h3>
<ul>
<li class="col-m-6 col-1"><a id="blog" class="hyperlink-button" href="blog">Blog</a></li>
<li class="col-m-6 col-1"><a id="wishlist" class="hyperlink-button" href="wishlist">Wishlist</a></li>
</ul>
</div>
</div>
<div class="row" id="portfolios-row">
<div class="col-12">
<h3 class="frontpage-section-title col-12">Portfolios</h3>
<ul>
<?php
$portfolios = array("website", "program", "writing", "video", "other");
$num = 2;
$args = array(
'public' => true,
'_builtin' => false
);
foreach (get_post_types($args, 'objects', 'and') as $post_type) {
if (in_array($post_type->name, $portfolios)) {
$num = array_search($post_type->name, $portfolios);
$buttons[$post_type->name] = "<li class=\"col-m-6 col-2\"><a id=\"".($post_type->name)."\" class=\"hyperlink-button\" href=\"".($post_type->name)."\">".($post_type->labels->name)."</a></li>";
}
}
foreach ($portfolios as $portfolio) {
echo $buttons[$portfolio];
}
?>
</ul>
</div>
</div>
<div class="row" id="experience-row">
<div class="col-12">
<h3 class="frontpage-section-title col-12">Experience</h3>
<ul>
<div class="col-m-6 col-2 col-w-1">
<li><a id="all" class="hyperlink-button" href="experience">All (WIP)</a></li>
</div>
<div class="col-m-6 col-2">
<li><a id="company" class="hyperlink-button" href="experience-by-companies">by Company (WIP)</a></li>
</div>
<div class="col-m-6 col-2">
<li><a id="country" class="hyperlink-button" href="experience-by-countries">by Country (WIP)</a></li>
</div>
<div class="col-m-6 col-2">
<li><a id="sector" class="hyperlink-button" href="experience-by-sector">by Sector (WIP)</a></li>
</div>
</ul>
</div>
</div>
<div class="row" id="others-row">
<div class="col-12">
<ul>
<div class="col-m-6 col-2">
<li><a id="certifications" class="hyperlink-button" href="qualification">Qualifications (WIP)</a></li>
</div>
<div class="col-m-6 col-2">
<li><a id="awards" class="hyperlink-button" href="award">Awards (WIP)</a></li>
</div>
</ul>
</div>
</div>
<!--
<div class="row" id="social-cataloguing-row">
<div class="icons-wrapper col-12 col-m-12">
<ul>
<li><a href="https://www.goodreads.com/Rumperuu"><div class="icon" style="background-image: url('http://www.bengoldsworthy.uk/wp-content/uploads/2016/09/gr.png');"></div></a></li>
<li><a href="http://letterboxd.com/Rumperuu/"><div class="icon" style="background-image: url('http://www.bengoldsworthy.uk/wp-content/uploads/2016/09/lb.png');"></div></a></li>
<li><a href="https://www.grouvee.com/user/Rumperuu/"><div class="icon" style="background-image: url('http://www.bengoldsworthy.uk/wp-content/uploads/2016/09/gv.png');"></div></a></li>
<li><a href="http://www.last.fm/user/Rumperuu"><div class="icon" style="background-image: url('http://www.bengoldsworthy.uk/wp-content/uploads/2016/09/lfm.png');"></div></a></li>
<li><a href="http://followmy.tv/u/Rumperuu"><div class="icon" style="background-image: url('http://www.bengoldsworthy.uk/wp-content/uploads/2016/09/fmtv.png');"></div></a></li>
</ul>
</div>
</div>
-->
</main><!-- .site-main -->
</div><!-- .content-area -->
<?php get_footer(); ?>

View file

@ -1,6 +1,6 @@
<?php <?php
/** /**
* Twenty Sixteen functions and definitions * Omphaloskepsis functions and definitions
* *
* Set up the theme and provides some helper functions, which are used in the * Set up the theme and provides some helper functions, which are used in the
* theme as custom template tags. Others are attached to action and filter * theme as custom template tags. Others are attached to action and filter
@ -21,12 +21,12 @@
* {@link https://codex.wordpress.org/Plugin_API} * {@link https://codex.wordpress.org/Plugin_API}
* *
* @package WordPress * @package WordPress
* @subpackage Twenty_Sixteen * @subpackage omphaloskepsis
* @since Twenty Sixteen 1.0 * @since Omphaloskepsis 1.0
*/ */
/** /**
* Twenty Sixteen only works in WordPress 4.4 or later. * Omphaloskepsis only works in WordPress 4.4 or later.
*/ */
if ( version_compare( $GLOBALS['wp_version'], '4.4-alpha', '<' ) ) { if ( version_compare( $GLOBALS['wp_version'], '4.4-alpha', '<' ) ) {
require get_template_directory() . '/inc/back-compat.php'; require get_template_directory() . '/inc/back-compat.php';
@ -36,7 +36,7 @@ global $themecolors;
$themecolors['bg'] = '95b2bf'; $themecolors['bg'] = '95b2bf';
$themecolors['text'] = '2b0000'; $themecolors['text'] = '2b0000';
if ( ! function_exists( 'twentysixteen_setup' ) ) : if ( ! function_exists( 'omphaloskepsis_setup' ) ) :
/** /**
* Sets up theme defaults and registers support for various WordPress features. * Sets up theme defaults and registers support for various WordPress features.
* *
@ -44,18 +44,16 @@ if ( ! function_exists( 'twentysixteen_setup' ) ) :
* runs before the init hook. The init hook is too late for some features, such * runs before the init hook. The init hook is too late for some features, such
* as indicating support for post thumbnails. * as indicating support for post thumbnails.
* *
* Create your own twentysixteen_setup() function to override in a child theme. * @since Omphaloskepsis 1.0
*
* @since Twenty Sixteen 1.0
*/ */
function twentysixteen_setup() { function omphaloskepsis_setup() {
/* /*
* Make theme available for translation. * Make theme available for translation.
* Translations can be filed in the /languages/ directory. * Translations can be filed in the /languages/ directory.
* If you're building a theme based on Twenty Sixteen, use a find and replace * If you're building a theme based on Omphaloskepsis, use a find and replace
* to change 'twentysixteen' to the name of your theme in all the template files * to change 'omphaloskepsis' to the name of your theme in all the template files
*/ */
load_theme_textdomain( 'twentysixteen', get_template_directory() . '/languages' ); load_theme_textdomain( 'omphaloskepsis', get_template_directory() . '/languages' );
// Add default posts and comments RSS feed links to head. // Add default posts and comments RSS feed links to head.
add_theme_support( 'automatic-feed-links' ); add_theme_support( 'automatic-feed-links' );
@ -71,7 +69,7 @@ if ( ! function_exists( 'twentysixteen_setup' ) ) :
/* /*
* Enable support for custom logo. * Enable support for custom logo.
* *
* @since Twenty Sixteen 1.2 * @since Omphaloskepsis 1.2
*/ */
add_theme_support( 'custom-logo', array( add_theme_support( 'custom-logo', array(
'height' => 240, 'height' => 240,
@ -89,23 +87,23 @@ if ( ! function_exists( 'twentysixteen_setup' ) ) :
// This theme uses wp_nav_menu() in two locations. // This theme uses wp_nav_menu() in two locations.
register_nav_menus( array( register_nav_menus( array(
'primary' => __( 'Primary Menu', 'twentysixteen' ), 'primary' => __( 'Primary Menu', 'omphaloskepsis' ),
'social' => __( 'Social Links Menu', 'twentysixteen' ), 'social' => __( 'Social Links Menu', 'omphaloskepsis' ),
) ); ) );
function bengoldsworthy_infinite_scroll_init() { function omphaloskepsis_infinite_scroll_init() {
add_theme_support( 'infinite-scroll', array( add_theme_support( 'infinite-scroll', array(
'container' => 'main', 'container' => 'main',
'render' => 'bengoldsworthy_infinite_scroll_render', 'render' => 'omphaloskepsis_infinite_scroll_render',
'footer' => 'colophon', 'footer' => 'colophon',
) ); ) );
} }
add_action( 'init', 'bengoldsworthy_infinite_scroll_init' ); add_action( 'init', 'omphaloskepsis_infinite_scroll_init' );
/** /**
* Custom render function for Infinite Scroll. * Custom render function for Infinite Scroll.
*/ */
function bengoldsworthy_infinite_scroll_render() { function omphaloskepsis_infinite_scroll_render() {
while ( have_posts() ) { while ( have_posts() ) {
the_post(); the_post();
if ( is_search() ) { if ( is_search() ) {
@ -149,13 +147,13 @@ function bengoldsworthy_infinite_scroll_render() {
* This theme styles the visual editor to resemble the theme style, * This theme styles the visual editor to resemble the theme style,
* specifically font, colors, icons, and column width. * specifically font, colors, icons, and column width.
*/ */
add_editor_style( array( 'css/editor-style.css', twentysixteen_fonts_url() ) ); add_editor_style( array( 'css/editor-style.css', omphaloskepsis_fonts_url() ) );
// Indicate widget sidebars can use selective refresh in the Customizer. // Indicate widget sidebars can use selective refresh in the Customizer.
add_theme_support( 'customize-selective-refresh-widgets' ); add_theme_support( 'customize-selective-refresh-widgets' );
} }
endif; // twentysixteen_setup endif; // omphaloskepsis_setup
add_action( 'after_setup_theme', 'twentysixteen_setup' ); add_action( 'after_setup_theme', 'omphaloskepsis_setup' );
/** /**
* Sets the content width in pixels, based on the theme's design and stylesheet. * Sets the content width in pixels, based on the theme's design and stylesheet.
@ -164,25 +162,25 @@ add_action( 'after_setup_theme', 'twentysixteen_setup' );
* *
* @global int $content_width * @global int $content_width
* *
* @since Twenty Sixteen 1.0 * @since Omphaloskepsis 1.0
*/ */
function twentysixteen_content_width() { function omphaloskepsis_content_width() {
$GLOBALS['content_width'] = apply_filters( 'twentysixteen_content_width', 840 ); $GLOBALS['content_width'] = apply_filters( 'omphaloskepsis_content_width', 840 );
} }
add_action( 'after_setup_theme', 'twentysixteen_content_width', 0 ); add_action( 'after_setup_theme', 'omphaloskepsis_content_width', 0 );
/** /**
* Registers a widget area. * Registers a widget area.
* *
* @link https://developer.wordpress.org/reference/functions/register_sidebar/ * @link https://developer.wordpress.org/reference/functions/register_sidebar/
* *
* @since Twenty Sixteen 1.0 * @since Omphaloskepsis 1.0
*/ */
function twentysixteen_widgets_init() { function omphaloskepsis_widgets_init() {
register_sidebar( array( register_sidebar( array(
'name' => __( 'Sidebar', 'twentysixteen' ), 'name' => __( 'Sidebar', 'omphaloskepsis' ),
'id' => 'sidebar-1', 'id' => 'sidebar-1',
'description' => __( 'Add widgets here to appear in your sidebar.', 'twentysixteen' ), 'description' => __( 'Add widgets here to appear in your sidebar.', 'omphaloskepsis' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">', 'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>', 'after_widget' => '</section>',
'before_title' => '<h2 class="widget-title">', 'before_title' => '<h2 class="widget-title">',
@ -190,9 +188,9 @@ function twentysixteen_widgets_init() {
) ); ) );
register_sidebar( array( register_sidebar( array(
'name' => __( 'Content Bottom 1', 'twentysixteen' ), 'name' => __( 'Content Bottom 1', 'omphaloskepsis' ),
'id' => 'sidebar-2', 'id' => 'sidebar-2',
'description' => __( 'Appears at the bottom of the content on posts and pages.', 'twentysixteen' ), 'description' => __( 'Appears at the bottom of the content on posts and pages.', 'omphaloskepsis' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">', 'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>', 'after_widget' => '</section>',
'before_title' => '<h2 class="widget-title">', 'before_title' => '<h2 class="widget-title">',
@ -200,44 +198,44 @@ function twentysixteen_widgets_init() {
) ); ) );
register_sidebar( array( register_sidebar( array(
'name' => __( 'Content Bottom 2', 'twentysixteen' ), 'name' => __( 'Content Bottom 2', 'omphaloskepsis' ),
'id' => 'sidebar-3', 'id' => 'sidebar-3',
'description' => __( 'Appears at the bottom of the content on posts and pages.', 'twentysixteen' ), 'description' => __( 'Appears at the bottom of the content on posts and pages.', 'omphaloskepsis' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">', 'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>', 'after_widget' => '</section>',
'before_title' => '<h2 class="widget-title">', 'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>', 'after_title' => '</h2>',
) ); ) );
} }
add_action( 'widgets_init', 'twentysixteen_widgets_init' ); add_action( 'widgets_init', 'omphaloskepsis_widgets_init' );
if ( ! function_exists( 'twentysixteen_fonts_url' ) ) : if ( ! function_exists( 'omphaloskepsis_fonts_url' ) ) :
/** /**
* Register Google fonts for Twenty Sixteen. * Register Google fonts for Omphaloskepsis.
* *
* Create your own twentysixteen_fonts_url() function to override in a child theme. * Create your own omphaloskepsis_fonts_url() function to override in a child theme.
* *
* @since Twenty Sixteen 1.0 * @since Omphaloskepsis 1.0
* *
* @return string Google fonts URL for the theme. * @return string Google fonts URL for the theme.
*/ */
function twentysixteen_fonts_url() { function omphaloskepsis_fonts_url() {
$fonts_url = ''; $fonts_url = '';
$fonts = array(); $fonts = array();
$subsets = 'latin,latin-ext'; $subsets = 'latin,latin-ext';
/* translators: If there are characters in your language that are not supported by Merriweather, translate this to 'off'. Do not translate into your own language. */ /* translators: If there are characters in your language that are not supported by Merriweather, translate this to 'off'. Do not translate into your own language. */
if ( 'off' !== _x( 'on', 'Merriweather font: on or off', 'twentysixteen' ) ) { if ( 'off' !== _x( 'on', 'Merriweather font: on or off', 'omphaloskepsis' ) ) {
$fonts[] = 'Merriweather:400,700,900,400italic,700italic,900italic'; $fonts[] = 'Merriweather:400,700,900,400italic,700italic,900italic';
} }
/* translators: If there are characters in your language that are not supported by Montserrat, translate this to 'off'. Do not translate into your own language. */ /* translators: If there are characters in your language that are not supported by Montserrat, translate this to 'off'. Do not translate into your own language. */
if ( 'off' !== _x( 'on', 'Montserrat font: on or off', 'twentysixteen' ) ) { if ( 'off' !== _x( 'on', 'Montserrat font: on or off', 'omphaloskepsis' ) ) {
$fonts[] = 'Montserrat:400,700'; $fonts[] = 'Montserrat:400,700';
} }
/* translators: If there are characters in your language that are not supported by Inconsolata, translate this to 'off'. Do not translate into your own language. */ /* translators: If there are characters in your language that are not supported by Inconsolata, translate this to 'off'. Do not translate into your own language. */
if ( 'off' !== _x( 'on', 'Inconsolata font: on or off', 'twentysixteen' ) ) { if ( 'off' !== _x( 'on', 'Inconsolata font: on or off', 'omphaloskepsis' ) ) {
$fonts[] = 'Inconsolata:400'; $fonts[] = 'Inconsolata:400';
} }
@ -257,80 +255,80 @@ endif;
* *
* Adds a `js` class to the root `<html>` element when JavaScript is detected. * Adds a `js` class to the root `<html>` element when JavaScript is detected.
* *
* @since Twenty Sixteen 1.0 * @since Omphaloskepsis 1.0
*/ */
function twentysixteen_javascript_detection() { function omphaloskepsis_javascript_detection() {
echo "<script>(function(html){html.className = html.className.replace(/\bno-js\b/,'js')})(document.documentElement);</script>\n"; echo "<script>(function(html){html.className = html.className.replace(/\bno-js\b/,'js')})(document.documentElement);</script>\n";
} }
add_action( 'wp_head', 'twentysixteen_javascript_detection', 0 ); add_action( 'wp_head', 'omphaloskepsis_javascript_detection', 0 );
/** /**
* Enqueues scripts and styles. * Enqueues scripts and styles.
* *
* @since Twenty Sixteen 1.0 * @since Omphaloskepsis 1.0
*/ */
function twentysixteen_scripts() { function omphaloskepsis_scripts() {
// Load the normalisation stylesheet. // Load the normalisation stylesheet.
wp_enqueue_style( 'twentysixteen-reset', get_template_directory_uri() . '/css/reset.css', array( ), null ); wp_enqueue_style( 'omphaloskepsis-reset', get_template_directory_uri() . '/css/reset.css', array( ), null );
wp_style_add_data( 'twentysixteen-ie', 'conditional', 'lt IE 10' ); wp_style_add_data( 'omphaloskepsis-ie', 'conditional', 'lt IE 10' );
// Add custom fonts, used in the main stylesheet. // Add custom fonts, used in the main stylesheet.
wp_enqueue_style( 'twentysixteen-fonts', twentysixteen_fonts_url(), array(), null ); wp_enqueue_style( 'omphaloskepsis-fonts', omphaloskepsis_fonts_url(), array(), null );
// Add Genericons, used in the main stylesheet. // Add Genericons, used in the main stylesheet.
wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.4.1' ); wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.4.1' );
// Theme stylesheet. // Theme stylesheet.
wp_enqueue_style( 'twentysixteen-style', get_stylesheet_uri() ); wp_enqueue_style( 'omphaloskepsis-style', get_stylesheet_uri() );
wp_enqueue_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css'); wp_enqueue_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css');
wp_enqueue_style( 'montserrat', "https://fonts.googleapis.com/css?family=Montserrat" ); wp_enqueue_style( 'montserrat', "https://fonts.googleapis.com/css?family=Montserrat" );
// Load the Internet Explorer specific stylesheet. // Load the Internet Explorer specific stylesheet.
wp_enqueue_style( 'twentysixteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentysixteen-style' ), '20160412' ); wp_enqueue_style( 'omphaloskepsis-ie', get_template_directory_uri() . '/css/ie.css', array( 'omphaloskepsis-style' ), '20160412' );
wp_style_add_data( 'twentysixteen-ie', 'conditional', 'lt IE 10' ); wp_style_add_data( 'omphaloskepsis-ie', 'conditional', 'lt IE 10' );
// Load the Internet Explorer 8 specific stylesheet. // Load the Internet Explorer 8 specific stylesheet.
wp_enqueue_style( 'twentysixteen-ie8', get_template_directory_uri() . '/css/ie8.css', array( 'twentysixteen-style' ), '20160412' ); wp_enqueue_style( 'omphaloskepsis-ie8', get_template_directory_uri() . '/css/ie8.css', array( 'omphaloskepsis-style' ), '20160412' );
wp_style_add_data( 'twentysixteen-ie8', 'conditional', 'lt IE 9' ); wp_style_add_data( 'omphaloskepsis-ie8', 'conditional', 'lt IE 9' );
// Load the Internet Explorer 7 specific stylesheet. // Load the Internet Explorer 7 specific stylesheet.
wp_enqueue_style( 'twentysixteen-ie7', get_template_directory_uri() . '/css/ie7.css', array( 'twentysixteen-style' ), '20160412' ); wp_enqueue_style( 'omphaloskepsis-ie7', get_template_directory_uri() . '/css/ie7.css', array( 'omphaloskepsis-style' ), '20160412' );
wp_style_add_data( 'twentysixteen-ie7', 'conditional', 'lt IE 8' ); wp_style_add_data( 'omphaloskepsis-ie7', 'conditional', 'lt IE 8' );
// Load the html5 shiv. // Load the html5 shiv.
wp_enqueue_script( 'twentysixteen-html5', get_template_directory_uri() . '/js/html5.js', array(), '3.7.3' ); wp_enqueue_script( 'omphaloskepsis-html5', get_template_directory_uri() . '/js/html5.js', array(), '3.7.3' );
wp_script_add_data( 'twentysixteen-html5', 'conditional', 'lt IE 9' ); wp_script_add_data( 'omphaloskepsis-html5', 'conditional', 'lt IE 9' );
wp_enqueue_script( 'twentysixteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20160412', true ); wp_enqueue_script( 'omphaloskepsis-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20160412', true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' ); wp_enqueue_script( 'comment-reply' );
} }
if ( is_singular() && wp_attachment_is_image() ) { if ( is_singular() && wp_attachment_is_image() ) {
wp_enqueue_script( 'twentysixteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20160412' ); wp_enqueue_script( 'omphaloskepsis-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20160412' );
} }
wp_enqueue_script( 'twentysixteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20160412', true ); wp_enqueue_script( 'omphaloskepsis-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20160412', true );
wp_localize_script( 'twentysixteen-script', 'screenReaderText', array( wp_localize_script( 'omphaloskepsis-script', 'screenReaderText', array(
'expand' => __( 'expand child menu', 'twentysixteen' ), 'expand' => __( 'expand child menu', 'omphaloskepsis' ),
'collapse' => __( 'collapse child menu', 'twentysixteen' ), 'collapse' => __( 'collapse child menu', 'omphaloskepsis' ),
) ); ) );
} }
add_action( 'wp_enqueue_scripts', 'twentysixteen_scripts' ); add_action( 'wp_enqueue_scripts', 'omphaloskepsis_scripts' );
/** /**
* Adds custom classes to the array of body classes. * Adds custom classes to the array of body classes.
* *
* @since Twenty Sixteen 1.0 * @since Omphaloskepsis 1.0
* *
* @param array $classes Classes for the body element. * @param array $classes Classes for the body element.
* @return array (Maybe) filtered body classes. * @return array (Maybe) filtered body classes.
*/ */
function twentysixteen_body_classes( $classes ) { function omphaloskepsis_body_classes( $classes ) {
// Adds a class of custom-background-image to sites with a custom background image. // Adds a class of custom-background-image to sites with a custom background image.
if ( get_background_image() ) { if ( get_background_image() ) {
$classes[] = 'custom-background-image'; $classes[] = 'custom-background-image';
@ -353,18 +351,18 @@ function twentysixteen_body_classes( $classes ) {
return $classes; return $classes;
} }
add_filter( 'body_class', 'twentysixteen_body_classes' ); add_filter( 'body_class', 'omphaloskepsis_body_classes' );
/** /**
* Converts a HEX value to RGB. * Converts a HEX value to RGB.
* *
* @since Twenty Sixteen 1.0 * @since Omphaloskepsis 1.0
* *
* @param string $color The original color, in 3- or 6-digit hexadecimal form. * @param string $color The original color, in 3- or 6-digit hexadecimal form.
* @return array Array containing RGB (red, green, and blue) values for the given * @return array Array containing RGB (red, green, and blue) values for the given
* HEX code, empty array otherwise. * HEX code, empty array otherwise.
*/ */
function twentysixteen_hex2rgb( $color ) { function omphaloskepsis_hex2rgb( $color ) {
$color = trim( $color, '#' ); $color = trim( $color, '#' );
if ( strlen( $color ) === 3 ) { if ( strlen( $color ) === 3 ) {
@ -396,14 +394,14 @@ require get_template_directory() . '/inc/customizer.php';
* Add custom image sizes attribute to enhance responsive image functionality * Add custom image sizes attribute to enhance responsive image functionality
* for content images * for content images
* *
* @since Twenty Sixteen 1.0 * @since Omphaloskepsis 1.0
* *
* @param string $sizes A source size value for use in a 'sizes' attribute. * @param string $sizes A source size value for use in a 'sizes' attribute.
* @param array $size Image size. Accepts an array of width and height * @param array $size Image size. Accepts an array of width and height
* values in pixels (in that order). * values in pixels (in that order).
* @return string A source size value for use in a content image 'sizes' attribute. * @return string A source size value for use in a content image 'sizes' attribute.
*/ */
function twentysixteen_content_image_sizes_attr( $sizes, $size ) { function omphaloskepsis_content_image_sizes_attr( $sizes, $size ) {
$width = $size[0]; $width = $size[0];
840 <= $width && $sizes = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px'; 840 <= $width && $sizes = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px';
@ -417,40 +415,165 @@ function twentysixteen_content_image_sizes_attr( $sizes, $size ) {
return $sizes; return $sizes;
} }
add_filter( 'wp_calculate_image_sizes', 'twentysixteen_content_image_sizes_attr', 10 , 2 ); add_filter( 'wp_calculate_image_sizes', 'omphaloskepsis_content_image_sizes_attr', 10 , 2 );
/** /**
* Add custom image sizes attribute to enhance responsive image functionality * Add custom image sizes attribute to enhance responsive image functionality
* for post thumbnails * for post thumbnails
* *
* @since Twenty Sixteen 1.0 * @since Omphaloskepsis 1.0
* *
* @param array $attr Attributes for the image markup. * @param array $attr Attributes for the image markup.
* @param int $attachment Image attachment ID. * @param int $attachment Image attachment ID.
* @param array $size Registered image size or flat array of height and width dimensions. * @param array $size Registered image size or flat array of height and width dimensions.
* @return string A source size value for use in a post thumbnail 'sizes' attribute. * @return string A source size value for use in a post thumbnail 'sizes' attribute.
*/ */
function twentysixteen_post_thumbnail_sizes_attr( $attr, $attachment, $size ) { function omphaloskepsis_post_thumbnail_sizes_attr( $attr, $attachment, $size ) {
if ( 'post-thumbnail' === $size ) { if ( 'post-thumbnail' === $size ) {
is_active_sidebar( 'sidebar-1' ) && $attr['sizes'] = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 60vw, (max-width: 1362px) 62vw, 840px'; is_active_sidebar( 'sidebar-1' ) && $attr['sizes'] = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 60vw, (max-width: 1362px) 62vw, 840px';
! is_active_sidebar( 'sidebar-1' ) && $attr['sizes'] = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 88vw, 1200px'; ! is_active_sidebar( 'sidebar-1' ) && $attr['sizes'] = '(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 88vw, 1200px';
} }
return $attr; return $attr;
} }
add_filter( 'wp_get_attachment_image_attributes', 'twentysixteen_post_thumbnail_sizes_attr', 10 , 3 ); add_filter( 'wp_get_attachment_image_attributes', 'omphaloskepsis_post_thumbnail_sizes_attr', 10 , 3 );
/** /**
* Modifies tag cloud widget arguments to have all tags in the widget same font size. * Modifies tag cloud widget arguments to have all tags in the widget same font size.
* *
* @since Twenty Sixteen 1.1 * @since Omphaloskepsis 1.1
* *
* @param array $args Arguments for tag cloud widget. * @param array $args Arguments for tag cloud widget.
* @return array A new modified arguments. * @return array A new modified arguments.
*/ */
function twentysixteen_widget_tag_cloud_args( $args ) { function omphaloskepsis_widget_tag_cloud_args( $args ) {
$args['largest'] = 1; $args['largest'] = 1;
$args['smallest'] = 1; $args['smallest'] = 1;
$args['unit'] = 'em'; $args['unit'] = 'em';
return $args; return $args;
} }
add_filter( 'widget_tag_cloud_args', 'twentysixteen_widget_tag_cloud_args' ); add_filter( 'widget_tag_cloud_args', 'omphaloskepsis_widget_tag_cloud_args' );
//
function omphaloskepsis_the_content($content) {
global $post;
if ($post->post_type == "program") {
$links = '<h2 class="subheading">Links</h2>';
if ($meta = get_post_meta($post->ID, 'Link', true))
$links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Download</a>';
if ($meta = get_post_meta($post->ID, 'Documentation', true))
$links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Documentation</a>';
if ($meta = get_post_meta($post->ID, 'Repo', true))
$links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Repo</a>';
if ($meta = get_post_meta($post->ID, 'Licence', true))
$links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Licence</a>';
if ($meta = get_post_meta($post->ID, 'MD5', true))
$links = $links . '<p class="checksum">MD5 checksum: '.$meta.'</p>';
return $content . $links;
} elseif ($post->post_type == "website") {
$links = '<h2 class="subheading">Links</h2>';
if ($meta = get_post_meta($post->ID, 'Link', true))
$links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Visit</a>';
if ($meta = get_post_meta($post->ID, 'Repo', true))
$links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Repo</a>';
if ($meta = get_post_meta($post->ID, 'Licence', true))
$links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Licence</a>';
return '<h2 class="subheading">Summary</h2>' . $content . $links;
} elseif ($post->post_type == "writing") {
$links = '<h2 class="subheading">Links</h2>';
if ($meta = get_post_meta($post->ID, 'Link', true))
$links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Read</a>';
if ($meta = get_post_meta($post->ID, 'Licence', true))
$links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Licence</a>';
return '<h2 class="subheading">Summary</h2>' . $content . $links;
} elseif ($post->post_type == "other") {
$links = '<h2 class="subheading">Links</h2>';
if ($meta = get_post_meta($post->ID, 'Link', true))
$links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Download</a>';
return '<h2 class="subheading">Summary</h2>' . $content . $links;
}
return $content;
}
add_filter('the_content', 'omphaloskepsis_the_content', 10);
function display_companies() {
echo "<ul>";
if ($_POST['toplevel'] == "true") {
// Gets all of the top-level company terms.
$terms = apply_filters("taxonomy-images-get-terms", "", array('having_images' => false, 'taxonomy' => 'company', 'term_args' => array('parent' => 0)));
} else {
// Gets all of the company terms.
$terms = apply_filters("taxonomy-images-get-terms", "", array('having_images' => false, 'taxonomy' => 'company',));
}
if(!empty($terms)) {
foreach($terms as $term) {
$term_children = get_term_children($term->term_id, "company");
// 0 = Jobs
// 1 = Websites
// 2 = Programs
// 3 = Writings
// 4 = Videos
// 5 = Others
// 6 = Qualifications
// 7 = Awards
$post_types = array('job', 'post', 'website', 'program', 'writing', 'video', 'other', 'qualification', 'award');
$dashicons = array('hammer', 'admin-post', 'schedule', 'desktop', 'format-aside', 'video-alt', 'archive', 'id', 'awards');
$term_items = array();
$term_item_counts = array();
foreach ($post_types as $post_type) {
$posts = get_posts(array( 'posts_per_page' => -1, 'post_type' => $post_type, 'tax_query' => array(array('taxonomy' => 'company', 'field' => 'slug', 'terms' => $term->slug))));
array_push($term_items, $posts);
array_push($term_item_counts, count($posts));
}
if(($_POST['job'] == "true" && $term_item_counts[0] > 0) ||
($_POST['website'] == "true" && $term_item_counts[1] > 0) ||
($_POST['program'] == "true" && $term_item_counts[2] > 0) ||
($_POST['writing'] == "true" && $term_item_counts[3] > 0) ||
($_POST['video'] == "true" && $term_item_counts[4] > 0) ||
($_POST['other'] == "true" && $term_item_counts[5] > 0) ||
($_POST['qualification'] == "true" && $term_item_counts[6] > 0) ||
($_POST['award'] == "true" && $term_item_counts[7] > 0)) {
$imgURL = wp_get_attachment_image_src($term->image_id, 'full')[0];
$bgImg = (!$imgURL) ? "" : " background-image: url(".strtok($imgURL, '?').");";
$colour = get_term_meta($term->term_id, 'color', true);
$colour = ($colour != "") ? $colour : "var(--light)";
echo '<a href="'.esc_url(get_term_link($term, $term->taxonomy)).'">';
echo '<li class="col-2 col-m-4" style="background-color: '.$colour.'; '.$bgImg.'">';
echo '<div class="company-info-container left">';
if (count($term_children) > 0) {
echo '<div class="company-info children">';
echo count($term_children).'<br><span class="dashicons dashicons-groups"></span>';
echo '</div>';
}
echo '</div>';
echo '<div class="company-info-container right">';
$i = 0;
foreach ($post_types as $post_type) {
if ($_POST[$post_type] == "true") {
echo '<div class="company-info jobs">';
echo $term_item_counts[$i].'<span class="dashicons dashicons-'.$dashicons[$i].'"></span>';
echo '</div>';
}
$i++;
}
echo '</div>';
if (!$imgURL) echo '<p class="company-name">'.$term->name.'</p>';
echo '</li>';
echo '</a>';
}
}
} else {
echo '<p>No companies found</p>';
}
echo '</ul>';
die();
}
add_action('wp_ajax_display_companies', 'display_companies');
add_action('wp_ajax_display_companies', 'display_companies');

View file

@ -25,3 +25,19 @@
<div id="page" class="site"> <div id="page" class="site">
<div class="site-inner"> <div class="site-inner">
<div id="content" class="site-content"> <div id="content" class="site-content">
<?php if (!is_front_page()): ?>
<div id="header-bar">
<ul id="header-bar-list">
<li><a href="/"><h1 id="header-bar-title">bengoldsworthy.uk</h1></a></li>
<li><a href="/blog" class="hyperlink-button thin">Blog</a></li>
<li style="line-height: 40px;">|</li>
<li><a href="/website" class="hyperlink-button thin">Websites</a></li>
<li><a href="/program" class="hyperlink-button thin">Programs</a></li>
<li><a href="/writing" class="hyperlink-button thin">Writings</a></li>
<li><a href="/video" class="hyperlink-button thin">Video</a></li>
<li><a href="/other" class="hyperlink-button thin">Other</a></li>
<li style="line-height: 40px;">|</li>
<li><a href="/experience" class="hyperlink-button thin">Experience</a></li>
</ul>
</div>
<?php endif; ?>

View file

@ -13,21 +13,7 @@
* @subpackage Omphaloskepsis * @subpackage Omphaloskepsis
* @since Omphaloskepsis 1.0 * @since Omphaloskepsis 1.0
*/ */
?> get_header(); ?>
<!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js">
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<?php if ( is_singular() && pings_open( get_queried_object() ) ) : ?>
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php endif; ?>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="content" class="site-content">
<header class="page-header"> <header class="page-header">
<h1 id="page-title">Blog</h1> <h1 id="page-title">Blog</h1>
</header> </header>

1315
js/markerclusterer.js Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,65 +1 @@
<?php <?php /* * Template Name: Experience by Companies */ /** * * * The template for displaying all single posts and attachments * * @package WordPress * @subpackage Twenty_Sixteen * @since Twenty Sixteen 1.0 */ get_header(); ?> <!--Page Title & Details--> <div class="post-header-title"> <h1 id="page-title">Experience</h1> <h2 id="page-subtitle">by company</h2> <?php while (have_posts()) : the_post(); ?> <div class="entry-content tile" id="taxonomy-description"> <?php the_content() ?> </div> <div class="entry-content tile" id="settings"> <h3 class="subheading">Settings</h3> <form action="/experience-by-companies" id="settings" method="GET"> <input class="checkbox" type="checkbox" id="toplevel" value="toplevel" checked="checked"> <label for="toplevel">Display only top-level companies</label> <br> <fieldset> <legend>Display companies with:</legend> <div class="controlgroup" id="typestodisplay"> <label for="jobs">Jobs <span class="dashicons dashicons-hammer"></span></label> <input type="checkbox" name="jobs" id="jobs" checked="checked"> <label for="posts">Blog Posts <span class="dashicons dashicons-admin-post"></span></label> <input type="checkbox" name="posts" id="posts"> <br><br><br> <label for="websites">Websites <span class="dashicons dashicons-schedule"></span></label> <input type="checkbox" name="websites" id="websites"> <label for="programs">Programs <span class="dashicons dashicons-desktop"></span></label> <input type="checkbox" name="programs" id="programs"> <label for="writings">Writings <span class="dashicons dashicons-format-aside"></span></label> <input type="checkbox" name="writings" id="writings"> <label for="videos">Videos <span class="dashicons dashicons-video-alt"></span></label> <input type="checkbox" name="videos" id="videos"> <label for="other">Other <span class="dashicons dashicons-archive"></span></label> <input type="checkbox" name="other" id="other"> <br><br><br> <label for="qualifications">Qualifications <span class="dashicons dashicons-id"></span></label> <input type="checkbox" name="qualifications" id="qualifications"> <label for="awards">Awards <span class="dashicons dashicons-awards"></span></label> <input type="checkbox" name="awards" id="awards"> </div> </fieldset> <br> <input class="ui-button ui-widget ui-corner-all" id="refresh" type="submit" value="Refresh"> </form> </div> <?php endwhile; ?> </div> <!--Company Grid--> <div class="row" id="companies-grid"> <img class="loading" src="/wp-content/uploads/2016/12/ajax-loader.gif"> </div> <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <script type="text/javascript"> // Populates the companies grid. jQuery(document).ready(function($) { // Sets up jQueryUI elements. $('input:checkbox').checkboxradio(); $('.controlgroup').controlgroup(); $('.refresh').button(); // Displays the initial companies grid. displayCompanies(); $('#refresh').click(function(event) { event.preventDefault(); displayCompanies(); }); function displayCompanies() { $('#companies-grid').html('<img class="loading" src="/wp-content/uploads/2016/12/ajax-loader.gif">'); var settings = { 'action': 'display_companies', 'toplevel': $('#toplevel').is(':checked'), 'job': $('#jobs').is(':checked'), 'post': $('#posts').is(':checked'), 'website': $('#websites').is(':checked'), 'program': $('#programs').is(':checked'), 'writing': $('#writings').is(':checked'), 'video': $('#videos').is(':checked'), 'other': $('#other').is(':checked'), 'qualification': $('#qualifications').is(':checked'), 'award': $('#awards').is(':checked'), }; $.post("/wp-admin/admin-ajax.php", settings, function(response) { $('#companies-grid').html(response); }); } }); </script> <?php //get_sidebar(); ?> <?php get_footer(); ?>
/**
* The template for displaying all single posts and attachments
*
* @package WordPress
* @subpackage Twenty_Sixteen
* @since Twenty Sixteen 1.0
*/
get_header(); ?>
<?php
function withinDates($jSDate, $jEDate) {
$endYear = date( "Y" );
$endDate = $endYear."-12-31";
$startDate = ($endYear - 2)."-01-01";
$jEDate = (!$jEDate) ? date('Y-m-d') : (($jEDate > $endDate) ? $endDate : $jEDate);
return (((strtotime($jSDate) < strtotime($endDate)) && (strtotime($jSDate) > strtotime($startDate))) && (strtotime($jEDate) > strtotime($startDate)));
}
$loop = new WP_Query( $args );
?>
<div class="post-header-title"><h1 id="page-title">Experience</h1><h2 id="page-subtitle">by company</h2></div>
<?php
$terms = apply_filters("taxonomy-images-get-terms", "", array('having_images' => false, 'taxonomy' => 'company', 'term_args' => array('parent' => 0)));
if ( ! empty( $terms ) ) {
echo "<div class=\"row\" id=\"companies-grid\">";
echo "<ul>";
foreach ( (array) $terms as $term ) {
$imgURL = wp_get_attachment_image_src($term->image_id, 'detail')[0];
$colour = get_term_meta($term->term_id, 'color', true);
$colour = ($colour != "") ? $colour : "var(--light)";
if (!$imgURL) {
echo "<a href=\"".esc_url(get_term_link($term, $term->taxonomy ))."\"><li class=\"col-2 col-m-4\" style=\"background-color: ".$colour.";\"><h5>".$term->name."</h5></li></a>";
} else {
echo "<a href=\"".esc_url(get_term_link($term, $term->taxonomy ))."\"><li class=\"col-2 col-m-4\" style=\"background-image: url(".strtok($imgURL, '?')."); background-color: ".$colour.";\"></li></a>";
}
}
echo "</ul>";
echo "</div>";
}
?>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
$(function() {
$( "#slider-range" ).slider({
range: true,
min: 2008,
max: 2016,
values: [ 2014, 2016 ],
slide: function( event, ui ) {
drawChart();
}
});
$( "#amount" ).val( "$" + $( "#slider-range" ).slider( "values", 0 ) +
" - $" + $( "#slider-range" ).slider( "values", 1 ) );
});
</script>
<div id="slider-range"></div>
<?php //get_sidebar(); ?>
<?php get_footer(); ?>

File diff suppressed because one or more lines are too long

View file

@ -1,91 +1 @@
<?php <?php /** * The template for displaying all single posts and attachments * * @package WordPress * @subpackage Twenty_Sixteen * @since Twenty Sixteen 1.0 */ get_header(); ?> <?php function withinDates($jSDate, $jEDate) { $endYear = date( "Y" ); $endDate = $endYear."-12-31"; $startDate = ($endYear - 2)."-01-01"; $jEDate = (!$jEDate) ? date('Y-m-d') : (($jEDate > $endDate) ? $endDate : $jEDate); return (((strtotime($jSDate) < strtotime($endDate)) && (strtotime($jSDate) > strtotime($startDate))) && (strtotime($jEDate) > strtotime($startDate))); } $args= array( 'post_type' => array( 'job' ), 'posts_per_page' => -1 ); $loop = new WP_Query( $args ); ?> <div class="post-header-title"><?php the_title( '<h1 id="page-title">', '</h1>' ); ?></div> <?php/*$terms = apply_filters( 'taxonomy-images-get-terms', '', array('having_images' => false, 'taxonomy' => 'company')); if ( ! empty( $terms ) ) { print '<ul>'; foreach ( (array) $terms as $term ) { print '<li><a href="' . esc_url( get_term_link( $term, $term->taxonomy ) ) . '">' . wp_get_attachment_image( $term->image_id, 'detail' ) . '</li>'; } print '</ul>'; } */?> <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <script> $(function() { $( "#slider-range" ).slider({ range: true, min: 2008, max: 2016, values: [ 2014, 2016 ], slide: function( event, ui ) { drawChart(); } }); $( "#amount" ).val( "$" + $( "#slider-range" ).slider( "values", 0 ) + " - $" + $( "#slider-range" ).slider( "values", 1 ) ); }); </script> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript"> google.charts.load('current', {'packages':['timeline']}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var container = document.getElementById('timeline'); var chart = new google.visualization.Timeline(container); var dataTable = new google.visualization.DataTable(); dataTable.addColumn({ type: 'string', id: 'Type' }); dataTable.addColumn({ type: 'string', id: 'Job Title' }); dataTable.addColumn({ type: 'date', id: 'Start' }); dataTable.addColumn({ type: 'date', id: 'End' }); dataTable.addRows([ <?php while ( $loop->have_posts() ) : $loop->the_post(); if (withinDates(get_the_date(), get_post_meta(get_the_ID(), 'end-date', true))) { $company = wp_get_object_terms(get_the_ID(), 'company', array( 'fields' => 'names' )); $title = html_entity_decode(get_the_title()); $start = get_the_date(); $end = (!get_post_meta(get_the_ID(), 'end-date', true)) ? date('D M d Y H:i:s O') : get_post_meta(get_the_ID(), 'end-date', true); echo "[ 'All', '$title, {$company[0]}', new Date('$start'), new Date('$end') ],\n"; } endwhile; ?> ]); chart.draw(dataTable); } </script> <div id="slider-range"></div> <div id="timeline" style="height: 100vh;"></div> <?php //get_sidebar(); ?> <?php get_footer(); ?>
/**
* The template for displaying all single posts and attachments
*
* @package WordPress
* @subpackage Twenty_Sixteen
* @since Twenty Sixteen 1.0
*/
get_header(); ?>
<?php
function withinDates($jSDate, $jEDate) {
$endYear = date( "Y" );
$endDate = $endYear."-12-31";
$startDate = ($endYear - 2)."-01-01";
$jEDate = (!$jEDate) ? date('Y-m-d') : (($jEDate > $endDate) ? $endDate : $jEDate);
return (((strtotime($jSDate) < strtotime($endDate)) && (strtotime($jSDate) > strtotime($startDate))) && (strtotime($jEDate) > strtotime($startDate)));
}
$args= array(
'post_type' => array( 'job' ),
'posts_per_page' => -1
);
$loop = new WP_Query( $args );
?>
<div class="post-header-title"><?php the_title( '<h1 id="page-title">', '</h1>' ); ?></div>
<?php/*$terms = apply_filters( 'taxonomy-images-get-terms', '', array('having_images' => false, 'taxonomy' => 'company'));
if ( ! empty( $terms ) ) {
print '<ul>';
foreach ( (array) $terms as $term ) {
print '<li><a href="' . esc_url( get_term_link( $term, $term->taxonomy ) ) . '">' . wp_get_attachment_image( $term->image_id, 'detail' ) . '</li>';
}
print '</ul>';
}
*/?>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
$(function() {
$( "#slider-range" ).slider({
range: true,
min: 2008,
max: 2016,
values: [ 2014, 2016 ],
slide: function( event, ui ) {
drawChart();
}
});
$( "#amount" ).val( "$" + $( "#slider-range" ).slider( "values", 0 ) +
" - $" + $( "#slider-range" ).slider( "values", 1 ) );
});
</script>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {'packages':['timeline']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var container = document.getElementById('timeline');
var chart = new google.visualization.Timeline(container);
var dataTable = new google.visualization.DataTable();
dataTable.addColumn({ type: 'string', id: 'Type' });
dataTable.addColumn({ type: 'string', id: 'Job Title' });
dataTable.addColumn({ type: 'date', id: 'Start' });
dataTable.addColumn({ type: 'date', id: 'End' });
dataTable.addRows([
<?php
while ( $loop->have_posts() ) : $loop->the_post();
if (withinDates(get_the_date(), get_post_meta(get_the_ID(), 'end-date', true))) {
$company = wp_get_object_terms(get_the_ID(), 'company', array( 'fields' => 'names' ));
$title = html_entity_decode(get_the_title());
$start = get_the_date();
$end = (!get_post_meta(get_the_ID(), 'end-date', true)) ? date('D M d Y H:i:s O') : get_post_meta(get_the_ID(), 'end-date', true);
echo "[ 'All', '$title, {$company[0]}', new Date('$start'), new Date('$end') ],\n";
}
endwhile;
?>
]);
chart.draw(dataTable);
}
</script>
<div id="slider-range"></div>
<div id="timeline" style="height: 100vh;"></div>
<?php //get_sidebar(); ?>
<?php get_footer(); ?>

59
page-home.php Normal file
View file

@ -0,0 +1,59 @@
<?php
/**
* The template for displaying pages
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages and that
* other "pages" on your WordPress site will use a different template.
*
* @package WordPress
* @subpackage Twenty_Sixteen
* @since Twenty Sixteen 1.0
*/
get_header(); ?>
<div id="content" class="site-content">
<main id="main" class="site-main wrapper-home" role="main">
<img id="main-background" src="<?php the_post_thumbnail_url(); ?>);">
<?php
// Start the loop.
while ( have_posts() ) : the_post();
?>
<header class="row" id="header-row">
<div class="col-m-3">
<div id="frontpage-img-wrapper">
<img id="frontpage-img" src="<?php the_post_thumbnail_url(); ?>" alt="A picture of Ben Goldsworthy">
</div>
</div>
<div class="page-header col-7 col-m-9">
<h1 id="website-title">Ben Goldsworthy</h1>
<h2 id="page-subtitle">
~
<a href="mailto:me@bengoldsworthy.uk"><i class="fa fa-envelope"></i></a> ~
<a href="bitcoin:1HApEg2robrRCx4rTKKeFj25unoaX65QUc"><i class="fa fa-btc"></i></a> ~
<a href="https://uk.linkedin.com/in/rumperuu"><i class="fa fa-linkedin"></i></a> ~
<a href="https://github.com/Rumperuu"><i class="fa fa-github"></i></a> ~
<a href="/pub.asc"><i class="fa fa-key"></i> 30D22F41</a>
~
</h2>
</div>
</header>
<div class="row">
<div class="col-1" style="visibility: hidden;">.</div>
<div class="col-5" id="intro-text">
<?php the_content(); ?>
</div>
</div>
<?php
endwhile;
?>
</main><!-- .site-main -->
<?php get_sidebar( 'content-bottom' ); ?>
</div><!-- .content-area -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

View file

@ -14,7 +14,7 @@
get_header(); ?> get_header(); ?>
<div id="primary" class="content-area"> <div id="primary" class="content-area">
<main id="main" class="site-main" role="main"> <main id="main" class="site-main blog-post" role="main">
<?php <?php
// Start the loop. // Start the loop.
while ( have_posts() ) : the_post(); while ( have_posts() ) : the_post();

454
style.css
View file

@ -146,10 +146,90 @@ figcaption {
* 2.1.3 Special Containers * 2.1.3 Special Containers
*/ */
#intro-text {
background-color: var(--light);
padding: 20px;
text-align: justify;
}
#header-row { #header-row {
margin-top: 15px;
margin-bottom: 15px; margin-bottom: 15px;
} }
#header-bar {
width: 100%;
height: 15%;
max-height: 40px;
background-color: var(--light);
position: fixed;
float: left;
z-index: 1;
opacity: 0.65;
top: 0;
left: 0;
right: 0;
transform: translateY(-100%);
transition: 0.2s transform cubic-bezier(.3,.73,.3,.74);
}
#header-bar.show {
transform: translateY(0);
}
#header-bar:hover,
#header-bar:focus {
opacity: 1;
}
#post-header-details-container {
border-top: 3px solid var(--dark);
display: block;
position: relative;
width: 100%;
background-color: var(--dark);
opacity: 0.7;
margin-top: auto;
text-align: center;
max-height: 40%;
height: auto;
padding: 4% 15px;
}
#comments {
margin: auto;
margin-top: 20px;
}
#comments-reply {
border-left: 2px solid var(--dark);
margin-bottom: 20px;
}
.comment {
background-color: var(--light);
border-radius: 20px;
padding: 20px;
}
.comment-meta,
.comment-content {
float: left;
}
.comment-meta {
width: 20%;
}
.comment-content {
width: 80%;
}
.tile {
margin-top: 20px;
margin-bottom: 20px;
}
/*************************************** /***************************************
* 2.2 Text * 2.2 Text
*/ */
@ -164,6 +244,14 @@ h1, h2, h3, h4, h5, h6 {
color: var(--dark); color: var(--dark);
} }
#header-bar-title {
line-height: 40px;
font-size: 1.5em;
font-weight: bold;
color: var(--dark);
margin-right: 25px;
}
#website-title { #website-title {
margin-left: 25px; margin-left: 25px;
text-align: center; text-align: center;
@ -190,11 +278,24 @@ h1, h2, h3, h4, h5, h6 {
#post-title { #post-title {
font-size: 6em; font-size: 6em;
text-align: center; text-align: center;
background-color: #000;
vertical-align: middle; vertical-align: middle;
color: white; color: white;
padding: 5px 0 16px 5px; }
text-shadow: 0px 2px 5px rgba(0,0,0,0.5);
#post-date {
font-size: 1em;
color: white;
}
#post-date::before,
#post-date::after {
content: ' — ';
}
.post-title {
text-shadow: -1px -1px 0 var(--light),
1px -1px 0 var(--light),
-1px 1px 0 var(--light),
1px 1px 0 var(--light);
} }
.post-title, .post-title,
@ -202,7 +303,12 @@ h1, h2, h3, h4, h5, h6 {
font-size: 2em; font-size: 2em;
margin: 0; margin: 0;
text-decoration: none !important; text-decoration: none !important;
text-align: center;
} }
.subheading {
margin-top: 1em;
}
.post-title.qsmall { font-size: 1.5em; }
.post-title.small { font-size: 1.4em; } .post-title.small { font-size: 1.4em; }
.post-title.vsmall { font-size: 1em; } .post-title.vsmall { font-size: 1em; }
@ -210,6 +316,12 @@ h1, h2, h3, h4, h5, h6 {
color: var(--light); color: var(--light);
} }
#comments-list-title,
#comments-reply-title {
text-align: center;
font-size: 2em;
}
/****************** /******************
* 2.2.2 Regular Text * 2.2.2 Regular Text
*/ */
@ -217,8 +329,12 @@ h1, h2, h3, h4, h5, h6 {
p { p {
font-size: 1em; font-size: 1em;
color: var(--text); color: var(--text);
padding: 0.5em;
line-height: 1.2em; line-height: 1.2em;
padding: 0.5em;
}
li p {
padding: 0.2em;
} }
strong { font-weight: bold; } strong { font-weight: bold; }
@ -230,6 +346,12 @@ sup, sup {
sup { vertical-align:top; } sup { vertical-align:top; }
sub { vertical-align:bottom; } sub { vertical-align:bottom; }
ul {
list-style: circle;
color: var(--dark);
padding-left: 1.8em;
}
/****************** /******************
* 2.2.3 Special Text * 2.2.3 Special Text
*/ */
@ -300,15 +422,15 @@ blockquote footer:before {
} }
q, blockquote { q, blockquote {
quotes: "“" "”" "" ""; quotes: "" "" "“" "”" ;
} }
q.guillemets { q.guillemets {
quotes: "«" "»" "«" "»"; quotes: "«" "»" "«" "»";
} }
q:before { q:before, blockquote p:first-of-type::before {
content: open-quote; content: open-quote;
} }
q:after { q:after, blockquote p:last-of-type::after {
content: close-quote; content: close-quote;
} }
@ -317,13 +439,18 @@ cite.smallcite:before { content: '“'; }
cite.smallcite:after { content: '”'; } cite.smallcite:after { content: '”'; }
.note { .note {
width: 80%; width: 80%;
background-color: #fc6f73; background-color: #fc6f73;
padding: 20px; padding: 20px;
text-align: center; text-align: center;
margin: auto; margin: auto;
border-radius: 20px; border-radius: 20px;
border: 2px dashed #000; border: 2px dashed #000;
}
.company-name {
font-size: 1.5em;
margin-top: 25%;
} }
/****************** /******************
@ -340,6 +467,20 @@ a:hover {
opacity: 1; opacity: 1;
} }
#header-bar-list {
list-style: none;
float: left;
}
#header-bar-list li {
float: left;
margin-right: 10px;
}
#header-bar-list li .hyperlink-button {
margin-top: 5px;
}
.subheading a { .subheading a {
color: var(--light); color: var(--light);
font-size: 0.4em; font-size: 0.4em;
@ -357,8 +498,21 @@ a:hover {
color: var(--dark); color: var(--dark);
text-decoration: none; text-decoration: none;
} }
.hyperlink-button.thin {
padding: 2px 20px;
display: inline-block;
margin: 0;
float: none;
top: 2px;
position: relative;
}
.hyperlink-button.thin:hover {
color: var(--light);
background-color: var(--dark);
border-color: var(--light);
}
li a.hyperlink-button { li a.hyperlink-button:not(.thin) {
width: 100%; width: 100%;
} }
@ -378,20 +532,20 @@ li a.hyperlink-button {
} }
.index-item header { .index-item header {
background-color: var(--light); background-color: var(--dark);
opacity: 0.75; opacity: 0.7;
margin-top: auto; margin-top: auto;
text-align: center; text-align: center;
padding: 15px;
max-height: 40%; max-height: 40%;
height: auto;
padding: 10% 15px;
} }
.index:hover .index-item { .index:hover .index-item {
filter: sepia(1); opacity: 0.7;
} }
.index:hover .index-item:hover { .index:hover .index-item:hover {
opacity: 1; opacity: 1;
filter: none;
} }
/*************************************** /***************************************
@ -407,6 +561,16 @@ li a.hyperlink-button {
border: 2px solid #003D52; border: 2px solid #003D52;
} }
#main-background {
width: 100vw;
height: 100vh;
z-index: -1;
display: none;
position: fixed;
object-fit: contain;
object-position: 100% 100%;
}
#frontpage-img { #frontpage-img {
max-width: 150%; max-width: 150%;
height: 150%; height: 150%;
@ -431,109 +595,71 @@ li a.hyperlink-button {
height: auto; height: auto;
} }
.post-header-image { #post-header-image {
height:100vh; height:100vh;
background-size: cover; background-size: cover;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: bottom;
position: relative; position: relative;
text-align:center; text-align:center;
display: flex;
flex-direction: column;
} }
.children {
background-size: cover;
}
.taxonomy-background-container {
height: 100vh;
width: 100vw;
position: fixed;
top: 0;
left: 0;
z-index: -1;
opacity: 0.2;
}
.taxonomy-background {
height: 100%;
width: 100%;
object-fit: contain;
padding: 10vh 20vw;
}
.location-block {
position: fixed;
top: 20px;
left: 20px;
z-index: 1;
max-width: 35% !important;
}
.sampler { .sampler {
width: 100%; width: 100%;
height: 60vh; height: 60vh;
} }
/*
* AUTHOR STUFF - CURRENTLY UNNECESSARY
*
.author a {
border-radius: 0 35px 35px 0;
background-color: #95b2bf;
padding: 3px 20px 3px 20px;
color: #003D52;
margin-left: -5px;
}
.edit-link {
float: right;
line-height: 3.6em;
margin-right: 30px;
}
.posted-on a {
color: #666;
padding: 3px 20px 3px 20px;
font-size: 0.8em;
}
.posted-on a:before, .posted-on a:after {
content: ' — ';
}
.posted-on a:hover {
color: #999;
}
.author img {
padding: 5px;
border-radius: 50%;
vertical-align: middle;
background-color: #95b2bf;
}
*/
.post-header-image .post-header-title {
position: absolute;
top: 25vh;
left: 0;
width: 100%;
opacity: 0.6;
}
.read-on {
position: relative;
display: inline-block;
top: 80vh;
background-color: #95b2bf;
opacity: 0.7;
border-radius: 50%;
}
.read-on:hover {
opacity: 1;
}
.arrow-down {
height: 100%;
color: #c1e5f4;
font-weight: bold;
font-size: 4em;
margin: auto;
padding: 10px 15px;
}
.entry-content { .entry-content {
padding: 20px 0px; padding: 20px 0px;
display: block; display: block;
margin: auto; margin-left: auto;
margin-right: auto;
} }
.blog-post .entry-content { .blog-post .entry-content {
border-bottom: 2px solid #003D52; border-bottom: 2px solid #003D52;
} }
.blog-post .entry-content p { .blog-post .entry-content p,
.tile p {
text-align: justify; text-align: justify;
} }
.jp-relatedposts-post p {
text-align: center !important;
}
.blog-post .entry-content ul { .blog-post .entry-content ul {
padding: 0 2em 0 2em; padding: 0 2em 0 2em;
} }
@ -541,26 +667,18 @@ li a.hyperlink-button {
.blog-post .entry-content ul li { .blog-post .entry-content ul li {
line-height: 1.2em; line-height: 1.2em;
} }
.blog-post .entry-content ul:not(.no-bullet) li:before { .sharedaddy, #jp-relatedposts {
content: '◆'; text-align: center !important;
color: #003D52;
font-size: 0.6em;
vertical-align: middle;
padding-bottom: 0.5em;
padding-right: 1em;
} }
.sharedaddy, .jp-relatedposts { .jp-relatedposts-headline {
text-align: center !important; width: 100%;
} }
/* /*
* Home * Home
*/ */
.wrapper-home li {
list-style: none;
}
i { i {
color: var(--text); color: var(--text);
@ -583,11 +701,6 @@ i {
width: 100%; width: 100%;
} }
.row ul {
list-style: none;
margin: 0;
}
.icons-wrapper { .icons-wrapper {
margin-top: 10px; margin-top: 10px;
margin-bottom: 10px; margin-bottom: 10px;
@ -761,20 +874,40 @@ i {
} }
.children { .children {
display: block; text-align: center;
width: 35px;
height: 35px;
text-align: center;
font-size: 1.8em;
font-weight: bold;
color: #ff0000;
float: right;
position: relative;
background-color: #aaa;
border-radius: 0 17px 0 5px;
z-index: 1;
} }
.company-info-container {
background-color: var(--light);
max-width: 60px;
overflow: hidden;
border-bottom: 1px solid var(--dark);
}
.company-info-container.left {
border-radius: 0px 0px 15px 0px;
float: left;
border-right: 1px solid var(--dark);
}
.company-info-container.right {
border-radius: 0px 0px 0px 15px;
float: right;
border-left: 1px solid var(--dark);
}
.company-info-container.right .company-info {
padding-left: 4px;
}
.company-info {
font-size: 1em;
line-height: 1.3em;
color: var(--dark);
opacity: 0.8;
padding: 2px;
width: auto;
}
#wrapper { #wrapper {
height: 100%; height: 100%;
margin: 0; margin: 0;
@ -886,12 +1019,11 @@ float: right;
#companies-grid:hover li, #companies-grid:hover li,
#companies-grid-small:hover li { #companies-grid-small:hover li {
filter: sepia(1); opacity: 0.4;
} }
#companies-grid:hover li:hover, #companies-grid:hover li:hover,
#companies-grid-small:hover li:hover { #companies-grid-small:hover li:hover {
opacity: 1; opacity: 1;
filter: none;
} }
#companies-grid li, #companies-grid li,
@ -915,6 +1047,51 @@ float: right;
min-height: 140px; min-height: 140px;
} }
/*
* AUTHOR STUFF - CURRENTLY UNNECESSARY
*
.author a {
border-radius: 0 35px 35px 0;
background-color: #95b2bf;
padding: 3px 20px 3px 20px;
color: #003D52;
margin-left: -5px;
}
.edit-link {
float: right;
line-height: 3.6em;
margin-right: 30px;
}
.posted-on a {
color: #666;
padding: 3px 20px 3px 20px;
font-size: 0.8em;
}
.posted-on a:before, .posted-on a:after {
content: ' — ';
}
.posted-on a:hover {
color: #999;
}
.author img {
padding: 5px;
border-radius: 50%;
vertical-align: middle;
background-color: #95b2bf;
}
*/
/******************************************************************************* /*******************************************************************************
* x. Media Queries * x. Media Queries
* *
@ -928,7 +1105,9 @@ float: right;
#website-title { #website-title {
font-size: 4.5em; font-size: 4.5em;
} }
.blog-post .entry-content { .blog-post .entry-content,
.tile,
#comments {
width: 80%; width: 80%;
max-width: 1124px; max-width: 1124px;
} }
@ -948,9 +1127,12 @@ float: right;
background-size: contain; background-size: contain;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: right top; background-position: right top;
background-image: url("http://www.bengoldsworthy.uk/wp-content/uploads/2016/09/mebg.png");
} }
.blog-post .entry-content { #main-background {
display: block;
}
.blog-post .entry-content,
.tile {
padding: 20px 40px; padding: 20px 40px;
background-color: #95b2bf; background-color: #95b2bf;
border-bottom: 2px solid #003D52; border-bottom: 2px solid #003D52;

File diff suppressed because one or more lines are too long

View file

@ -9,13 +9,16 @@
?> ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header"> <header class="entry-header post-header-image" style="background-image: url('<?php the_post_thumbnail_url(); ?>');">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> <div id="post-header-details-container">
<img id="post-header-details-bg" src="<?php the_post_thumbnail_url(); ?>">
<div id="post-header-details">
<h1 id="post-title"><?php echo get_the_title(); ?></h1>
</div>
</div>
</header><!-- .entry-header --> </header><!-- .entry-header -->
<?php twentysixteen_post_thumbnail(); ?> <div id="body" class="entry-content">
<div class="entry-content">
<?php <?php
the_content(); the_content();

View file

@ -10,21 +10,40 @@
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header"> <header class="entry-header" id="post-header-image" style="background-image: url('<?php the_post_thumbnail_url(); ?>');">
<div class="post-header-image" style="background-image: url('<?php the_post_thumbnail_url(); ?>');"> <div id="post-header-details-container">
<div class="post-header-title"><?php the_title( '<h1 id="post-title">', '</h1>' ); ?></div> <div id="post-header-details">
<div class="read-on"><a href="#body"><div class="arrow-down"></div></a></div> <?php
</div> if (strlen(get_the_title()) > 70) $small= "3em";
elseif (strlen(get_the_title()) > 35) $small = "4em";
elseif (strlen(get_the_title()) > 12) $small = "5em";
else $small = "6em"
?>
<h1 id="post-title" style="font-size: <?php echo $small ?>;">
<?php echo get_the_title(); ?>
<?php if ($versionNum = get_post_meta(get_the_ID(), 'Version', true)): ?>
<span id="version"><?php echo $versionNum ?></span>
<?php endif; ?>
</h1>
<?php the_date('F j, Y', '<p id="post-date">', '</p>'); ?>
<?php /*
<?php if ($posttags = get_the_tags()): ?>
<div id="post-tags">
<?php foreach ($posttags as $tag): ?>
<a class="hyperlink-button" href="<?php echo $tag->slug ?>"><?php echo $tag->name ?></a>
<?php endforeach; ?>
<?php endif; ?>
*/ ?>
</div>
</div>
</header><!-- .entry-header --> </header><!-- .entry-header -->
<div id="body" class="entry-content"> <div id="body" class="entry-content">
<?php <?php
if (get_the_content()): if (get_the_content()):
the_content(); the_content();
else : echo get_the_excerpt(); else : echo get_the_excerpt();
endif; endif;
wp_link_pages( array( wp_link_pages( array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentysixteen' ) . '</span>', 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentysixteen' ) . '</span>',
'after' => '</div>', 'after' => '</div>',
@ -41,8 +60,6 @@
</div><!-- .entry-content --> </div><!-- .entry-content -->
<footer class="entry-footer"> <footer class="entry-footer">
<?php twentysixteen_entry_meta(); ?> <?php //twentysixteen_entry_meta(); ?>
<?php
?>
</footer><!-- .entry-footer --> </footer><!-- .entry-footer -->
</article><!-- #post-## --> </article><!-- #post-## -->

View file

@ -12,15 +12,17 @@
<a href="<?php the_permalink(); ?>"> <a href="<?php the_permalink(); ?>">
<article id="post-<?php the_ID(); ?>" class="index-item" style="background-image: url('<?php the_post_thumbnail_url(); ?>');"> <article id="post-<?php the_ID(); ?>" class="index-item" style="background-image: url('<?php the_post_thumbnail_url(); ?>');">
<header class="entry-header"> <header class="entry-header">
<?php if ( is_sticky() && is_home() && ! is_paged() ) : ?> <div class="post-header-details">
<span class="sticky-post"><?php _e( 'Featured', 'bengoldsworthy' ); ?></span> <?php
<?php endif; ?> if (strlen(get_the_title()) > 70) $small= "vsmall";
elseif (strlen(get_the_title()) > 35) $small = "small";
<?php elseif (strlen(get_the_title()) > 12) $small = "qsmall";
if (strlen(get_the_title()) > 70) $small= "vsmall"; ?>
elseif (strlen(get_the_title()) > 35) $small = "small"; <h2 class="post-title <?php echo $small ?>">
the_title( '<h2 class="post-title '.$small.'">', '</h2>' ); <?php echo get_the_title(); ?>
?> <?php if ($versionNum = get_post_meta( get_the_ID(), 'Program/Version', true )) echo '<span id="version">'.$versionNum.'</span>'; ?>
</h2>
</div>
</header><!-- .entry-header --> </header><!-- .entry-header -->
</article><!-- #post-## --> </article><!-- #post-## -->
</a> </a>

1
updateCompanies.php Normal file
View file

@ -0,0 +1 @@
Hello world