-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7e726b1
commit eb0bba1
Showing
34 changed files
with
2,923 additions
and
4,376 deletions.
There are no files selected for viewing
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,43 @@ | ||
{ | ||
"key": "group_6041e65d7bdf9", | ||
"title": "Block \/ Article content", | ||
"fields": [ | ||
{ | ||
"key": "field_60420703959d8", | ||
"label": "Piilota kuvio", | ||
"name": "hide_figure", | ||
"type": "true_false", | ||
"instructions": "", | ||
"required": 0, | ||
"conditional_logic": 0, | ||
"wrapper": { | ||
"width": "", | ||
"class": "", | ||
"id": "" | ||
}, | ||
"message": "", | ||
"default_value": 0, | ||
"ui": 0, | ||
"ui_on_text": "", | ||
"ui_off_text": "" | ||
} | ||
], | ||
"location": [ | ||
[ | ||
{ | ||
"param": "block", | ||
"operator": "==", | ||
"value": "acf\/block-article-content" | ||
} | ||
] | ||
], | ||
"menu_order": 0, | ||
"position": "normal", | ||
"style": "default", | ||
"label_placement": "top", | ||
"instruction_placement": "label", | ||
"hide_on_screen": "", | ||
"active": true, | ||
"description": "", | ||
"modified": 1614939938 | ||
} |
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,46 @@ | ||
{ | ||
"key": "group_6042206bbeb74", | ||
"title": "Block \/ Form", | ||
"fields": [ | ||
{ | ||
"key": "field_604220f544242", | ||
"label": "Lomake", | ||
"name": "gravity_forms", | ||
"type": "select", | ||
"instructions": "", | ||
"required": 0, | ||
"conditional_logic": 0, | ||
"wrapper": { | ||
"width": "", | ||
"class": "", | ||
"id": "" | ||
}, | ||
"choices": [], | ||
"default_value": false, | ||
"allow_null": 0, | ||
"multiple": 0, | ||
"ui": 0, | ||
"return_format": "value", | ||
"ajax": 0, | ||
"placeholder": "" | ||
} | ||
], | ||
"location": [ | ||
[ | ||
{ | ||
"param": "block", | ||
"operator": "==", | ||
"value": "acf\/block-form" | ||
} | ||
] | ||
], | ||
"menu_order": 0, | ||
"position": "normal", | ||
"style": "default", | ||
"label_placement": "top", | ||
"instruction_placement": "label", | ||
"hide_on_screen": "", | ||
"active": true, | ||
"description": "", | ||
"modified": 1614946567 | ||
} |
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
62 changes: 62 additions & 0 deletions
62
components/block-article-content/acf-json/group_5ad09ed07f2e9.json
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,62 @@ | ||
{ | ||
"key": "group_5ad09ed07f2e9", | ||
"title": "Elementti \/ Otsikko ja tekstialue", | ||
"fields": [ | ||
{ | ||
"key": "field_5ad09f4c54a8e", | ||
"label": "Otsikko", | ||
"name": "title", | ||
"type": "text", | ||
"instructions": "", | ||
"required": 0, | ||
"conditional_logic": 0, | ||
"wrapper": { | ||
"width": "", | ||
"class": "", | ||
"id": "" | ||
}, | ||
"default_value": "", | ||
"placeholder": "", | ||
"prepend": "", | ||
"append": "", | ||
"maxlength": "" | ||
}, | ||
{ | ||
"key": "field_5ad09ed0847dc", | ||
"label": "Tekstialue", | ||
"name": "content", | ||
"type": "wysiwyg", | ||
"instructions": "", | ||
"required": 0, | ||
"conditional_logic": 0, | ||
"wrapper": { | ||
"width": "", | ||
"class": "", | ||
"id": "" | ||
}, | ||
"default_value": "", | ||
"tabs": "all", | ||
"toolbar": "full", | ||
"media_upload": 1, | ||
"delay": 0 | ||
} | ||
], | ||
"location": [ | ||
[ | ||
{ | ||
"param": "block", | ||
"operator": "==", | ||
"value": "acf\/block-content" | ||
} | ||
] | ||
], | ||
"menu_order": 0, | ||
"position": "normal", | ||
"style": "seamless", | ||
"label_placement": "top", | ||
"instruction_placement": "label", | ||
"hide_on_screen": "", | ||
"active": 1, | ||
"description": "", | ||
"modified": 1596617127 | ||
} |
50 changes: 50 additions & 0 deletions
50
components/block-article-content/block-article-content.php
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,50 @@ | ||
<?php | ||
/** | ||
* Component: Artikkelin sisältö | ||
* Description: Artikkelin sisältö | ||
* InnerBlocks: true | ||
* InnerBlocksMode: preview | ||
* Keywords: | ||
* @version 1.0 | ||
*/ | ||
|
||
$allowed_blocks = array_merge(ID_allowed_inner_blocks(), array( | ||
'acf/block-map' | ||
)); | ||
|
||
$template = array( | ||
array('core/heading', array( | ||
'level' => 1, | ||
)), | ||
array('core/paragraph', array()), | ||
); | ||
|
||
$hide_figure = get_field('hide_figure'); | ||
?> | ||
<div class="block-article-content article full-width id-block"> | ||
<div class="container-lg"> | ||
<div class="row"> | ||
<div class="col d-none d-lg-block col-lg-4 col-xxl-3"> | ||
<?php get_template_part('template-parts/partial' , 'sidebar-posts'); ?> | ||
</div> | ||
<div class="col col-12 col-lg-8 col-xxl-7 offset-xxl-1"> | ||
<p class="entry-date"><?php echo _x('Julkaistu', 'artikkeli', 'ID') . ' ' . get_the_date('j.n.Y', $post_id); ?></p> | ||
<h1 class="entry-title"><?php echo get_the_title($post_id); ?></h1> | ||
<div class="inner-blocks entry-content"> | ||
<InnerBlocks template="<?php echo esc_attr(wp_json_encode($template)); ?>" allowedBlocks="<?php echo esc_attr(wp_json_encode($allowed_blocks)); ?>" templateLock="false" /> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<?php if(!$hide_figure): ?> | ||
<div class="figures"> | ||
<svg class="figure mountain" xmlns="http://www.w3.org/2000/svg" width="107" height="45.956" viewBox="0 0 107 45.956"> | ||
<path d="M168.122 240.378l5.678-5.678-25.585-25.516-16.362 16.362-27.115-27.046L66.8 236.438l5.678 5.655 32.283-32.283 34.67 34.647 5.678-5.655-7.6-7.6 10.73-10.73z" transform="translate(-66.8 -198.5)"/> | ||
</svg> | ||
|
||
<svg class="figure tent" xmlns="http://www.w3.org/2000/svg" width="107" height="78.58" viewBox="0 0 107 78.58"> | ||
<path d="M217.722 215.089l10.643-13.474-10.227-8.115-8.756 11.059-8.757-11.059-10.225 8.115 10.681 13.474L155.9 272.08h16.645l36.837-46.5 36.875 46.5H262.9z" transform="translate(-155.9 -193.5)"/> | ||
</svg> | ||
</div> | ||
<?php endif; ?> | ||
</div> |
Empty file.
56 changes: 56 additions & 0 deletions
56
components/block-article-content/sass/_block-article-content.scss
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,56 @@ | ||
.block-article-content { | ||
position: relative; | ||
overflow: hidden; | ||
padding: 30px 0; | ||
|
||
.entry-date { | ||
margin-bottom: 5px; | ||
text-transform: uppercase; | ||
} | ||
|
||
.entry-title { | ||
margin-top: 0; | ||
text-transform: uppercase; | ||
font-weight: bold; | ||
line-height: 1.2; | ||
@include primary-color-text(); | ||
} | ||
|
||
.figures { | ||
display: flex; | ||
justify-content: space-between; | ||
margin-top: 70px; | ||
|
||
@include media-breakpoint-up(md) { | ||
margin-top: 80px; | ||
} | ||
|
||
.figure { | ||
display: block; | ||
height: auto; | ||
|
||
path { | ||
@include secondary-color-fill(); | ||
} | ||
} | ||
|
||
.mountain { | ||
width: 424px; | ||
margin-left: -80px; | ||
margin-right: 25px; | ||
|
||
@include media-breakpoint-up(md) { | ||
margin-left: -20px; | ||
} | ||
} | ||
|
||
.tent { | ||
margin-right: -40px; | ||
width: 232px; | ||
|
||
@include media-breakpoint-up(md) { | ||
margin-right: 60px; | ||
} | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.