Commit e5e25a18 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Split the singing-chimes.co.uk theme into it's own repo

Additionally, add support for an /etc/wordpress/themes.txt file like
plugin.txt.
parent ee4c4104
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -24,25 +24,12 @@ RUN apt-get update \
 &&:


FROM debian:buster as theme-build

RUN --mount=type=bind,source=sela-child,target=/src : \
 && apt-get update \
 && apt-get install -y \
    zip \
 && mkdir -p /pkg \
 && cd /src \
 && zip -r /pkg/sela-child.zip . \
 &&:


FROM deps

LABEL uk.org.kodo.maintainer "Dom Sekotill <dom.sekotill@kodo.org.uk>"

COPY --from=compile /usr/local/etc/php /usr/local/etc/php
COPY --from=compile /usr/local/lib/php /usr/local/lib/php
COPY --from=theme-build /pkg /pkg
COPY wp.sh /usr/local/bin/wp
ADD https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar /usr/local/bin/wp.php

+5 −2
Original line number Diff line number Diff line
@@ -30,8 +30,8 @@ setup() {
		-exec install -vD '{}' 'static/{}' \;
}

declare -a THEMES=( sela /pkg/sela-child.zip )
declare -a PLUGINS
declare -a THEMES=()
declare -a PLUGINS=()

for file in /etc/wordpress/*.conf /etc/wordpress/**/*.conf; do
	source ${file}
@@ -40,6 +40,9 @@ done
if [[ -e ${PLUGINS_LIST:=/etc/wordpress/plugins.txt} ]]; then
	PLUGINS+=( $(<${PLUGINS_LIST}) )
fi
if [[ -e ${THEMES_LIST:=/etc/wordpress/themes.txt} ]]; then
	THEMES+=( $(<${THEMES_LIST}) )
fi

case "$1" in
	php-fpm)

sela-child/content-page.php

deleted100644 → 0
+0 −46
Original line number Diff line number Diff line
<?php
/**
 * The template used for displaying page content.
 *
 * @package Sela
 */


$title = the_title(null, null, false);

if ( function_exists('get_nskw_subtitle') ) {
	$subtitle = get_nskw_subtitle();
} else {
	$subtitle = '';
}

if ( $subtitle == '' ) {
	$title_class = 'entry-title';
} else {
	$title_class = 'entry-title has-subtitle';
}

?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

	<header class="entry-header">
		<h1 class="<?php print($title_class); ?>"><?php print($title); ?></h1>
		<?php if ( $subtitle != '' ): ?>
			<h5 class="entry-subtitle"><?php print($subtitle); ?></h5>
		<?php endif; ?>
	</header><!-- .entry-header -->

	<div class="entry-content">
		<?php the_content(); ?>
		<?php
			wp_link_pages( array(
				'before' => '<div class="page-links">' . __( 'Pages:', 'sela' ),
				'after'  => '</div>',
			) );
		?>

	</div><!-- .entry-content -->
	<?php edit_post_link( __( 'Edit', 'sela' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' ); ?>

</article><!-- #post-## -->

sela-child/functions.php

deleted100644 → 0
+0 −23
Original line number Diff line number Diff line
<?php

/* Style loading boilerplate */
add_action( 'wp_enqueue_scripts', 'sela_child_enqueue_styles' );

function sela_child_enqueue_styles()
{
	wp_enqueue_style( 'sela-style',
		get_template_directory_uri() . '/style.css'
	);

	wp_enqueue_style( 'sela-child-style',
		get_stylesheet_directory_uri() . '/style.css',
		array( 'sela-style' ),
		wp_get_theme()->get('Version')
	);

//	wp_enqueue_style( 'sela-child-bootstrap',
//		get_stylesheet_directory_uri() . '/bootstrap3/css/bootstrap.min.css',
//		array( 'sela-style' ),
//		wp_get_theme()->get('Version')
// 	);
}
+0 −60
Original line number Diff line number Diff line
<?php
/**
 * Template Name: Front Page
 *
 * @package Sela-Child
 */

get_header(); ?>

	<div id="primary" class="content-area front-page-content-area">
		<?php while ( have_posts() ) : the_post(); ?>
			<div class="hero">

				<?php if ( has_post_thumbnail() ) : ?>
				<figure class="hero-content">
					<?php the_post_thumbnail( 'sela-hero-thumbnail' ); ?>
					<div class="hero-content-overlayer">
						<div class="hero-container-outer">
							<div class="hero-container-inner">
								<?php get_template_part( 'content', 'page' ); ?>
							</div><!-- .hero-container-inner -->
						</div><!-- .hero-container-outer -->
					</div><!-- .hero-content-overlayer -->
				</figure><!-- .hero-content -->

				<?php else : ?>
					<?php get_template_part( 'content', 'page' ); ?>
				<?php endif; ?>

			</div><!-- .hero -->
		<?php endwhile; ?>
	</div><!-- #primary -->

	<?php get_sidebar( 'front-page' ); ?>

	<?php
		$testimonials = new WP_Query( array(
			'post_type'      => 'jetpack-testimonial',
			'order'          => 'ASC',
			'orderby'        => 'menu_order',
			'posts_per_page' => 2,
			'no_found_rows'  => true,
		) );
	?>

	<?php if ( $testimonials->have_posts() ) : ?>
	<div id="front-page-testimonials" class="front-testimonials testimonials">
		<div class="grid-row">
		<?php
			while ( $testimonials->have_posts() ) : $testimonials->the_post();
				 get_template_part( 'content', 'testimonial' );
			endwhile;
			wp_reset_postdata();
		?>
		</div>
	</div><!-- .testimonials -->
	<?php endif; ?>

<?php get_sidebar( 'footer' ); ?>
<?php get_footer(); ?>
Loading