@rspress-theme-anatole/theme-default 0.7.39 → 0.7.41

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
@@ -3668,6 +3668,27 @@ p {
3668
3668
  color: #f44336;
3669
3669
  }
3670
3670
 
3671
+ .topics-icon-svg {
3672
+ display: inline-flex;
3673
+ align-items: center;
3674
+ justify-content: center;
3675
+ width: 40px;
3676
+ height: 40px;
3677
+ font-size: 0;
3678
+ color: inherit;
3679
+ }
3680
+
3681
+ .topics-icon-svg svg {
3682
+ width: 100%;
3683
+ height: 100%;
3684
+ }
3685
+
3686
+ .topics-icon-img {
3687
+ width: 40px;
3688
+ height: 40px;
3689
+ object-fit: contain;
3690
+ }
3691
+
3671
3692
  .topics-link {
3672
3693
  font-weight: bold;
3673
3694
  text-decoration: none;
@@ -3735,11 +3756,14 @@ p {
3735
3756
  }
3736
3757
 
3737
3758
  .features-item-icon-div {
3738
- width: 40;
3739
- height: 40;
3759
+ width: 40px;
3760
+ height: 40px;
3740
3761
  border-radius: 8px;
3741
- background-color: #EF483D;
3742
3762
  text-align: center;
3763
+ }
3764
+
3765
+ .features-item-icon-div.features-item-icon-div--fa {
3766
+ background: linear-gradient(135deg, #C72281, #7B2FBE);
3743
3767
  padding-top: 8px;
3744
3768
  }
3745
3769
 
@@ -3748,6 +3772,26 @@ p {
3748
3772
  color: #FFFFFF;
3749
3773
  }
3750
3774
 
3775
+ .features-item-icon-svg {
3776
+ display: inline-flex;
3777
+ align-items: center;
3778
+ justify-content: center;
3779
+ width: 40px;
3780
+ height: 40px;
3781
+ font-size: 0;
3782
+ }
3783
+
3784
+ .features-item-icon-svg svg {
3785
+ width: 100%;
3786
+ height: 100%;
3787
+ }
3788
+
3789
+ .features-item-icon-img {
3790
+ width: 40px;
3791
+ height: 40px;
3792
+ object-fit: contain;
3793
+ }
3794
+
3751
3795
  .features-div {
3752
3796
  margin: 45px 40px 72px 40px;
3753
3797
  }
package/dist/bundle.js CHANGED
@@ -3232,9 +3232,20 @@ function HomepageTopics({ frontmatter, routePath }) {
3232
3232
  children: [
3233
3233
  (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
3234
3234
  className: "topics-icon-wrapper",
3235
- children: (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("i", {
3236
- className: topicItem.icon + " topics-icon"
3237
- })
3235
+ children: topicItem.icon && topicItem.icon.trim().startsWith('<svg')
3236
+ ? (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
3237
+ className: "topics-icon topics-icon-svg",
3238
+ dangerouslySetInnerHTML: { __html: topicItem.icon }
3239
+ })
3240
+ : topicItem.icon && (topicItem.icon.endsWith('.svg') || topicItem.icon.endsWith('.png') || topicItem.icon.endsWith('.jpg') || topicItem.icon.endsWith('.webp'))
3241
+ ? (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("img", {
3242
+ src: topicItem.icon,
3243
+ alt: topicItem.text || '',
3244
+ className: "topics-icon topics-icon-img"
3245
+ })
3246
+ : (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("i", {
3247
+ className: topicItem.icon + " topics-icon"
3248
+ })
3238
3249
  }),
3239
3250
  (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
3240
3251
  className: "topics-link",
@@ -3300,9 +3311,20 @@ function HomepageMoreTopics({ frontmatter, routePath }) {
3300
3311
  children: [
3301
3312
  (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
3302
3313
  className: "topics-icon-wrapper",
3303
- children: (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("i", {
3304
- className: topicItem.icon + " topics-icon"
3305
- })
3314
+ children: topicItem.icon && topicItem.icon.trim().startsWith('<svg')
3315
+ ? (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
3316
+ className: "topics-icon topics-icon-svg",
3317
+ dangerouslySetInnerHTML: { __html: topicItem.icon }
3318
+ })
3319
+ : topicItem.icon && (topicItem.icon.endsWith('.svg') || topicItem.icon.endsWith('.png') || topicItem.icon.endsWith('.jpg') || topicItem.icon.endsWith('.webp'))
3320
+ ? (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("img", {
3321
+ src: topicItem.icon,
3322
+ alt: topicItem.text || '',
3323
+ className: "topics-icon topics-icon-img"
3324
+ })
3325
+ : (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("i", {
3326
+ className: topicItem.icon + " topics-icon"
3327
+ })
3306
3328
  }),
3307
3329
  (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
3308
3330
  className: "topics-link",
@@ -3354,10 +3376,21 @@ function HomepageFeatures({ frontmatter, routePath }) {
3354
3376
  href: featureItem.link,
3355
3377
  children: [
3356
3378
  (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
3357
- children: (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("i", {
3358
- className: featureItem.icon + " features-item-icon",
3359
- }),
3360
- className: "features-item-icon-div"
3379
+ children: featureItem.icon && featureItem.icon.trim().startsWith('<svg')
3380
+ ? (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
3381
+ className: "features-item-icon features-item-icon-svg",
3382
+ dangerouslySetInnerHTML: { __html: featureItem.icon }
3383
+ })
3384
+ : featureItem.icon && (featureItem.icon.endsWith('.svg') || featureItem.icon.endsWith('.png') || featureItem.icon.endsWith('.jpg') || featureItem.icon.endsWith('.webp'))
3385
+ ? (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("img", {
3386
+ src: featureItem.icon,
3387
+ alt: featureItem.text || '',
3388
+ className: "features-item-icon features-item-icon-img"
3389
+ })
3390
+ : (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("i", {
3391
+ className: featureItem.icon + " features-item-icon",
3392
+ }),
3393
+ className: "features-item-icon-div" + (!(featureItem.icon && (featureItem.icon.trim().startsWith('<svg') || featureItem.icon.endsWith('.svg') || featureItem.icon.endsWith('.png') || featureItem.icon.endsWith('.jpg') || featureItem.icon.endsWith('.webp'))) ? " features-item-icon-div--fa" : "")
3361
3394
  }),
3362
3395
  (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("p", {
3363
3396
  className: "topics-item-text",
@@ -3617,10 +3650,21 @@ function HomepageFeaturesTabs({ frontmatter, routePath }) {
3617
3650
  href: featureItem.link,
3618
3651
  children: [
3619
3652
  (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
3620
- className: "features-item-icon-div",
3621
- children: (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("i", {
3622
- className: featureItem.icon + " features-item-icon",
3623
- })
3653
+ className: "features-item-icon-div" + (!(featureItem.icon && (featureItem.icon.trim().startsWith('<svg') || featureItem.icon.endsWith('.svg') || featureItem.icon.endsWith('.png') || featureItem.icon.endsWith('.jpg') || featureItem.icon.endsWith('.webp'))) ? " features-item-icon-div--fa" : ""),
3654
+ children: featureItem.icon && featureItem.icon.trim().startsWith('<svg')
3655
+ ? (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
3656
+ className: "features-item-icon features-item-icon-svg",
3657
+ dangerouslySetInnerHTML: { __html: featureItem.icon }
3658
+ })
3659
+ : featureItem.icon && (featureItem.icon.endsWith('.svg') || featureItem.icon.endsWith('.png') || featureItem.icon.endsWith('.jpg') || featureItem.icon.endsWith('.webp'))
3660
+ ? (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("img", {
3661
+ src: featureItem.icon,
3662
+ alt: featureItem.text || '',
3663
+ className: "features-item-icon features-item-icon-img"
3664
+ })
3665
+ : (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("i", {
3666
+ className: featureItem.icon + " features-item-icon",
3667
+ })
3624
3668
  }),
3625
3669
  (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("p", {
3626
3670
  className: "topics-item-text",
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.39",
4
+ "version": "0.7.41",
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.39",
25
- "@rspress-theme-anatole/shared": "0.7.39",
24
+ "@rspress-theme-anatole/rspress-plugin-mermaid": "0.7.41",
25
+ "@rspress-theme-anatole/shared": "0.7.41",
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",