diff --git a/src/components/HeroBanner/index.tsx b/src/components/HeroBanner/index.tsx index 87c7ae8..547962d 100644 --- a/src/components/HeroBanner/index.tsx +++ b/src/components/HeroBanner/index.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import styles from './styles.module.css'; +import styles from './styles.module.scss'; const HeroBanner = ({ title, subheading, backgroundImage }) => { return ( diff --git a/src/components/HeroBanner/styles.module.css b/src/components/HeroBanner/styles.module.css deleted file mode 100644 index cfc5eee..0000000 --- a/src/components/HeroBanner/styles.module.css +++ /dev/null @@ -1,50 +0,0 @@ - -.heroBanner { - width: 100%; - background-size: cover; - background-position: center; - display: flex; - align-items: center; - justify-content: flex-start; - height: 300px; - position: relative; -} - -.textSection { - position: relative; - z-index: 1; - padding: 15px; - padding-right: 30px; -} - -.textSection p { - padding-right: 15px; -} - -.textSection::after { - content: ''; - position: absolute; - left: 0; - top: 0; - bottom: 0; - right: 0; - background: var(--ifm-background-color); - z-index: -1; - transform-origin: top right; - transform: skewX(-16deg); - overflow: hidden; - width: 100%; -} - -[data-theme='light'] .textSection::after { - background: #fff; -} - -.heroBanner h1 { - font-size: 2.5em; -} - -.heroBanner p { - font-size: 1.2em; - line-height: 1em; -} \ No newline at end of file diff --git a/src/components/HeroBanner/styles.module.scss b/src/components/HeroBanner/styles.module.scss new file mode 100644 index 0000000..455dbc2 --- /dev/null +++ b/src/components/HeroBanner/styles.module.scss @@ -0,0 +1,52 @@ + +.heroBanner { + width: 100%; + background-size: cover; + background-position: center; + display: flex; + align-items: center; + justify-content: flex-start; + height: 300px; + position: relative; +} + +.textSection { + position: relative; + z-index: 1; + padding: 15px; + padding-right: 30px; + + p { + padding-right: 15px; + } + + &::after { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: 0; + right: 0; + background: var(--ifm-background-color); + z-index: -1; + transform-origin: top right; + transform: skewX(-16deg); + overflow: hidden; + width: 100%; + } +} + +[data-theme='light'] .textSection::after { + background: #fff; +} + +.heroBanner { + h1 { + font-size: 2.5em; + } + + p { + font-size: 1.2em; + line-height: 1em; + } +} \ No newline at end of file diff --git a/src/components/HomepageFeatures/index.tsx b/src/components/HomepageFeatures/index.tsx index 7d3b484..9158c15 100644 --- a/src/components/HomepageFeatures/index.tsx +++ b/src/components/HomepageFeatures/index.tsx @@ -1,6 +1,6 @@ import clsx from 'clsx'; import Heading from '@theme/Heading'; -import styles from './styles.module.css'; +import styles from './styles.module.scss'; import Crossplatform0Img from '@site/static/img/site/crossplatform_0.png'; import Crossplatform1Img from '@site/static/img/site/crossplatform_1.png'; import Crossplatform2Img from '@site/static/img/site/crossplatform_2.png'; diff --git a/src/components/HomepageFeatures/styles.module.css b/src/components/HomepageFeatures/styles.module.scss similarity index 100% rename from src/components/HomepageFeatures/styles.module.css rename to src/components/HomepageFeatures/styles.module.scss diff --git a/src/pages/index.module.css b/src/pages/index.module.scss similarity index 100% rename from src/pages/index.module.css rename to src/pages/index.module.scss diff --git a/src/pages/index.tsx b/src/pages/index.tsx index fc2b78c..0a3aa3f 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -4,7 +4,7 @@ import HomepageFeatures from '@site/src/components/HomepageFeatures'; import Heading from '@theme/Heading'; import HeroImage from '@site/static/img/site/geyser.png'; -import styles from './index.module.css'; +import styles from './index.module.scss'; import Translate from '@docusaurus/Translate'; function HomepageHeader() { diff --git a/src/pages/utilities/config-editor.tsx b/src/pages/utilities/config-editor.tsx index 3280271..4839c81 100644 --- a/src/pages/utilities/config-editor.tsx +++ b/src/pages/utilities/config-editor.tsx @@ -2,7 +2,7 @@ import Translate from '@docusaurus/Translate'; import HeroBanner from '@site/src/components/HeroBanner'; import HeroBackground from '@site/static/img/site/split-background.webp'; import Layout from '@theme/Layout'; -import styles from './utilities.module.css'; +import styles from './utilities.module.scss'; import { useRef, useState } from 'react'; const ConfigEditorPage: React.FC = () => { diff --git a/src/pages/utilities/dump-viewer.tsx b/src/pages/utilities/dump-viewer.tsx index 0c022b0..341d785 100644 --- a/src/pages/utilities/dump-viewer.tsx +++ b/src/pages/utilities/dump-viewer.tsx @@ -3,7 +3,7 @@ import HeroBanner from '@site/src/components/HeroBanner'; import HeroBackground from '@site/static/img/site/split-background.webp'; import Layout from '@theme/Layout'; import { useEffect, useRef, useState } from 'react'; -import styles from './utilities.module.css'; +import styles from './utilities.module.scss'; import { Grid } from '@site/src/components/Grid'; import CodeBlock from '@theme/CodeBlock'; import clsx from 'clsx'; diff --git a/src/pages/utilities/utilities.module.css b/src/pages/utilities/utilities.module.scss similarity index 83% rename from src/pages/utilities/utilities.module.css rename to src/pages/utilities/utilities.module.scss index 1a1b9c7..b33b836 100644 --- a/src/pages/utilities/utilities.module.css +++ b/src/pages/utilities/utilities.module.scss @@ -32,10 +32,10 @@ padding-bottom: 20px; padding-top: 20px; border-bottom: 1px solid gray; -} -.configOption:last-child { - border-bottom: none; + &:last-child { + border-bottom: none; + } } .loadButton { @@ -53,11 +53,11 @@ padding-bottom: 10px; color: var(--ifm-tabs-color-active); margin-left: 5px; -} -.loadButton:hover { - background-color: var(--ifm-color-primary); - color: #fff; + &:hover { + background-color: var(--ifm-color-primary); + color: #fff; + } } .statusMessage { @@ -76,10 +76,10 @@ z-index: 1000; min-width: 300px; box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px; -} -.pluginInfoPopover p { - margin: 0; + p { + margin: 0; + } } .pluginNamePopover { @@ -118,18 +118,18 @@ background-color: var(--switch-background-color); border-radius: 20px; transition: all 0.3s; -} -.switch::after { - content: ''; - position: absolute; - width: 18px; - height: 18px; - border-radius: 50%; - background-color: white; - top: 1px; - left: 1px; - transition: all 0.3s; + &::after { + content: ''; + position: absolute; + width: 18px; + height: 18px; + border-radius: 50%; + background-color: white; + top: 1px; + left: 1px; + transition: all 0.3s; + } } .checkbox:checked+.switch::after { @@ -144,7 +144,6 @@ display: none; } - .hidden { display: none; } @@ -167,19 +166,19 @@ padding-top: 10px; padding-bottom: 10px; color: var(--ifm-tabs-color-active); -} -.button:hover { - background-color: var(--ifm-color-primary); - color: #fff; + &:hover { + background-color: var(--ifm-color-primary); + color: #fff; + } } .buttonSecondary { outline: 3px solid var(--ifm-color-secondary); -} - -.buttonSecondary:hover { - background-color: var(--ifm-color-secondary); + + &:hover { + background-color: var(--ifm-color-secondary); + } } .formInput { diff --git a/src/types/modules.d.ts b/src/types/modules.d.ts new file mode 100644 index 0000000..0a04608 --- /dev/null +++ b/src/types/modules.d.ts @@ -0,0 +1,9 @@ +declare module '*.module.scss' { + const classes: {readonly [key: string]: string}; + export default classes; +} + +declare module '*.scss' { + const src: string; + export default src; +} \ No newline at end of file