aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/Templates.tsx
diff options
context:
space:
mode:
authorFawn <fangrui_tong@brown.edu>2019-04-19 18:31:38 -0400
committerFawn <fangrui_tong@brown.edu>2019-04-19 18:31:38 -0400
commit7ceac5f7f4cc8172bde90c2d495da3779901ef84 (patch)
treee9a054f67724f9d0c8afb3066a7d710e251368aa /src/client/views/Templates.tsx
parentfbf1662304e0b3f744827710d728602af4493f25 (diff)
templating saves
Diffstat (limited to 'src/client/views/Templates.tsx')
-rw-r--r--src/client/views/Templates.tsx55
1 files changed, 25 insertions, 30 deletions
diff --git a/src/client/views/Templates.tsx b/src/client/views/Templates.tsx
index c22b22286..3afdc711c 100644
--- a/src/client/views/Templates.tsx
+++ b/src/client/views/Templates.tsx
@@ -24,39 +24,34 @@ export class Template {
}
export namespace Templates {
+ export const BasicLayout = new Template("Basic layout", "{layout}");
+
export const OuterCaption = new Template("Outer caption",
- `
- <div>
- <div style="margin:auto; height:calc(100%); width:100%;">
- {layout}
- </div>
- <div style="height:(100% + 25px); width:100%; position:absolute">
- <FormattedTextBox doc={Document} DocumentViewForField={DocumentView} bindings={bindings} fieldKey={CaptionKey} isSelected={isSelected} select={select} selectOnLoad={SelectOnLoad} isTopMost={isTopMost}/>
- </div>
- </div>
- `);
+ `<div><div style="margin:auto; height:calc(100%); width:100%;">{layout}</div><div style="height:(100% + 50px); width:100%; position:absolute"><FormattedTextBox doc={Document} DocumentViewForField={DocumentView} bindings={bindings} fieldKey={CaptionKey} isSelected={isSelected} select={select} selectOnLoad={SelectOnLoad} isTopMost={isTopMost}/></div></div>`
+ );
+
export const InnerCaption = new Template("Inner caption",
- `
- <div>
- <div style="margin:auto; height:calc(100% - 25px); width:100%;">
- {layout}
- </div>
- <div style="height:25px; width:100%; position:absolute">
- <FormattedTextBox doc={Document} DocumentViewForField={DocumentView} bindings={bindings} fieldKey={CaptionKey} isSelected={isSelected} select={select} selectOnLoad={SelectOnLoad} isTopMost={isTopMost}/>
- </div>
- </div>
- `);
+ `<div>
+ <div style="margin:auto; height:calc(100% - 50px); width:100%;">
+ {layout}
+ </div>
+ <div style="height:50px; width:100%; position:absolute">
+ <FormattedTextBox doc={Document} DocumentViewForField={DocumentView} bindings={bindings} fieldKey={CaptionKey} isSelected={isSelected} select={select} selectOnLoad={SelectOnLoad} isTopMost={isTopMost}/>
+ </div>
+ </div>`
+ );
export const Title = new Template("Title",
- `
- <div>
- <div style="margin:auto; height:calc(100% - 50px); width:100%;">
- {layout}
- </div>
- <div style="height:50px; width:100%; position:absolute">
- {Title}
- </div>
- </div>
- `);
+ `<div>
+ <div style="margin:auto; height:calc(100% - 50px); width:100%;">
+ {layout}
+ </div>
+ <div style="height:50px; width:100%; position:absolute; background-color: rgba(0, 0, 0, .6); color: white; padding:12px">
+ {Title}
+ </div>
+ </div>`
+ );
+
+
}