forked from syncfusion/blazor-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHtmlTemplate.razor
65 lines (53 loc) · 2.13 KB
/
HtmlTemplate.razor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
@page "/Tooltip/HtmlTemplate"
@using Syncfusion.EJ2.Blazor.Buttons;
@using Syncfusion.EJ2.Blazor.Popups
@inherits SampleBaseComponent;
@using Syncfusion.EJ2
<div id="htmlTemplate" class="col-lg-12 control-section">
<div id="customization">
<EjsTooltip CssClass="e-tooltip-css" Content="@Template" OpensOn="Click">
<EjsButton CssClass="e-outline text" IsPrimary="true" Content="HTML Template"></EjsButton>
</EjsTooltip>
</div>
</div>
@code
{
public string Template = "<div id='democontent' class='democontent'><div class='info'><h3 style='margin-top:10px'>Eastern Bluebird <hr style='margin-top:10px'></h3>" +
"<div style='margin-top: -10px'><div style='float:left;width:57%'>The<a href='https://en.wikipedia.org/wiki/Eastern_bluebird' target='blank'> Eastern Bluebird</a>" +
" is easily found in open fields and sparse woodland areas, including along woodland edges.These are<i>cavity-nesting birds</i>and a pair of eastern bluebirds will raise 2-3 broods annually, with 2-8 light blue or whitish eggs per brood.</div>" +
"<div id ='bird' style='float:right;width:42%'><img id='templateImg' width='125' height='125'/></div></div>" +
"<div style='margin-top:160px'><hr><p style='margin-top:-11px'> Eastern bluebirds can be very vocal in flocks.Their calls include a rapid, mid-tone chatter and several long dropping pitch calls.</p>" +
"</div><p>Source:</br><a href='https://en.wikipedia.org/wiki/Eastern_bluebird' target='_blank'>https://en.wikipedia.org/wiki/Eastern_bluebird</a></p></div></div>";
}
<style>
#htmlTemplate {
height: 385px;
}
#customization {
display: table;
margin: 0 auto;
}
.e-tooltip-css {
filter: drop-shadow(2px 5px 5px rgba(0, 0, 0, 0.25));
}
.text {
text-transform: capitalize;
width: 155px;
}
.democontent {
border: 0.5px solid grey;
}
#bird {
padding-top: 4px;
}
.info a {
color: #2FA1E3;
}
#templateImg {
background-image: url(css/tooltip/bird.png);
}
.info {
padding-left: 12px;
padding-right: 5px;
}
</style>