Up-to-date

This commit is contained in:
rumperuu 2017-05-25 18:57:33 +00:00
parent 98ea090b9f
commit 1958efe40f
10 changed files with 185 additions and 100 deletions

View file

@ -22,7 +22,7 @@ get_header(); ?>
<header class="page-header">
<?php
the_archive_title( '<h1 id="page-title">', '</h1>' );
the_archive_description( '<div class="taxonomy-description entry-content">', '</div>' );
the_archive_description( '<div class="entry-content tile" id="taxonomy-description">', '</div>' );
?>
</header><!-- .page-header -->

View file

@ -32,6 +32,7 @@ if ( version_compare( $GLOBALS['wp_version'], '4.4-alpha', '<' ) ) {
require get_template_directory() . '/inc/back-compat.php';
}
// This sets the correct background colour for any LaTeX.
global $themecolors;
$themecolors['bg'] = '95b2bf';
$themecolors['text'] = '2b0000';
@ -281,7 +282,7 @@ function omphaloskepsis_scripts() {
// Theme stylesheet.
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', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css');
wp_enqueue_style( 'montserrat', "https://fonts.googleapis.com/css?family=Montserrat" );
@ -496,50 +497,94 @@ function omphaloskepsis_the_content($content) {
add_filter('the_content', 'omphaloskepsis_the_content', 10);
add_action( 'wp_enqueue_scripts', 'load_dashicons_front_end' );
function load_dashicons_front_end() {
wp_enqueue_style( 'dashicons' );
}
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)));
$include = 1;
} else {
// Gets all of the company terms.
$terms = apply_filters("taxonomy-images-get-terms", "", array('having_images' => false, 'taxonomy' => 'company',));
$include = 0;
}
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
// 1 = Blog Posts
// 2 = Websites
// 3 = Programs
// 4 = Writings
// 5 = Videos
// 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) {
$posts = get_posts(array( 'posts_per_page' => -1, 'post_type' => $post_type, 'tax_query' => array(array('taxonomy' => 'company', 'field' => 'slug', 'terms' => $term->slug))));
$args = array(
'posts_per_page' => -1,
'post_type' => $post_type,
'tax_query' => array(
array(
'taxonomy' => 'company',
'field' => 'slug',
'terms' => $term->slug,
'include_children' => $include,
),
),
'meta_query' => array(),
);
if ($_POST['currentjobs'] == "true" && $post_type == "job") {
$args['meta_query'] = array(
array(
'key' => 'end-date',
'compare' => 'NOT EXISTS',
'value' => '1',
),
);
}
if ($_POST['showexpired'] != "true" && $post_type == "qualification") {
$args['meta_query'] = array(
array(
'key' => 'Expired',
'compare' => 'NOT EXISTS',
'value' => '1',
),
);
}
$posts = get_posts($args);
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)) {
($_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 : "var(--light)";
$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.'">';
@ -576,4 +621,4 @@ function display_companies() {
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');

View file

@ -26,18 +26,23 @@
<div class="site-inner">
<div id="content" class="site-content">
<?php if (!is_front_page()): ?>
<div id="header-bar">
<nav 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 class="mobile"><a href="/blog" class="hyperlink-button thin">Blog</a></li>
<li class="mobile" style="line-height: 40px;">|</li>
<li class="mobile mobile-only"><a href="/" class="hyperlink-button thin">Portfolios</a></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>
<li><a href="/award" class="hyperlink-button thin">Awards</a></li>
<li><a href="/qualification" class="hyperlink-button thin">Qualifications</a></li>
<li class="mobile" style="line-height: 40px;">|</li>
<li class="mobile"><a href="/experience" class="hyperlink-button thin">Experience</a></li>
<li><a href="/experience-by-companies" class="hyperlink-button thin">by companies</a></li>
</ul>
</div>
</nav>
<?php endif; ?>

File diff suppressed because one or more lines are too long

View file

@ -13,13 +13,18 @@
get_header(); ?>
<script>
var openingMessage = "This website is still a work-in-progress. Things may look janky or broken entirely, particularly in browsers that aren't Firefox. Sorry about that.";
openingMessage += "\n\nFirefox: ✓ (should be)";
openingMessage += "\nChrome, Opera, etc.: varies";
openingMessage += "\nInternet Explorer: Unlikely until Microsoft make a real browser";
alert(openingMessage);
</script>
<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();
?>
<?php while ( have_posts() ) : the_post(); ?>
<header class="row" id="header-row">
<div class="col-m-3">
<div id="frontpage-img-wrapper">
@ -34,21 +39,18 @@ get_header(); ?>
<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>
<a href="/pub.asc"><i class="fa fa-key"></i> 0x30D22F41</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>
</h2>
</div>
<?php
endwhile;
?>
</header>
<div class="row">
<div class="col-1" style="visibility: hidden;">.</div>
<div class="col-5 tile" id="intro-text">
<?php the_content(); ?>
</div>
</div>
<?php endwhile; ?>
</main><!-- .site-main -->
<?php get_sidebar( 'content-bottom' ); ?>

103
style.css
View file

@ -147,7 +147,7 @@ figcaption {
*/
#intro-text {
background-color: var(--light);
background-color: #95b2bf;
padding: 20px;
text-align: justify;
}
@ -161,7 +161,7 @@ figcaption {
width: 100%;
height: 15%;
max-height: 40px;
background-color: var(--light);
background-color: #95b2bf;
position: fixed;
float: left;
z-index: 1;
@ -182,12 +182,16 @@ figcaption {
opacity: 1;
}
#infinite-footer {
display: none;
}
#post-header-details-container {
border-top: 3px solid var(--dark);
border-top: 3px solid #003d52;
display: block;
position: relative;
width: 100%;
background-color: var(--dark);
background-color: #003d52;
opacity: 0.7;
margin-top: auto;
text-align: center;
@ -202,12 +206,12 @@ figcaption {
}
#comments-reply {
border-left: 2px solid var(--dark);
border-left: 2px solid #003d52;
margin-bottom: 20px;
}
.comment {
background-color: var(--light);
background-color: #95b2bf;
border-radius: 20px;
padding: 20px;
}
@ -241,14 +245,14 @@ figcaption {
h1, h2, h3, h4, h5, h6 {
margin: 0;
font-family: 'Montserrat', sans-serif;
color: var(--dark);
color: #003d52;
}
#header-bar-title {
line-height: 40px;
font-size: 1.5em;
font-weight: bold;
color: var(--dark);
color: #003d52;
margin-right: 25px;
}
@ -272,7 +276,7 @@ h1, h2, h3, h4, h5, h6 {
margin-left: 10px;
text-align: center;
font-size: 1.2em;
color: var(--light);
color: #95b2bf;
}
#post-title {
@ -292,10 +296,15 @@ h1, h2, h3, h4, h5, h6 {
}
.post-title {
text-shadow: -1px -1px 0 var(--light),
1px -1px 0 var(--light),
-1px 1px 0 var(--light),
1px 1px 0 var(--light);
text-shadow: -1px -1px 0 #95b2bf,
1px -1px 0 #95b2bf,
-1px 1px 0 #95b2bf,
1px 1px 0 #95b2bf;
}
.ohwhatohjeez .post-title {
color: #454545;
text-shadow: none;
}
.post-title,
@ -313,7 +322,7 @@ h1, h2, h3, h4, h5, h6 {
.post-title.vsmall { font-size: 1em; }
.subheading-subtitle {
color: var(--light);
color: #95b2bf;
}
#comments-list-title,
@ -328,7 +337,7 @@ h1, h2, h3, h4, h5, h6 {
p {
font-size: 1em;
color: var(--text);
color: #2b0000;
line-height: 1.2em;
padding: 0.5em;
}
@ -348,7 +357,7 @@ sub { vertical-align:bottom; }
ul {
list-style: circle;
color: var(--dark);
color: #003d52;
padding-left: 1.8em;
}
@ -401,7 +410,7 @@ kbd {
blockquote {
margin: 1em 4em 1em 4em;
border-left: 2px solid var(--dark);
border-left: 2px solid #003d52;
}
blockquote:first-of-type {
@ -459,7 +468,7 @@ cite.smallcite:after { content: '”'; }
a {
font-weight: bold;
color: var(--dark);
color: #003d52;
padding: 0;
opacity: 0.7;
}
@ -469,7 +478,6 @@ a:hover {
#header-bar-list {
list-style: none;
float: left;
}
#header-bar-list li {
@ -477,12 +485,16 @@ a:hover {
margin-right: 10px;
}
#header-bar-list li:not(.mobile) {
display: none;
}
#header-bar-list li .hyperlink-button {
margin-top: 5px;
}
.subheading a {
color: var(--light);
color: #95b2bf;
font-size: 0.4em;
vertical-align: middle;
text-decoration: underline;
@ -493,9 +505,9 @@ a:hover {
margin: 10px 20px 10px 0px;
padding: 20px 30px 20px 30px;
border-radius: 35px;
border: 2px solid var(--dark);
background-color: var(--light);
color: var(--dark);
border: 2px solid #003d52;
background-color: #95b2bf;
color: #003d52;
text-decoration: none;
}
.hyperlink-button.thin {
@ -507,9 +519,9 @@ a:hover {
position: relative;
}
.hyperlink-button.thin:hover {
color: var(--light);
background-color: var(--dark);
border-color: var(--light);
color: #95b2bf;
background-color: #003d52;
border-color: #95b2bf;
}
li a.hyperlink-button:not(.thin) {
@ -517,9 +529,8 @@ li a.hyperlink-button:not(.thin) {
}
.index-item {
border-bottom: 2px solid var(--dark);
overflow: hidden;
background-color: var(--light);
background-color: #95b2bf;
height: 250px;
background-size: cover;
background-repeat: no-repeat;
@ -532,7 +543,7 @@ li a.hyperlink-button:not(.thin) {
}
.index-item header {
background-color: var(--dark);
background-color: #003d52;
opacity: 0.7;
margin-top: auto;
text-align: center;
@ -541,6 +552,10 @@ li a.hyperlink-button:not(.thin) {
padding: 10% 15px;
}
.index-item header.ohwhatohjeez {
background-color: #FFA008;
}
.index:hover .index-item {
opacity: 0.7;
}
@ -599,7 +614,7 @@ li a.hyperlink-button:not(.thin) {
height:100vh;
background-size: cover;
background-repeat: no-repeat;
background-position: bottom;
background-position: center;
position: relative;
text-align:center;
display: flex;
@ -681,7 +696,7 @@ li a.hyperlink-button:not(.thin) {
i {
color: var(--text);
color: #2b0000;
}
.row-item {
@ -878,22 +893,22 @@ i {
}
.company-info-container {
background-color: var(--light);
background-color: #95b2bf;
max-width: 60px;
overflow: hidden;
border-bottom: 1px solid var(--dark);
border-bottom: 1px solid #003d52;
}
.company-info-container.left {
border-radius: 0px 0px 15px 0px;
float: left;
border-right: 1px solid var(--dark);
border-right: 1px solid #003d52;
}
.company-info-container.right {
border-radius: 0px 0px 0px 15px;
float: right;
border-left: 1px solid var(--dark);
border-left: 1px solid #003d52;
}
.company-info-container.right .company-info {
@ -903,7 +918,7 @@ i {
.company-info {
font-size: 1em;
line-height: 1.3em;
color: var(--dark);
color: #003d52;
opacity: 0.8;
padding: 2px;
width: auto;
@ -1100,13 +1115,13 @@ float: right;
* 1024px Laptop
* 1444px Desktop
*/
@media only screen and (min-width: 768px) {
#website-title {
font-size: 4.5em;
}
.blog-post .entry-content,
.tile,
.tile:not(#intro-text),
#comments {
width: 80%;
max-width: 1124px;
@ -1137,6 +1152,18 @@ float: right;
background-color: #95b2bf;
border-bottom: 2px solid #003D52;
}
#header-bar-list {
float: left;
}
#header-bar-list li.mobile-only {
display: none;
}
#header-bar-list li:not(.mobile) {
display: block;
}
}
@media only screen and (min-width: 1444px) {

File diff suppressed because one or more lines are too long

View file

@ -9,11 +9,20 @@
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header post-header-image" style="background-image: url('<?php the_post_thumbnail_url(); ?>');">
<header class="entry-header" id="post-header-image" style="background-image: url('<?php the_post_thumbnail_url(); ?>'); background-position: <?php if ($position = get_post_meta(get_the_ID(), 'Header Image Position', true)) echo $position; else echo 'centre'; ?>;">
<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>
<?php
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(); ?>
</h1>
<?php the_date('F j, Y', '<p id="post-date">', '</p>'); ?>
</div>
</div>
</header><!-- .entry-header -->
@ -33,16 +42,8 @@
?>
</div><!-- .entry-content -->
<?php
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
__( 'Edit<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ),
get_the_title()
),
'<footer class="entry-footer"><span class="edit-link">',
'</span></footer><!-- .entry-footer -->'
);
?>
<footer class="entry-footer">
<?php //twentysixteen_entry_meta(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->

View file

@ -10,17 +10,17 @@
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header" id="post-header-image" style="background-image: url('<?php the_post_thumbnail_url(); ?>');">
<header class="entry-header" id="post-header-image" style="background-image: url('<?php the_post_thumbnail_url(); ?>'); background-position: <?php if ($position = get_post_meta(get_the_ID(), 'Header Image Position', true)) echo $position; else echo 'centre'; ?>;">
<div id="post-header-details-container">
<div id="post-header-details">
<?php
<?php
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 echo get_the_title(); ?>
<?php if ($versionNum = get_post_meta(get_the_ID(), 'Version', true)): ?>
<span id="version"><?php echo $versionNum ?></span>
<?php endif; ?>
@ -39,6 +39,11 @@
</header><!-- .entry-header -->
<div id="body" class="entry-content">
<?php if (has_tag('ohwhatohjeez')): ?>
<div class="note">
<p>This piece was originally written for my old site, <a href="/website/oh-what-oh-jeez">Oh What? Oh Jeez!</a> 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).</p>
</div>
<?php endif; ?>
<?php
if (get_the_content()):
the_content();

View file

@ -10,8 +10,8 @@
<div class="col-m-6 col-4 col-w-3">
<a href="<?php the_permalink(); ?>">
<article id="post-<?php the_ID(); ?>" class="index-item" style="background-image: url('<?php the_post_thumbnail_url(); ?>');">
<header class="entry-header">
<article id="post-<?php the_ID(); ?>" class="index-item" style="background-image: url('<?php the_post_thumbnail_url(); ?>'); background-position: <?php if ($position = get_post_meta(get_the_ID(), 'Header Image Position', true)) echo $position; else echo 'centre'; ?>;">
<header class="entry-header <?php if (has_tag('ohwhatohjeez')) echo 'ohwhatohjeez' ?>">
<div class="post-header-details">
<?php
if (strlen(get_the_title()) > 70) $small= "vsmall";