Skip to content

Commit

Permalink
Merge pull request #297 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 d8242c2 + bbf23be commit 1455c96
Show file tree
Hide file tree
Showing 4 changed files with 147 additions and 33 deletions.
122 changes: 95 additions & 27 deletions wp-content/themes/blankslate-child/acf-json/group_624f529b40c49.json
Original file line number Diff line number Diff line change
Expand Up @@ -257,32 +257,6 @@
}
]
},
{
"key": "field_64d159b3dee63",
"label": "Fellow Headshot",
"name": "fellow_headshot",
"aria-label": "",
"type": "image",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"return_format": "id",
"library": "all",
"min_width": "",
"min_height": "",
"min_size": "",
"max_width": "",
"max_height": "",
"max_size": "",
"mime_types": "",
"allow_in_bindings": 1,
"preview_size": "medium"
},
{
"key": "field_62546d83dc64a",
"label": "Fellow Bio",
Expand Down Expand Up @@ -586,6 +560,100 @@
"rows": "",
"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",
"name": "main_content",
"aria-label": "",
"type": "flexible_content",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"layouts": {
"layout_67a223227fc2d": {
"key": "layout_67a223227fc2d",
"name": "text_layout",
"label": "Text Layout",
"display": "block",
"sub_fields": [
{
"key": "field_67a2242b68bad",
"label": "Text",
"name": "text",
"aria-label": "",
"type": "wysiwyg",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"tabs": "all",
"toolbar": "full",
"media_upload": 1,
"delay": 0
}
],
"min": "",
"max": ""
},
"layout_67a2244268bae": {
"key": "layout_67a2244268bae",
"name": "video_layout",
"label": "Video Layout",
"display": "block",
"sub_fields": [
{
"key": "field_67a2244668bb0",
"label": "Video",
"name": "video",
"aria-label": "",
"type": "url",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": ""
}
],
"min": "",
"max": ""
}
},
"min": "",
"max": "",
"button_label": "Add Row"
}
],
"location": [
Expand All @@ -606,5 +674,5 @@
"active": true,
"description": "",
"show_in_rest": 0,
"modified": 1738503801
"modified": 1738679394
}
25 changes: 25 additions & 0 deletions wp-content/themes/blankslate-child/single-fellows.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,31 @@

$fellow_bio = get_field('fellow_bio');

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_layout' ):
// get_template_part('template-parts/flexible/hero');
echo '<section class="main-content">';
echo wpautop(wp_kses_post(get_sub_field('text')));
echo '</section>';

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

endwhile;
endif;


if ( $fellow_bio ) {
include( 'modules/fellow-bio.php');
}
Expand Down
23 changes: 18 additions & 5 deletions wp-content/themes/blankslate-child/stylus/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -2094,7 +2094,8 @@ body.single-videos .wt_header__nav>ul>li:first-of-type:hover .sub-menu {
font-size: 6.08rem;
}
.wt_single-videos__video,
.wt_single-videos__no-video {
.wt_single-videos__no-video,
.wt_single-videos__embed {
background: #101010;
padding: 4rem 0;
margin-bottom: 6rem;
Expand All @@ -2119,6 +2120,13 @@ body.single-videos .wt_header__nav>ul>li:first-of-type:hover .sub-menu {
}
.wt_single-videos__video {
width: 100%;
}
.wt_single-videos__embed {
width: 1140px;
margin: 0 auto 6.4rem;
}
.wt_single-videos__video,
.wt_single-videos__embed {
font-style: normal;
font-stretch: normal;
color: #fffcef;
Expand All @@ -2128,19 +2136,24 @@ body.single-videos .wt_header__nav>ul>li:first-of-type:hover .sub-menu {
line-height: 1.3;
text-align: center;
}
.wt_single-videos__video video {
.wt_single-videos__video video,
.wt_single-videos__embed video {
background: #282828;
width: 100%;
}
.wt_single-videos__video video,
.wt_single-videos__video iframe {
.wt_single-videos__embed video,
.wt_single-videos__video iframe,
.wt_single-videos__embed iframe {
min-height: 31.640625vw;
max-width: 56.25vw;
}
.wt_single-videos__video p {
.wt_single-videos__video p,
.wt_single-videos__embed p {
background: #9581c2;
}
.wt_single-videos__video img {
.wt_single-videos__video img,
.wt_single-videos__embed img {
width: 100%;
height: auto;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ $video_size = (9/16)*100 // in viewport widths
text--header($black)

&__video,
&__no-video
&__no-video,
&__embed
background $black
padding 4rem 0
margin-bottom 6rem
Expand All @@ -36,6 +37,13 @@ $video_size = (9/16)*100 // in viewport widths

&__video
width 100%

&__embed
width $content
margin 0 auto 6.4rem

&__video,
&__embed
text--strong($parchment)
text-align center

Expand Down

0 comments on commit 1455c96

Please sign in to comment.