Skip to content

Commit

Permalink
Merge pull request #299 from wikitongues/main
Browse files Browse the repository at this point in the history
Staging deploy
  • Loading branch information
FredericoAndrade authored Feb 4, 2025
2 parents 1455c96 + 7114488 commit 55cc0fe
Show file tree
Hide file tree
Showing 6 changed files with 104 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -561,23 +561,6 @@
"placeholder": "",
"new_lines": ""
},
{
"key": "field_67a21fbd2128a",
"label": "Fellow Video",
"name": "fellow_video",
"aria-label": "",
"type": "url",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": ""
},
{
"key": "field_67a2231ef5fb9",
"label": "Main Content",
Expand Down Expand Up @@ -645,6 +628,26 @@
},
"default_value": "",
"placeholder": ""
},
{
"key": "field_67a23e9a7fde2",
"label": "Video Title",
"name": "video_title",
"aria-label": "",
"type": "text",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"maxlength": "",
"placeholder": "",
"prepend": "",
"append": ""
}
],
"min": "",
Expand Down Expand Up @@ -674,5 +677,5 @@
"active": true,
"description": "",
"show_in_rest": 0,
"modified": 1738679394
"modified": 1738686115
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"fields": [
{
"key": "field_679e98a9c94e7",
"label": "Editorial Content",
"name": "editorial_content",
"label": "Main Content",
"name": "main_content",
"aria-label": "",
"type": "flexible_content",
"instructions": "",
Expand All @@ -19,8 +19,8 @@
"layouts": {
"layout_679e98b633bc8": {
"key": "layout_679e98b633bc8",
"name": "text_block",
"label": "Text Block",
"name": "text_layout",
"label": "Text Layout",
"display": "block",
"sub_fields": [
{
Expand Down Expand Up @@ -49,8 +49,8 @@
},
"layout_679e9a6a86159": {
"key": "layout_679e9a6a86159",
"name": "banner",
"label": "Banner",
"name": "banner_layout",
"label": "Banner Layout",
"display": "block",
"sub_fields": [
{
Expand Down Expand Up @@ -178,8 +178,8 @@
},
"layout_679e9a3b7738d": {
"key": "layout_679e9a3b7738d",
"name": "gallery",
"label": "Gallery",
"name": "gallery_layout",
"label": "Gallery Layout",
"display": "block",
"sub_fields": [
{
Expand Down Expand Up @@ -376,16 +376,16 @@
},
"layout_679ea63d73229": {
"key": "layout_679ea63d73229",
"name": "video",
"label": "Video",
"name": "video_layout",
"label": "Video Layout",
"display": "block",
"sub_fields": [
{
"key": "field_679ea6437322f",
"label": "Video",
"name": "video",
"aria-label": "",
"type": "post_object",
"type": "url",
"instructions": "",
"required": 0,
"conditional_logic": 0,
Expand All @@ -394,19 +394,28 @@
"class": "",
"id": ""
},
"post_type": [
"videos"
],
"post_status": [
"publish"
],
"taxonomy": "",
"return_format": "object",
"multiple": 0,
"allow_null": 0,
"bidirectional": 0,
"ui": 1,
"bidirectional_target": []
"default_value": "",
"placeholder": ""
},
{
"key": "field_67a23eb5566c7",
"label": "Video Title",
"name": "video_title",
"aria-label": "",
"type": "text",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"maxlength": "",
"placeholder": "",
"prepend": "",
"append": ""
}
],
"min": "",
Expand Down Expand Up @@ -439,5 +448,5 @@
"active": true,
"description": "",
"show_in_rest": 0,
"modified": 1738497507
"modified": 1738686139
}
16 changes: 16 additions & 0 deletions wp-content/themes/blankslate-child/stylus/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -1218,6 +1218,16 @@ body.search-results .wt_banner--searchbar {
margin: auto;
max-width: 600px;
}
.main-content h2 {
font-style: normal;
font-stretch: normal;
color: #101010;
font-family: 'Schnyder Wide M Web';
font-weight: 300;
font-size: 6.08rem;
font-size: 3rem;
margin: 3rem auto 1.6rem;
}
.main-content h3 {
font-style: normal;
font-stretch: normal;
Expand Down Expand Up @@ -2125,6 +2135,12 @@ body.single-videos .wt_header__nav>ul>li:first-of-type:hover .sub-menu {
width: 1140px;
margin: 0 auto 6.4rem;
}
.wt_single-videos__embed h3 {
text-align: left;
padding: 16px 0 0 32px;
font-size: 20px;
font-weight: 400;
}
.wt_single-videos__video,
.wt_single-videos__embed {
font-style: normal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
margin auto
max-width 600px

h2
text--header($black)
font-size 3rem
margin 3rem auto 1.6rem

h3
text--strong($black)
margin 1.6rem 0 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ $video_size = (9/16)*100 // in viewport widths
width $content
margin 0 auto 6.4rem

h3
text-align left
padding 16px 0 0 32px
font-size 20px
font-weight 400

&__video,
&__embed
text--strong($parchment)
Expand Down
29 changes: 22 additions & 7 deletions wp-content/themes/blankslate-child/template-editorial.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@

get_header();

if( have_rows('editorial_content') ):
while( have_rows('editorial_content') ) : the_row();
if( have_rows('main_content') ):
while( have_rows('main_content') ) : the_row();

// Determine the current layout.
$layout = get_row_layout();

// Load a partial based on the layout.
if( $layout == 'text_block' ):
if( $layout == 'text_layout' ):
// get_template_part('template-parts/flexible/hero');
echo '<section class="main-content">';
echo wpautop(wp_kses_post(get_sub_field('text_area')));
echo '</section>';

elseif( $layout == 'banner' ):
elseif( $layout == 'banner_layout' ):
$page_banner = get_sub_field('banner');
include( 'modules/banner--main.php' );

elseif( $layout == 'gallery' ):
elseif( $layout == 'gallery_layout' ):
if ( have_rows( 'custom_gallery_posts' ) ) {
while ( have_rows( 'custom_gallery_posts') ) {
the_row();
Expand Down Expand Up @@ -48,8 +48,23 @@
];
echo create_gallery_instance($params);
}
}

};
elseif( $layout == 'video_layout' ):
$video = get_sub_field('video');
$video_title = get_sub_field('video_title');
$dropbox_link_raw = str_replace("dl=0", "raw=1", $video);
if ( $dropbox_link_raw ) {
?>
<div class="wt_single-videos__embed">
<video width="320" height="240" controls>
<source src="<?php echo $dropbox_link_raw ?>" type="video/mp4">Your browser does not support the video tag.
</video>
<?php
if ( $video_title ) {
echo '<h3>' . $video_title . '</h3>';
};
echo '</div>';
};
endif;

endwhile;
Expand Down

0 comments on commit 55cc0fe

Please sign in to comment.