Skip to content

Commit

Permalink
Merge pull request #2 from pingcap-inc/feat/remove-package-download
Browse files Browse the repository at this point in the history
feat: remove package download
  • Loading branch information
xuliwenwenwen authored May 14, 2024
2 parents 79373be + d04845b commit 7c20824
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 7 deletions.
4 changes: 4 additions & 0 deletions pingcap-jp/css/components/get-started.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,8 @@
display: block;
padding: 1rem 1.5rem;
}

&__footer-content{
margin-top: 3.2rem;
}
}
10 changes: 10 additions & 0 deletions pingcap-jp/css/scaffold/buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,14 @@ input[type="submit"],
justify-content: center;
}
}

.icon-github {
background: url("https://static.pingcap.com/files/2024/04/25211345/github.png") no-repeat
center/contain;
height: 2.4rem;
width: 2.4rem;
display: inline-block;
vertical-align: middle;
margin-right: 6px;
}
}
2 changes: 1 addition & 1 deletion pingcap-jp/grav-blocks/columns/block.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

$format = isset($format) && is_string($format) ? $format : ACF::get_sub_field_string('format');
$columns = isset($columns) && is_array($columns) ? $columns : ACF::get_sub_field_array('columns');
$column_num = isset($format) && is_string($column_num) ? $column_num : ACF::get_sub_field_string('column_num');
$column_num = isset($column_num) && is_string($column_num) ? $column_num : ACF::get_sub_field_string('column_num');

if ($columns) {
$block_inner_classes = [
Expand Down
4 changes: 4 additions & 0 deletions pingcap-jp/inc/PingCAP/Components/GetStarted.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

class GetStarted implements IComponent
{
public string $title = '';
public array $platforms = [];

public function __construct(array $params)
Expand Down Expand Up @@ -116,6 +117,9 @@ public function render(): void
}
?>
</div>
<div class="get-started__footer-content">
<a class="button" href="https://github.com/pingcap/tidb" data-gtag="event:product_download,tidb_download_version:view_on_github"><i class="icon-github"></i>View on GitHub</a>
</div>
</div>
<?php
}
Expand Down
12 changes: 6 additions & 6 deletions pingcap-jp/templates/page-template-featured-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@
'platforms' => ACF::get_field_array('platforms'),
'title' => ACF::get_field_string('platform_title')
]);
Component::render(Components\PackageDownload::class, [
'version' => ACF::get_field_array('package_version'),
'packages' => ACF::get_field_array('package'),
'title' => ACF::get_field_string('package_download_title'),
'page_link' => ACF::get_field_array('package_download_page_link')
]);
// Component::render(Components\PackageDownload::class, [
// 'version' => ACF::get_field_array('package_version'),
// 'packages' => ACF::get_field_array('package'),
// 'title' => ACF::get_field_string('package_download_title'),
// 'page_link' => ACF::get_field_array('package_download_page_link')
// ]);

break;
}
Expand Down

0 comments on commit 7c20824

Please sign in to comment.