aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/Templates.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2020-01-15 17:17:35 -0500
committerbob <bcz@cs.brown.edu>2020-01-15 17:17:35 -0500
commit8212288108c3acfd129e45b9f496f0606a8d2848 (patch)
tree941a580fddfdd79022cbf4c1edf22c25a78c80a0 /src/client/views/Templates.tsx
parent3ab47ee803372686966092751bd6a589b62a17c6 (diff)
changed freeformdocument to use contentfittingviews if specified with FitToBox. fixed bugs with contentfittingviews & titles.
Diffstat (limited to 'src/client/views/Templates.tsx')
-rw-r--r--src/client/views/Templates.tsx11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/client/views/Templates.tsx b/src/client/views/Templates.tsx
index ef78b60d4..8af8a6280 100644
--- a/src/client/views/Templates.tsx
+++ b/src/client/views/Templates.tsx
@@ -56,8 +56,17 @@ export namespace Templates {
<div style="width:100%;overflow:auto">{layout}</div>
</div>
</div>` );
+ export const TitleHover = new Template("TitleHover", TemplatePosition.InnerTop,
+ `<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.Document.title}</span>
+ </div>
+ <div style="height:calc(100% - 25px);">
+ <div style="width:100%;overflow:auto">{layout}</div>
+ </div>
+ </div>` );
- export const TemplateList: Template[] = [Title, Caption];
+ export const TemplateList: Template[] = [Title, TitleHover, Caption];
export function sortTemplates(a: Template, b: Template) {
if (a.Position < b.Position) { return -1; }