Skip to content

Commit dc45abc

Browse files
committed
fix logo
1 parent ac83014 commit dc45abc

7 files changed

Lines changed: 132 additions & 51 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
"serve-handler": "6.1.6",
102102
"tailwindcss": "4.2.2",
103103
"tailwindcss-animate": "1.0.7",
104-
"title-case": "3.0.3",
104+
"title-case": "4.3.2",
105105
"tsconfig-paths-webpack-plugin": "4.2.0",
106106
"unified": "11.0.5",
107107
"unist-util-visit": "5.0.0",

src/components/Documentation/Layout/styles.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@
294294
left: 0;
295295
bottom: 0;
296296
width: 100%;
297-
z-index: 2;
297+
z-index: 21;
298298
visibility: hidden;
299299
transform: translateX(-100%);
300300
transition:
@@ -328,7 +328,7 @@
328328
display: block;
329329
position: fixed;
330330
inset: 0;
331-
z-index: 1;
331+
z-index: 20;
332332
background-color: var(--docs-backdrop-bg);
333333
opacity: 0;
334334
pointer-events: none;

src/components/Documentation/Markdown/Main/index.tsx

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ import { PropsWithChildren } from 'react'
33

44
import 'github-markdown-css/github-markdown.css'
55
import useCustomYtEmbeds from '../../../../utils/front/useCustomYtEmbeds'
6-
import { getPathWithSource } from '../../../../utils/shared/sidebar'
6+
import {
7+
getItemByPath,
8+
getPathWithSource
9+
} from '../../../../utils/shared/sidebar'
710
import Link from '../../../Link'
811
import * as sharedStyles from '../../styles.module.css'
912
import Tutorials from '../../TutorialsLinks'
@@ -29,6 +32,9 @@ const Main: React.FC<PropsWithChildren<IMainProps>> = ({
2932
useArgsTargetFlash()
3033
useCustomYtEmbeds()
3134

35+
const prevItem = prev ? getItemByPath(prev) : null
36+
const nextItem = next ? getItemByPath(next) : null
37+
3238
return (
3339
<div className={styles.content} id="markdown-root">
3440
{tutorials && (
@@ -46,17 +52,25 @@ const Main: React.FC<PropsWithChildren<IMainProps>> = ({
4652
</Link>
4753
<div className={cn('markdown-body', themeStyles.code)}>{children}</div>
4854
<div className={styles.navButtons}>
49-
<Link className={styles.navButton} href={prev || '#'}>
50-
<i className={cn(styles.navButtonIcon, styles.prev)} />
51-
<span>Prev</span>
52-
</Link>
53-
<Link
54-
className={styles.navButton}
55-
href={next ? getPathWithSource(next) : '#'}
56-
>
57-
<span>Next</span>
58-
<i className={cn(styles.navButtonIcon, styles.next)} />
59-
</Link>
55+
{prev && prevItem?.label && (
56+
<Link className={cn(styles.navButton, styles.prevLink)} href={prev}>
57+
<span className={styles.navButtonTitle}>
58+
<i className={cn(styles.navButtonIcon, styles.prev)} />
59+
<span>{prevItem.label}</span>
60+
</span>
61+
</Link>
62+
)}
63+
{next && nextItem?.label && (
64+
<Link
65+
className={cn(styles.navButton, styles.nextLink)}
66+
href={getPathWithSource(next)}
67+
>
68+
<span className={styles.navButtonTitle}>
69+
<span>{nextItem.label}</span>
70+
<i className={cn(styles.navButtonIcon, styles.next)} />
71+
</span>
72+
</Link>
73+
)}
6074
</div>
6175
</div>
6276
)

src/components/Documentation/Markdown/Main/styles.module.css

Lines changed: 92 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -490,31 +490,49 @@
490490
display: flex;
491491
justify-content: space-between;
492492
align-items: center;
493-
margin-top: 40px;
494-
font-size: 14px;
495-
font-weight: 500;
493+
gap: 16px;
494+
margin-top: 48px;
495+
margin-bottom: 14px;
496+
497+
@media (width <= 572px) {
498+
gap: 12px;
499+
margin-top: 40px;
500+
margin-bottom: 12px;
501+
}
496502
}
497503

498504
.navButton {
499505
text-decoration: none;
500-
background: var(--docs-surface-bg);
501-
padding: 10px 15px;
502-
text-transform: uppercase;
503506
color: var(--docs-text-primary);
504-
border: none;
505-
border-bottom: 3px solid var(--docs-accent-primary);
506507
display: inline-flex;
507508
align-items: center;
509+
justify-content: center;
510+
min-width: 0;
511+
max-width: min(22ch, calc(50% - 8px));
512+
min-height: 44px;
513+
padding: 8px 0;
514+
border-bottom: 1px solid
515+
color-mix(in srgb, var(--docs-accent-primary) 45%, transparent);
516+
opacity: 0.9;
508517
transition:
509-
border-color 0.2s ease-out,
510-
background-color 0.2s ease-out,
511518
color 0.2s ease-out,
512-
box-shadow 0.2s ease-out;
519+
opacity 0.2s ease-out,
520+
border-color 0.2s ease-out;
513521

514-
&:hover {
522+
&:hover,
523+
&:focus-visible {
515524
color: var(--docs-link-hover);
516-
background-color: var(--docs-surface-hover-bg);
517-
border-bottom-color: var(--docs-accent-primary-hover);
525+
text-decoration: none;
526+
border-bottom-color: color-mix(
527+
in srgb,
528+
var(--docs-accent-primary) 45%,
529+
transparent
530+
);
531+
opacity: 1;
532+
}
533+
534+
&:focus-visible {
535+
outline: none;
518536
}
519537

520538
&[disabled] {
@@ -523,6 +541,38 @@
523541
}
524542
}
525543

544+
.prevLink {
545+
margin-right: auto;
546+
}
547+
548+
.nextLink {
549+
margin-left: auto;
550+
text-align: right;
551+
}
552+
553+
.navButtonTitle {
554+
display: inline-flex;
555+
align-items: center;
556+
gap: 10px;
557+
font-size: 16px;
558+
line-height: 1.25;
559+
font-weight: 500;
560+
letter-spacing: -0.01em;
561+
text-transform: none;
562+
563+
@media (width <= 768px) {
564+
font-size: 14px;
565+
}
566+
567+
@media (width <= 572px) {
568+
font-size: 14px;
569+
}
570+
}
571+
572+
.navButtonTitle > span {
573+
max-width: 18ch;
574+
}
575+
526576
:global(body.dark-mode #markdown-root .markdown-body) {
527577
--focus-outlineColor: var(--focus-ring);
528578

@@ -652,29 +702,20 @@
652702
}
653703

654704
:global(body.dark-mode) .navButton {
655-
border: 1px solid var(--docs-border-subtle);
656-
border-bottom: 3px solid var(--docs-accent-primary);
705+
color: var(--docs-text-primary);
657706
}
658707

659708
:global(body.dark-mode) .navButton:hover,
660709
:global(body.dark-mode) .navButton:focus-visible {
661-
border-color: color-mix(in srgb, var(--docs-border-subtle) 86%, white 10%);
662-
background-color: color-mix(
663-
in srgb,
664-
var(--docs-surface-hover-bg) 84%,
665-
var(--docs-surface-bg) 16%
666-
);
667-
box-shadow:
668-
inset 0 1px 0 rgb(255 255 255 / 4%),
669-
0 2px 6px rgb(0 0 0 / 12%);
710+
color: var(--docs-link-hover);
670711
}
671712

672713
.navButtonIcon {
673714
display: inline-block;
674-
width: 1em;
675-
height: 1em;
715+
width: 0.9em;
716+
height: 0.9em;
676717
line-height: 1;
677-
background-color: currentcolor;
718+
background-color: var(--docs-accent-primary);
678719
background-image: none;
679720
mask-image: url('../../../../images/arrow.svg');
680721
mask-size: contain;
@@ -688,16 +729,36 @@
688729
-webkit-mask-position: center;
689730
/* stylelint-disable-next-line property-no-vendor-prefix */
690731
-webkit-mask-repeat: no-repeat;
691-
transition: all 0.3s;
732+
opacity: 0.9;
733+
transition:
734+
transform 0.2s ease-out,
735+
background-color 0.2s ease-out,
736+
opacity 0.2s ease-out;
692737

693738
&.next {
694-
margin-left: 7px;
739+
flex-shrink: 0;
695740
}
696741

697742
&.prev {
698-
margin-right: 7px;
743+
flex-shrink: 0;
699744
mask-position: center;
700745
transform: rotate(180deg);
701746
margin-top: 2px;
702747
}
703748
}
749+
750+
.navButton:hover .navButtonIcon,
751+
.navButton:focus-visible .navButtonIcon {
752+
background-color: var(--docs-accent-primary-hover);
753+
opacity: 1;
754+
}
755+
756+
.prevLink:hover .navButtonIcon,
757+
.prevLink:focus-visible .navButtonIcon {
758+
transform: rotate(180deg) translateX(3px);
759+
}
760+
761+
.nextLink:hover .navButtonIcon,
762+
.nextLink:focus-visible .navButtonIcon {
763+
transform: translateX(3px);
764+
}

src/components/LayoutHeader/HeaderBranding/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import cn from 'classnames'
2-
31
import { mainSiteUrls } from '../../../consts.js'
42
import { ReactComponent as LogoSVG } from '../../../images/dvc_by_lakefs.svg'
53
import Link from '../../Link'
@@ -15,7 +13,7 @@ export const HeaderBranding: React.FC<HeaderBrandingProps> = ({ onClick }) => (
1513
<Link
1614
onClick={onClick}
1715
href={mainSiteUrls.home}
18-
className={cn(styles.logoLink, 'mr-auto')}
16+
className={styles.logoLink}
1917
title="DVC"
2018
aria-label="DVC"
2119
>

src/components/LayoutHeader/HeaderBranding/styles.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
.logoLink {
44
color: var(--text-primary);
5+
margin-right: auto;
56

67
&:hover,
78
&:focus {

yarn.lock

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20099,7 +20099,14 @@ __metadata:
2009920099
languageName: node
2010020100
linkType: hard
2010120101

20102-
"title-case@npm:3.0.3, title-case@npm:^3.0.3":
20102+
"title-case@npm:4.3.2":
20103+
version: 4.3.2
20104+
resolution: "title-case@npm:4.3.2"
20105+
checksum: 10c0/f040c5b0586e3a4ac5881e59ac060ebfa56dae611b0d513ad211fa7f92597d418395fa902fe9d7ee49f98e557e88421e274680b22a3b04dd1ce1c577225444d3
20106+
languageName: node
20107+
linkType: hard
20108+
20109+
"title-case@npm:^3.0.3":
2010320110
version: 3.0.3
2010420111
resolution: "title-case@npm:3.0.3"
2010520112
dependencies:
@@ -21517,7 +21524,7 @@ __metadata:
2151721524
stylelint-config-standard: "npm:40.0.0"
2151821525
tailwindcss: "npm:4.2.2"
2151921526
tailwindcss-animate: "npm:1.0.7"
21520-
title-case: "npm:3.0.3"
21527+
title-case: "npm:4.3.2"
2152121528
tsconfig-paths-webpack-plugin: "npm:4.2.0"
2152221529
typescript: "npm:5.9.3"
2152321530
typescript-eslint: "npm:8.57.0"

0 commit comments

Comments
 (0)