Skip to content

Commit

Permalink
jewish languages page
Browse files Browse the repository at this point in the history
  • Loading branch information
bogreudell committed Mar 21, 2021
1 parent 3d8cde4 commit 4446796
Show file tree
Hide file tree
Showing 5 changed files with 153 additions and 26 deletions.
23 changes: 4 additions & 19 deletions acf-json/group_5af2062235702.json
Original file line number Diff line number Diff line change
Expand Up @@ -511,9 +511,9 @@
"return_format": "url"
},
{
"key": "field_6056860035827",
"label": "Second action text",
"name": "second_action_text",
"key": "field_6056860935828",
"label": "Second action embed",
"name": "second_action_embed",
"type": "text",
"instructions": "",
"required": 0,
Expand All @@ -528,21 +528,6 @@
"prepend": "",
"append": "",
"maxlength": ""
},
{
"key": "field_6056860935828",
"label": "Second action link",
"name": "second_action_link",
"type": "link",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"return_format": "url"
}
],
"min": "",
Expand Down Expand Up @@ -748,5 +733,5 @@
"hide_on_screen": "",
"active": true,
"description": "",
"modified": 1616283428
"modified": 1616364455
}
38 changes: 32 additions & 6 deletions components/jewish-languages.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="single-projects_jewish">
<div class="single-projects__jewish">
<?php
if( have_rows('jewish_languages_layout') ){
while( have_rows('jewish_languages_layout') ){
Expand All @@ -10,17 +10,19 @@
$copy_text = get_sub_field('copy_text');
$first_action_text = get_sub_field('first_action_text');
$first_action_link = get_sub_field('first_action_link');
$second_action_text = get_sub_field('second_action_text');
$second_action_link = get_sub_field('second_action_link');
$second_action_embed = get_sub_field('second_action_embed');

// summary layout markup
echo '<div class="wt_content-block">'.
'<h1>'.$header_text.'</h1>'.
$copy_text.
'<a class="wt_primary-action" href="'.$first_action_link.'">'.
$first_action_text.
'</a>'.
$second_action_embed.
'<a id="target" class="wt_donate__secondaryaction" href="#target"><i class="fal fa-arrow-to-bottom"></i><span>Or keep reading</span></a>'.
'</div>';

// calls-to-action

} elseif ( get_row_layout() == 'languages' ){
// languages layout variables
$header_text = get_sub_field('header_text');
Expand Down Expand Up @@ -50,14 +52,38 @@
// featured videos variables
$header_text = get_sub_field('header_text');
$copy_text = get_sub_field('copy_text');
$videos = get_sub_field('videos');

echo '<div class="wt_content-block">'.
'<h1>'.$header_text.'</h1>'.
$copy_text.
'</div>';

// videos link
if( $videos ) {
foreach( $videos as $post ){
setup_postdata( $post );

if ( get_field('video_title') ) {
$video_title = get_field('video_title');
} else {
$video_title = get_the_title($post);
}

$video_permalink = get_the_permalink();
$video_thumbnail = get_field('video_thumbnail');
$featured_languages = get_field('featured_languages');
$video_description = get_field('video_description');
$dropbox_link = get_field('dropbox_link');
$youtube_link = get_field('youtube_link');
$wikimedia_commons_link = get_field('wikimedia_commons_link');
$video_license = get_field('video_license');
$license_link = get_field('license_link');
$attribution_statement = get_field('attribution');

include( locate_template('components/video-preview.php') );
}
wp_reset_postdata();
}
}
}
}
Expand Down
57 changes: 57 additions & 0 deletions stylus/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -2602,3 +2602,60 @@ body.post-type-archive-projects .wt_section:last-of-type {
margin: auto !important;
}
}
.single-projects__jewish .wt_content-block {
width: 90%;
max-width: 600px;
margin: 90px auto 0;
}
.single-projects__jewish .wt_content-block p {
line-height: 3.6rem;
}
.single-projects__jewish .wt_content-block:first-of-type {
margin-top: 180px;
}
.single-projects__jewish .wt_content-block .wt_primary-action {
display: inline-block;
width: 48%;
max-width: 500px;
margin: 30px 4% 30px 0;
background: #20597a;
border: 5px solid #20597a;
padding: 25px;
box-sizing: border-box;
border-radius: 60px;
text-align: center;
font-size: 1.5rem;
color: #fff;
font-family: objektiv-mk1, sans-serif;
font-weight: 500;
text-transform: uppercase;
font-size: 2.8rem;
}
.single-projects__jewish .wt_content-block .giveforms-donation-button {
display: inline-block;
width: 48%;
max-width: 500px;
border: 5px solid #20597a;
padding: 25px;
box-sizing: border-box;
border-radius: 60px;
text-align: center;
font-size: 1.5rem;
color: #20597a;
font-family: objektiv-mk1, sans-serif;
font-weight: 500;
text-transform: uppercase;
font-size: 2.8rem;
}
.single-projects__jewish .wt_donate {
padding: 90px 0;
}
@media all and (max-width: 979px) {
.single-projects__jewish .wt_content-block h1 br {
display: none;
}
.single-projects__jewish .wt_content-block .wt_primary-action,
.single-projects__jewish .wt_content-block .giveforms-donation-button {
font-size: 1.4rem;
}
}
3 changes: 2 additions & 1 deletion stylus/require/components/all.styl
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
@require "seedbank-donors"
@require "donate-module"
@require "feature"
@require "language-revitalization"
@require "language-revitalization"
@require "jewish-languages"
58 changes: 58 additions & 0 deletions stylus/require/components/jewish-languages.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
.single-projects__jewish
.wt_content-block
width 90%
max-width 600px
margin $margin3 auto 0

p
line-height 3.6rem

&:first-of-type
margin-top $margin5

.wt_primary-action
display inline-block
width 48%
max-width 500px
margin $margin1 4% $margin1 0
background $interactive
border 5px solid $interactive
padding 25px
box-sizing border-box
border-radius 60px
text-align center
font-size 1.5rem
color $white
font-family objektiv-mk1, sans-serif
font-weight 500
text-transform uppercase
font-size 2.8rem

.giveforms-donation-button
display inline-block
width 48%
max-width 500px
border 5px solid $interactive
padding 25px
box-sizing border-box
border-radius 60px
text-align center
font-size 1.5rem
color $interactive
font-family objektiv-mk1, sans-serif
font-weight 500
text-transform uppercase
font-size 2.8rem

.wt_donate
padding $margin3 0

@media all and ( max-width: $mobile )
.single-projects__jewish
.wt_content-block
h1 br
display none

.wt_primary-action,
.giveforms-donation-button
font-size 1.4rem

0 comments on commit 4446796

Please sign in to comment.