2020-10-02 15:10:00 +00:00
|
|
|
import {transientInput} from 'app/client/ui/transientInput';
|
2022-09-06 01:51:57 +00:00
|
|
|
import {mediaSmall, theme, vars} from 'app/client/ui2018/cssVars';
|
2020-10-02 15:10:00 +00:00
|
|
|
import {icon} from 'app/client/ui2018/icons';
|
|
|
|
import {styled} from 'grainjs';
|
2021-08-18 17:49:34 +00:00
|
|
|
import {bigBasicButton} from 'app/client/ui2018/buttons';
|
2020-10-02 15:10:00 +00:00
|
|
|
|
2022-04-28 21:47:02 +00:00
|
|
|
// Import popweasel to ensure that sortSelector style below comes later in CSS than popweasel
|
|
|
|
// styles, which gives it priority.
|
|
|
|
import 'popweasel';
|
|
|
|
|
2020-10-02 15:10:00 +00:00
|
|
|
// The "&:after" clause forces some padding below all docs.
|
|
|
|
export const docList = styled('div', `
|
|
|
|
height: 100%;
|
|
|
|
padding: 32px 64px 24px 64px;
|
|
|
|
overflow-y: auto;
|
|
|
|
position: relative;
|
2022-06-08 17:54:00 +00:00
|
|
|
display: flex;
|
2023-03-28 16:11:40 +00:00
|
|
|
flex-direction: column;
|
2020-10-02 15:10:00 +00:00
|
|
|
|
|
|
|
&:after {
|
|
|
|
content: "";
|
|
|
|
display: block;
|
|
|
|
height: 64px;
|
|
|
|
}
|
2021-01-21 19:12:24 +00:00
|
|
|
@media ${mediaSmall} {
|
|
|
|
& {
|
|
|
|
padding: 32px 24px 24px 24px;
|
|
|
|
}
|
|
|
|
}
|
2022-03-11 10:48:36 +00:00
|
|
|
@media print {
|
|
|
|
& {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
2020-10-02 15:10:00 +00:00
|
|
|
`);
|
|
|
|
|
2023-03-28 16:11:40 +00:00
|
|
|
export const docListContent = styled('div', `
|
|
|
|
display: flex;
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const docMenu = styled('div', `
|
|
|
|
flex-grow: 1;
|
|
|
|
max-width: 100%;
|
|
|
|
`);
|
|
|
|
|
2022-06-17 03:43:26 +00:00
|
|
|
const listHeader = styled('div', `
|
2022-06-03 14:58:07 +00:00
|
|
|
min-height: 32px;
|
2020-10-02 15:10:00 +00:00
|
|
|
line-height: 32px;
|
2022-09-06 01:51:57 +00:00
|
|
|
color: ${theme.text};
|
2020-10-02 15:10:00 +00:00
|
|
|
font-size: ${vars.xxxlargeFontSize};
|
|
|
|
font-weight: ${vars.headerControlTextWeight};
|
|
|
|
`);
|
|
|
|
|
2022-06-17 03:43:26 +00:00
|
|
|
export const docListHeader = styled(listHeader, `
|
|
|
|
margin-bottom: 24px;
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const templatesHeaderWrap = styled('div', `
|
|
|
|
display: flex;
|
|
|
|
align-items: baseline;
|
|
|
|
justify-content: space-between;
|
|
|
|
gap: 16px;
|
|
|
|
margin-bottom: 24px;
|
|
|
|
|
|
|
|
@media ${mediaSmall} {
|
|
|
|
& {
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: flex-start;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const templatesHeader = styled(listHeader, `
|
2021-07-28 19:02:06 +00:00
|
|
|
cursor: pointer;
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const featuredTemplatesHeader = styled(docListHeader, `
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
`);
|
|
|
|
|
2021-08-18 17:49:34 +00:00
|
|
|
export const otherSitesHeader = templatesHeader;
|
|
|
|
|
2022-06-17 03:43:26 +00:00
|
|
|
export const allDocsTemplates = styled('div', `
|
|
|
|
display: flex;
|
|
|
|
`);
|
|
|
|
|
2020-10-02 15:10:00 +00:00
|
|
|
export const docBlock = styled('div', `
|
2022-09-06 01:51:57 +00:00
|
|
|
color: ${theme.text};
|
2020-10-02 15:10:00 +00:00
|
|
|
max-width: 550px;
|
|
|
|
min-width: 300px;
|
|
|
|
margin-bottom: 28px;
|
|
|
|
|
|
|
|
&-icons {
|
2022-06-17 03:43:26 +00:00
|
|
|
max-width: max-content;
|
|
|
|
min-width: calc(min(550px, 100%));
|
2020-10-02 15:10:00 +00:00
|
|
|
}
|
|
|
|
`);
|
|
|
|
|
2021-07-28 19:02:06 +00:00
|
|
|
export const templatesDocBlock = styled(docBlock, `
|
|
|
|
margin-top: 32px;
|
|
|
|
`);
|
|
|
|
|
2021-08-18 17:49:34 +00:00
|
|
|
export const otherSitesBlock = styled('div', `
|
2022-09-06 01:51:57 +00:00
|
|
|
color: ${theme.text};
|
2021-08-18 17:49:34 +00:00
|
|
|
margin-bottom: 32px;
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const otherSitesButtons = styled('div', `
|
|
|
|
display: flex;
|
2022-04-28 21:47:02 +00:00
|
|
|
overflow: auto;
|
2021-08-18 17:49:34 +00:00
|
|
|
padding-bottom: 16px;
|
|
|
|
margin-top: 16px;
|
|
|
|
margin-bottom: 28px;
|
|
|
|
gap: 16px;
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const siteButton = styled(bigBasicButton, `
|
|
|
|
flex: 0 0 auto;
|
|
|
|
`);
|
|
|
|
|
2022-09-06 01:51:57 +00:00
|
|
|
export const docHeaderIcon = styled(icon, `
|
2020-10-02 15:10:00 +00:00
|
|
|
margin-right: 8px;
|
|
|
|
margin-top: -3px;
|
2022-09-06 01:51:57 +00:00
|
|
|
--icon-color: ${theme.lightText};
|
2020-10-02 15:10:00 +00:00
|
|
|
`);
|
|
|
|
|
2022-09-06 01:51:57 +00:00
|
|
|
export const pinnedDocsIcon = styled(docHeaderIcon, `
|
|
|
|
--icon-color: ${theme.text};
|
2020-10-02 15:10:00 +00:00
|
|
|
`);
|
|
|
|
|
2021-07-28 19:02:06 +00:00
|
|
|
export const featuredTemplatesIcon = styled(icon, `
|
2022-09-06 01:51:57 +00:00
|
|
|
--icon-color: ${theme.text};
|
2021-07-28 19:02:06 +00:00
|
|
|
margin-right: 8px;
|
|
|
|
width: 20px;
|
|
|
|
height: 20px;
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const templatesHeaderIcon = styled(docHeaderIcon, `
|
|
|
|
width: 24px;
|
|
|
|
height: 24px;
|
|
|
|
`);
|
|
|
|
|
2021-08-18 17:49:34 +00:00
|
|
|
export const otherSitesHeaderIcon = templatesHeaderIcon;
|
|
|
|
|
2021-07-28 19:02:06 +00:00
|
|
|
const docBlockHeader = `
|
2020-10-02 15:10:00 +00:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
height: 40px;
|
|
|
|
line-height: 40px;
|
|
|
|
margin-bottom: 8px;
|
|
|
|
margin-right: -16px;
|
2022-09-06 01:51:57 +00:00
|
|
|
color: ${theme.text};
|
2020-10-02 15:10:00 +00:00
|
|
|
font-size: ${vars.mediumFontSize};
|
|
|
|
font-weight: bold;
|
|
|
|
&, &:hover, &:focus {
|
|
|
|
text-decoration: none;
|
|
|
|
outline: none;
|
|
|
|
color: inherit;
|
|
|
|
}
|
2021-07-28 19:02:06 +00:00
|
|
|
`;
|
|
|
|
|
|
|
|
export const docBlockHeaderLink = styled('a', docBlockHeader);
|
|
|
|
|
|
|
|
export const templateBlockHeader = styled('div', docBlockHeader);
|
2020-10-02 15:10:00 +00:00
|
|
|
|
|
|
|
export const wsLeft = styled('div', `
|
2022-09-06 01:51:57 +00:00
|
|
|
color: ${theme.text};
|
2020-10-02 15:10:00 +00:00
|
|
|
flex: 1 0 50%;
|
|
|
|
min-width: 0px;
|
|
|
|
margin-right: 24px;
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const docRowWrapper = styled('div', `
|
|
|
|
position: relative;
|
|
|
|
margin: 0px -16px 8px -16px;
|
|
|
|
border-radius: 3px;
|
|
|
|
font-size: ${vars.mediumFontSize};
|
2022-09-06 01:51:57 +00:00
|
|
|
color: ${theme.text};
|
|
|
|
--icon-color: ${theme.lightText};
|
2020-10-02 15:10:00 +00:00
|
|
|
|
|
|
|
&:hover, &.weasel-popup-open, &-renaming {
|
2022-09-06 01:51:57 +00:00
|
|
|
background-color: ${theme.hover};
|
2020-10-02 15:10:00 +00:00
|
|
|
}
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const docRowLink = styled('a', `
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
height: 40px;
|
|
|
|
line-height: 40px;
|
|
|
|
border-radius: 3px;
|
|
|
|
outline: none;
|
|
|
|
transition: background-color 2s;
|
|
|
|
&, &:hover, &:focus {
|
|
|
|
text-decoration: none;
|
|
|
|
outline: none;
|
|
|
|
color: inherit;
|
|
|
|
}
|
|
|
|
&-no-access, &-no-access:hover, &-no-access:focus {
|
2022-09-06 01:51:57 +00:00
|
|
|
color: ${theme.disabledText};
|
2020-10-02 15:10:00 +00:00
|
|
|
cursor: not-allowed;
|
|
|
|
}
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const docLeft = styled('div', `
|
|
|
|
flex: 1 0 50%;
|
|
|
|
min-width: 0px;
|
|
|
|
margin: 0 16px;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const docName = styled('div', `
|
|
|
|
flex: 0 1 auto;
|
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const docPinIcon = styled(icon, `
|
|
|
|
flex: none;
|
|
|
|
margin-left: 4px;
|
2022-09-06 01:51:57 +00:00
|
|
|
--icon-color: ${theme.accentIcon};
|
2020-10-02 15:10:00 +00:00
|
|
|
`);
|
|
|
|
|
|
|
|
export const docPublicIcon = styled(icon, `
|
|
|
|
flex: none;
|
|
|
|
margin-left: auto;
|
2022-09-06 01:51:57 +00:00
|
|
|
--icon-color: ${theme.accentIcon};
|
2020-10-02 15:10:00 +00:00
|
|
|
`);
|
|
|
|
|
|
|
|
export const docEditorInput = styled(transientInput, `
|
|
|
|
flex: 1 0 50%;
|
|
|
|
min-width: 0px;
|
|
|
|
margin: 0 16px;
|
|
|
|
color: initial;
|
|
|
|
font-size: inherit;
|
|
|
|
line-height: initial;
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const docRowUpdatedAt = styled('div', `
|
|
|
|
flex: 1 1 50%;
|
2022-09-06 01:51:57 +00:00
|
|
|
color: ${theme.lightText};
|
2020-10-02 15:10:00 +00:00
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
font-weight: normal;
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const docMenuTrigger = styled('div', `
|
|
|
|
flex: none;
|
|
|
|
margin: 0 4px 0 auto;
|
|
|
|
height: 24px;
|
|
|
|
width: 24px;
|
|
|
|
padding: 4px;
|
|
|
|
line-height: 0px;
|
|
|
|
border-radius: 3px;
|
|
|
|
cursor: default;
|
2022-09-06 01:51:57 +00:00
|
|
|
--icon-color: ${theme.docMenuDocOptionsFg};
|
2020-10-02 15:10:00 +00:00
|
|
|
.${docRowLink.className}:hover > & {
|
2022-09-06 01:51:57 +00:00
|
|
|
--icon-color: ${theme.docMenuDocOptionsHoverFg};
|
2020-10-02 15:10:00 +00:00
|
|
|
}
|
|
|
|
&:hover, &.weasel-popup-open {
|
2022-09-06 01:51:57 +00:00
|
|
|
background-color: ${theme.docMenuDocOptionsHoverBg};
|
|
|
|
--icon-color: ${theme.docMenuDocOptionsHoverFg};
|
2020-10-02 15:10:00 +00:00
|
|
|
}
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const moveDocModalBody = styled('div', `
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2022-09-06 01:51:57 +00:00
|
|
|
border-bottom: 1px solid ${theme.modalBorderDark};
|
2020-10-02 15:10:00 +00:00
|
|
|
margin: 0 -64px;
|
|
|
|
height: 200px;
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const moveDocListItem = styled('div', `
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
width: 100%;
|
|
|
|
height: 32px;
|
|
|
|
padding: 12px 64px;
|
|
|
|
cursor: pointer;
|
|
|
|
font-size: ${vars.mediumFontSize};
|
|
|
|
|
|
|
|
&-selected {
|
2022-09-06 01:51:57 +00:00
|
|
|
background-color: ${theme.moveDocsSelectedBg};
|
|
|
|
color: ${theme.moveDocsSelectedFg};
|
2020-10-02 15:10:00 +00:00
|
|
|
}
|
|
|
|
&-disabled {
|
2022-09-06 01:51:57 +00:00
|
|
|
color: ${theme.moveDocsDisabledFg};
|
2020-10-02 15:10:00 +00:00
|
|
|
cursor: default;
|
|
|
|
}
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const moveDocListText = styled('div', `
|
|
|
|
display: flex;
|
|
|
|
flex: 1 1 0;
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: center;
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const moveDocListHintText = styled(moveDocListText, `
|
|
|
|
text-align: right;
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const spinner = styled('div', `
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
height: 80px;
|
|
|
|
margin: auto;
|
|
|
|
margin-top: 80px;
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const prefSelectors = styled('div', `
|
2021-02-25 16:11:59 +00:00
|
|
|
float: right;
|
2020-10-02 15:10:00 +00:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const sortSelector = styled('div', `
|
|
|
|
margin-right: 24px;
|
|
|
|
|
|
|
|
/* negate the styles of a select that normally looks like a button */
|
|
|
|
border: none;
|
|
|
|
display: inline-flex;
|
|
|
|
height: unset;
|
|
|
|
line-height: unset;
|
|
|
|
align-items: center;
|
|
|
|
border-radius: ${vars.controlBorderRadius};
|
2022-09-06 01:51:57 +00:00
|
|
|
color: ${theme.controlFg};
|
|
|
|
--icon-color: ${theme.controlFg};
|
|
|
|
background-color: unset;
|
2020-10-02 15:10:00 +00:00
|
|
|
|
|
|
|
&:focus, &:hover {
|
|
|
|
outline: none;
|
|
|
|
box-shadow: none;
|
2022-09-06 01:51:57 +00:00
|
|
|
background-color: ${theme.hover};
|
2020-10-02 15:10:00 +00:00
|
|
|
}
|
2021-01-21 19:12:24 +00:00
|
|
|
@media ${mediaSmall} {
|
|
|
|
& {
|
|
|
|
margin-right: 0;
|
|
|
|
}
|
|
|
|
}
|
2020-10-02 15:10:00 +00:00
|
|
|
`);
|
2022-08-03 15:19:33 +00:00
|
|
|
|
|
|
|
export const upgradeButton = styled('div', `
|
|
|
|
margin-left: 32px;
|
|
|
|
|
|
|
|
@media ${mediaSmall} {
|
|
|
|
& {
|
|
|
|
margin-left: 8px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const upgradeCard = styled('div', `
|
|
|
|
margin-left: 64px;
|
|
|
|
`);
|