Skip to content

Commit

Permalink
Feat/theme tidb (#38)
Browse files Browse the repository at this point in the history
* feat: header

* feat: footer

* feat: home banner

* feat: home

* feat: update

* style: update

* style: update

* feat: hello bar menu

* feat: product

* feat: update

* feat: product update

* feat: ai page
  • Loading branch information
xuliwenwenwen authored Oct 28, 2024
1 parent 96c4a59 commit 5c7b443
Show file tree
Hide file tree
Showing 127 changed files with 7,301 additions and 1,538 deletions.
8 changes: 8 additions & 0 deletions pingcap-jp/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
tabWidth: 2,
useTabs: false,
singleQuote: true,
jsxSingleQuote: false,
printWidth: 100,
trailingComma: 'none'
};
55 changes: 45 additions & 10 deletions pingcap-jp/acf/acf-banner-home.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,28 @@

$banner_fields = array_merge(
array (
array (
'key' => 'field_' . $acf_group . '_subtitle',
'label' => 'Subtitle',
'name' => $acf_group . '_subtitle',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'formatting' => 'none', // none | html
'prepend' => '',
'append' => '',
'maxlength' => '',
'readonly' => 0,
'disabled' => 0,
),
array (
'key' => 'field_' . $acf_group . '_title_override',
'label' => 'Title (override)',
Expand Down Expand Up @@ -43,16 +65,29 @@
'toolbar' => 'full', // full | basic
'media_upload' => 0,
),
),
WPUtil\Vendor\BlueprintBlocks::safe_get_link_fields([
'label' => 'Button',
'name' => $acf_group . '_button',
'includes' => [
'none' => 'None',
'page' => 'Page Link',
'url' => 'URL',
],
]),
array (
'key' => 'field_' . $acf_group . '_video_url',
'label' => 'Side Video Url',
'name' => $acf_group . '_video_url',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'formatting' => 'none', // none | html
'prepend' => '',
'append' => '',
'maxlength' => '',
'readonly' => 0,
'disabled' => 0,
),
)
);

acf_add_local_field_group(array (
Expand Down
139 changes: 70 additions & 69 deletions pingcap-jp/acf/acf-banner.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
'id' => '',
),
'choices' => array(
'bg-black-dark' => 'Dark',
'bg-black' => 'Black',
'bg-white' => 'White',
),
Expand Down Expand Up @@ -122,11 +123,11 @@
'mime_types' => '',
),
array(
'key' => 'field_' . $acf_group . '_product_icon_image',
'label' => 'Product Icon Image',
'name' => $acf_group . '_product_icon_image',
'key' => 'field_' . $acf_group . '_title_size',
'label' => 'Title Container Size',
'name' => $acf_group . '_title_container_size',
'type' => 'radio',
'instructions' => '',
'type' => 'image',
'required' => 0,
'conditional_logic' => array(
array(
Expand All @@ -138,20 +139,49 @@
),
),
'wrapper' => array(
'width' => '',
'width' => '33',
'class' => '',
'id' => '',
),
'return_format' => 'object', // array | url | id
'preview_size' => 'thumbnail',
'library' => 'all', // all | uploadedTo
'min_width' => '',
'min_height' => '',
'min_size' => '',
'max_width' => '',
'max_height' => '',
'max_size' => '',
'mime_types' => '',
'choices' => array(
'' => 'Normal',
'medium' => 'Medium',
'large' => 'Large',
),
'other_choice' => 0,
'save_other_choice' => 0,
'default_value' => '',
'layout' => 'horizontal',
),
array(
'key' => 'field_' . $acf_group . '_subtitle',
'label' => 'Subtitle',
'name' => $acf_group . '_subtitle',
'type' => 'text',
'instructions' => '',
'required' => 0,
'conditional_logic' => array(
array(
array(
'field' => 'field_' . $acf_group . '_banner_display_type',
'operator' => '==',
'value' => 'product',
),
),
),
'wrapper' => array(
'width' => '67',
'class' => '',
'id' => '',
),
'default_value' => '',
'placeholder' => '',
'formatting' => 'none', // none | html
'prepend' => '',
'append' => '',
'maxlength' => '',
'readonly' => 0,
'disabled' => 0,
),
array(
'key' => 'field_' . $acf_group . '_use_case_illustration',
Expand Down Expand Up @@ -232,66 +262,21 @@
]),
array(
array(
'key' => 'field_' . $acf_group . '_bottom_arc_enabled',
'label' => 'Enable bottom arc shape',
'name' => $acf_group . '_bottom_arc_enabled',
'key' => 'field_' . $acf_group . '_first_block_pull_up',
'label' => '"Pull up" first block content',
'name' => $acf_group . '_first_block_pull_up',
'type' => 'true_false',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '50',
'class' => '',
'id' => '',
),
'message' => '',
'ui' => 1,
'ui_on_text' => 'Yes',
'ui_off_text' => 'No',
'default_value' => 1,
),
array(
'key' => 'field_' . $acf_group . '_bottom_arc_color',
'label' => 'Bottom arc color',
'name' => $acf_group . '_bottom_arc_color',
'type' => 'select',
'instructions' => '',
'instructions' => 'This option will "pull up" the first block content into the bottom portion of the banner. The only block types that support this functionality are Cards and Columns (when using the "Enable Box Container" option). If you leave this option enabled when the first block does not support the functionality, the side image in this banner will not extend over the bottom arc in the banner.',
'required' => 0,
'conditional_logic' => array(
array(
array(
'field' => 'field_' . $acf_group . '_bottom_arc_enabled',
'operator' => '==',
'value' => 1,
'field' => 'field_' . $acf_group . '_banner_display_type',
'operator' => '!=',
'value' => 'product',
),
),
),
'wrapper' => array(
'width' => '50',
'class' => '',
'id' => '',
),
'choices' => array(
'white' => 'White',
'blue' => 'Blue'
),
'default_value' => 'white',
'allow_null' => 0,
'multiple' => 0, // allows for multi-select
'ui' => 0, // creates a more stylized UI
'ajax' => 0,
'placeholder' => '',
'disabled' => 0,
'readonly' => 0,
),
array(
'key' => 'field_' . $acf_group . '_first_block_pull_up',
'label' => '"Pull up" first block content',
'name' => $acf_group . '_first_block_pull_up',
'type' => 'true_false',
'instructions' => 'This option will "pull up" the first block content into the bottom portion of the banner. The only block types that support this functionality are Cards and Columns (when using the "Enable Box Container" option). If you leave this option enabled when the first block does not support the functionality, the side image in this banner will not extend over the bottom arc in the banner.',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
Expand All @@ -310,7 +295,15 @@
'type' => 'true_false',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'conditional_logic' => array(
array(
array(
'field' => 'field_' . $acf_group . '_banner_display_type',
'operator' => '!=',
'value' => 'product',
),
),
),
'wrapper' => array(
'width' => '50',
'class' => '',
Expand All @@ -329,7 +322,15 @@
'type' => 'text',
'instructions' => 'Separate with spaces',
'required' => 0,
'conditional_logic' => 0,
'conditional_logic' => array(
array(
array(
'field' => 'field_' . $acf_group . '_banner_display_type',
'operator' => '!=',
'value' => 'product',
),
),
),
'wrapper' => array(
'width' => '50',
'class' => '',
Expand Down
Loading

0 comments on commit 5c7b443

Please sign in to comment.