Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imprv: PagePathNav and PagePathHeader styles #8643

Merged
merged 3 commits into from
Mar 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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">
<>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

マザーシップの大きさに近づける

image

<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