diff options
| author | Abdullah Ahmed <abdullah_ahmed@brown.edu> | 2019-06-29 19:25:38 -0400 |
|---|---|---|
| committer | Abdullah Ahmed <abdullah_ahmed@brown.edu> | 2019-06-29 19:25:38 -0400 |
| commit | 82f61a9ff5406326a8bae736a63ddae7a386a181 (patch) | |
| tree | 92fbbc7a35866c62618f31ec688fcd387116d9c2 /src/client/views/Templates.tsx | |
| parent | 881df5e1255681a306af2d9f78b092b3688ad38c (diff) | |
| parent | 8e6caaf2a4f9f5c9777719a85dcacf4922830c04 (diff) | |
Merge branch 'text_box_ab' of https://github.com/browngraphicslab/Dash-Web into text_box_ab
Diffstat (limited to 'src/client/views/Templates.tsx')
| -rw-r--r-- | src/client/views/Templates.tsx | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/client/views/Templates.tsx b/src/client/views/Templates.tsx index 3cd525afa..5bb8d454a 100644 --- a/src/client/views/Templates.tsx +++ b/src/client/views/Templates.tsx @@ -48,12 +48,12 @@ export namespace Templates { </div>` ); export const Title = new Template("Title", TemplatePosition.InnerTop, - `<div style="height:100%"> - <div style="height:25px; width:100%; background-color: rgba(0, 0, 0, .4); color: white; "> - <span style="text-align:center;width:100%;font-size:20px;position:absolute;overflow:hidden;white-space:nowrap;text-overflow:ellipsis">{props.Document.title}</span> + `<div> + <div style="height:25px; width:100%; background-color: rgba(0, 0, 0, .4); color: white; z-index: 100"> + <span style="text-align:center;width:100%;font-size:20px;position:absolute;overflow:hidden;white-space:nowrap;text-overflow:ellipsis">{props.DataDoc.title}</span> </div> - <div style="display:flex; flex-direction:column; height:calc(100% - 25px);"> - <div style="height:min-content; width:100%;overflow:auto">{layout}</div> + <div style="height:calc(100% - 25px);"> + <div style="width:100%;overflow:auto">{layout}</div> </div> </div>` ); @@ -62,7 +62,7 @@ export namespace Templates { <div style="width:100%; background-color: rgba(0, 0, 0, .4); color: white; "> <FormattedTextBox {...props} height={"min-content"} color={"white"} fieldKey={"header"} /> </div> - <div style="width:100%;height:min-content;overflow:auto;">{layout}</div> + <div style="width:100%;height:100%;overflow:auto;">{layout}</div> </div > ` ); export const Bullet = new Template("Bullet", TemplatePosition.InnerTop, @@ -84,6 +84,16 @@ export namespace Templates { </div > `); } + export function TitleBar(datastring: string) { + return (`<div> + <div style="height:25px; width:100%; background-color: rgba(0, 0, 0, .4); color: white; z-index: 100"> + <span style="text-align:center;width:100%;font-size:20px;position:absolute;overflow:hidden;white-space:nowrap;text-overflow:ellipsis">${datastring}</span> + </div> + <div style="height:calc(100% - 25px);"> + <div style="width:100%;overflow:auto">{layout}</div> + </div> + </div>` ); + } export const TemplateList: Template[] = [Title, Header, Caption, Bullet]; export function sortTemplates(a: Template, b: Template) { |
