Skip to content

Commit

Permalink
Merge pull request #8643 from weseek/imprv/page-path-nav-styles
Browse files Browse the repository at this point in the history
imprv: PagePathNav and PagePathHeader styles
  • Loading branch information
yuki-takei committed Mar 30, 2024
2 parents 2fa592e + 92c8aa6 commit 433d332
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 10 deletions.
17 changes: 17 additions & 0 deletions apps/app/src/components/Common/PagePathNav/PagePathNav.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,20 @@
@include btn-muted.colorize(bs.$orange);
}
}

// == Colors
.grw-former-link :global {
.separator {
opacity: 0.75;
}
}

.grw-former-link a {
--bs-link-opacity: 0.75;

&:global {
&:hover {
--bs-link-opacity: 1;
}
}
}
10 changes: 5 additions & 5 deletions apps/app/src/components/Common/PagePathNav/PagePathNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ type Props = {

const CopyDropdown = dynamic(() => import('../CopyDropdown').then(mod => mod.CopyDropdown), { ssr: false });

const Separator = (): JSX.Element => {
return <span className={styles['grw-mx-02em']}>/</span>;
const Separator = ({ className }: {className?: string}): JSX.Element => {
return <span className={`separator ${className ?? ''} ${styles['grw-mx-02em']}`}>/</span>;
};

export const PagePathNav: FC<Props> = (props: Props) => {
Expand Down Expand Up @@ -69,10 +69,10 @@ export const PagePathNav: FC<Props> = (props: Props) => {
const linkedPagePathFormer = new LinkedPagePath(dPagePath.former);
const linkedPagePathLatter = new LinkedPagePath(dPagePath.latter);
formerLink = (
<div className="fs-5">
<>
<PagePathHierarchicalLink linkedPagePath={linkedPagePathFormer} isInTrash={isInTrash} />
<Separator />
</div>
</>
);
latterLink = (
<PagePathHierarchicalLink linkedPagePath={linkedPagePathLatter} basePath={dPagePath.former} isInTrash={isInTrash} />
Expand All @@ -83,7 +83,7 @@ export const PagePathNav: FC<Props> = (props: Props) => {

return (
<div>
<span className={formerLinkClassName}>{formerLink}</span>
<span className={`${formerLinkClassName ?? ''} ${styles['grw-former-link']}`}>{formerLink}</span>
<div className="d-flex align-items-center">
<h1 className={`m-0 ${latterLinkClassName}`}>
{latterLink}
Expand Down
6 changes: 3 additions & 3 deletions apps/app/src/components/PageHeader/PagePathHeader.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
input {
min-width: 20px;
min-height: unset;
padding-top: 0;
padding-bottom: 0;
line-height: 1em;
padding-top: 2px;
padding-bottom: 2px;
line-height: 1.2em;
}

.page-path-header-buttons {
Expand Down
4 changes: 2 additions & 2 deletions apps/app/src/components/PageHeader/PagePathHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
useState, useEffect, useCallback, memo, useMemo,
useState, useCallback, memo,
} from 'react';
import type { CSSProperties, FC } from 'react';
import type { FC } from 'react';

import type { IPagePopulatedToShowRevision } from '@growi/core';
import { DevidedPagePath } from '@growi/core/dist/models';
Expand Down

0 comments on commit 433d332

Please sign in to comment.