/
oembedcard.html
70 lines (69 loc) · 2.07 KB
/
oembedcard.html
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
66
67
68
69
70
<style>
.indiecard {font-family: "Gill Sans", Roboto,Verdana, sans-serif;
display: -webkit-flex; display:flex;
-webkit-flex-direction: column; flex-direction: column;
-webkit-align-items: stretch; align-items: stretch;
margin:0; width:100%; height:100%; padding: 0; overflow:hidden;
font-size:3vw;
}
.u-banner {height:30vh;}
.u-banner img {width:100%; height:100%; object-fit: cover;}
h1 {display: -webkit-flex; display:flex;
-webkit-align-items:center; align-items:center;
font-size:20vh; margin:0;height:25vh;
}
text {font-size:20vh;}
a { text-decoration:none;}
.figure {-webkit-flex-grow:1; flex-grow:1; max-width:20%; height:100%;}
.u-photo {width:100%; max-height:100%; object-fit: contain;
}
.p-name {-webkit-flex-grow:4; flex-grow:4; }
h2 {
font-weight: 300; margin:0;
font-size:6vw;
}
.h-entry {margin-left: 10vw; margin-bottom:4vh;}
h3 {
font-weight: 400; margin:0;
font-size:7vh;
text-overflow: ellipsis;
overflow: hidden;
max-height:16vh;
}
p { margin:0;}
</style>
<div class="{{type}} indiecard">
{% if banner %}
<div class="u-featured">
<img src={{banner}} />
</div>
{% endif %}
<h1 >{% if photo %}
<a class="figure" href="{{url}}"><img src="{{photo}}" class="u-photo" /></a>
{% endif %}
<a class="u-url p-name" href="{{url}}">
<svg width="100%" height="100%"><text x="0%" y="80%" font-size="30vh" textLength="100%" lengthAdjust="spacingAndGlyphs">{{name}}</text></svg>
</a></h1>
{% if summary %}
{% autoescape false %}
<h2 class="e-summary">{{summary}}</h2>
{% endautoescape %}
{% endif %}
{% if org %}
{% autoescape false %}
<h3 class="p-org h-card">{{org}}</h3>
{% endautoescape %}
{% endif %}
{% if entries %}
{% for entry in entries %}
<div class="h-entry"><a href="{{entry.url}}"><h3 class="e-name">{{entry.name}}</h3></a>
{% if entry.featured %}
<img class="u-featured" src="{{entry.featured}}" />
{% elif entry.photo %}
<img class="u-photo" src="{{entry.photo}}" />
{% endif %}
<p class="e-summary">{{entry.summary}}</p>
</div>
{% endfor %}
{% endif %}
</div>