mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) support ?embed=true and &style=light for a clean embed experience
Summary: This adds query parameters useful for tailoring the Grist experience, with an eye to embedding. Setting `style=light` removes side and top bars, as a first pass at a focused view of a single document page (this would benefit from refining). Setting `embed=true` has no significant effect just yet other than it restricts document access to viewer at most (this can be overridden by specifying `/m/default`). Test Plan: added tests Reviewers: dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D2585
This commit is contained in:
@@ -63,6 +63,7 @@ export function pagePanels(page: PageContents) {
|
||||
|
||||
cssMainPane(
|
||||
cssTopHeader(
|
||||
testId('top-header'),
|
||||
(left.hideOpener ? null :
|
||||
cssPanelOpener('PanelRight', cssPanelOpener.cls('-open', left.panelOpen),
|
||||
testId('left-opener'),
|
||||
@@ -144,6 +145,9 @@ export const cssLeftPane = styled(cssVBox, `
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.interface-light & {
|
||||
display: none;
|
||||
}
|
||||
`);
|
||||
const cssMainPane = styled(cssVBox, `
|
||||
position: relative;
|
||||
@@ -170,6 +174,9 @@ const cssRightPane = styled(cssVBox, `
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.interface-light & {
|
||||
display: none;
|
||||
}
|
||||
`);
|
||||
const cssTopHeader = styled('div', `
|
||||
height: 48px;
|
||||
@@ -184,6 +191,10 @@ const cssTopHeader = styled('div', `
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.interface-light & {
|
||||
display: none;
|
||||
}
|
||||
`);
|
||||
const cssResizeFlexVHandle = styled(resizeFlexVHandle, `
|
||||
--resize-handle-color: ${colors.mediumGrey};
|
||||
|
||||
Reference in New Issue
Block a user