-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #135 from wikitongues/project_single
Project single
- Loading branch information
Showing
9 changed files
with
615 additions
and
348 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<div class="single-projects__jewish"> | ||
<?php | ||
if( have_rows('jewish_languages_layout') ){ | ||
while( have_rows('jewish_languages_layout') ){ | ||
the_row(); | ||
|
||
if( get_row_layout() == 'summary' ){ | ||
// summary layout variables | ||
$header_text = get_sub_field('header_text'); | ||
$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_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>'; | ||
|
||
} elseif ( get_row_layout() == 'languages' ){ | ||
// languages layout variables | ||
$header_text = get_sub_field('header_text'); | ||
$copy_text = get_sub_field('copy_text'); | ||
|
||
echo '<div class="wt_content-block">'. | ||
'<h1>'.$header_text.'</h1>'. | ||
$copy_text; | ||
|
||
if( have_rows('jewish_languages') ){ | ||
while( have_rows('jewish_languages') ){ | ||
the_row(); | ||
|
||
$language_name = get_sub_field('language_name'); | ||
$language_information = get_sub_field('language_information'); | ||
|
||
echo '<p>'. | ||
'<strong>'.$language_name.'</strong><br />'. | ||
$language_information. | ||
'</p>'; | ||
} | ||
} | ||
|
||
echo '</div>'; | ||
|
||
} elseif ( get_row_layout() == 'featured_videos' ){ | ||
// 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>'; | ||
|
||
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(); | ||
} | ||
} | ||
} | ||
} | ||
// define variables for donate CTA at bottom of layout | ||
$donate_header = get_field('donate_header'); | ||
$donate_copy = get_field('donate_copy'); | ||
$donate_embed = get_field('donate_embed'); | ||
$donate_secondary_action_text = get_field('donate_secondary_action_text'); | ||
$donate_secondary_action_link = get_field('donate_secondary_action_link'); | ||
|
||
// load donate CTA | ||
include( locate_template('components/donate-block.php') ); ?> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters