mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-28 16:00:59 -05:00
fix(sidebar): remove double borders from sidebar menus
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
1e8590da6c
commit
9d55c5ee53
6 changed files with 25 additions and 13 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*!
|
/*!
|
||||||
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
* SPDX-FileCopyrightText: 2024 The HedgeDoc developers (see AUTHORS file)
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
@ -10,8 +10,8 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border: solid 1px var(--sidebar-separator-color);
|
border: none;
|
||||||
border-left: none;
|
border-bottom: solid 1px var(--sidebar-separator-color);
|
||||||
user-select: none;
|
user-select: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
|
@ -20,6 +20,11 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
color: var(--bs-emphasis-color);
|
color: var(--bs-emphasis-color);
|
||||||
|
|
||||||
|
&.main {
|
||||||
|
border-top: solid 1px var(--sidebar-separator-color);
|
||||||
|
border-bottom-width: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
&.hide {
|
&.hide {
|
||||||
flex-basis: 0;
|
flex-basis: 0;
|
||||||
height: 0;
|
height: 0;
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
* SPDX-FileCopyrightText: 2024 The HedgeDoc developers (see AUTHORS file)
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
.entry {
|
.entry {
|
||||||
border: solid 1px var(--sidebar-separator-color);
|
border-bottom: solid 1px var(--sidebar-separator-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
* SPDX-FileCopyrightText: 2024 The HedgeDoc developers (see AUTHORS file)
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
@ -18,6 +18,8 @@ import {
|
||||||
Github as IconGithub
|
Github as IconGithub
|
||||||
} from 'react-bootstrap-icons'
|
} from 'react-bootstrap-icons'
|
||||||
import { Trans, useTranslation } from 'react-i18next'
|
import { Trans, useTranslation } from 'react-i18next'
|
||||||
|
import { concatCssClasses } from '../../../../utils/concat-css-classes'
|
||||||
|
import styles from '../sidebar-button/sidebar-button.module.scss'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renders the export menu for the sidebar.
|
* Renders the export menu for the sidebar.
|
||||||
|
@ -46,7 +48,7 @@ export const ExportMenuSidebarMenu: React.FC<SpecificSidebarMenuProps> = ({
|
||||||
{...cypressId('menu-export')}
|
{...cypressId('menu-export')}
|
||||||
hide={hide}
|
hide={hide}
|
||||||
icon={expand ? IconArrowLeft : IconCloudDownload}
|
icon={expand ? IconArrowLeft : IconCloudDownload}
|
||||||
className={className}
|
className={concatCssClasses(className, { [styles.main]: expand })}
|
||||||
onClick={onClickHandler}>
|
onClick={onClickHandler}>
|
||||||
<Trans i18nKey={'editor.documentBar.export'} />
|
<Trans i18nKey={'editor.documentBar.export'} />
|
||||||
</SidebarButton>
|
</SidebarButton>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
* SPDX-FileCopyrightText: 2024 The HedgeDoc developers (see AUTHORS file)
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
@ -18,6 +18,8 @@ import {
|
||||||
Github as IconGithub
|
Github as IconGithub
|
||||||
} from 'react-bootstrap-icons'
|
} from 'react-bootstrap-icons'
|
||||||
import { Trans, useTranslation } from 'react-i18next'
|
import { Trans, useTranslation } from 'react-i18next'
|
||||||
|
import styles from '../sidebar-button/sidebar-button.module.scss'
|
||||||
|
import { concatCssClasses } from '../../../../utils/concat-css-classes'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renders the import menu for the sidebar.
|
* Renders the import menu for the sidebar.
|
||||||
|
@ -46,7 +48,7 @@ export const ImportMenuSidebarMenu: React.FC<SpecificSidebarMenuProps> = ({
|
||||||
{...cypressId('menu-import')}
|
{...cypressId('menu-import')}
|
||||||
hide={hide}
|
hide={hide}
|
||||||
icon={expand ? IconArrowLeft : IconCloudUpload}
|
icon={expand ? IconArrowLeft : IconCloudUpload}
|
||||||
className={className}
|
className={concatCssClasses(className, { [styles.main]: expand })}
|
||||||
onClick={onClickHandler}>
|
onClick={onClickHandler}>
|
||||||
<Trans i18nKey={'editor.documentBar.import'} />
|
<Trans i18nKey={'editor.documentBar.import'} />
|
||||||
</SidebarButton>
|
</SidebarButton>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
* SPDX-FileCopyrightText: 2024 The HedgeDoc developers (see AUTHORS file)
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
@ -16,6 +16,8 @@ import { NoteInfoLineWordCount } from './note-info-line/note-info-line-word-coun
|
||||||
import React, { Fragment, useCallback } from 'react'
|
import React, { Fragment, useCallback } from 'react'
|
||||||
import { ArrowLeft as IconArrowLeft, GraphUp as IconGraphUp } from 'react-bootstrap-icons'
|
import { ArrowLeft as IconArrowLeft, GraphUp as IconGraphUp } from 'react-bootstrap-icons'
|
||||||
import { Trans, useTranslation } from 'react-i18next'
|
import { Trans, useTranslation } from 'react-i18next'
|
||||||
|
import styles from '../../sidebar-button/sidebar-button.module.scss'
|
||||||
|
import { concatCssClasses } from '../../../../../utils/concat-css-classes'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renders the note info menu for the sidebar.
|
* Renders the note info menu for the sidebar.
|
||||||
|
@ -44,7 +46,7 @@ export const NoteInfoSidebarMenu: React.FC<SpecificSidebarMenuProps> = ({
|
||||||
{...cypressId('sidebar-menu-info')}
|
{...cypressId('sidebar-menu-info')}
|
||||||
hide={hide}
|
hide={hide}
|
||||||
icon={expand ? IconArrowLeft : IconGraphUp}
|
icon={expand ? IconArrowLeft : IconGraphUp}
|
||||||
className={className}
|
className={concatCssClasses(className, { [styles.main]: expand })}
|
||||||
onClick={onClickHandler}>
|
onClick={onClickHandler}>
|
||||||
<Trans i18nKey={'editor.noteInfo.title'} />
|
<Trans i18nKey={'editor.noteInfo.title'} />
|
||||||
</SidebarButton>
|
</SidebarButton>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
* SPDX-FileCopyrightText: 2024 The HedgeDoc developers (see AUTHORS file)
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
@ -15,6 +15,7 @@ import { UserLine } from './user-line/user-line'
|
||||||
import React, { Fragment, useCallback, useEffect, useMemo, useRef } from 'react'
|
import React, { Fragment, useCallback, useEffect, useMemo, useRef } from 'react'
|
||||||
import { ArrowLeft as IconArrowLeft, People as IconPeople } from 'react-bootstrap-icons'
|
import { ArrowLeft as IconArrowLeft, People as IconPeople } from 'react-bootstrap-icons'
|
||||||
import { Trans, useTranslation } from 'react-i18next'
|
import { Trans, useTranslation } from 'react-i18next'
|
||||||
|
import buttonStyles from '../../sidebar-button/sidebar-button.module.scss'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sidebar menu that contains the list of currently online users in the current note session.
|
* Sidebar menu that contains the list of currently online users in the current note session.
|
||||||
|
@ -69,7 +70,7 @@ export const UsersOnlineSidebarMenu: React.FC<SpecificSidebarMenuProps> = ({
|
||||||
buttonRef={buttonRef}
|
buttonRef={buttonRef}
|
||||||
onClick={onClickHandler}
|
onClick={onClickHandler}
|
||||||
icon={expand ? IconArrowLeft : IconPeople}
|
icon={expand ? IconArrowLeft : IconPeople}
|
||||||
className={concatCssClasses(styles.entry, className)}>
|
className={concatCssClasses(styles.entry, buttonStyles.main, className)}>
|
||||||
<Trans i18nKey={'editor.onlineStatus.online'} />
|
<Trans i18nKey={'editor.onlineStatus.online'} />
|
||||||
</SidebarButton>
|
</SidebarButton>
|
||||||
<SidebarMenu expand={expand}>
|
<SidebarMenu expand={expand}>
|
||||||
|
|
Loading…
Reference in a new issue