Untitled
unknown
plain_text
10 months ago
11 kB
15
Indexable
// Optimized Variables - Compact & Advanced
$primary: #00B4D8;
$primary-dark: #2563eb;
$primary-light: #60a5fa;
$accent: #10b981;
$accent-light: #34d399;
// Surfaces
$bg: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
$surface: #ffffff;
$surface-glass: rgba(255, 255, 255, 0.9);
// Text
$text-1: #1e293b;
$text-2: #475569;
$text-3: #64748b;
// Layout
$border: #e2e8f0;
$radius: 12px;
$shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
$shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.12);
// Spacing System (Compact)
$s-xs: 0.25rem; // 4px
$s-sm: 0.5rem; // 8px
$s-md: 0.75rem; // 12px
$s-lg: 1rem; // 16px
$s-xl: 1.5rem; // 24px
// Typography Scale (Compact)
$text-xs: 0.75rem; // 12px
$text-sm: 0.8125rem; // 13px
$text-base: 0.875rem; // 14px
$text-lg: 1rem; // 16px
$text-xl: 1.125rem; // 18px
$text-2xl: 1.25rem; // 20px
// Advanced Mixins (Reusable)
@mixin flex($align: center, $justify: center, $gap: 0) {
display: flex;
align-items: $align;
justify-content: $justify;
gap: $gap;
}
@mixin glass($blur: 10px, $opacity: 0.9) {
background: rgba(255, 255, 255, $opacity);
backdrop-filter: blur($blur);
border: 1px solid rgba(255, 255, 255, 0.2);
}
@mixin card($hover: true) {
background: $surface;
border-radius: $radius;
box-shadow: $shadow;
border: 1px solid $border;
transition: all 0.2s ease;
@if $hover {
&:hover {
box-shadow: $shadow-lg;
transform: translateY(-1px);
}
}
}
@mixin gradient($color1: $primary, $color2: $primary-light, $deg: 135deg) {
background: linear-gradient($deg, $color1 0%, $color2 100%);
}
@mixin button-base {
@include flex(center, center);
border: 1.5px solid $border;
border-radius: calc($radius - 2px);
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
cursor: pointer;
position: relative;
overflow: hidden;
&::before {
content: '';
position: absolute;
top: 0; left: -100%;
width: 100%; height: 100%;
background: linear-gradient(90deg, transparent, rgba($primary, 0.1), transparent);
transition: left 0.4s ease;
}
&:hover:not(:disabled) {
border-color: $primary-light;
transform: translateY(-2px);
box-shadow: $shadow;
&::before { left: 100%; }
}
&:active:not(:disabled) {
transform: translateY(0);
}
}
@mixin icon-base($size: 2.5rem) {
@include flex;
width: $size;
height: $size;
border-radius: calc($radius - 4px);
transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
svg {
font-size: calc($size * 0.4);
transition: all 0.2s ease;
}
}
@mixin text-gradient($color1: $text-1, $color2: $primary) {
background: linear-gradient(135deg, $color1 0%, $color2 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
// Base Container
.mainContainerUser {
min-height: 100vh;
background: $bg;
padding: $s-lg;
position: relative;
&::before {
content: '';
position: fixed;
inset: 0;
background:
radial-gradient(circle at 20% 80%, rgba($primary-light, 0.08) 0%, transparent 50%),
radial-gradient(circle at 80% 20%, rgba($accent-light, 0.08) 0%, transparent 50%);
pointer-events: none;
}
> * { position: relative; z-index: 1; }
}
// Profile Section (Compact)
.profileSection {
@include flex(center, center, $s-lg);
flex-direction: column;
@include glass;
border-radius: $radius + 4px;
padding: $s-xl $s-lg;
margin-bottom: $s-xl;
box-shadow: $shadow-lg;
position: relative;
margin-top: 20px;
// &::before {
// content: '';
// position: absolute;
// top: 0; left: 0; right: 0;
// height: 2px;
// @include gradient;
// border-radius: $radius + 4px $radius + 4px 0 0;
// }
}
.profilePic {
position: relative;
// &::before {
// content: '';
// position: absolute;
// inset: -6px;
// border-radius: 50%;
// @include gradient;
// animation: pulse 2s infinite;
// }
}
.profileImage {
border-radius: 50%;
object-fit: cover;
border: 3px solid $surface;
transition: transform 0.3s ease;
&:hover { transform: scale(1.02); }
}
.userInfo {
text-align: center;
h1 {
font-size: $text-xl;
font-weight: 700;
color:#00B4D8;
// @include text-gradient;
margin: 0 0 $s-xs 0;
line-height: 1.2;
letter-spacing: -0.02em;
}
p {
font-size: $text-sm;
color: $text-2;
margin: 0;
font-weight: 500;
}
}
// Stats Section (Compact Grid)
.statsSection {
display: grid;
grid-template-columns: 1fr 1fr;
gap: $s-md;
margin-bottom: $s-xl;
}
.statCard {
@include card;
@include flex(center, flex-start, $s-md);
padding: $s-lg;
position: relative;
// &::before {
// content: '';
// position: absolute;
// left: 0; top: 0; bottom: 0;
// width: 3px;
// border-radius: 0 4px 4px 0;
// }
&:nth-child(1)::before { @include gradient; }
&:nth-child(2)::before { @include gradient($accent, $accent-light); }
}
.statIcon {
@include icon-base(2.75rem);
flex-shrink: 0;
svg {
color: white;
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}
}
.statCard:nth-child(1) .statIcon { @include gradient; }
.statCard:nth-child(2) .statIcon { @include gradient($accent, $accent-light); }
.statContent {
min-width: 0;
.statLabel {
font-size: $text-xs;
color: $text-3;
font-weight: 600;
margin-bottom: $s-xs;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.statValue {
font-size: $text-lg;
font-weight: 800;
color: $text-1;
font-family: ui-monospace, monospace;
line-height: 1;
}
}
// Social Section
.socialSection {
@include card;
padding: $s-lg;
position: relative;
&::before {
content: '';
position: absolute;
top: 0; left: 50%;
transform: translateX(-50%);
width: 40px; height: 2px;
@include gradient;
border-radius: 0 0 4px 4px;
}
}
.socialGrid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: $s-md;
margin-bottom: $s-md;
}
.socialGridFull {
display: grid;
grid-template-columns: 1fr;
}
// Advanced Social Button (Reusable)
.social__button {
@include button-base;
@include flex(center, flex-start, $s-md);
background: $surface;
padding: $s-md $s-lg;
text-align: left;
width: 100%;
// States
&.active {
border-color: $primary;
background: linear-gradient(135deg, rgba($primary, 0.06), rgba($primary-light, 0.04));
box-shadow: 0 0 0 1px rgba($primary, 0.1), $shadow;
.social__icon {
@include gradient;
transform: scale(1.05);
svg { color: white; }
}
.social__label {
color: $primary;
font-weight: 600;
}
}
&.disabled {
opacity: 0.5;
cursor: not-allowed;
background: #fafbfc;
.social__icon {
background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
svg { color: $text-3; }
}
&:hover {
transform: none;
box-shadow: none;
border-color: $border;
}
}
&.fullWidth {
justify-content: center;
padding: $s-lg $s-xl;
.social__content { text-align: center; }
.social__icon {
@include icon-base(3rem);
margin-right: $s-lg;
}
}
// Enhanced hover for non-disabled
&:hover:not(.disabled):not(:disabled) {
.social__icon {
@include gradient;
transform: scale(1.1) rotate(8deg);
box-shadow: $shadow;
svg { color: white; }
}
.social__label { color: $primary; }
}
}
.social__icon {
@include icon-base;
background: linear-gradient(135deg, #f8fafc, #f1f5f9);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
flex-shrink: 0;
svg {
color: $text-2;
}
}
.social__content {
flex: 1;
min-width: 0;
}
.social__label {
font-size: $text-sm;
font-weight: 600;
color: $text-1;
line-height: 1.3;
transition: color 0.2s ease;
.fullWidth & {
font-size: $text-base;
font-weight: 700;
}
}
// Optimized Animations
@keyframes pulse {
0%, 100% { transform: scale(0.98); opacity: 1; }
50% { transform: scale(1.02); opacity: 0.8; }
}
@keyframes fadeUp {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
// Loading State
.social__button:disabled.loading::after {
content: '';
position: absolute;
top: 50%; left: 50%;
width: 1rem; height: 1rem;
border: 2px solid transparent;
border-top: 2px solid $primary;
border-radius: 50%;
transform: translate(-50%, -50%);
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to { transform: translate(-50%, -50%) rotate(360deg); }
}
// Mobile Optimizations (Compact)
@media (max-width: 768px) {
.mainContainerUser { padding: $s-md; }
.profileSection {
padding: $s-lg $s-md;
margin-bottom: $s-lg;
}
.userInfo {
h1 { font-size: $text-lg; }
p { font-size: $text-xs; }
}
.statsSection {
gap: $s-sm;
margin-bottom: $s-lg;
}
.statCard { padding: $s-md; }
.statIcon { @include icon-base(2.5rem); }
.statValue { font-size: $text-base; }
.socialSection { padding: $s-md; }
.socialGrid { gap: $s-sm; }
.social__button {
padding: $s-sm $s-md;
&.fullWidth {
padding: $s-md $s-lg;
.social__icon { @include icon-base(2.75rem); }
}
}
.social__icon { @include icon-base(2.25rem); }
.social__label { font-size: $text-xs; }
}
@media (max-width: 480px) {
.mainContainerUser { padding: $s-sm; }
.profileSection {
padding: $s-md;
gap: $s-md;
}
.statsSection { gap: $s-xs; }
.statCard { padding: $s-sm $s-md; }
.socialGrid { gap: $s-xs; }
.social__button { padding: $s-xs $s-sm; }
}
// Utility Classes (Reusable)
.flex-center { @include flex; }
.flex-between { @include flex(center, space-between); }
.text-gradient { @include text-gradient; }
.glass { @include glass; }
.card { @include card; }
// Page Load Animation
.mainContainerUser > * {
animation: fadeUp 0.4s ease-out backwards;
&:nth-child(2) { animation-delay: 0.1s; }
&:nth-child(3) { animation-delay: 0.2s; }
&:nth-child(4) { animation-delay: 0.3s; }
}
// Focus States (Accessibility)
.social__button:focus-visible {
outline: 2px solid $primary;
outline-offset: 2px;
}Editor is loading...
Leave a Comment