-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: James Hunt <[email protected]>
- Loading branch information
Showing
23 changed files
with
1,033 additions
and
4 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
87 changes: 87 additions & 0 deletions
87
web/wp-content/themes/cncf-twenty-two/acf-json/group_64de953286db1.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,87 @@ | ||
{ | ||
"key": "group_64de953286db1", | ||
"title": "Block - Learning Journey Section", | ||
"fields": [ | ||
{ | ||
"key": "field_64dea2d8a18e9", | ||
"label": "Section Number", | ||
"name": "ljs_section_number", | ||
"aria-label": "", | ||
"type": "number", | ||
"instructions": "", | ||
"required": 1, | ||
"conditional_logic": 0, | ||
"wrapper": { | ||
"width": "", | ||
"class": "", | ||
"id": "" | ||
}, | ||
"default_value": 0, | ||
"min": "", | ||
"max": "", | ||
"placeholder": "", | ||
"step": "", | ||
"prepend": "", | ||
"append": "" | ||
}, | ||
{ | ||
"key": "field_64de95327f2d7", | ||
"label": "Title", | ||
"name": "ljs_title", | ||
"aria-label": "", | ||
"type": "text", | ||
"instructions": "", | ||
"required": 1, | ||
"conditional_logic": 0, | ||
"wrapper": { | ||
"width": "", | ||
"class": "", | ||
"id": "" | ||
}, | ||
"default_value": "", | ||
"maxlength": "", | ||
"placeholder": "Title", | ||
"prepend": "", | ||
"append": "" | ||
}, | ||
{ | ||
"key": "field_64de95f3da7d0", | ||
"label": "Last Section?", | ||
"name": "ljs_last_section", | ||
"aria-label": "", | ||
"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": "lf\/learning-journey-section" | ||
} | ||
] | ||
], | ||
"menu_order": 0, | ||
"position": "normal", | ||
"style": "default", | ||
"label_placement": "top", | ||
"instruction_placement": "label", | ||
"hide_on_screen": "", | ||
"active": true, | ||
"description": "", | ||
"show_in_rest": 0, | ||
"modified": 1692364418 | ||
} |
62 changes: 62 additions & 0 deletions
62
web/wp-content/themes/cncf-twenty-two/acf-json/group_64de963e397f7.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_64de963e397f7", | ||
"title": "Block - Learning Journey Item", | ||
"fields": [ | ||
{ | ||
"key": "field_64de963ec5c38", | ||
"label": "Title", | ||
"name": "lji_title", | ||
"aria-label": "", | ||
"type": "text", | ||
"instructions": "", | ||
"required": 1, | ||
"conditional_logic": 0, | ||
"wrapper": { | ||
"width": "", | ||
"class": "", | ||
"id": "" | ||
}, | ||
"default_value": "", | ||
"maxlength": "", | ||
"placeholder": "Title", | ||
"prepend": "", | ||
"append": "" | ||
}, | ||
{ | ||
"key": "field_64de966dc5c39", | ||
"label": "Link", | ||
"name": "lji_link", | ||
"aria-label": "", | ||
"type": "url", | ||
"instructions": "", | ||
"required": 1, | ||
"conditional_logic": 0, | ||
"wrapper": { | ||
"width": "", | ||
"class": "", | ||
"id": "" | ||
}, | ||
"default_value": "", | ||
"placeholder": "" | ||
} | ||
], | ||
"location": [ | ||
[ | ||
{ | ||
"param": "block", | ||
"operator": "==", | ||
"value": "lf\/learning-journey-item" | ||
} | ||
] | ||
], | ||
"menu_order": 0, | ||
"position": "normal", | ||
"style": "default", | ||
"label_placement": "top", | ||
"instruction_placement": "label", | ||
"hide_on_screen": "", | ||
"active": true, | ||
"description": "", | ||
"show_in_rest": 0, | ||
"modified": 1692364254 | ||
} |
48 changes: 48 additions & 0 deletions
48
web/wp-content/themes/cncf-twenty-two/blocks/learning-journey-item/block.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,48 @@ | ||
{ | ||
"$schema": "https://schemas.wp.org/trunk/block.json", | ||
"apiVersion": 3, | ||
"name": "lf/learning-journey-item", | ||
"title": "Learning Journey Item", | ||
"description": "A item within the Learning Journey", | ||
"editorScript": [], | ||
"category": "lf", | ||
"icon": "editor-insertmore", | ||
"parent": ["lf/learning-journey-section"], | ||
"keywords": [ | ||
"learning journey", | ||
"", | ||
"" | ||
], | ||
"acf": { | ||
"mode": "preview", | ||
"renderTemplate": "learning-journey-item.php", | ||
"postTypes": [ "page" ] | ||
}, | ||
"supports": { | ||
"mode": false, | ||
"align": false, | ||
"alignWide": false, | ||
"alignContent": false, | ||
"alignText": false, | ||
"anchor": false, | ||
"color": { | ||
"background": true, | ||
"gradients": false, | ||
"link": false, | ||
"text": false | ||
}, | ||
"fullHeight": false, | ||
"html": false, | ||
"multiple": true, | ||
"spacing": { | ||
"margin": false, | ||
"padding": false | ||
}, | ||
"typography": { | ||
"fontSize": false, | ||
"lineHeight": false | ||
}, | ||
"layout": true | ||
}, | ||
"example": {} | ||
} |
64 changes: 64 additions & 0 deletions
64
web/wp-content/themes/cncf-twenty-two/blocks/learning-journey-item/learning-journey-item.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,64 @@ | ||
<?php | ||
/** | ||
* Learning Journey Item Block | ||
* | ||
* This block was generated by create-acf-block-json. | ||
* | ||
* @package WordPress | ||
* | ||
* @param array $block The block settings and attributes. | ||
* @param string $content The block inner HTML (empty). | ||
* @param bool $is_preview True during AJAX preview. | ||
* @param (int|string) $post_id The post ID this block is saved to. | ||
*/ | ||
|
||
// Block Name (sluggified). | ||
$block_name = 'learning-journey-item'; | ||
|
||
$namespace = 'lf'; | ||
|
||
// Create full block name to use in classes. | ||
$block_name = 'wp-block-' . $namespace . '-' . $block_name; | ||
|
||
// setup various classes sent through from $block. | ||
$background = ( empty( $block['backgroundColor'] ) ) ? '' : 'has-' . $block['backgroundColor'] . '-background-color'; | ||
|
||
$has_background = $background ? 'has-background' : ''; | ||
|
||
$additional_classes = $block['className'] ?? ''; | ||
|
||
$all_classes = array( | ||
$block_name, | ||
$additional_classes, | ||
); | ||
|
||
$classes = implode( ' ', $all_classes ); | ||
|
||
$inner_block_classes = implode( | ||
' ', | ||
array( | ||
$background, | ||
$has_background, | ||
'timeline__item', | ||
) | ||
); | ||
|
||
$lji_title = get_field( 'lji_title' ); | ||
$lji_link = get_field( 'lji_link' ); | ||
|
||
?> | ||
|
||
<div class="<?php echo esc_attr( $classes ); ?>"> | ||
<div class="<?php echo esc_attr( $inner_block_classes ); ?>"> | ||
|
||
<?php | ||
// Hide the link when in admin to stop editors clicking accidentally. | ||
if ( ! is_admin() ) : | ||
?> | ||
<a class="box-link" href="<?php echo esc_url( $lji_link ); ?>" title="<?php echo esc_attr( $lji_title ); ?>"></a> | ||
<?php | ||
endif; | ||
?> | ||
<span><?php echo esc_html( $lji_title ); ?></span> | ||
</div> | ||
</div> |
57 changes: 57 additions & 0 deletions
57
web/wp-content/themes/cncf-twenty-two/blocks/learning-journey-navigation/block.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,57 @@ | ||
{ | ||
"$schema": "https://schemas.wp.org/trunk/block.json", | ||
"apiVersion": 3, | ||
"name": "lf/learning-journey-navigation", | ||
"title": "Learning Journey Navigation", | ||
"description": "Navigation block for the Learning Journey block", | ||
"style": "file:./learning-journey-navigation.css", | ||
"editorStyle": "file:./editor.css", | ||
"editorScript": [], | ||
"category": "common", | ||
"icon": "menu", | ||
"keywords": [ | ||
"navigation", | ||
"", | ||
"" | ||
], | ||
"acf": { | ||
"mode": "preview", | ||
"renderTemplate": "learning-journey-navigation.php" | ||
}, | ||
"supports": { | ||
"mode": false, | ||
"align": false, | ||
"alignWide": false, | ||
"alignContent": false, | ||
"alignText": false, | ||
"anchor": true, | ||
"className": true, | ||
"color": { | ||
"background": false, | ||
"gradients": false, | ||
"link": false, | ||
"text": false, | ||
"enableContrastChecker": false | ||
}, | ||
"customClassName": false, | ||
"defaultStylePicker": true, | ||
"html": false, | ||
"multiple": false, | ||
"reusable": true, | ||
"spacing": { | ||
"margin": false, | ||
"padding": false | ||
}, | ||
"typography": { | ||
"fontSize": false, | ||
"lineHeight": false | ||
} | ||
}, | ||
"attributes": { | ||
"variable": { | ||
"type": "string", | ||
"default": "" | ||
} | ||
}, | ||
"example": {} | ||
} |
1 change: 1 addition & 0 deletions
1
web/wp-content/themes/cncf-twenty-two/blocks/learning-journey-navigation/editor.css
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
web/wp-content/themes/cncf-twenty-two/blocks/learning-journey-navigation/editor.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,13 @@ | ||
.wp-block.wp-block-lf-learning-journey-navigation { | ||
border: 1px solid #757ba2; | ||
padding: 1rem 0; | ||
&:before { | ||
content: 'Learning Journey Nav'; | ||
color: #757ba2; | ||
position: absolute; | ||
left: 1px; | ||
top: 0; | ||
line-height: 1; | ||
font-size: 10px; | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...themes/cncf-twenty-two/blocks/learning-journey-navigation/learning-journey-navigation.css
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
7857bb7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created multidev environment pr-777 for cncfci.