Skip to content

Commit

Permalink
Feat/user day mdx (#31)
Browse files Browse the repository at this point in the history
* feat: user day

* User Day Update.

1.If enabled, change template
2.Add value to Constants\Taxonomies.php
3.Add Taxonomy New Event Tag
4.CSS loading file change in header at check

* Update page-user-day.php

* For additional key visual settings

* feat: img path

* feat: not change template

* feat: Modification of the speaker company section

* feat: change the label

* feat: session replay cta

---------

Co-authored-by: UenoDaisuke <[email protected]>
  • Loading branch information
xuliwenwenwen and UenoDaisuke authored Aug 21, 2024
1 parent 791a91c commit ca07176
Show file tree
Hide file tree
Showing 10 changed files with 1,620 additions and 2 deletions.
1,013 changes: 1,013 additions & 0 deletions pingcap-jp/acf/acf-user-day.php

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions pingcap-jp/bootstrap/shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,7 @@

return '<div class="block-table__icon-container">' . SVG::get_svg('table-block/table_' . $svg_name, ['class' => implode(' ', $svg_classes)]) . '</div>';
});

add_shortcode('user_day_btn_anc', function () {
return '<a href="#entry" class="a-button is-content-fit is-design-square is-type-grd-primary tw-font-bold js-scroll"><span class="a-button_inner "><span class="a-button_text">イベントの参加申込はこちら</span><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" class="style-svg"><rect width="20" height="20" style="fill:none;"></rect><path d="M8.74,13.34l-2.6-2.6c-.5-.5-1.3-.5-1.8,0s-.5,1.3,0,1.7h0l4.7,4.7c.3,.3,.7,.4,1,.4s.7-.1,.9-.4l4.7-4.7c.2-.2,.4-.5,.4-.9,0-.3-.1-.6-.4-.9-.2-.2-.6-.4-.9-.4s-.7,.1-.9,.4l-2.6,2.6V3.74c0-.3-.1-.6-.4-.9-.5-.5-1.3-.5-1.8,0-.1,.3-.3,.6-.3,.9V13.34h0Z" style="fill:#fff;"></path></svg></span></a>';
});
7 changes: 5 additions & 2 deletions pingcap-jp/header.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php

use PingCAP\{Components, Constants};

?>
<!doctype html>
<html <?php language_attributes(); ?>>
Expand All @@ -13,7 +12,6 @@
if (!defined('IGNORE_USER_SCRIPTS') || !constant('IGNORE_USER_SCRIPTS')) {
the_field(Constants\ACF::THEME_OPTIONS_SCRIPTS_BASE . '_global_head_top_content', 'option', false);
}

?>
<title><?php wp_title('&bull;'); ?></title>
<meta charset="<?php bloginfo('charset'); ?>">
Expand All @@ -35,6 +33,11 @@
<script src="<?php echo esc_url(get_template_directory_uri()); ?>/tidb-user-day/assets/js/main.js" defer></script>
<?php } ?>

<?php if (is_page_template('templates/page-user-day.php')) { ?>
<link rel="stylesheet" href="<?php echo esc_url(get_template_directory_uri()); ?>/userday/css/userday.css">
<script src="<?php echo esc_url(get_template_directory_uri()); ?>/userday/js/userday.js" defer></script>
<?php } ?>

<?php
wp_head();

Expand Down
1 change: 1 addition & 0 deletions pingcap-jp/inc/PingCAP/Constants/Taxonomies.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ abstract class Taxonomies
const CUSTOMER = 'customer';
const LOCATION = 'location';
const REGION = 'region';
const USERDAY = 'userdaytag';
}
34 changes: 34 additions & 0 deletions pingcap-jp/taxonomies/userday.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php
use PingCAP\Constants;

$single_label = 'New Event Tag';
$plural_label = 'New Event Tag';
$slug = Constants\Taxonomies::USERDAY;

register_taxonomy(
$slug,
[Constants\CPT::EVENT, 'page'],
[
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_in_quick_edit' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_in_rest' => true,
'query_var' => true,
"rest_controller_class" => "WP_REST_Terms_Controller",
'labels' => [
'name' => $plural_label,
'singular_name' => $single_label,
'search_items' => 'Search ' . $plural_label,
'all_items' => 'All ' . $plural_label,
'parent_item' => 'Parent ' . $single_label,
'parent_item_colon' => 'Parent ' . $single_label . ':',
'edit_item' => 'Edit ' . $single_label,
'update_item' => 'Update ' . $single_label,
'add_new_item' => 'Add New ' . $single_label,
'new_item_name' => 'New ' . $single_label . ' Name'
]
]
);
559 changes: 559 additions & 0 deletions pingcap-jp/templates/page-user-day.php

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pingcap-jp/userday/css/userday.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pingcap-jp/userday/images/icon_menu.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions pingcap-jp/userday/images/icon_sort.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions pingcap-jp/userday/js/userday.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ca07176

Please sign in to comment.