Skip to content

Commit 87a935a

Browse files
authored
Sets up KubeWeekly single post page (#872)
* Sets up KubeWeekly single post page Signed-off-by: Chris Abraham <[email protected]> * tweak margin Signed-off-by: Chris Abraham <[email protected]> * Add event banner to bottom Signed-off-by: Chris Abraham <[email protected]> --------- Signed-off-by: Chris Abraham <[email protected]>
1 parent 9ac36b1 commit 87a935a

File tree

4 files changed

+122
-1
lines changed

4 files changed

+122
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<?php
2+
/**
3+
* Kubeweekly content - the loop
4+
*
5+
* @package WordPress
6+
* @subpackage cncf-theme
7+
* @since 1.0.0
8+
*/
9+
10+
?>
11+
12+
<main class="kubeweekly-single">
13+
<article class="container wrap page-content">
14+
15+
<section class="hero alignfull">
16+
17+
<figure class="hero__figure">
18+
<?php
19+
$site_options = get_option( 'lf-mu' );
20+
Lf_Utils::display_picture( 114723, 'hero', 'hero__image' );
21+
?>
22+
</figure>
23+
24+
<div class="container wrap hero__text-overlay title-wrapper lf-grid">
25+
26+
<div class="col1">
27+
<span>
28+
<a class="parent-link has-text-color has-white-text" href="/kubeweekly/" title="Go to KubeWeeklys">KubeWeekly</a>
29+
</span>
30+
31+
<h1 class="is-style-case-study-title"><?php the_title(); ?></h1>
32+
<div style="height:20px"
33+
aria-hidden="true" class="wp-block-spacer">
34+
</div>
35+
<p class="is-style-spaced-uppercase has-small-font-size">Published: <?php echo get_the_date(); ?></p>
36+
</div>
37+
<div class="col2">
38+
<img width="210" src="/wp-content/themes/cncf-twenty-two/images/projects/kubernetes-icon-color.svg" alt="Kubernetes">
39+
</div>
40+
41+
</section>
42+
43+
<?php
44+
while ( have_posts() ) :
45+
the_post();
46+
the_content();
47+
endwhile;
48+
?>
49+
<div style="height:80px"
50+
aria-hidden="true" class="wp-block-spacer is-style-60-100">
51+
</div>
52+
<?php
53+
get_template_part( 'components/social-share' );
54+
?>
55+
<div style="height:80px"
56+
aria-hidden="true" class="wp-block-spacer is-style-60-100">
57+
</div>
58+
59+
</article>
60+
61+
<aside class="container wrap">
62+
<?php
63+
echo do_shortcode( '[event_banner hide_title=true]' );
64+
?>
65+
</aside>
66+
</main>

web/wp-content/themes/cncf-twenty-two/components/title.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
}
8585
?>
8686
<?php
87-
if ( is_singular( 'lf_report' ) || is_singular( 'lf_human' ) || is_singular( 'lf_kubeweekly' ) ) {
87+
if ( is_singular( 'lf_report' ) || is_singular( 'lf_human' ) ) {
8888
?>
8989
<div style="height:50px" aria-hidden="true"
9090
class="wp-block-spacer is-style-30-50"></div>

web/wp-content/themes/cncf-twenty-two/single.php

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
elseif ( is_singular( 'lf_report' ) ) :
3030
get_template_part( 'components/title' );
3131
get_template_part( 'components/report-single' );
32+
33+
elseif ( is_singular( 'lf_kubeweekly' ) ) :
34+
get_template_part( 'components/kubeweekly-single' );
35+
3236
// Default.
3337
else :
3438
get_template_part( 'components/title' );

web/wp-content/themes/cncf-twenty-two/source/scss/components/_kubeweeklys.scss

+51
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,54 @@
6363
display: none;
6464
}
6565
}
66+
67+
.kubeweekly-single {
68+
.hero {
69+
overflow: hidden;
70+
position: relative;
71+
margin-bottom: 60px;
72+
73+
&__image {
74+
width: 100%;
75+
height: 100%;
76+
object-fit: cover;
77+
position: absolute;
78+
z-index: 1;
79+
top: 0;
80+
left: 0;
81+
}
82+
83+
&__text-overlay {
84+
position: relative;
85+
z-index: 2;
86+
padding-top: 60px;
87+
padding-bottom: 40px;
88+
}
89+
90+
.parent-link {
91+
color: $white;
92+
margin-bottom: 20px;
93+
@media (min-width: 1200px) {
94+
margin-bottom: 40px;
95+
}
96+
}
97+
98+
p {
99+
color: $white;
100+
}
101+
102+
.col1 {
103+
grid-column: span 12;
104+
@media (min-width: 782px) {
105+
grid-column: span 9;
106+
}
107+
}
108+
.col2 {
109+
grid-column: span 12;
110+
@media (min-width: 782px) {
111+
grid-column: span 3;
112+
}
113+
}
114+
115+
}
116+
}

0 commit comments

Comments
 (0)