Skip to content

Commit 4e9711b

Browse files
committed
feat(download): add download ZIP button with loading state and styles
- Introduced a new button for downloading documentation as a ZIP file, including SVG icon. - Added specific styles for the button, including hover effects and a loading state with a spinner animation. - Adjusted existing styles for consistency across buttons in the theme.
1 parent 93e8550 commit 4e9711b

File tree

3 files changed

+449
-3
lines changed

3 files changed

+449
-3
lines changed

themes/default/assets/css/style.css

Lines changed: 55 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -636,10 +636,57 @@ body {
636636
transform: scale(1.1);
637637
}
638638

639+
/* Download ZIP Button Specific Styles */
640+
.download-zip-btn svg {
641+
width: 20px;
642+
height: 20px;
643+
transition: var(--transition);
644+
}
645+
646+
.download-zip-btn:hover svg {
647+
transform: scale(1.1);
648+
}
649+
650+
.download-zip-btn:disabled {
651+
opacity: 0.5;
652+
cursor: not-allowed;
653+
pointer-events: none;
654+
}
655+
656+
/* Loading state for download button */
657+
.download-zip-btn.loading {
658+
position: relative;
659+
pointer-events: none;
660+
}
661+
662+
.download-zip-btn.loading svg {
663+
opacity: 0.3;
664+
}
665+
666+
.download-zip-btn.loading::after {
667+
content: '';
668+
position: absolute;
669+
top: 50%;
670+
left: 50%;
671+
width: 16px;
672+
height: 16px;
673+
margin: -8px 0 0 -8px;
674+
border: 2px solid var(--primary-color);
675+
border-radius: 50%;
676+
border-top-color: transparent;
677+
animation: spin 1s linear infinite;
678+
}
679+
680+
@keyframes spin {
681+
to {
682+
transform: rotate(360deg);
683+
}
684+
}
685+
639686
/* Theme Toggle Specific Styles */
640687
.theme-toggle-header .theme-icon {
641688
position: absolute;
642-
font-size: 16px;
689+
font-size: 14px;
643690
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
644691
display: flex;
645692
align-items: center;
@@ -1174,8 +1221,13 @@ body {
11741221
}
11751222

11761223
.github-link svg {
1177-
width: 18px;
1178-
height: 18px;
1224+
width: 16px;
1225+
height: 16px;
1226+
}
1227+
1228+
.download-zip-btn svg {
1229+
width: 16px;
1230+
height: 16px;
11791231
}
11801232

11811233
/* Page actions adjustments */

0 commit comments

Comments
 (0)