feat(help): add Help Center with video tutorials and progress tracking
- Implemented Help Center page with video categories and tutorials. - Added VideoModal component for video playback. - Introduced progress tracking for watched videos using local storage. - Created CSS styles for Help Center layout and components. - Added video data structure and sample videos for various categories. - Updated Footer to include a link to the Help Center.
This commit is contained in:
@@ -0,0 +1,701 @@
|
||||
/* Help Center - Professional Video Tutorial Page */
|
||||
|
||||
.container {
|
||||
width: 100%;
|
||||
max-width: 1300px;
|
||||
margin: 0 auto;
|
||||
padding: 0 2rem;
|
||||
}
|
||||
|
||||
/* Hero Section */
|
||||
.hero {
|
||||
text-align: center;
|
||||
padding: 4rem 2rem 3rem;
|
||||
padding-top: 5rem;
|
||||
}
|
||||
|
||||
.heroIcon {
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
background: linear-gradient(135deg, var(--wine-red) 0%, var(--wine-dark) 100%);
|
||||
border-radius: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0 auto 1.5rem;
|
||||
box-shadow: 0 10px 30px rgba(255, 42, 127, 0.2);
|
||||
}
|
||||
|
||||
.heroTitle {
|
||||
font-size: 3rem;
|
||||
font-weight: 800;
|
||||
line-height: 1.2;
|
||||
margin-bottom: 1rem;
|
||||
background: linear-gradient(135deg, var(--wine-superdark) 0%, var(--wine-red) 100%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
}
|
||||
|
||||
.heroSubtitle {
|
||||
font-size: 1.2rem;
|
||||
color: var(--gray-dark);
|
||||
max-width: 700px;
|
||||
margin: 0 auto 2rem;
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.heroStats {
|
||||
display: flex;
|
||||
gap: 2rem;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
.statItem {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
padding: 0.75rem 1.5rem;
|
||||
background: var(--white);
|
||||
border-radius: 50px;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
|
||||
border: 1px solid var(--white-darkest);
|
||||
}
|
||||
|
||||
.statNumber {
|
||||
font-size: 1.4rem;
|
||||
font-weight: 800;
|
||||
color: var(--wine-dark);
|
||||
}
|
||||
|
||||
.statLabel {
|
||||
font-size: 0.9rem;
|
||||
color: var(--gray-dark);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* Category Navigation */
|
||||
.categoryNav {
|
||||
display: flex;
|
||||
gap: 0.75rem;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
padding: 1.5rem 0 3rem;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
backdrop-filter: blur(10px);
|
||||
z-index: 10;
|
||||
border-bottom: 1px solid var(--white-darkest);
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.categoryBtn {
|
||||
padding: 0.6rem 1.4rem;
|
||||
border-radius: 50px;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: all 0.25s ease;
|
||||
border: 2px solid var(--white-darkest);
|
||||
background: var(--white);
|
||||
color: var(--gray-dark);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.categoryBtn:hover {
|
||||
border-color: var(--wine-light);
|
||||
color: var(--wine-dark);
|
||||
background: rgba(127, 42, 255, 0.04);
|
||||
}
|
||||
|
||||
.categoryBtnActive {
|
||||
composes: categoryBtn;
|
||||
background: linear-gradient(135deg, var(--wine-red) 0%, var(--wine-dark) 100%);
|
||||
color: var(--white);
|
||||
border-color: transparent;
|
||||
box-shadow: 0 4px 15px rgba(255, 42, 127, 0.3);
|
||||
}
|
||||
|
||||
.categoryBtnActive:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 6px 20px rgba(255, 42, 127, 0.4);
|
||||
color: var(--white);
|
||||
}
|
||||
|
||||
/* Category Section */
|
||||
.categorySection {
|
||||
margin-bottom: 4rem;
|
||||
scroll-margin-top: 80px;
|
||||
}
|
||||
|
||||
.categoryHeader {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
margin-bottom: 2rem;
|
||||
padding-bottom: 1rem;
|
||||
border-bottom: 2px solid var(--white-darkest);
|
||||
}
|
||||
|
||||
.categoryIcon {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border-radius: 14px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.categoryTitle {
|
||||
font-size: 1.8rem;
|
||||
font-weight: 800;
|
||||
color: var(--wine-superdark);
|
||||
}
|
||||
|
||||
.categoryDescription {
|
||||
font-size: 1rem;
|
||||
color: var(--gray-dark);
|
||||
margin-top: 0.25rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.categoryCount {
|
||||
margin-left: auto;
|
||||
background: var(--white-dark);
|
||||
color: var(--gray-dark);
|
||||
padding: 0.3rem 0.8rem;
|
||||
border-radius: 50px;
|
||||
font-size: 0.85rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* Video Grid */
|
||||
.videoGrid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
/* Video Card */
|
||||
.videoCard {
|
||||
background: var(--white);
|
||||
border-radius: 16px;
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--white-darkest);
|
||||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
|
||||
transition: all 0.3s ease;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.videoCard:hover {
|
||||
transform: translateY(-4px);
|
||||
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
|
||||
border-color: var(--wine-lighter);
|
||||
}
|
||||
|
||||
.videoThumbnail {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
padding-bottom: 56.25%;
|
||||
overflow: hidden;
|
||||
background: var(--black);
|
||||
}
|
||||
|
||||
.videoThumbnail img {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.videoCard:hover .videoThumbnail img {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.playOverlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: rgba(0, 0, 0, 0);
|
||||
transition: background 0.3s ease;
|
||||
}
|
||||
|
||||
.videoCard:hover .playOverlay {
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.playButton {
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
opacity: 0;
|
||||
transform: scale(0.8);
|
||||
transition: all 0.3s ease;
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.videoCard:hover .playButton {
|
||||
opacity: 1;
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
.playIcon {
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-style: solid;
|
||||
border-width: 10px 0 10px 18px;
|
||||
border-color: transparent transparent transparent var(--wine-red);
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.videoDuration {
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
right: 8px;
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
color: white;
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.videoContent {
|
||||
padding: 1.25rem;
|
||||
}
|
||||
|
||||
.videoTitle {
|
||||
font-size: 1rem;
|
||||
font-weight: 700;
|
||||
color: var(--black);
|
||||
margin-bottom: 0.5rem;
|
||||
line-height: 1.4;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.videoDescription {
|
||||
font-size: 0.85rem;
|
||||
color: var(--gray-dark);
|
||||
line-height: 1.5;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.videoMeta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
margin-top: 0.75rem;
|
||||
padding-top: 0.75rem;
|
||||
border-top: 1px solid var(--white-darkest);
|
||||
}
|
||||
|
||||
.videoStep {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.4rem;
|
||||
font-size: 0.8rem;
|
||||
color: var(--wine-dark);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.stepNumber {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
background: linear-gradient(135deg, var(--wine-red), var(--wine-dark));
|
||||
color: white;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 0.7rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
/* Video Modal */
|
||||
.modalOverlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.85);
|
||||
z-index: 1000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 2rem;
|
||||
animation: fadeIn 0.2s ease;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
}
|
||||
|
||||
.modalContent {
|
||||
width: 100%;
|
||||
max-width: 1100px;
|
||||
background: var(--white);
|
||||
border-radius: 20px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
|
||||
animation: slideUp 0.3s ease;
|
||||
max-height: 90vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
@keyframes slideUp {
|
||||
from { transform: translateY(20px); opacity: 0; }
|
||||
to { transform: translateY(0); opacity: 1; }
|
||||
}
|
||||
|
||||
.modalHeader {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 1.25rem 1.5rem;
|
||||
border-bottom: 1px solid var(--white-darkest);
|
||||
background: var(--white);
|
||||
}
|
||||
|
||||
.modalTitle {
|
||||
font-size: 1.2rem;
|
||||
font-weight: 700;
|
||||
color: var(--black);
|
||||
flex: 1;
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
.modalClose {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 50%;
|
||||
background: var(--white-dark);
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.2s ease;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.modalClose:hover {
|
||||
background: var(--error);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.modalBody {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.modalVideo {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.videoWrapper {
|
||||
position: relative;
|
||||
padding-bottom: 56.25%;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.videoWrapper iframe {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.modalSidebar {
|
||||
width: 320px;
|
||||
overflow-y: auto;
|
||||
border-left: 1px solid var(--white-darkest);
|
||||
background: var(--white-dark);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.sidebarTitle {
|
||||
font-size: 0.9rem;
|
||||
font-weight: 700;
|
||||
color: var(--gray-dark);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
padding: 1rem 1.25rem 0.75rem;
|
||||
}
|
||||
|
||||
.sidebarVideo {
|
||||
display: flex;
|
||||
gap: 0.75rem;
|
||||
padding: 0.75rem 1.25rem;
|
||||
cursor: pointer;
|
||||
transition: background 0.2s ease;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
.sidebarVideo:hover {
|
||||
background: rgba(127, 42, 255, 0.04);
|
||||
}
|
||||
|
||||
.sidebarVideoActive {
|
||||
composes: sidebarVideo;
|
||||
background: rgba(127, 42, 255, 0.08);
|
||||
border-left: 3px solid var(--wine-red);
|
||||
}
|
||||
|
||||
.sidebarThumb {
|
||||
width: 100px;
|
||||
height: 56px;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
flex-shrink: 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.sidebarThumb img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.sidebarVideoInfo {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.sidebarVideoTitle {
|
||||
font-size: 0.8rem;
|
||||
font-weight: 600;
|
||||
color: var(--black);
|
||||
line-height: 1.3;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sidebarVideoCategory {
|
||||
font-size: 0.7rem;
|
||||
color: var(--wine-dark);
|
||||
font-weight: 500;
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
|
||||
/* Progress Section */
|
||||
.progressSection {
|
||||
background: linear-gradient(135deg, var(--wine-superdark) 0%, var(--wine-darkest) 100%);
|
||||
border-radius: 20px;
|
||||
padding: 3rem;
|
||||
margin: 3rem 0;
|
||||
text-align: center;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.progressTitle {
|
||||
font-size: 1.8rem;
|
||||
font-weight: 800;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.progressText {
|
||||
font-size: 1.1rem;
|
||||
opacity: 0.85;
|
||||
max-width: 600px;
|
||||
margin: 0 auto 2rem;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.progressBar {
|
||||
max-width: 500px;
|
||||
margin: 0 auto;
|
||||
height: 8px;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.progressFill {
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, var(--wine-red), var(--yellow));
|
||||
border-radius: 4px;
|
||||
transition: width 0.5s ease;
|
||||
}
|
||||
|
||||
/* CTA Section */
|
||||
.ctaSection {
|
||||
text-align: center;
|
||||
padding: 4rem 2rem;
|
||||
margin-top: 2rem;
|
||||
background: var(--white-dark);
|
||||
border-radius: 24px;
|
||||
margin-bottom: 3rem;
|
||||
}
|
||||
|
||||
.ctaTitle {
|
||||
font-size: 2rem;
|
||||
font-weight: 800;
|
||||
color: var(--wine-superdark);
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.ctaText {
|
||||
font-size: 1.1rem;
|
||||
color: var(--gray-dark);
|
||||
max-width: 500px;
|
||||
margin: 0 auto 2rem;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.ctaButton {
|
||||
display: inline-block;
|
||||
padding: 1rem 2.5rem;
|
||||
background: linear-gradient(135deg, var(--wine-red) 0%, var(--wine-dark) 100%);
|
||||
color: white;
|
||||
border-radius: 50px;
|
||||
font-weight: 700;
|
||||
font-size: 1.1rem;
|
||||
text-decoration: none;
|
||||
transition: all 0.3s ease;
|
||||
box-shadow: 0 4px 15px rgba(255, 42, 127, 0.3);
|
||||
}
|
||||
|
||||
.ctaButton:hover {
|
||||
transform: translateY(-3px);
|
||||
box-shadow: 0 8px 25px rgba(255, 42, 127, 0.4);
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Learning Path */
|
||||
.learningPath {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
padding: 1rem 1.5rem;
|
||||
background: rgba(127, 42, 255, 0.04);
|
||||
border-radius: 12px;
|
||||
margin-bottom: 2rem;
|
||||
border: 1px solid rgba(127, 42, 255, 0.1);
|
||||
}
|
||||
|
||||
.learningPathIcon {
|
||||
color: var(--wine-dark);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.learningPathText {
|
||||
font-size: 0.9rem;
|
||||
color: var(--wine-darkest);
|
||||
font-weight: 500;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
/* Responsive */
|
||||
@media (max-width: 1024px) {
|
||||
.modalSidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.modalBody {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.heroTitle {
|
||||
font-size: 2.2rem;
|
||||
}
|
||||
|
||||
.heroSubtitle {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.videoGrid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.categoryNav {
|
||||
justify-content: flex-start;
|
||||
overflow-x: auto;
|
||||
padding-bottom: 1rem;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.categoryHeader {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.categoryCount {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.heroStats {
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.statItem {
|
||||
padding: 0.5rem 1rem;
|
||||
}
|
||||
|
||||
.modalContent {
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.modalOverlay {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.progressSection {
|
||||
padding: 2rem 1.5rem;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 0 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.hero {
|
||||
padding: 3rem 1rem 2rem;
|
||||
}
|
||||
|
||||
.heroTitle {
|
||||
font-size: 1.8rem;
|
||||
}
|
||||
|
||||
.categoryTitle {
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
|
||||
.videoContent {
|
||||
padding: 1rem;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user