Refactor SCSS and JavaScript for improved styling and scrolling behavior

- Updated SCSS variables to use static values instead of dynamic site parameters for colors and fonts.
- Changed various color values in the SCSS to enhance the overall design consistency.
- Improved JavaScript scroll functionality to prevent conflicts during auto-scrolling and manual scrolling.
- Added debounce functionality to wheel event listener for smoother scrolling experience.
- Enhanced header visibility behavior during scrolling.
- Reset auto-scroll state when returning to the hero section.
This commit is contained in:
astosic 2025-08-01 21:22:27 +02:00
parent baa97692d1
commit 99b78797b2
3 changed files with 237 additions and 214 deletions

View file

@ -1,27 +1,24 @@
// Color Variables
{{ with site.Params.variables }}
$color-primary: {{.color_primary | default "#fff"}};
$color-secondary: {{.color_secondary | default "#0AA8A7"}};
$text-color: {{.text_color | default "#fff"}};
$text-dark: {{.text_dark | default "#222"}};
$text-light: {{.text_light | default "#737373"}};
$body-bg: {{.body_color | default "#fff"}};
$border-color: {{.border_color | default "#ECECEC"}};
$black: {{.black | default "#000"}};
$white: {{.white | default "#fff"}};
$light: {{.light | default "#EDF6F5"}};
$color-primary: #fff;
$color-secondary: #0AA8A7;
$text-color: #fff;
$text-dark: #222;
$text-light: #737373;
$body-bg: #fff;
$border-color: #ECECEC;
$black: #000;
$white: #fff;
$light: #EDF6F5;
// Font Variables
$font-size: {{.font_size | default "16px"}};
$font-scale: {{.font_scale | default "1.25"}};
$font-primary: '{{replace (replaceRE ":[ital,]*[ital@]*[wght@]*[0-9,;]+" "" .font_primary | default "Lato") "+" " "}}', {{.font_primary_type | default "sans-serif"}};
$font-secondary: '{{replace (replaceRE ":[ital,]*[ital@]*[wght@]*[0-9,;]+" "" .font_secondary | default "Lato") "+" " "}}', {{.font_secondary_type | default "sans-serif"}};
$font-tertiary: '{{replace (replaceRE ":[ital,]*[ital@]*[wght@]*[0-9,;]+" "" .font_tertiary | default "Dosis") "+" " "}}', {{.font_tertiary_type | default "sans-serif"}};
$font-quaternary: '{{replace (replaceRE ":[ital,]*[ital@]*[wght@]*[0-9,;]+" "" .font_quaternary | default "Edu") "+" " "}}', {{.font_quaternary_type | default "sans-serif"}};
$font-size: 16px;
$font-scale: 1.25;
$font-primary: 'Lato', sans-serif;
$font-secondary: 'Lato', sans-serif;
$font-tertiary: 'Dosis', sans-serif;
$font-quaternary: 'Edu', sans-serif;
$font-icon: '{{.font_icon | default "Font Awesome 5 Free"}}';
{{ end }}
$font-icon: 'Font Awesome 5 Free';
$h1: 80px;
$h1-md: 34px;