@rspress-theme-anatole/theme-default 0.7.35 → 0.7.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bundle.css CHANGED
@@ -3674,6 +3674,14 @@ p {
3674
3674
  border: 1px solid var(--Colors-Neutral-3, #D2D5DA);
3675
3675
  justify-content: space-between;
3676
3676
  height: 100%;
3677
+ transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
3678
+ cursor: pointer;
3679
+ }
3680
+
3681
+ .topics-item:hover {
3682
+ transform: translateY(-4px);
3683
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
3684
+ border-color: #b0b5bd;
3677
3685
  }
3678
3686
 
3679
3687
  .topics-item-text {
@@ -3929,6 +3937,42 @@ p {
3929
3937
  border-bottom: 2px solid #e60023;
3930
3938
  }
3931
3939
 
3940
+ /* Pills variant */
3941
+ .features-tabs--pills {
3942
+ border-bottom: none;
3943
+ gap: 8px;
3944
+ flex-wrap: wrap;
3945
+ }
3946
+
3947
+ .features-tab--pill {
3948
+ border: 1px solid #d1d5db !important;
3949
+ border-radius: 9999px !important;
3950
+ padding: 6px 16px !important;
3951
+ font-size: 14px !important;
3952
+ font-weight: 500 !important;
3953
+ color: #4b5563 !important;
3954
+ background: #fff !important;
3955
+ transition: all 0.15s ease;
3956
+ white-space: nowrap;
3957
+ }
3958
+
3959
+ .features-tab--pill:hover {
3960
+ border-color: #9ca3af !important;
3961
+ color: #1f2937 !important;
3962
+ }
3963
+
3964
+ .features-tab--pill.active {
3965
+ background: #1f2937 !important;
3966
+ color: #fff !important;
3967
+ border-color: #1f2937 !important;
3968
+ border-bottom: none !important;
3969
+ }
3970
+
3971
+ /* Overview tab layout */
3972
+ .features-tab-showcase a:hover {
3973
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
3974
+ }
3975
+
3932
3976
  .request-article-section {
3933
3977
  display: flex;
3934
3978
  justify-content: center;
package/dist/bundle.js CHANGED
@@ -3346,8 +3346,9 @@ function HomepageFeatures({ frontmatter, routePath }) {
3346
3346
  children: (features.rows || []).map((featuresRow) => {
3347
3347
  return (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
3348
3348
  children: (featuresRow.items || []).map((featureItem) => {
3349
- return (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
3349
+ return (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("a", {
3350
3350
  className: "topics-item",
3351
+ href: featureItem.link,
3351
3352
  children: [
3352
3353
  (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
3353
3354
  children: (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("i", {
@@ -3465,6 +3466,8 @@ function HomepageFeaturesTabs({ frontmatter, routePath }) {
3465
3466
  const [activeTab, setActiveTab] = __WEBPACK_EXTERNAL_MODULE_react__.useState(0);
3466
3467
  const featureTab = frontmatter?.featureTabs;
3467
3468
 
3469
+ const isPills = featureTab?.variant === 'pills';
3470
+
3468
3471
  return featureTab && featureTab.tabs && featureTab.tabs.length > 0 ? (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
3469
3472
  className: "features-div",
3470
3473
  children: [
@@ -3475,10 +3478,10 @@ function HomepageFeaturesTabs({ frontmatter, routePath }) {
3475
3478
 
3476
3479
  //Tabs
3477
3480
  (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
3478
- className: "features-tabs",
3481
+ className: "features-tabs" + (isPills ? " features-tabs--pills" : ""),
3479
3482
  children: (featureTab.tabs || []).map((tab, idx) =>
3480
3483
  (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("button", {
3481
- className: "features-tab" + (idx === activeTab ? " active" : ""),
3484
+ className: "features-tab" + (isPills ? " features-tab--pill" : "") + (idx === activeTab ? " active" : ""),
3482
3485
  onClick: () => setActiveTab(idx),
3483
3486
  children: tab.name
3484
3487
  }, tab.name)
@@ -3486,9 +3489,116 @@ function HomepageFeaturesTabs({ frontmatter, routePath }) {
3486
3489
  }),
3487
3490
 
3488
3491
  // Tab content
3489
- featureTab.tabs[activeTab] && featureTab.tabs[activeTab].rows?.length > 0 ?
3490
- (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
3491
- children: (featureTab.tabs[activeTab].rows || []).map((featuresRow) => {
3492
+ (() => {
3493
+ const currentTab = featureTab.tabs[activeTab];
3494
+ if (!currentTab) return null;
3495
+
3496
+ // Showcase layout: left info + right product grid
3497
+ if (currentTab.type === 'showcase') {
3498
+ const showcaseInfo = currentTab.showcase || {};
3499
+ return (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
3500
+ className: "features-tab-showcase",
3501
+ style: {
3502
+ display: 'flex',
3503
+ gap: '48px',
3504
+ marginTop: '24px',
3505
+ padding: '40px',
3506
+ background: '#F5F5F5',
3507
+ borderRadius: '12px',
3508
+ alignItems: 'flex-start',
3509
+ },
3510
+ children: [
3511
+ // Left side: title, desc, link
3512
+ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
3513
+ style: {
3514
+ flex: '1',
3515
+ display: 'flex',
3516
+ flexDirection: 'column',
3517
+ gap: '12px',
3518
+ },
3519
+ children: [
3520
+ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("h3", {
3521
+ style: {
3522
+ fontSize: '32px',
3523
+ fontWeight: '700',
3524
+ color: '#32363E',
3525
+ margin: 0,
3526
+ display: 'flex',
3527
+ alignItems: 'center',
3528
+ gap: '8px',
3529
+ },
3530
+ children: currentTab.name
3531
+ }),
3532
+ showcaseInfo.desc && (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("p", {
3533
+ style: {
3534
+ fontSize: '20px',
3535
+ color: '#494F5A',
3536
+ lineHeight: '1.6',
3537
+ margin: 0,
3538
+ },
3539
+ children: showcaseInfo.desc
3540
+ }),
3541
+ showcaseInfo.link && (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("a", {
3542
+ href: showcaseInfo.link,
3543
+ target: "_blank",
3544
+ style: {
3545
+ display: 'inline-flex',
3546
+ alignItems: 'center',
3547
+ gap: '6px',
3548
+ fontSize: '18px',
3549
+ fontWeight: '500',
3550
+ color: '#32363E',
3551
+ border: '1px solid #d1d5db',
3552
+ borderRadius: '6px',
3553
+ padding: '8px 16px',
3554
+ textDecoration: 'none',
3555
+ width: 'fit-content',
3556
+ marginTop: '4px',
3557
+ backgroundColor: '#fff',
3558
+ },
3559
+ children: [
3560
+ showcaseInfo.linkText || "View all products",
3561
+ " ",
3562
+ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("i", {
3563
+ className: "fa-solid fa-arrow-up-right-from-square",
3564
+ style: { fontSize: '12px' }
3565
+ })
3566
+ ]
3567
+ }),
3568
+ ]
3569
+ }),
3570
+ // Right side: product cards grid
3571
+ (showcaseInfo.items && showcaseInfo.items.length > 0) ? (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
3572
+ style: {
3573
+ flex: '1',
3574
+ display: 'grid',
3575
+ gridTemplateColumns: 'repeat(2, 1fr)',
3576
+ gap: '12px',
3577
+ },
3578
+ children: showcaseInfo.items.map((item) =>
3579
+ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("a", {
3580
+ href: item.link || "#",
3581
+ style: {
3582
+ background: '#fff',
3583
+ borderRadius: '8px',
3584
+ padding: '16px 20px',
3585
+ fontSize: '20px',
3586
+ fontWeight: '500',
3587
+ color: '#32363E',
3588
+ textDecoration: 'none',
3589
+ display: 'block',
3590
+ },
3591
+ children: item.text
3592
+ }, item.text)
3593
+ )
3594
+ }) : null,
3595
+ ]
3596
+ });
3597
+ }
3598
+
3599
+ // Default layout
3600
+ return (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
3601
+ children: (currentTab.rows || []).map((featuresRow) => {
3492
3602
  return featuresRow.items?.length > 0 ? (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
3493
3603
  style: {
3494
3604
  display: 'grid',
@@ -3499,8 +3609,9 @@ function HomepageFeaturesTabs({ frontmatter, routePath }) {
3499
3609
  alignItems: 'stretch',
3500
3610
  },
3501
3611
  children: (featuresRow.items || []).map((featureItem) =>
3502
- (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
3612
+ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("a", {
3503
3613
  className: "topics-item",
3614
+ href: featureItem.link,
3504
3615
  children: [
3505
3616
  (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
3506
3617
  className: "features-item-icon-div",
@@ -3535,7 +3646,8 @@ function HomepageFeaturesTabs({ frontmatter, routePath }) {
3535
3646
  )
3536
3647
  }, featuresRow.items[0].text) : null;
3537
3648
  })
3538
- }) : null,
3649
+ });
3650
+ })(),
3539
3651
  ]
3540
3652
  }) : null;
3541
3653
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rspress-theme-anatole/theme-default",
3
3
  "author": "Anatole Tong",
4
- "version": "0.7.35",
4
+ "version": "0.7.37",
5
5
  "license": "MIT",
6
6
  "sideEffects": [
7
7
  "*.css",
@@ -21,8 +21,8 @@
21
21
  "types": "./dist/bundle.d.ts",
22
22
  "dependencies": {
23
23
  "@mdx-js/react": "2.3.0",
24
- "@rspress-theme-anatole/rspress-plugin-mermaid": "0.7.35",
25
- "@rspress-theme-anatole/shared": "0.7.35",
24
+ "@rspress-theme-anatole/rspress-plugin-mermaid": "0.7.37",
25
+ "@rspress-theme-anatole/shared": "0.7.37",
26
26
  "@rspress/runtime": "1.43.8",
27
27
  "body-scroll-lock": "4.0.0-beta.0",
28
28
  "copy-to-clipboard": "^3.3.3",