This commit is contained in:
Ben Goldsworthy 2020-08-08 10:55:20 +01:00
parent 1ab6e5f0b0
commit 5faca190a6
13 changed files with 1070 additions and 535 deletions

View File

@ -1,2 +1,46 @@
# Omphaloskepsis # Omphaloskepsis
Ompahloskepsis is the current WordPress Theme for `bengoldsworthy.uk`. Contributors: Ben Goldsworthy
Version: 1.0
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html
## Abstract
Omphaloskepsis is a portfolio- and experience-centric WordPress Theme.
## Copyright
Omphaloskepsis WordPress Theme, Copyright 2016-2020 Ben Goldsworthy
Omphaloskepsis is distributed under the terms of the GNU GPL
This program 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.
This program is distributed in the hope that it will be useful,
but 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.
Omphaloskepsis Theme bundles the following third-party resources:
HTML5 Shiv v3.7.0, Copyright 2014 Alexander Farkas
Licenses: MIT/GPL2
Source: https://github.com/aFarkas/html5shiv
Genericons icon font, Copyright 2013-2015 Automattic.com
License: GNU GPL, Version 2 (or later)
Source: http://www.genericons.com
## TODO 2017-01-13
### Short-term
* Finish refactoring
..* Remove all vestiges of Twenty Sixteen
* Skills pages
### Long-term
* SOCs

View File

@ -18,7 +18,7 @@
<div id="comments" class="comments-area"> <div id="comments" class="comments-area">
<div class="row"> <div class="row">
<div class="col-7" id="comments-list"> <div class="col-7" id="comments-list">
<h3 id="comments-list-title">Comments</h3> <h3 id="comments-list-title">Replies</h3>
<?php if ( have_comments() ) : ?> <?php if ( have_comments() ) : ?>
<?php the_comments_navigation(); ?> <?php the_comments_navigation(); ?>

View File

@ -8,17 +8,39 @@
*/ */
?> ?>
<script type="text/javascript"> <script type="text/javascript">
// Displays and hides the top header bar on page scroll. // Displays and hides the top header bar on page scroll.
jQuery(document).ready(function($) { jQuery(document).ready(function($) {
$(window).on("scroll", function() { $(window).on("scroll", function() {
var fromTop = $(window).scrollTop(); var fromTop = $(window).scrollTop();
$('body > header').toggleClass("show", (fromTop > 200)); $('body > header').toggleClass("show", (fromTop > 200));
}); });
});
</script> $('blockquote').each(function() {
if ($(this).children('p').children().first().is('q')) {
$(this).addClass('no-first-quote');
}
if ($(this).children('p').children().last().is('q')) {
$(this).addClass('no-last-quote');
}
});
});
function toggleCommentary() {
var linkText = ["Click here to hide all commentary and leave only reportage.", "Click here to show commentary."];
var commentaries = document.getElementsByClassName("article__text--commentary");
var link = document.getElementById("toggleCommentary");
for (var i = 0; i < commentaries.length; i++) {
commentaries[i].style.display = (commentaries[i].style.display == 'none') ? 'inline' : 'none';
}
<?php wp_footer(); ?> link.innerHTML = (link.innerHTML == linkText[0]) ? linkText[1] : linkText[0];
}
</body> </script>
<?php wp_footer(); ?>
</body>
</html> </html>

View File

@ -454,44 +454,46 @@ function omphaloskepsis_widget_tag_cloud_args( $args ) {
} }
add_filter( 'widget_tag_cloud_args', 'omphaloskepsis_widget_tag_cloud_args' ); add_filter( 'widget_tag_cloud_args', 'omphaloskepsis_widget_tag_cloud_args' );
function clean_script_tag($input) {
$input = str_replace("type='text/javascript' ", '', $input);
return str_replace("'", '"', $input);
}
add_filter('script_loader_tag', 'clean_script_tag');
function omphaloskepsis_the_content($content) { function omphaloskepsis_the_content($content) {
global $post; global $post;
if ($post->post_type == "program") { if ($post->post_type == "program") {
$links = '<h2 class="subheading">Links</h2>'; if ($meta = get_post_meta($post->ID, 'Link', true))
if ($meta = get_post_meta($post->ID, 'Link', true)) $links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Download</a>';
$links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Download</a>'; if ($meta = get_post_meta($post->ID, 'Documentation', true))
if ($meta = get_post_meta($post->ID, 'Documentation', true)) $links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Documentation</a>';
$links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Documentation</a>'; if ($meta = get_post_meta($post->ID, 'Repo', true))
if ($meta = get_post_meta($post->ID, 'Repo', true)) $links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Repo</a>';
$links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Repo</a>'; if ($meta = get_post_meta($post->ID, 'Licence', true))
if ($meta = get_post_meta($post->ID, 'Licence', true)) $links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Licence</a>';
$links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Licence</a>'; if ($meta = get_post_meta($post->ID, 'MD5', true))
if ($meta = get_post_meta($post->ID, 'MD5', true)) $links = $links . '<p class="checksum">MD5 checksum: '.$meta.'</p>';
$links = $links . '<p class="checksum">MD5 checksum: '.$meta.'</p>'; return $content . $links;
return $content . $links; } elseif ($post->post_type == "website") {
} elseif ($post->post_type == "website") { if ($meta = get_post_meta($post->ID, 'Link', true))
$links = '<h2 class="subheading">Links</h2>'; $links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Visit</a>';
if ($meta = get_post_meta($post->ID, 'Link', true)) if ($meta = get_post_meta($post->ID, 'Repo', true))
$links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Visit</a>'; $links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Repo</a>';
if ($meta = get_post_meta($post->ID, 'Repo', true)) if ($meta = get_post_meta($post->ID, 'Licence', true))
$links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Repo</a>'; $links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Licence</a>';
if ($meta = get_post_meta($post->ID, 'Licence', true)) return $content . $links;
$links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Licence</a>'; } elseif ($post->post_type == "writing") {
return '<h2 class="subheading">Summary</h2>' . $content . $links; if ($meta = get_post_meta($post->ID, 'Link', true))
} elseif ($post->post_type == "writing") { $links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Read</a>';
$links = '<h2 class="subheading">Links</h2>'; if ($meta = get_post_meta($post->ID, 'Licence', true))
if ($meta = get_post_meta($post->ID, 'Link', true)) $links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Licence</a>';
$links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Read</a>'; return $content . $links;
if ($meta = get_post_meta($post->ID, 'Licence', true)) } elseif ($post->post_type == "other") {
$links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Licence</a>'; if ($meta = get_post_meta($post->ID, 'Link', true))
return '<h2 class="subheading">Summary</h2>' . $content . $links; $links = $links . '<a class="hyperlink-button" target="_blank" href="'.$meta.'">Download</a>';
} elseif ($post->post_type == "other") { return $content . $links;
$links = '<h2 class="subheading">Links</h2>'; }
if ($meta = get_post_meta($post->ID, 'Link', true)) return $content;
$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); add_filter('the_content', 'omphaloskepsis_the_content', 10);
@ -501,122 +503,163 @@ function load_dashicons_front_end() {
} }
function display_companies() { function display_companies() {
echo "<ul>"; echo '<tr>';
if ($_POST['toplevel'] == "true") { echo '<th colspan="2">Organisation</th>';
// Gets all of the top-level company terms. echo '<th>Children</th>';
$terms = apply_filters("taxonomy-images-get-terms", "", array('having_images' => false, 'taxonomy' => 'company', 'term_args' => array('parent' => 0))); echo '<th>Associated Items</th>';
$include = 1; echo '</tr>';
} else {
// Gets all of the company terms. if ($_POST['toplevel'] == "true") {
$terms = apply_filters("taxonomy-images-get-terms", "", array('having_images' => false, 'taxonomy' => 'company',)); // Gets all of the top-level company terms.
$include = 0; $terms = apply_filters("taxonomy-images-get-terms", "", array('having_images' => false, 'taxonomy' => 'company', 'term_args' => array('parent' => 0)));
} $include = 1;
if(!empty($terms)) { } else {
foreach($terms as $term) { // Gets all of the company terms.
$term_children = get_term_children($term->term_id, "company"); $terms = apply_filters("taxonomy-images-get-terms", "", array('having_images' => false, 'taxonomy' => 'company',));
$include = 0;
// 0 = Jobs }
// 1 = Blog Posts
// 2 = Websites if(!empty($terms)) {
// 3 = Programs foreach($terms as $term) {
// 4 = Writings $term_children = get_term_children($term->term_id, "company");
// 5 = Videos
// 6 = Others // 0 = Jobs
// 7 = Qualifications // 1 = Blog Posts
// 8 = Awards // 2 = Websites
$post_types = array('job', 'post', 'website', 'program', 'writing', 'video', 'other', 'qualification', 'award'); // 3 = Programs
$dashicons = array('hammer', 'admin-post', 'schedule', 'desktop', 'format-aside', 'video-alt', 'archive', 'id', 'awards'); // 4 = Writings
$term_items = array(); // 5 = Videos
$term_item_counts = array(); // 6 = Others
// 7 = Qualifications
// 8 = 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) {
$args = array(
'posts_per_page' => -1, foreach ($post_types as $post_type) {
'post_type' => $post_type, $args = array(
'tax_query' => array( 'posts_per_page' => -1,
array( 'post_type' => $post_type,
'taxonomy' => 'company', 'tax_query' => array(
'field' => 'slug', array(
'terms' => $term->slug, 'taxonomy' => 'company',
'include_children' => $include, 'field' => 'slug',
), 'terms' => $term->slug,
), 'include_children' => $include,
'meta_query' => array(), ),
); ),
'meta_query' => array(),
if ($_POST['currentjobs'] == "true" && $post_type == "job") { );
$args['meta_query'] = array(
array( if ($_POST['currentjobs'] == "true" && $post_type == "job") {
'key' => 'end-date', $args['meta_query'] = array(
'compare' => 'NOT EXISTS', array(
'value' => '1', 'key' => 'end-date',
), 'compare' => 'NOT EXISTS',
); 'value' => '1',
} ),
);
if ($_POST['showexpired'] != "true" && $post_type == "qualification") { }
$args['meta_query'] = array(
array( if ($_POST['showexpired'] != "true" && $post_type == "qualification") {
'key' => 'Expired', $args['meta_query'] = array(
'compare' => 'NOT EXISTS', array(
'value' => '1', 'key' => 'Expired',
), 'compare' => 'NOT EXISTS',
); 'value' => '1',
} ),
);
}
$posts = get_posts($args); $posts = get_posts($args);
array_push($term_items, $posts); array_push($term_items, $posts);
array_push($term_item_counts, count($posts)); array_push($term_item_counts, count($posts));
} }
if(($_POST['job'] == "true" && $term_item_counts[0] > 0) ||
($_POST['post'] == "true" && $term_item_counts[1] > 0) ||
($_POST['website'] == "true" && $term_item_counts[2] > 0) ||
($_POST['program'] == "true" && $term_item_counts[3] > 0) ||
($_POST['writing'] == "true" && $term_item_counts[4] > 0) ||
($_POST['video'] == "true" && $term_item_counts[5] > 0) ||
($_POST['other'] == "true" && $term_item_counts[6] > 0) ||
($_POST['qualification'] == "true" && $term_item_counts[7] > 0) ||
($_POST['award'] == "true" && $term_item_counts[8] > 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 : "transparent";
echo '<tr class="organisation">';
echo '<td class="organisation-logo">';
echo '<a href="'.esc_url(get_term_link($term, $term->taxonomy)).'">';
echo '<img style="background-color: '.$colour.';" src="'.strtok($imgURL, '?').'" alt="'.$term->name.' logo">';
echo '</a>';
echo '</td>';
echo '<td class="organisation-name">';
echo '<a href="'.esc_url(get_term_link($term, $term->taxonomy)).'">';
echo '<p>'.$term->name.'</p>';
echo '</a>';
echo '</td>';
echo '<td class="organisation-items organisation-children">';
$num = (count($term_children) > 0) ? "" : "none";
echo '<div class="organisation-item '.$num.'">';
echo '<span class="dashicons dashicons-groups"></span><br>'.count($term_children);
echo '</div>';
echo '</td>';
echo '<td class="organisation-items">';
$i = 0;
foreach ($post_types as $post_type) {
$num = ($term_item_counts[$i] > 0) ? "" : "none";
echo '<div class="organisation-item '.$num.'">';
echo '<span class="dashicons dashicons-'.$dashicons[$i].'"></span><br>'.$term_item_counts[$i];
echo '</div>';
$i++;
};
echo '</td>';
echo '</tr>';
/*
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>';
}
if(($_POST['job'] == "true" && $term_item_counts[0] > 0) || die();
($_POST['post'] == "true" && $term_item_counts[1] > 0) ||
($_POST['website'] == "true" && $term_item_counts[2] > 0) ||
($_POST['program'] == "true" && $term_item_counts[3] > 0) ||
($_POST['writing'] == "true" && $term_item_counts[4] > 0) ||
($_POST['video'] == "true" && $term_item_counts[5] > 0) ||
($_POST['other'] == "true" && $term_item_counts[6] > 0) ||
($_POST['qualification'] == "true" && $term_item_counts[7] > 0) ||
($_POST['award'] == "true" && $term_item_counts[8] > 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 : "transparent";
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');
add_action('wp_ajax_nopriv_display_companies', 'display_companies'); add_action('wp_ajax_nopriv_display_companies', 'display_companies');

View File

@ -13,7 +13,8 @@
<head> <head>
<meta charset="<?php bloginfo('charset'); ?>"> <meta charset="<?php bloginfo('charset'); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<?php if (!is_front_page()): ?> <?php $index = get_post_meta(get_the_ID(), 'Index', true); ?>
<?php if (!(is_single() && !is_page() && $index == "true")): ?>
<meta name="robots" content="noindex"> <meta name="robots" content="noindex">
<?php endif; ?> <?php endif; ?>
<link rel="profile" href="http://gmpg.org/xfn/11"> <link rel="profile" href="http://gmpg.org/xfn/11">
@ -22,18 +23,18 @@
<?php endif; ?> <?php endif; ?>
<?php wp_head(); ?> <?php wp_head(); ?>
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script> <script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
<script>//alert("If the site looks weird, it's because I am currently in the process of redoing the CSS (giving it a new paint job, basically). Sorry about that.");</script>
</head> </head>
<body <?php body_class(); ?> id="site-wrapper"> <body <?php body_class(); ?> id="site-wrapper">
<?php if (!is_page_template('centred-page.php')): ?> <?php if (!is_page_template('centred-page.php')): ?>
<header id="site-header"> <header id="site-header">
<nav id="site-header-nav"> <nav id="site-header-nav">
<div class="site-header-nav-item"><a href="/"><h1>bengoldsworthy.uk</h1></a></div> <div class="site-header-nav-item"><a href="/"><h1>Ben Goldsworthy</a></div>
<div class="site-header-nav-item"><p>~ <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://github.com/Rumperuu"><i class="fa fa-github"></i></a> ~ <a href="/0x30D22F41.asc"><i class="fa fa-key"></i></a> ~</p></div> <div class="site-header-nav-item"><h2>Views my own. Do try this at home.</h2></div>
<div class="site-header-nav-item"><a href="/portfolios">Portfolios</a></div> <div class="site-header-nav-item"><p>~ <a href="mailto:me+bg@bengoldsworthy.net"><i class="fa fa-envelope"></i></a> ~ <a href="bitcoin:1HApEg2robrRCx4rTKKeFj25unoaX65QUc"><i class="fa fa-btc"></i></a> ~ <a href="https://github.com/Rumperuu"><i class="fa fa-github"></i></a> ~ <a href="/0x30D22F41.asc"><i class="fa fa-key"></i></a> ~ <a href="/feed"><i class="fa fa-rss"></i></a> ~</p></div>
<div class="site-header-nav-item"><a href="/blog">Blog</a></div> <div class="site-header-nav-item"><a href="/blog">Blog</a></div>
<div class="site-header-nav-item"><a href="/experience">Experience</a></div> <div class="site-header-nav-item"><a href="/portfolios">Portfolios</a></div>
<div class="site-header-nav-item"><a href="/social-cataloguing">Social Cataloguing</a></div>
</nav> </nav>
</header> </header>
<?php endif; ?> <?php endif; ?>

View File

@ -13,7 +13,7 @@
<main id="list-page" class="col-10 col-m-12" role="main"> <main id="list-page" class="col-10 col-m-12" role="main">
<header> <header>
<h1>Blog.</h1> <h1>Blog.</h1>
<h2><a href="/category/thoughts">Thoughts</a> / <a href="/category/reports">Reports</a> / <a href="/category/reviews">Reviews</a> / <a href="/category/projects">Projects</a></h2> <h2><strong>All</strong> / <a href="/category/thoughts">Thoughts</a> / <a href="/category/reports">Reports</a> / <a href="/category/reviews">Reviews</a> / <a href="/category/projects">Projects</a></h2>
<?php <?php
echo get_the_posts_pagination( array( echo get_the_posts_pagination( array(
'screen_reader_text' => ' ', 'screen_reader_text' => ' ',

View File

@ -17,121 +17,120 @@ get_header(); ?>
<div id="experience-wrapper" class="content-area col-10 col-m-12"> <div id="experience-wrapper" class="content-area col-10 col-m-12">
<!--Page Title & Details--> <!--Page Title & Details-->
<header class="post-header-title"> <header class="post-header-title">
<h1 style="margin-bottom: 20px;" id="page-title">Experience</h1> <h1 style="margin-bottom: 20px;" id="page-title">Experience.</h1>
<?php while (have_posts()) : the_post(); ?> <?php while (have_posts()) : the_post(); ?>
<div class="entry-content tile" id="taxonomy-description"> <div class="entry-content tile" id="taxonomy-description">
<?php the_content() ?> <?php the_content() ?>
</div> </div>
<div style="width: 70%; margin: auto; margin-top: 20px; border: 2px dashed #020202; padding: 20px; border-radius: 25px;" class="entry-content tile" id="settings"> <div style="width: 70%; margin: auto; margin-top: 20px; border: 2px dashed #020202; padding: 20px; border-radius: 25px;" class="entry-content tile" id="settings">
<h3 style="margin-bottom: 14px;" class="subheading">Settings</h3> <h3 style="margin-bottom: 14px;" class="subheading">Settings</h3>
<form action="/experience-by-companies" id="settings" method="GET"> <form action="/experience-by-companies" id="settings" method="GET">
<input class="checkbox" type="checkbox" id="toplevel" value="toplevel" checked="checked"> <input class="checkbox" type="checkbox" id="toplevel" value="toplevel" checked="checked">
<label for="toplevel">Display only top-level organisations</label> <label for="toplevel">Display only top-level organisations</label>
<br> <br>
<fieldset> <fieldset>
<legend><p style="margin-top: 14px; margin-bottom: 14px;">Display only organisations with associated:</p></legend> <legend><p style="margin-top: 14px; margin-bottom: 14px;">Display only organisations with associated:</p></legend>
<div class="controlgroup" id="typestodisplay"> <div class="controlgroup" id="typestodisplay">
<label for="jobs">Roles <span class="dashicons dashicons-hammer"></span></label> <label for="jobs">Roles <span class="dashicons dashicons-hammer"></span></label>
<input type="checkbox" name="jobs" id="jobs" checked="checked"> <input type="checkbox" name="jobs" id="jobs" checked="checked">
<label class="currentjobs" for="currentjobs">Display only current roles</label> <label class="currentjobs" for="currentjobs">Display only current roles</label>
<input class="currentjobs" type="checkbox" name="currentjobs" id="currentjobs" checked="checked"> <input class="currentjobs" type="checkbox" name="currentjobs" id="currentjobs" checked="checked">
<label for="posts">Blog Posts <span class="dashicons dashicons-admin-post"></span></label> <label for="posts">Blog Posts <span class="dashicons dashicons-admin-post"></span></label>
<input type="checkbox" name="posts" id="posts"> <input type="checkbox" name="posts" id="posts">
<label for="websites">Websites <span class="dashicons dashicons-schedule"></span></label> <label for="websites">Websites <span class="dashicons dashicons-schedule"></span></label>
<input type="checkbox" name="websites" id="websites"> <input type="checkbox" name="websites" id="websites">
<label for="programs">Programs <span class="dashicons dashicons-desktop"></span></label> <label for="programs">Programs <span class="dashicons dashicons-desktop"></span></label>
<input type="checkbox" name="programs" id="programs"> <input type="checkbox" name="programs" id="programs">
<label for="writings">Writings <span class="dashicons dashicons-format-aside"></span></label> <label for="writings">Writings <span class="dashicons dashicons-format-aside"></span></label>
<input type="checkbox" name="writings" id="writings"> <input type="checkbox" name="writings" id="writings">
<label for="videos">Videos <span class="dashicons dashicons-video-alt"></span></label> <label for="videos">Videos <span class="dashicons dashicons-video-alt"></span></label>
<input type="checkbox" name="videos" id="videos"> <input type="checkbox" name="videos" id="videos">
<label for="other">Other <span class="dashicons dashicons-archive"></span></label> <label for="other">Other <span class="dashicons dashicons-archive"></span></label>
<input type="checkbox" name="other" id="other"> <input type="checkbox" name="other" id="other">
<label for="qualifications">Qualifications <span class="dashicons dashicons-id"></span></label> <label for="qualifications">Qualifications <span class="dashicons dashicons-id"></span></label>
<input type="checkbox" name="qualifications" id="qualifications"> <input type="checkbox" name="qualifications" id="qualifications">
<label class="expired" for="expired">Show expired qualifications</label> <label class="expired" for="expired">Show expired qualifications</label>
<input class="expired" type="checkbox" name="expired" id="expired"> <input class="expired" type="checkbox" name="expired" id="expired">
<label for="awards">Awards <span class="dashicons dashicons-awards"></span></label> <label for="awards">Awards <span class="dashicons dashicons-awards"></span></label>
<input type="checkbox" name="awards" id="awards"> <input type="checkbox" name="awards" id="awards">
</div> </div>
</fieldset> </fieldset>
<br> <br>
<input class="ui-button ui-widget ui-corner-all" id="refresh" type="submit" value="Refresh"> <input class="ui-button ui-widget ui-corner-all" id="refresh" type="submit" value="Refresh">
</form> </form>
</div> </div>
<?php endwhile; ?> <?php endwhile; ?>
</header> </header>
<!--Company Grid--> <!--Company Grid-->
<div class="row" id="companies-grid"> <table class="row" id="organisations-grid">
<img class="loading" src="/wp-content/uploads/2016/12/ajax-loader.gif"> </table>
</div>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> <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 src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script type="text/javascript"> <script type="text/javascript">
// Populates the companies grid. // Populates the organisations grid.
jQuery(document).ready(function($) { jQuery(document).ready(function($) {
// Sets up jQueryUI elements. // Sets up jQueryUI elements.
$('input:checkbox').checkboxradio(); $('input:checkbox').checkboxradio();
$('.controlgroup').controlgroup(); $('.controlgroup').controlgroup();
$('.refresh').button(); $('.refresh').button();
// Displays the initial companies grid. // Displays the initial organisations grid.
displayCompanies(); displayCompanies();
$('.expired').hide(); $('.expired').hide();
$('input[type="checkbox"]').change(function() { $('input[type="checkbox"]').change(function() {
$('#refresh').css('border-width', '5px'); $('#refresh').css('border-width', '5px');
}); });
$('#jobs').change(function() { $('#jobs').change(function() {
if($(this).is(":checked")) { if($(this).is(":checked")) {
$('.currentjobs').fadeIn(100); $('.currentjobs').fadeIn(100);
} else { } else {
$('.currentjobs').fadeOut(100); $('.currentjobs').fadeOut(100);
} }
}); });
$('#qualifications').change(function() { $('#qualifications').change(function() {
if($(this).is(":checked")) { if($(this).is(":checked")) {
$('.expired').fadeIn(100); $('.expired').fadeIn(100);
} else { } else {
$('.expired').fadeOut(100); $('.expired').fadeOut(100);
} }
}); });
$('#refresh').click(function(event) { $('#refresh').click(function(event) {
$(this).css('border-width', '1px'); $(this).css('border-width', '1px');
event.preventDefault(); event.preventDefault();
displayCompanies(); displayCompanies();
}); });
function displayCompanies() { function displayCompanies() {
$('#companies-grid').html('<img class="loading" src="/wp-content/uploads/2016/12/ajax-loader.gif">'); $('#organisations-grid').html('<img class="loading" src="/wp-content/uploads/2016/12/ajax-loader.gif">');
var settings = { var settings = {
'action': 'display_companies', 'action': 'display_companies',
'toplevel': $('#toplevel').is(':checked'), 'toplevel': $('#toplevel').is(':checked'),
'job': $('#jobs').is(':checked'), 'job': $('#jobs').is(':checked'),
'currentjobs': $('#currentjobs').is(':checked'), 'currentjobs': $('#currentjobs').is(':checked'),
'post': $('#posts').is(':checked'), 'post': $('#posts').is(':checked'),
'website': $('#websites').is(':checked'), 'website': $('#websites').is(':checked'),
'program': $('#programs').is(':checked'), 'program': $('#programs').is(':checked'),
'writing': $('#writings').is(':checked'), 'writing': $('#writings').is(':checked'),
'video': $('#videos').is(':checked'), 'video': $('#videos').is(':checked'),
'other': $('#other').is(':checked'), 'other': $('#other').is(':checked'),
'qualification': $('#qualifications').is(':checked'), 'qualification': $('#qualifications').is(':checked'),
'showexpired': $('#expired').is(':checked'), 'showexpired': $('#expired').is(':checked'),
'award': $('#awards').is(':checked'), 'award': $('#awards').is(':checked'),
}; };
$.post("/wp-admin/admin-ajax.php", settings, function(response) { $.post("/wp-admin/admin-ajax.php", settings, function(response) {
$('#companies-grid').html(response); $('#organisations-grid').html(response);
}); });
} }
}); });
</script> </script>
</div> </div>

View File

@ -14,17 +14,17 @@
<?php <?php
// Start the loop. // Start the loop.
while (have_posts()): while (have_posts()):
the_post(); the_post();
// Include the page content template. // Include the page content template.
get_template_part('template-parts/content', 'page'); get_template_part('template-parts/content', 'page');
// If comments are open or we have at least one comment, load up the comment template. // If comments are open or we have at least one comment, load up the comment template.
if (comments_open() || get_comments_number()) { if (comments_open() || get_comments_number()) {
comments_template(); comments_template();
} }
// End of the loop. // End of the loop.
endwhile; endwhile;
?> ?>
</main> </main>

579
style.css
View File

@ -3,6 +3,26 @@
--dark: #020202; --dark: #020202;
} }
html {
font-size: 16px;
color: black;
}
@media all and (max-width: 800px) {
html {
font-size:14px;
}
}
@media all and (max-width: 600px) {
html {
font-size:12px;
}
}
@media all and (max-width: 400px) {
html {
font-size:10px;
}
}
/** 1. Block Elements */ /** 1. Block Elements */
/* 1.1. Flexible Grid */ /* 1.1. Flexible Grid */
@ -89,19 +109,19 @@
align-items: center; align-items: center;
min-height: 100vh; min-height: 100vh;
grid-template-areas: grid-template-areas:
"header" "header"
"page-container" "page-container"
"footer"; "footer";
} }
@media only screen and (min-width: 1024px) { @media only screen and (min-width: 1024px) {
#site-wrapper { #site-wrapper {
grid-template-columns: 2.5% 1fr 2.5%; grid-template-columns: 2.5% 1fr 2.5%;
grid-template-rows: auto 1fr 2.5%; grid-template-rows: auto 1fr 2.5%;
min-height: calc(100vh - 4em); min-height: calc(100vh - 4em);
grid-template-areas: grid-template-areas:
"header header header" "header header header"
". page-container ." ". page-container ."
"footer footer footer"; "footer footer footer";
border: 2px solid black; border: 2px solid black;
margin: 2em; margin: 2em;
} }
@ -113,17 +133,18 @@
grid-template-columns: 1fr; grid-template-columns: 1fr;
grid-template-rows: 1fr; grid-template-rows: 1fr;
grid-template-areas: grid-template-areas:
"header-nav"; "header-nav";
} }
#site-header > nav { #site-header > nav {
grid-area: header-nav; grid-area: header-nav;
grid-template-columns: 1fr 1fr 1fr; grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: 1fr 0.7fr auto; grid-template-rows: 1fr 0.4fr 0.5fr auto;
grid-template-areas: grid-template-areas:
"header-top header-top header-top" "header-top header-top header-top"
"header-middle header-middle header-middle" "header-middle header-middle header-middle"
"header-left header-center header-right"; "header-bottom header-bottom header-bottom"
"header-left header-centre header-right";
} }
#site-header > nav > div { #site-header > nav > div {
@ -136,12 +157,15 @@
grid-area: header-middle; grid-area: header-middle;
} }
#site-header > nav > div:nth-child(3) { #site-header > nav > div:nth-child(3) {
grid-area: header-left; grid-area: header-bottom;
} }
#site-header > nav > div:nth-child(4) { #site-header > nav > div:nth-child(4) {
grid-area: header-center; grid-area: header-left;
} }
#site-header > nav > div:nth-child(5) { #site-header > nav > div:nth-child(5) {
grid-area: header-centre;
}
#site-header > nav > div:nth-child(6) {
grid-area: header-right; grid-area: header-right;
} }
@ -163,9 +187,9 @@
justify-items: center; justify-items: center;
align-items: center; align-items: center;
grid-template-areas: grid-template-areas:
"list-page-header" "list-page-header"
"list-page-grid" "list-page-grid"
"list-page-footer"; "list-page-footer";
} }
#list-page > header { #list-page > header {
grid-area: list-page-header; grid-area: list-page-header;
@ -224,9 +248,9 @@
grid-template-columns: 5% auto 5%; grid-template-columns: 5% auto 5%;
grid-template-rows: 2.5% auto 2.5%; grid-template-rows: 2.5% auto 2.5%;
grid-template-areas: grid-template-areas:
". . ." ". . ."
". tile-details ." ". tile-details ."
". . ."; ". . .";
} }
#list-page > section#grid article.tile:nth-child(1) { grid-area: li1; } #list-page > section#grid article.tile:nth-child(1) { grid-area: li1; }
#list-page > section#grid article.tile:nth-child(2) { grid-area: li2; } #list-page > section#grid article.tile:nth-child(2) { grid-area: li2; }
@ -242,8 +266,8 @@
grid-template-columns: 5px auto 5px; grid-template-columns: 5px auto 5px;
grid-template-rows: auto auto; grid-template-rows: auto auto;
grid-template-areas: grid-template-areas:
". tile-title ." ". tile-title ."
". tile-subtitle ."; ". tile-subtitle .";
} }
article.tile > header > h1 { article.tile > header > h1 {
grid-area: tile-title; grid-area: tile-title;
@ -264,7 +288,7 @@
@media only screen and (min-width: 1024px) { @media only screen and (min-width: 1024px) {
#split-page, #split-page,
#split-page > #wrapper { #split-page > #wrapper {
width: 100%; width: 100%;
} }
} }
@ -274,8 +298,8 @@
justify-items: center; justify-items: center;
align-items: center; align-items: center;
grid-template-areas: grid-template-areas:
"post" "post"
"comments"; "comments";
} }
#split-page > #wrapper { #split-page > #wrapper {
@ -285,18 +309,19 @@
justify-items: center; justify-items: center;
align-items: center; align-items: center;
grid-template-areas: grid-template-areas:
"post-content-header" "post-content-header"
"post-content"; "post-content";
} }
@media only screen and (min-width: 1024px) { @media only screen and (min-width: 1024px) {
#split-page > #wrapper { #split-page > #wrapper {
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
grid-template-rows: 70vh auto; grid-template-rows: 70vh auto auto;
justify-items: center; justify-items: center;
align-items: center; align-items: center;
grid-template-areas: grid-template-areas:
"post-content-header post-content" "post-content-header post-content"
" . post-content"; " post-toc post-content"
" . post-content";
} }
} }
@ -305,43 +330,43 @@
background-position: center center; background-position: center center;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
min-height: 80vh; min-height: 70vh;
height: 100%; height: 100%;
margin-bottom: 4em;
width: 100vw; width: 100vw;
grid-template-columns: 1fr; grid-template-columns: 1fr auto 1fr;
grid-template-rows: 1fr; grid-template-rows: 1fr auto 1fr;
grid-template-areas: grid-template-areas:
"post-header-details"; ". . ."
". post-header-details ."
". . .";
} }
@media only screen and (min-width: 1024px) { @media only screen and (min-width: 1024px) {
#split-page > #wrapper > header { #split-page > #wrapper > header {
grid-area: post-content-header; grid-area: post-content-header;
min-height: 180px; min-height: 180px;
height: 100%; height: 100%;
width: 100%; width: 100%;
grid-template-columns: 15% 1fr 15%; grid-template-columns: 15% 1fr 15%;
grid-template-rows: 20% 1fr 20%; grid-template-rows: 20% 1fr 20%;
grid-template-areas: grid-template-areas:
". . ." ". . ."
". post-header-details ." ". post-header-details ."
". . ."; ". . .";
} }
} }
#split-page > #wrapper > header > div { #split-page > #wrapper > header > div {
grid-area: post-header-details; grid-area: post-header-details;
grid-template-columns: 1fr; grid-template-columns: 1fr;
padding: 20px; padding: 20px;
grid-template-rows: 1fr auto auto 1fr auto 1fr; grid-template-rows: 1fr auto auto 1fr;
justify-items: center; justify-items: center;
align-items: center; align-items: center;
grid-template-areas: grid-template-areas:
"." "."
"post-title" "post-title"
"post-subtitle" "post-subtitle"
"." ".";
"post-date"
".";
} }
#split-page > #wrapper > header > div > h1 { #split-page > #wrapper > header > div > h1 {
grid-area: post-title; grid-area: post-title;
@ -353,6 +378,25 @@
grid-area: post-date; grid-area: post-date;
} }
#split-page #post-toc {
grid-area: post-toc;
width: 100%;
text-align: left;
}
#split-page #post-toc > h1 {
border-bottom: 2px inset var(--dark);
margin-top: 0.5em;
margin-bottom: 0.5em;
line-height: 1.2em;
text-align: center;
}
#split-page #post-toc > ol > li {
margin-top: 0.5em;
margin-bottom: 0.5em;
}
#split-page > #wrapper > .body { #split-page > #wrapper > .body {
grid-area: post-content; grid-area: post-content;
display: block; display: block;
@ -362,16 +406,16 @@
grid-template-columns: 1fr; grid-template-columns: 1fr;
grid-template-rows: auto auto auto auto auto auto auto auto auto auto; grid-template-rows: auto auto auto auto auto auto auto auto auto auto;
grid-template-areas: grid-template-areas:
"description" "description"
"timeline" "timeline"
"related" "related"
"posts" "posts"
"websites" "websites"
"programs" "programs"
"writings" "writings"
"videos" "videos"
"others" "others"
"quals-and-awards"; "quals-and-awards";
} }
#organisation-body > #description { #organisation-body > #description {
@ -392,7 +436,7 @@
grid-template-rows: auto; grid-template-rows: auto;
text-align: left; text-align: left;
grid-template-areas: grid-template-areas:
"left right"; "left right";
} }
#organisation-body > #related > #children { #organisation-body > #related > #children {
grid-area: left; grid-area: left;
@ -428,8 +472,8 @@
grid-template-columns: 1fr; grid-template-columns: 1fr;
grid-template-rows: auto auto; grid-template-rows: auto auto;
grid-template-areas: grid-template-areas:
"title" "title"
"items"; "items";
} }
#organisation-body > .org-items h2.subheading { #organisation-body > .org-items h2.subheading {
grid-area: title; grid-area: title;
@ -437,12 +481,12 @@
#organisation-body > .org-items .index { #organisation-body > .org-items .index {
grid-gap: 6px 5px; grid-gap: 6px 5px;
grid-area: items; grid-area: items;
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(4, 1fr);
grid-template-rows: repeat(1, 1fr); grid-template-rows: 1fr;
justify-items: stretch; justify-items: stretch;
align-items: stretch; align-items: stretch;
grid-template-areas: grid-template-areas:
"item1 item2"; "item1 item2 item3 item4";
} }
#organisation-body > .org-items .index .item:nth-child(1) { #organisation-body > .org-items .index .item:nth-child(1) {
grid-area: item1; grid-area: item1;
@ -450,6 +494,12 @@
#organisation-body > .org-items .index .item:nth-child(2) { #organisation-body > .org-items .index .item:nth-child(2) {
grid-area: item2; grid-area: item2;
} }
#organisation-body > .org-items .index .item:nth-child(3) {
grid-area: item3;
}
#organisation-body > .org-items .index .item:nth-child(4) {
grid-area: item4;
}
#split-page > #comments { #split-page > #comments {
grid-area: comments; grid-area: comments;
@ -460,22 +510,24 @@
grid-template-columns: 1fr; grid-template-columns: 1fr;
grid-template-rows: auto auto; grid-template-rows: auto auto;
grid-template-areas: grid-template-areas:
"comment-entry" "comment-entry"
"comments"; "comments";
} }
@media only screen and (min-width: 1024px) { @media only screen and (min-width: 1024px) {
#split-page > #comments > .row { #split-page > #comments > .row {
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr; grid-template-rows: 1fr;
grid-template-areas: grid-template-areas:
"comments comment-entry"; "comments comment-entry";
} }
} }
#split-page > #comments #comments-list { #split-page > #comments #comments-list {
grid-area: comments; grid-area: comments;
justify-items: center; justify-items: center;
align-items: start; align-items: start;
} }
#split-page > #comments #comments-reply { #split-page > #comments #comments-reply {
grid-area: comment-entry; grid-area: comment-entry;
justify-items: center; justify-items: center;
@ -483,8 +535,59 @@
text-align: center; text-align: center;
} }
#related-organisations { .comment-body {
grid-template-columns: 15% 1fr;
grid-template-rows: auto auto;
grid-template-areas:
"comment-meta comment-content"
". comment-content"
". comment-reply";
}
.comment-body .comment-meta {
grid-area: comment-meta;
justify-items: center;
align-items: start;
text-align: center;
font-weight: bold;
}
.comment-body .comment-meta .comment-author img {
display: none;
}
.comment-body .comment-content {
grid-area: comment-content;
justify-items: left;
align-items: start;
padding: 0 2em 0 2em;
}
.comment-body .comment-content p {
padding-top: 0.5em;
padding-bottom: 0.5em;
font-size: 1em;
}
.comment-body .comment-content p:first-of-type {
padding-top: 0em;
}
.comment-body .comment-content p:last-of-type {
padding-bottom: 0em;
}
.comment-body .comment-content .comment-source {
font-size: 0.75em;
opacity: 0.75;
}
.comment-body .reply {
grid-area: comment-reply;
justify-items: right;
align-items: start;
text-align: right;
padding-left: 0.4em;
} }
body > footer { body > footer {
@ -511,7 +614,7 @@
} }
body:not(.page-template-centred-page) > main { body:not(.page-template-centred-page) > main {
margin-top: 80px; margin-top: 3.8em;
} }
body > header { body > header {
@ -559,15 +662,24 @@ article #details {
display: block; display: block;
} }
#split-page > #split-page section div {
margin: 0 1em;
}
#organisation-body {
width: 100%;
}
/** 2.Inline Elements */ /** 2.Inline Elements */
/* 1.1. Appearance */ /* 1.1. Appearance */
body { font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif; } body {
font-family: Palatino, serif;
}
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6, th {
font-family: "Palatino Linotype", serif;
margin: 0; margin: 0;
} }
@ -589,7 +701,7 @@ ol {
strong { font-weight: bold; } strong { font-weight: bold; }
sup, sup { sup, sub {
font-size:xx-small; font-size:xx-small;
line-height: 1.2em; line-height: 1.2em;
} }
@ -637,16 +749,58 @@ q, blockquote {
q.guillemets { q.guillemets {
quotes: "«" "»" "«" "»"; quotes: "«" "»" "«" "»";
} }
q:before, blockquote p:first-of-type::before { q:before, blockquote:not(.no-first-quote) p:first-of-type::before {
content: open-quote; content: open-quote;
} }
q:after, blockquote p:last-of-type::after { q:after, blockquote:not(.no-last-quote) p:last-of-type::after {
content: close-quote; content: close-quote;
} }
cite:not(.smallcite), i, em { font-style: italic; } i, em {
cite.smallcite:before { content: '“'; } font-style: italic;
cite.smallcite:after { content: '”'; } }
cite,
cite.book,
cite.film,
cite.tv-show,
cite.book,
cite.album,
cite.report {
font-style: italic;
}
cite.legislation,
cite.smallcite,
cite.article,
cite.episode,
cite.video,
cite.chapter,
cite.song,
cite.speech,
cite.presentation {
font-style: normal;
}
cite.smallcite:before,
cite.article:before,
cite.episode:before,
cite.video:before,
cite.chapter:before,
cite.song:before,
cite.speech:before,
cite.presentation:before {
content: '“';
}
cite.smallcite:after,
cite.article:after,
cite.episode:after,
cite.video:after,
cite.chapter:after,
cite.song:after,
cite.speech:after,
cite.presentation:after {
content: '”';
}
code, code,
samp, samp,
@ -663,18 +817,39 @@ pre .nocode {
border-radius: 6px; border-radius: 6px;
border: dashed 1px black; border: dashed 1px black;
} }
:not(.post-title):not(pre) code, code,
:not(.post-title):not(pre) samp, samp,
:not(.post-title):not(pre) var { var {
background-color: #d1d1d1; background-color: #d1d1d1;
border-radius: 5px; border-radius: 5px;
padding: 2px 2px; padding: 2px 2px;
} }
pre {
max-width: 50vw;
overflow: scroll;
}
h1 code, .post-title code, pre code,
h1 samp, .post-title samp, pre samp,
h1 var, .post-title var, pre var {
background-color: transparent;
padding: 0;
}
.heading code, .heading code,
.subheading code { .subheading code {
background-color: transparent; background-color: transparent;
} }
pre.prettyprint ol {
padding-left: 3.5em;
}
pre.prettyprint li {
background: none !important;
}
li.L0, li.L1, li.L2, li.L3, li.L0, li.L1, li.L2, li.L3,
li.L5, li.L6, li.L7, li.L8 { li.L5, li.L6, li.L7, li.L8 {
list-style-type: decimal !important; list-style-type: decimal !important;
@ -702,8 +877,18 @@ kbd {
white-space: nowrap; white-space: nowrap;
} }
.pre-nominals,
.post-nominals { .post-nominals {
font-size: 0.6em; font-size: 0.6em;
font-variant: small-caps;
}
.article__text--commentary {
display: inline;
}
#toggleCommentary {
text-decoration: underline;
} }
#comments-list-title { #comments-list-title {
@ -765,7 +950,7 @@ body > header h1 {
#split-page > #wrapper > header > div > h1 { #split-page > #wrapper > header > div > h1 {
font-weight: bold; font-weight: bold;
margin-top: 20%; /*margin-top: 20%;*/
font-size: 2.5em; font-size: 2.5em;
} }
#split-page > #wrapper > header > div > h2 { #split-page > #wrapper > header > div > h2 {
@ -776,6 +961,10 @@ body > header h1 {
margin-top: 20%; margin-top: 20%;
font-size: 1em; font-size: 1em;
} }
#split-page > #wrapper > footer > h1 {
font-size: 2em;
}
@media only screen and (min-width: 1024px) { @media only screen and (min-width: 1024px) {
#split-page > #wrapper > header > div > h1 { #split-page > #wrapper > header > div > h1 {
font-size: 3.5em; font-size: 3.5em;
@ -787,13 +976,98 @@ body > header h1 {
#comments-list-title, #comments-reply-title { #comments-list-title, #comments-reply-title {
font-size: 1.6em; font-size: 1.6em;
margin-bottom: 0.5em;
}
.logged-in-as, .comment-form-comment, .form-submit {
margin-bottom: 0.5em;
}
.comment-form-comment label {
display: none;
}
.comment-form-comment textarea,
.form-submit input#submit {
border: 2px solid black;
background-color: #fffff0;
}
.form-submit input#submit {
padding: 0.6em 1em;
cursor: pointer;
box-shadow: 3px 3px black;
}
.form-submit input#submit:hover {
box-shadow: none;
margin-left: 3px;
}
.akismet_comment_form_privacy_notice {
font-size: 0.6em;
}
.comment-list {
margin: auto;
list-style: none;
}
.comment .children {
list-style: none;
}
.comment .children .comment .comment-body {
border-left: 2px solid black;
padding-left: 1em;
}
.comment-body {
border-top: 1px solid black;
border-bottom: 1px solid black;
padding-top: 1em;
}
.comment-body:first-of-type {
border-top: 0px;
}
.comment-body:last-of-type {
border-bottom: 0px;
}
.comment-body .comment-meta img {
border-radius: 50%;
width: 100%;
height: auto;
}
.comment-body .comment-meta .says {
display: none;
}
.comment-body .comment-meta .comment-metadata > a {
margin-top: 0.4em;
margin-bottom: 0.4em;
font-size: 0.6em;
}
.comment-body .comment-meta .comment-metadata .edit-link {
font-size: 0.8em;
margin-top: 0.4em;
}
.comment-body .comment-meta .comment-metadata .edit-link::before {
content: '( ';
}
.comment-body .comment-meta .comment-metadata .edit-link::after {
content: ' )';
} }
main#split-page > #wrapper > .body { main#split-page > #wrapper > .body {
text-align: justify; text-align: left;
padding: 0 2em 2em 2em; padding: 0 2em 2em 2em;
} }
main#split-page > #wrapper > .body blockquote:first-of-type { main#split-page > #wrapper > .body blockquote:first-of-type:not(.no-first-blockquote) {
font-size: 1.2em; font-size: 1.2em;
text-align: center; text-align: center;
margin: 0; margin: 0;
@ -811,7 +1085,7 @@ main#split-page > #wrapper > .body ol li {
font-size: 1em; font-size: 1em;
margin-top: 0.5em; margin-top: 0.5em;
margin-bottom: 0.5em; margin-bottom: 0.5em;
line-height: 1.2em; line-height: 1.3em;
} }
main#split-page > #wrapper > .body h2.subheading { main#split-page > #wrapper > .body h2.subheading {
font-size: 1.6em; font-size: 1.6em;
@ -821,6 +1095,16 @@ main#split-page > #wrapper > .body h2.subheading {
line-height: 1.2em; line-height: 1.2em;
text-align: center; text-align: center;
} }
main#split-page > #wrapper > .body h3.subsubheading {
font-size: 1em;
border-bottom: 1px dashed var(--dark);
margin-top: 1em;
margin-bottom: 1em;
padding-bottom: 0.5em;
line-height: 1em;
text-align: left;
font-weight: bold;
}
main#split-page > #wrapper > #organisation-body h2.subheading a { main#split-page > #wrapper > #organisation-body h2.subheading a {
font-size: 0.5em; font-size: 0.5em;
} }
@ -863,6 +1147,77 @@ a:hover, a:focus {
#experience-wrapper { #experience-wrapper {
grid-area: page-container; grid-area: page-container;
} }
#organisations-grid {
border-spacing: 1em;
margin-top: 1em;
margin-bottom: 1em;
border-radius: 10px;
}
#organisations-grid th {
font-weight: bold;
text-align: left;
padding: 1em;
font-size: 1.4em;
}
#organisations-grid tr:first-of-type {
background-color: #808080;
color: #FFFFF0;
z-index: 1;
position: sticky;
vertical-align: middle;
top: 99px;
max-height: 1.8em;
}
#organisations-grid tr:nth-child(even) {
background-color: #DDDDD0;
}
.organisation td {
padding: 1em;
vertical-align: middle;
}
.organisation a {
display: block;
}
.organisation-logo {
width: 160px;
}
.organisation-logo img {
height: 60px;
width: auto;
max-width: 150px;
display: block;
object-fit: contain;
margin: auto
}
.organisation-children {
width: 5%
}
.organisation-items:not(.organisation-children) .organisation-item {
width: 10%;
float: left;
}
.organisation-items .organisation-item {
text-align: center;
}
.organisation-items .organisation-item span {
margin: auto;
}
.organisation-items .organisation-item.none {
opacity: 0.4;
}
.company-info-container { .company-info-container {
background-color: #ffffff; background-color: #ffffff;
max-width: 60px; max-width: 60px;
@ -962,7 +1317,7 @@ a:hover, a:focus {
#split-page > #wrapper > .body > figure { #split-page > #wrapper > .body > figure {
max-width: none !important; max-width: none !important;
width: 100%; width: 100% !important;
text-align: center; text-align: center;
} }
@ -986,3 +1341,27 @@ a:hover, a:focus {
.latex { .latex {
vertical-align: middle; vertical-align: middle;
} }
span.nobr {
white-space: nowrap;
}
.footnote_tooltip {
z-index: 1;
}
.footnote-reference-container {
border-collapse: separate;
border-spacing: 0 10px;
}
table:not(.footnote-reference-container) th {
font-weight: bold;
}
table:not(.footnote-reference-container) th,
table:not(.footnote-reference-container) td {
border: 1px solid var(--dark);
padding: 0.5em 1em;
text-align: left;
}

View File

@ -13,14 +13,15 @@
<?php <?php
// Gets all of the roles attached to the given organisation. // Gets all of the roles attached to the given organisation.
$company = get_queried_object(); $company = get_queried_object();
echo "<!-- ".$company->name."-->";
$args= array( $args= array(
'post_type' => array( 'job' ), 'post_type' => array( 'job' ),
'tax_query' => array( 'tax_query' => array(
array( array(
'taxonomy' => 'company', 'taxonomy' => 'company',
'field' => 'slug', 'field' => 'slug',
'terms' => $company->name, 'terms' => $company->slug,
), ),
), ),
'posts_per_page' => -1 'posts_per_page' => -1
); );
@ -32,48 +33,49 @@
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
google.charts.load('current', {'packages':['timeline']}); google.charts.load('current', {'packages':['timeline']});
<?php if ($loop->have_posts()): ?>
google.charts.setOnLoadCallback(drawChart); google.charts.setOnLoadCallback(drawChart);
<?php endif; ?>
function drawChart() { function drawChart() {
var container = document.getElementById('timeline'); var container = document.getElementById('timeline');
var chart = new google.visualization.Timeline(container); var chart = new google.visualization.Timeline(container);
var dataTable = new google.visualization.DataTable(); var dataTable = new google.visualization.DataTable();
dataTable.addColumn({ type: 'string', id: 'Type' }); dataTable.addColumn({ type: 'string', id: 'Type' });
dataTable.addColumn({ type: 'string', id: 'Job Title' }); dataTable.addColumn({ type: 'string', id: 'Job Title' });
dataTable.addColumn({ type: 'date', id: 'Start' }); dataTable.addColumn({ type: 'date', id: 'Start' });
dataTable.addColumn({ type: 'date', id: 'End' }); dataTable.addColumn({ type: 'date', id: 'End' });
dataTable.addRows([ dataTable.addRows([
<?php while ( $loop->have_posts() ) : $loop->the_post(); <?php while ($loop->have_posts()): $loop->the_post();
// Gets all of the roles associated with this organisation and its // Gets all of the roles associated with this organisation and its
// child organisations. // child organisations.
$companies = wp_get_object_terms(get_the_ID(), 'company'); $companies = wp_get_object_terms(get_the_ID(), 'company');
$i = 0; $i = 0;
$currSizeOf = -1; $currSizeOf = -1;
foreach ($companies as $company) { foreach ($companies as $company) {
if (sizeof(get_ancestors($company->term_id, 'company')) > $currSizeOf) { if (sizeof(get_ancestors($company->term_id, 'company')) > $currSizeOf) {
$currSizeOf = sizeof(get_ancestors($company->term_id, 'company')); $currSizeOf = sizeof(get_ancestors($company->term_id, 'company'));
$lowestDepthCompany = $i++; $lowestDepthCompany = $i++;
} }
} }
$title = html_entity_decode(get_the_title()); $title = html_entity_decode(get_the_title());
$start = get_the_date(); $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); $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 "[ '".html_entity_decode($companies[$lowestDepthCompany]->name)."', '$title', new Date('$start'), new Date('$end') ],\n";
echo "[ '{$companies[$lowestDepthCompany]->name}', '$title', new Date('$start'), new Date('$end') ],\n";
endwhile; ?> endwhile; ?>
]); ]);
// Draws the table, then resizes the element height and re-draws it // Draws the table, then resizes the element height and re-draws it
// to avoid needing to scroll vertically. // to avoid needing to scroll vertically.
//chart.draw(dataTable); chart.draw(dataTable);
var realheight = parseInt($("#timeline div:first-child div:first-child div:first-child div svg").attr("height"))+70; var realheight = parseInt(jQuery("#timeline div:first-child div:first-child div:first-child div svg").attr("height"))+70;
var options = {}; var options = {};
options.height = realheight; options.height = realheight;
//chart.draw(dataTable, options); chart.draw(dataTable, options);
console.log(dataTable);
} }
</script> </script>
@ -84,130 +86,155 @@
?> ?>
<div id="wrapper"> <div id="wrapper">
<header style="background-image: url('<?php echo $companyLogo ?>'); background-color: <?php echo get_term_meta(get_queried_object()->term_id, 'color')[0] ?>; background-size: contain;"> <header style="background-image: url('<?php echo $companyLogo ?>'); background-color: <?php echo get_term_meta(get_queried_object()->term_id, 'color')[0] ?>; background-size: contain;">
<div> <div>
<?php <?php
if (strlen($companyName) > 70) $small= "2em"; if (strlen($companyName) > 70) $small= "2em";
elseif (strlen($companyName) > 35) $small = "3em"; elseif (strlen($companyName) > 35) $small = "3em";
elseif (strlen($companyName) > 12) $small = "4em"; elseif (strlen($companyName) > 12) $small = "4em";
else $small = "5em" else $small = "5em"
?> ?>
<h1 id="post-title" style="font-size: <?php echo $small ?>;"><?php echo $companyName; ?></h1> <h1 id="post-title" style="font-size: <?php echo $small ?>;"><?php echo $companyName; ?></h1>
</div> </div>
</header><!-- .entry-header --> </header><!-- .entry-header -->
<main id="organisation-body" class="body"> <main id="organisation-body" class="body">
<section id="description"> <section id="description">
<?php the_archive_description(); ?> <?php the_archive_description(); ?>
</section> </section>
<section id="timeline"> <?php if ($loop->have_posts()): ?>
<?php /*if ($loop->have_posts()): ?> <section id="timeline">
<div class="row"> <div class="row">
<div id="timeline" class="col-12"> <div id="timeline" class="col-12">
<img class="loading" src="/wp-content/uploads/2016/12/ajax-loader.gif"> <img class="loading" src="/wp-content/uploads/2016/12/ajax-loader.gif">
</div> </div>
</div> </div>
<?php endif;*/ ?> </section>
</section> <?php endif; ?>
<section id="related" class="row"> <section id="related" class="row">
<div id="parents" class="col-6 col-m-12"> <div id="parents" class="col-6 col-m-12">
<?php <?php
if (get_queried_object()->parent != 0) { if (get_queried_object()->parent != 0) {
$parents = apply_filters("taxonomy-images-get-terms", $parents = apply_filters("taxonomy-images-get-terms", "",
"", array(
array( 'having_images' => false,
'having_images' => false, 'taxonomy' => 'company',
'taxonomy' => 'company', 'term_args' => array(
'term_args' => array( 'include' => get_term_by('id', get_queried_object()->parent, 'company')->term_id
'include' => get_term_by('id', get_queried_object()->parent, 'company')->term_id )
) )
)); );
} }
if (count($parents) > 0): ?> if (count($parents) > 0): ?>
<h2 class="subheading">Parent</h2> <h2 class="subheading">Parent</h2>
<ul class="index"> <ul class="index">
<?php foreach ((array) $parents as $parent): <?php foreach ((array) $parents as $parent):
$imgURL = wp_get_attachment_image_src($parent->image_id)[0]; $imgURL = wp_get_attachment_image_src($parent->image_id)[0];
$colour = get_term_meta($parent->term_id, 'color', true); $colour = get_term_meta($parent->term_id, 'color', true);
$colour = ($colour != "") ? $colour : "transparent"; ?> $colour = ($colour != "") ? $colour : "transparent"; ?>
<li><a href="<?php echo esc_url(get_term_link($parent, $parent->taxonomy)) ?>"><?php echo get_term($parent->term_id, 'company')->name ?></a></li> <li><a href="<?php echo esc_url(get_term_link($parent, $parent->taxonomy)) ?>"><?php echo get_term($parent->term_id, 'company')->name ?></a></li>
<?php endforeach; ?> <?php endforeach; ?>
</ul> </ul>
<?php else: ?> <?php endif; ?>
<h2 class="subheading"></h2> </div>
<?php endif; ?>
</div>
<div id="children" class="col-6 col-m-12"> <div id="children" class="col-6 col-m-12">
<?php <?php
$children = apply_filters("taxonomy-images-get-terms", "", array('having_images' => false, 'taxonomy' => 'company', 'term_args' => array('parent' => get_queried_object()->term_id))); $children = apply_filters("taxonomy-images-get-terms", "", array('having_images' => false, 'taxonomy' => 'company', 'term_args' => array('parent' => get_queried_object()->term_id)));
if (count($children) > 0): ?> if (count($children) > 0): ?>
<h2 class="subheading">Children</h2> <h2 class="subheading">Child<?php echo (count($children) != 1) ? "ren" : ""; ?></h2>
<ul class="index"> <ul class="index">
<?php foreach ( (array) $children as $child ): <?php foreach ( (array) $children as $child ):
$imgURL = wp_get_attachment_image_src($child->image_id, 'detail')[0]; $imgURL = wp_get_attachment_image_src($child->image_id, 'detail')[0];
$colour = get_term_meta($child->term_id, 'color', true); $colour = get_term_meta($child->term_id, 'color', true);
$colour = ($colour != "") ? $colour : "transparent"; ?> $colour = ($colour != "") ? $colour : "transparent"; ?>
<li><a href="<?php echo esc_url(get_term_link($child, $child->taxonomy)) ?>"><?php echo get_term($child->term_id, 'company')->name ?></a></li> <li><a href="<?php echo esc_url(get_term_link($child, $child->taxonomy)) ?>"><?php echo get_term($child->term_id, 'company')->name ?></a></li>
<?php endforeach; ?> <?php endforeach; ?>
</ul> </ul>
<?php else: ?> <?php else: ?>
<p>No children.</p> <p>No children.</p>
<?php endif; ?> <?php endif; ?>
</div> </div>
</section> </section>
<?php <?php
$pageOrder = array( 'post', 'website', 'program', 'writing', 'video', 'other'); $pageOrder = array( 'post', 'website', 'program', 'writing', 'video', 'other');
foreach ($pageOrder as $currSec) { foreach ($pageOrder as $currSec) {
$args['post_type'] = array( $currSec ); $args['post_type'] = array( $currSec );
$i = 0; $i = 0;
$loop = new WP_Query( $args ); $loop = new WP_Query( $args );
if ( $loop->have_posts() ): if ( $loop->have_posts() ):
echo '<section id="'.$currSec.'" class="org-items row">'; echo '<section id="'.$currSec.'" class="org-items row">';
echo '<h2 class="subheading">'.ucwords($currSec).'s <a href="/'.($currSec != "post" ? $currSec : "blog").'?company='.get_queried_object()->slug.'">View all '.$loop->post_count.'</a></h2>'; echo '<h2 class="subheading">'.ucwords($currSec).'s <a href="/'.($currSec != "post" ? $currSec : "blog").'?company='.get_queried_object()->slug.'">View all '.$loop->post_count.'</a></h2>';
echo '<div class="index">'; echo '<div class="index">';
while (($loop->have_posts()) && ($i++ < 2)) : $loop->the_post(); while (($loop->have_posts()) && ($i++ < 4)) : $loop->the_post();
get_template_part( 'template-parts/content', get_post_format() ); get_template_part( 'template-parts/content', get_post_format() );
endwhile; endwhile;
echo '</div>'; echo '</div>';
echo '</section>'; echo '</section>';
endif; endif;
} }
echo '<section id="quals-and-awards">'; echo '<section id="quals-and-awards">';
echo '<div id="qualifications" class="org-items row">'; echo '<div id="qualifications" class="org-items row">';
$args['post_type'] = 'qualification'; $args['post_type'] = 'qualification';
$i = 0; $loop = new WP_Query( $args );
$loop = new WP_Query( $args ); echo '<h2 class="subheading">Qualifications</h2>';
echo '<h2 class="subheading">Qualifications</h2>'; if ( $loop->have_posts() ):
if ( $loop->have_posts() ): echo '<ul class="index">';
echo '<ul class="index">'; while ($loop->have_posts()) : $loop->the_post();
while ($loop->have_posts()) : $loop->the_post(); $url = esc_url(get_permalink());
echo '<li><a href="#">'.get_the_title().'</a></li>'; echo '<li><a href="'.$url.'">'.get_the_title().'</a></li>';
endwhile; endwhile;
echo '</ul>'; echo '</ul>';
else: else:
echo '<p>No qualifications.</p>'; echo '<p>No qualifications.</p>';
endif; endif;
echo '</div>'; echo '</div>';
echo '<div id="awards" class="org-items row">';
$args['post_type'] = 'award'; echo '<div id="awards" class="org-items row">';
$i = 0; $args['post_type'] = 'award';
$loop = new WP_Query( $args ); $loop = new WP_Query( $args );
echo '<h2 class="subheading">Awards</h2>'; echo '<h2 class="subheading">Awards</h2>';
if ( $loop->have_posts() ): if ( $loop->have_posts() ):
echo '<ul class="index">'; echo '<ul class="index">';
while ($loop->have_posts()) : $loop->the_post(); while ($loop->have_posts()) : $loop->the_post();
echo '<li><a href="#">'.get_the_title().'</a></li>'; $url = esc_url(get_permalink());
endwhile; echo '<li><a href="'.$url.'">'.get_the_title().'</a></li>';
echo '</ul>'; endwhile;
else: echo '</ul>';
echo '<p>No awards.</p>'; else:
endif; echo '<p>No awards.</p>';
echo '</div>'; endif;
echo '</section>' echo '</div>';
echo '</section>';
$args['post_type'] = 'appearance';
$loop = new WP_Query( $args );
if ( $loop->have_posts() ):
echo '<section id="appearances" class="org-items row">';
echo '<h2 class="subheading">Appearances <a href="/appearance?company='.get_queried_object()->slug.'">View all '.$loop->post_count.'</a></h2>';
echo '<div class="index">';
while (($loop->have_posts())) : $loop->the_post();
get_template_part( 'template-parts/content', get_post_format() );
endwhile;
echo '</div>';
echo '</section>';
endif;
$args['post_type'] = 'correspondence';
$loop = new WP_Query( $args );
if ( $loop->have_posts() ):
echo '<section id="correspondence" class="org-items row">';
echo '<h2 class="subheading">Correspondence <a href="/correspondence?company='.get_queried_object()->slug.'">View all '.$loop->post_count.'</a></h2>';
echo '<div class="index">';
while (($loop->have_posts())) : $loop->the_post();
get_template_part( 'template-parts/content', get_post_format() );
endwhile;
echo '</div>';
echo '</section>';
endif;
?> ?>
</main> </main>
</div> </div>

View File

@ -11,16 +11,18 @@
<article id="wrapper" <?php post_class(); ?>> <article id="wrapper" <?php post_class(); ?>>
<header style="background-image: url('<?php the_post_thumbnail_url(); ?>');"> <header style="background-image: url('<?php the_post_thumbnail_url(); ?>');">
<div> <div>
<h1 id="post-title"><?php echo get_the_title(); ?></h1> <h1 id="post-title"><?php echo get_the_title(); ?></h1>
<?php if ($subtitle = get_post_meta(get_the_ID(), 'Subtitle', true)): ?> <?php if ($subtitle = get_post_meta(get_the_ID(), 'Subtitle', true)): ?>
<h2 id="post-subtitle"><?php echo $subtitle ?></h2> <h2 id="post-subtitle"><?php echo $subtitle ?></h2>
<?php endif; ?> <?php endif; ?>
<?php the_date('F j\<\s\u\p\>S\<\/\s\u\p\>, 1,Y \H\.\E\.', '<h3>', '</h3>'); ?> <?php //the_date('F j\<\s\u\p\>S\<\/\s\u\p\>, 1,Y \H\.\E\.', '<h3>', '</h3>'); ?>
</div> </div>
</header><!-- .entry-header --> </header><!-- .entry-header -->
<main id="post-body" class="body"> <main id="post-body" class="body">
<?php if (has_category()): ?> <?php $date1 = strtotime(get_the_date('Y-m-d')); ?>
<?php $date2 = strtotime(date('Y-m-d')); ?>
<?php if (has_category('series') || has_tag('ohwhatohjeez') || get_post_meta(get_the_ID(), 'Note(s)', true) || get_post_meta(get_the_ID(), 'License', true) || ($date1 < $date2 - 31557600)): ?>
<div id="details"> <div id="details">
<ul> <ul>
<?php <?php
@ -47,16 +49,22 @@
$catag .= '<a href="/category/series/'.$thisSeries->slug.'">'.$thisSeries->name.'</a>'; $catag .= '<a href="/category/series/'.$thisSeries->slug.'">'.$thisSeries->name.'</a>';
} }
$catag .= '.'; $catag .= '.';
} else {
$catag = "is not a part of any series."; echo "<li>This <a href='/category/{$type}s'>{$type}</a> {$catag}</li>";
} }
?> ?>
<li>This <?php echo '<a href="/category/'.$type.'s">'.$type.'</a> '.$catag.'</li>'; ?>
<?php if ($date1 < $date2 - 31557600): ?>
<li>This piece was written over a year ago. It may no longer accurately reflect my views now, or may be factually outdated.</li>
<?php endif; ?>
<?php if (has_tag('ohwhatohjeez')): ?> <?php if (has_tag('ohwhatohjeez')): ?>
<li>This piece was originally written for my old site, Oh What? Oh Jeez! As such, it may not have transferred over properly and some images and links might be broken (and, to a lesser extent, my writing from years ago is about 80% run-on sentences).</li> <li>This piece was originally written for my old site, Oh What? Oh Jeez! As such, it may not have transferred over properly and some images and links might be broken (and, to a lesser extent, my writing from years ago is about 80% run-on sentences).</li>
<?php endif; ?> <?php endif; ?>
<?php if ($notes = get_post_meta(get_the_ID(), 'Note(s)', true)): ?> <?php if ($notes = get_post_meta(get_the_ID(), 'Note(s)', true)): ?>
<li><?php echo $notes ?></li> <li><?php echo $notes ?></li>
<?php endif; ?>
<?php if ($license = get_post_meta(get_the_ID(), 'License', true)): ?>
<li>This work is licensed under <?php echo $license ?>. <a href="https://bengoldsworthy.uk/2018/03/copywrong/">Sorry about that</a>.</li>
<?php endif; ?> <?php endif; ?>
</ul> </ul>
</div> </div>
@ -70,4 +78,16 @@
endif; endif;
?> ?>
</main><!-- .entry-content --> </main><!-- .entry-content -->
<footer id="post-toc">
<?php if ($content = get_post_meta(get_the_ID(), 'ToC1', true)): ?>
<h1>Contents</h1>
<ol>
<?php $i = 1; ?>
<?php while($content = get_post_meta(get_the_ID(), 'ToC'.$i, true)): ?>
<li><a href="#section-<?php echo $i++ ?>"><?php echo $content ?></a></li>
<?php endwhile; ?>
</ol>
<?php endif; ?>
</footer>
</article><!-- #post-## --> </article><!-- #post-## -->

View File

@ -10,16 +10,16 @@
<a class="item" href="<?php echo ($link = get_post_meta(get_the_ID(), 'External_Link', true)) ? $link : get_the_permalink(); ?>" <?php echo ($link) ? 'target="_blank"' : ''; ?>> <a class="item" href="<?php echo ($link = get_post_meta(get_the_ID(), 'External_Link', true)) ? $link : get_the_permalink(); ?>" <?php echo ($link) ? 'target="_blank"' : ''; ?>>
<article id="post-<?php the_ID(); ?>" class="tile col-m-6 col-4 col-w-3" style="background-image: url('<?php the_post_thumbnail_url(); ?>');"> <article id="post-<?php the_ID(); ?>" class="tile col-m-6 col-4 col-w-3" style="background-image: url('<?php the_post_thumbnail_url(); ?>');">
<?php <?php
if (strlen(get_the_title()) > 70) $small= "vsmall"; if (strlen(get_the_title()) > 70) $small= "vsmall";
elseif (strlen(get_the_title()) > 35) $small = "small"; elseif (strlen(get_the_title()) > 35) $small = "small";
elseif (strlen(get_the_title()) > 12) $small = "qsmall"; elseif (strlen(get_the_title()) > 12) $small = "qsmall";
?> ?>
<header> <header>
<h1 class="<?php echo $small ?>"><?php echo get_the_title(); ?></h1> <h1 class="<?php echo $small ?> post-title"><?php echo get_the_title(); ?></h1>
<?php if ($subtitle = get_post_meta(get_the_ID(), 'Subtitle', true)): ?> <?php if ($subtitle = get_post_meta(get_the_ID(), 'Subtitle', true)): ?>
<h2><?php echo $subtitle ?></h2> <h2><?php echo $subtitle ?></h2>
<?php endif; ?> <?php endif; ?>
</header> </header>
</article><!-- #post-## --> </article><!-- #post-## -->
</a> </a>