diff options
| author | bob <bcz@cs.brown.edu> | 2019-05-07 15:26:29 -0400 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-05-07 15:26:29 -0400 |
| commit | 26141a697ae52a7edf3cc6845ce2153111f8860e (patch) | |
| tree | f68bc0846b54df7111811dc35ccbff00a0e653cf /src/client/views/Templates.tsx | |
| parent | f8f96fe4006f96459e6ad4b9889fdaefc339467e (diff) | |
added Bullet template
Diffstat (limited to 'src/client/views/Templates.tsx')
| -rw-r--r-- | src/client/views/Templates.tsx | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/client/views/Templates.tsx b/src/client/views/Templates.tsx index 738272913..51fca4c41 100644 --- a/src/client/views/Templates.tsx +++ b/src/client/views/Templates.tsx @@ -54,21 +54,13 @@ export namespace Templates { `<div><div style="height:calc(100% - 25px); margin-top: 25px; width:100%;position:absolute;">{layout}</div> <div style="height:25px; width:100%; position:absolute; top: 0; background-color: rgba(0, 0, 0, .4); color: white; padding:2px 10px">{props.Document.title}</div></div>` ); - export const Summary = new Template("Title", TemplatePosition.InnerTop, - `<div style="height:100%; width:100%;position:absolute; margin:0; padding: 0"> - <div style="height:60%; width:100%;position:absolute;background:yellow; padding:0; margin:0"> - {layout} - </div> - <div style="bottom:0px; height:40%; width:50%; position:absolute; background-color: rgba(0, 0, 0, .4); color: white;"> - <FieldView {...props} fieldKey={"doc1"} /> - </div> - <div style="bottom:0; left: 50%; height:40%; width:50%; position:absolute; background-color: rgba(0, 0, 0, .4); color: white;"> - <FieldView {...props} fieldKey={"doc2"} /> - </div> - </div>` + + export const Bullet = new Template("Bullet", TemplatePosition.InnerTop, + `<div><div style="height:100%; width:100%;position:absolute;">{layout}</div> + <div className="isBullet" style="height:25px; width:25px; margin-left:-25px; pointer-events:all; position:absolute; top: 0; background-color: rgba(0, 0, 0, .4); color: white; padding:2px 10px"/></div>` ); - export const TemplateList: Template[] = [Title, OuterCaption, InnerCaption, SideCaption]; + export const TemplateList: Template[] = [Title, OuterCaption, InnerCaption, SideCaption, Bullet]; export function sortTemplates(a: Template, b: Template) { if (a.Position < b.Position) { return -1; } |
