From 7086111ad4dd997e12a3220e1ee60c9b9bcf0bb8 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 7 Jan 2020 13:06:14 +0100 Subject: Added wordpress --- .../template-parts/footer/footer-widgets.php | 35 +++++++ .../template-parts/footer/site-info.php | 24 +++++ .../template-parts/header/header-image.php | 20 ++++ .../template-parts/header/site-branding.php | 38 +++++++ .../template-parts/navigation/navigation-top.php | 33 +++++++ .../page/content-front-page-panels.php | 87 ++++++++++++++++ .../template-parts/page/content-front-page.php | 52 ++++++++++ .../template-parts/page/content-page.php | 32 ++++++ .../template-parts/post/content-audio.php | 109 +++++++++++++++++++++ .../template-parts/post/content-excerpt.php | 48 +++++++++ .../template-parts/post/content-gallery.php | 96 ++++++++++++++++++ .../template-parts/post/content-image.php | 86 ++++++++++++++++ .../template-parts/post/content-none.php | 40 ++++++++ .../template-parts/post/content-video.php | 107 ++++++++++++++++++++ .../template-parts/post/content.php | 79 +++++++++++++++ 15 files changed, 886 insertions(+) create mode 100644 srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/footer/footer-widgets.php create mode 100644 srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/footer/site-info.php create mode 100644 srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/header/header-image.php create mode 100644 srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/header/site-branding.php create mode 100644 srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/navigation/navigation-top.php create mode 100644 srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/page/content-front-page-panels.php create mode 100644 srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/page/content-front-page.php create mode 100644 srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/page/content-page.php create mode 100644 srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/post/content-audio.php create mode 100644 srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/post/content-excerpt.php create mode 100644 srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/post/content-gallery.php create mode 100644 srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/post/content-image.php create mode 100644 srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/post/content-none.php create mode 100644 srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/post/content-video.php create mode 100644 srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/post/content.php (limited to 'srcs/wordpress/wp-content/themes/twentyseventeen/template-parts') diff --git a/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/footer/footer-widgets.php b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/footer/footer-widgets.php new file mode 100644 index 0000000..ea309d8 --- /dev/null +++ b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/footer/footer-widgets.php @@ -0,0 +1,35 @@ + + + + + + + diff --git a/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/footer/site-info.php b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/footer/site-info.php new file mode 100644 index 0000000..68883bb --- /dev/null +++ b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/footer/site-info.php @@ -0,0 +1,24 @@ + +
+ ' ); + } + ?> + + + +
diff --git a/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/header/header-image.php b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/header/header-image.php new file mode 100644 index 0000000..390debc --- /dev/null +++ b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/header/header-image.php @@ -0,0 +1,20 @@ + +
+ +
+ +
+ + + +
diff --git a/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/header/site-branding.php b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/header/site-branding.php new file mode 100644 index 0000000..02017d5 --- /dev/null +++ b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/header/site-branding.php @@ -0,0 +1,38 @@ + +
+
+ + + +
+ +

+ +

+ + + +

+ +
+ + + 'arrow-right' ) ); ?> + + +
+
diff --git a/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/navigation/navigation-top.php b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/navigation/navigation-top.php new file mode 100644 index 0000000..5cfc998 --- /dev/null +++ b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/navigation/navigation-top.php @@ -0,0 +1,33 @@ + + diff --git a/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/page/content-front-page-panels.php b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/page/content-front-page-panels.php new file mode 100644 index 0000000..91da4ca --- /dev/null +++ b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/page/content-front-page-panels.php @@ -0,0 +1,87 @@ + + +
> + + ID ), 'twentyseventeen-featured-image' ); + + // Calculate aspect ratio: h / w * 100%. + $ratio = $thumbnail[2] / $thumbnail[1] * 100; + ?> + +
+
+
+ + + +
+
+
+ ', '' ); ?> + + + +
+ +
+ "%s"', 'twentyseventeen' ), + get_the_title() + ) + ); + ?> +
+ + + + 3, + 'post_status' => 'publish', + 'ignore_sticky_posts' => true, + 'no_found_rows' => true, + ) + ); + ?> + + have_posts() ) : ?> + +
+ + have_posts() ) : + $recent_posts->the_post(); + get_template_part( 'template-parts/post/content', 'excerpt' ); + endwhile; + wp_reset_postdata(); + ?> +
+ + + +
+
+ +
diff --git a/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/page/content-front-page.php b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/page/content-front-page.php new file mode 100644 index 0000000..143552f --- /dev/null +++ b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/page/content-front-page.php @@ -0,0 +1,52 @@ + +
> + + ID ), 'twentyseventeen-featured-image' ); + + // Calculate aspect ratio: h / w * 100%. + $ratio = $thumbnail[2] / $thumbnail[1] * 100; + ?> + +
+
+
+ + + +
+
+
+ ', '' ); ?> + + + +
+ +
+ "%s"', 'twentyseventeen' ), + get_the_title() + ) + ); + ?> +
+ +
+
+ +
diff --git a/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/page/content-page.php b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/page/content-page.php new file mode 100644 index 0000000..f85ebc8 --- /dev/null +++ b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/page/content-page.php @@ -0,0 +1,32 @@ + + +
> +
+ ', '' ); ?> + +
+
+ '', + ) + ); + ?> +
+
diff --git a/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/post/content-audio.php b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/post/content-audio.php new file mode 100644 index 0000000..0d094ed --- /dev/null +++ b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/post/content-audio.php @@ -0,0 +1,109 @@ + + +
> + 'thumb-tack' ) ); + } + ?> +
+ '; + if ( is_single() ) { + twentyseventeen_posted_on(); + } else { + echo twentyseventeen_time_link(); + twentyseventeen_edit_link(); + }; + echo ''; + }; + + if ( is_single() ) { + the_title( '

', '

' ); + } elseif ( is_front_page() && is_home() ) { + the_title( '

', '

' ); + } else { + the_title( '

', '

' ); + } + ?> +
+ + + + +
+ + + +
+ + +
+ + '; + echo $audio_html; + echo '
'; + } + }; + + }; + + if ( is_single() || empty( $audio ) ) { + + the_content( + sprintf( + /* translators: %s: Post title. */ + __( 'Continue reading "%s"', 'twentyseventeen' ), + get_the_title() + ) + ); + + wp_link_pages( + array( + 'before' => '', + 'link_before' => '', + 'link_after' => '', + ) + ); + + }; + ?> + + + + + +
diff --git a/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/post/content-excerpt.php b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/post/content-excerpt.php new file mode 100644 index 0000000..54a4933 --- /dev/null +++ b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/post/content-excerpt.php @@ -0,0 +1,48 @@ + + +
> + +
+ + + + + + + ', esc_url( get_permalink() ) ), '' ); + } else { + the_title( sprintf( '

', esc_url( get_permalink() ) ), '

' ); + } + ?> +
+ +
+ +
+ +
diff --git a/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/post/content-gallery.php b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/post/content-gallery.php new file mode 100644 index 0000000..af1eaf4 --- /dev/null +++ b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/post/content-gallery.php @@ -0,0 +1,96 @@ + + +
> + 'thumb-tack' ) ); + } + ?> +
+ '; + if ( is_single() ) { + twentyseventeen_posted_on(); + } else { + echo twentyseventeen_time_link(); + twentyseventeen_edit_link(); + }; + echo ''; + }; + + if ( is_single() ) { + the_title( '

', '

' ); + } elseif ( is_front_page() && is_home() ) { + the_title( '

', '

' ); + } else { + the_title( '

', '

' ); + } + ?> +
+ + +
+ + + +
+ + +
+ + '; + echo get_post_gallery(); + echo '
'; + }; + + }; + + if ( is_single() || ! get_post_gallery() ) { + + the_content( + sprintf( + /* translators: %s: Post title. */ + __( 'Continue reading "%s"', 'twentyseventeen' ), + get_the_title() + ) + ); + + wp_link_pages( + array( + 'before' => '', + 'link_before' => '', + 'link_after' => '', + ) + ); + + }; + ?> + + + + + +
diff --git a/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/post/content-image.php b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/post/content-image.php new file mode 100644 index 0000000..9062fcd --- /dev/null +++ b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/post/content-image.php @@ -0,0 +1,86 @@ + + +
> + 'thumb-tack' ) ); + } + ?> +
+ '; + if ( is_single() ) { + twentyseventeen_posted_on(); + } else { + echo twentyseventeen_time_link(); + twentyseventeen_edit_link(); + }; + echo ''; + }; + + if ( is_single() ) { + the_title( '

', '

' ); + } elseif ( is_front_page() && is_home() ) { + the_title( '

', '

' ); + } else { + the_title( '

', '

' ); + } + ?> +
+ + +
+ + + +
+ + +
+ + "%s"', 'twentyseventeen' ), + get_the_title() + ) + ); + + wp_link_pages( + array( + 'before' => '', + 'link_before' => '', + 'link_after' => '', + ) + ); + + }; + ?> + +
+ + + +
diff --git a/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/post/content-none.php b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/post/content-none.php new file mode 100644 index 0000000..50b3fb1 --- /dev/null +++ b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/post/content-none.php @@ -0,0 +1,40 @@ + + +
+ +
+ + +

+ Get started here.', 'twentyseventeen' ), esc_url( admin_url( 'post-new.php' ) ) ); + ?> +

+ + + +

+ +
+
diff --git a/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/post/content-video.php b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/post/content-video.php new file mode 100644 index 0000000..c08dda9 --- /dev/null +++ b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/post/content-video.php @@ -0,0 +1,107 @@ + + +
> + 'thumb-tack' ) ); + } + ?> +
+ '; + if ( is_single() ) { + twentyseventeen_posted_on(); + } else { + echo twentyseventeen_time_link(); + twentyseventeen_edit_link(); + } + echo ''; + }; + + if ( is_single() ) { + the_title( '

', '

' ); + } elseif ( is_front_page() && is_home() ) { + the_title( '

', '

' ); + } else { + the_title( '

', '

' ); + } + ?> +
+ + + + +
+ + + +
+ + +
+ + '; + echo $video_html; + echo '
'; + } + }; + + }; + + if ( is_single() || empty( $video ) ) { + + the_content( + sprintf( + /* translators: %s: Post title. */ + __( 'Continue reading "%s"', 'twentyseventeen' ), + get_the_title() + ) + ); + + wp_link_pages( + array( + 'before' => '', + 'link_before' => '', + 'link_after' => '', + ) + ); + }; + ?> + + + + + +
diff --git a/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/post/content.php b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/post/content.php new file mode 100644 index 0000000..7571f05 --- /dev/null +++ b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/post/content.php @@ -0,0 +1,79 @@ + + +
> + 'thumb-tack' ) ); + endif; + ?> +
+ '; + if ( is_single() ) { + twentyseventeen_posted_on(); + } else { + echo twentyseventeen_time_link(); + twentyseventeen_edit_link(); + }; + echo ''; + }; + + if ( is_single() ) { + the_title( '

', '

' ); + } elseif ( is_front_page() && is_home() ) { + the_title( '

', '

' ); + } else { + the_title( '

', '

' ); + } + ?> +
+ + +
+ + + +
+ + +
+ "%s"', 'twentyseventeen' ), + get_the_title() + ) + ); + + wp_link_pages( + array( + 'before' => '', + 'link_before' => '', + 'link_after' => '', + ) + ); + ?> +
+ + + +
-- cgit