feat: change to other sitepakage
This commit is contained in:
10
packages/base/Resources/Public/Scss/abstracts/_mixins.scss
Normal file
10
packages/base/Resources/Public/Scss/abstracts/_mixins.scss
Normal file
@@ -0,0 +1,10 @@
|
||||
// Example mixin for transitions
|
||||
@mixin transition($property: all, $duration: 0.3s, $timing: ease-in-out) {
|
||||
transition: $property $duration $timing;
|
||||
}
|
||||
|
||||
@mixin respond($breakpoint) {
|
||||
@media (min-width: $breakpoint) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// Example variables, extend as needed
|
||||
$primary-color: #4b4b4b;
|
||||
$secondary-color: #ffffff;
|
||||
$brand-color: #6B8E23;
|
||||
$font-stack: 'Helvetica', sans-serif;
|
||||
|
||||
// Breakpoints
|
||||
$breakpoint-sm: 576px;
|
||||
$breakpoint-md: 768px;
|
||||
$breakpoint-lg: 992px;
|
||||
$breakpoint-xl: 1200px;
|
||||
20
packages/base/Resources/Public/Scss/base/_container.scss
Normal file
20
packages/base/Resources/Public/Scss/base/_container.scss
Normal file
@@ -0,0 +1,20 @@
|
||||
.container {
|
||||
margin: auto;
|
||||
padding: 3rem 1rem;
|
||||
|
||||
@include respond($breakpoint-sm) {
|
||||
max-width: 540px;
|
||||
}
|
||||
|
||||
@include respond($breakpoint-md) {
|
||||
max-width: 720px;
|
||||
}
|
||||
|
||||
@include respond($breakpoint-lg) {
|
||||
max-width: 960px;
|
||||
}
|
||||
|
||||
@include respond($breakpoint-xl) {
|
||||
max-width: 1140px;
|
||||
}
|
||||
}
|
||||
5
packages/base/Resources/Public/Scss/base/_global.scss
Normal file
5
packages/base/Resources/Public/Scss/base/_global.scss
Normal file
@@ -0,0 +1,5 @@
|
||||
body {
|
||||
font-family: $font-stack;
|
||||
color: $primary-color;
|
||||
line-height: 1.5;
|
||||
}
|
||||
6
packages/base/Resources/Public/Scss/base/_reset.scss
Normal file
6
packages/base/Resources/Public/Scss/base/_reset.scss
Normal file
@@ -0,0 +1,6 @@
|
||||
// A simple CSS reset, adapt as needed
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
3
packages/base/Resources/Public/Scss/base/base.scss
Normal file
3
packages/base/Resources/Public/Scss/base/base.scss
Normal file
@@ -0,0 +1,3 @@
|
||||
@import 'reset';
|
||||
@import 'global';
|
||||
@import 'container';
|
||||
@@ -0,0 +1,19 @@
|
||||
.content-element {
|
||||
margin: 2rem auto;
|
||||
padding: 2rem;
|
||||
background-color: #f5f5f5; // default background
|
||||
|
||||
// Apply responsive widths at breakpoints using the respond mixin
|
||||
|
||||
&--blue {
|
||||
background-color: #cceeff;
|
||||
}
|
||||
|
||||
&--gray {
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
|
||||
&--image {
|
||||
background: url('EXT:my_sitepackage/Resources/Public/Images/background-image.jpg') no-repeat center/cover;
|
||||
}
|
||||
}
|
||||
142
packages/base/Resources/Public/Scss/components/_navigation.scss
Normal file
142
packages/base/Resources/Public/Scss/components/_navigation.scss
Normal file
@@ -0,0 +1,142 @@
|
||||
.main-nav {
|
||||
width: 100%;
|
||||
background: $secondary-color url('EXT:my_sitepackage/Resources/Public/Images/linen-texture.png') repeat;
|
||||
position: relative;
|
||||
z-index: 1000;
|
||||
|
||||
&.sticky {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 0 auto;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.nav-logo {
|
||||
img {
|
||||
display: block;
|
||||
max-height: 50px;
|
||||
height: auto;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-toggle {
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
display: none; // hidden by default on desktop
|
||||
position: relative;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
|
||||
.nav-toggle-icon {
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
background: $primary-color;
|
||||
display: block;
|
||||
position: relative;
|
||||
@include transition(all, 0.3s);
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
content: '';
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
background: $primary-color;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
@include transition(all, 0.3s);
|
||||
}
|
||||
|
||||
&::before {
|
||||
top: -8px;
|
||||
}
|
||||
|
||||
&::after {
|
||||
top: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
&.active .nav-toggle-icon {
|
||||
background: transparent;
|
||||
|
||||
&::before {
|
||||
transform: rotate(45deg) translate(5px, 5px);
|
||||
}
|
||||
|
||||
&::after {
|
||||
transform: rotate(-45deg) translate(5px, -5px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.nav-links {
|
||||
display: flex;
|
||||
list-style: none;
|
||||
|
||||
.nav-item {
|
||||
margin: 0 1rem;
|
||||
|
||||
.nav-link {
|
||||
text-decoration: none;
|
||||
color: $primary-color;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
font-size: 1rem;
|
||||
@include transition(color);
|
||||
|
||||
&:hover {
|
||||
color: $brand-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Responsive: show hamburger and collapse menu on smaller screens
|
||||
@media (max-width: $breakpoint-lg) {
|
||||
.nav-toggle {
|
||||
display: block;
|
||||
}
|
||||
|
||||
// Hide links by default on mobile and show only when toggled
|
||||
.nav-links {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
flex-direction: column;
|
||||
background: $secondary-color url('EXT:my_sitepackage/Resources/Public/Images/linen-texture.png') repeat;
|
||||
max-height: 0;
|
||||
overflow: hidden;
|
||||
@include transition(max-height, 0.4s);
|
||||
|
||||
.nav-item {
|
||||
margin: 0;
|
||||
padding: 1rem;
|
||||
border-top: 1px solid rgba(0,0,0,0.1);
|
||||
|
||||
&:first-child {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.open .nav-links {
|
||||
max-height: 500px; // Adjust to fit all items
|
||||
}
|
||||
}
|
||||
}
|
||||
4
packages/base/Resources/Public/Scss/main.scss
Normal file
4
packages/base/Resources/Public/Scss/main.scss
Normal file
@@ -0,0 +1,4 @@
|
||||
@import 'abstracts/variables';
|
||||
@import 'abstracts/mixins';
|
||||
@import 'base/base';
|
||||
@import 'components/navigation';
|
||||
Reference in New Issue
Block a user