2020-10-02 15:10:00 +00:00
|
|
|
import {transientInput} from 'app/client/ui/transientInput';
|
2021-01-21 19:12:24 +00:00
|
|
|
import {colors, mediaSmall, 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';
|
|
|
|
|
2022-06-17 03:43:26 +00:00
|
|
|
export const docMenu = styled('div', `
|
|
|
|
flex-grow: 1;
|
|
|
|
max-width: 100%;
|
|
|
|
`);
|
|
|
|
|
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;
|
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
|
|
|
`);
|
|
|
|
|
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;
|
|
|
|
color: ${colors.dark};
|
|
|
|
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', `
|
|
|
|
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', `
|
|
|
|
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;
|
|
|
|
`);
|
|
|
|
|
2020-10-02 15:10:00 +00:00
|
|
|
export const docHeaderIconDark = styled(icon, `
|
|
|
|
margin-right: 8px;
|
|
|
|
margin-top: -3px;
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const docHeaderIcon = styled(docHeaderIconDark, `
|
|
|
|
--icon-color: ${colors.slate};
|
|
|
|
`);
|
|
|
|
|
2021-07-28 19:02:06 +00:00
|
|
|
export const featuredTemplatesIcon = styled(icon, `
|
|
|
|
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;
|
|
|
|
color: ${colors.dark};
|
|
|
|
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', `
|
|
|
|
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};
|
|
|
|
color: ${colors.dark};
|
|
|
|
--icon-color: ${colors.slate};
|
|
|
|
|
|
|
|
&:hover, &.weasel-popup-open, &-renaming {
|
|
|
|
background-color: ${colors.mediumGrey};
|
|
|
|
}
|
|
|
|
`);
|
|
|
|
|
|
|
|
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 {
|
|
|
|
color: ${colors.slate};
|
|
|
|
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;
|
|
|
|
--icon-color: ${colors.lightGreen};
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const docPublicIcon = styled(icon, `
|
|
|
|
flex: none;
|
|
|
|
margin-left: auto;
|
|
|
|
--icon-color: ${colors.lightGreen};
|
|
|
|
`);
|
|
|
|
|
|
|
|
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%;
|
|
|
|
color: ${colors.slate};
|
|
|
|
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;
|
|
|
|
--icon-color: ${colors.darkGrey};
|
|
|
|
.${docRowLink.className}:hover > & {
|
|
|
|
--icon-color: ${colors.slate};
|
|
|
|
}
|
|
|
|
&:hover, &.weasel-popup-open {
|
|
|
|
background-color: ${colors.darkGrey};
|
|
|
|
--icon-color: ${colors.slate};
|
|
|
|
}
|
|
|
|
`);
|
|
|
|
|
|
|
|
export const moveDocModalBody = styled('div', `
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
border-bottom: 1px solid ${colors.darkGrey};
|
|
|
|
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 {
|
|
|
|
background-color: ${colors.lightGreen};
|
|
|
|
color: white;
|
|
|
|
}
|
|
|
|
&-disabled {
|
|
|
|
color: ${colors.darkGrey};
|
|
|
|
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};
|
|
|
|
color: ${colors.lightGreen};
|
|
|
|
--icon-color: ${colors.lightGreen};
|
|
|
|
|
|
|
|
&:focus, &:hover {
|
|
|
|
outline: none;
|
|
|
|
box-shadow: none;
|
|
|
|
background-color: ${colors.mediumGrey};
|
|
|
|
}
|
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;
|
|
|
|
`);
|