51 lines
3.1 KiB
Cheetah
51 lines
3.1 KiB
Cheetah
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="{{ tweetWidth }}" height="{{ calculateHeight . }}">
|
|
<foreignObject x="0" y="0" width="{{ tweetWidth }}" height="100%" fill="#eade52">
|
|
<style>
|
|
.{{ className }}{clear:none;font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;}
|
|
.{{ className }}.text{font-size: 23px;}
|
|
a.{{ className }}{color: rgb(27, 149, 224); text-decoration:none;}
|
|
.{{ className }} a { color: #1da1f2; }
|
|
blockquote.{{ className }}{margin:1px; background-color:#fefefe; border-radius:2%; border-style:solid; border-width:.1em; border-color:#ddd; padding:1em; font-family:sans; width:29rem}
|
|
blockquote.subtweet{width:26rem; padding:0.8em;}
|
|
.avatar-{{ className }}{float:left; width:4rem; height:4rem; border-radius:50%;margin-right:.5rem;;margin-bottom:.5rem;border-style: solid; border-width:.1em; border-color:#ddd;}
|
|
h1.{{ className }}{margin:0;font-size:15px;text-decoration:none;color:#000;}
|
|
h2.{{ className }}{margin:0;font-size:15px;font-weight:normal;text-decoration:none;color:rgb(101, 119, 134);}
|
|
p.{{ className }}{font-size:1rem; clear:both;}
|
|
hr.{{ className }}{color:#ddd;}
|
|
.media-{{ className }}{border-radius:2%; max-width:100%;border-radius: 2%; border-style: solid; border-width: .1em; border-color: #ddd;}
|
|
time.{{ className }}{font-size:15px;margin:0;margin-left: 2px;padding-bottom:1rem;color:rgb(101, 119, 134);text-decoration:none;}
|
|
.{{ className }}.reply{font-size:15px;color:rgb(110, 118, 125);}
|
|
.{{ className }}.footer{display:block;}
|
|
</style>
|
|
<blockquote class="{{ className }}" xmlns="http://www.w3.org/1999/xhtml">
|
|
<a rel="noopener" target="_blank" class="{{ className }}" href="https://twitter.com/{{ .User.ScreenName }}/"><img class="avatar-{{ className }}" alt="" src="data:image/jpeg;base64,{{ base64 .User.ProfileImageUrlHttps }}" /></a>
|
|
|
|
<a rel="noopener" target="_blank" class="{{ className }}" href="https://twitter.com/{{ .User.ScreenName }}/"><h1 class="{{ className }}">{{ .User.Name }}</h1></a>
|
|
|
|
<a rel="noopener" target="_blank" class="{{ className }}" href="https://twitter.com/{{ .User.ScreenName }}/"><h2 class="{{ className }}">@{{ .User.ScreenName }}</h2></a>
|
|
|
|
{{ if .InReplyToScreenName }}
|
|
<p class="{{ className }} reply">Replying to <a rel="noopener" target="_blank" href="https://twitter.com/{{ .InReplyToScreenName }}/">@{{ .InReplyToScreenName }}</a></p>
|
|
{{ end }}
|
|
|
|
<p class="{{ className }} text">{{ html .FullText }}</p>
|
|
|
|
{{ if .QuotedStatus }}
|
|
{{ renderTweet .QuotedStatus }}
|
|
{{ end }}
|
|
|
|
{{ if .ExtendedEntities }}
|
|
{{ range .ExtendedEntities.Media }}
|
|
|
|
<a rel="noopener" target="_blank" href="{{ .Media_url_https }}"><img class="media-{{ className }}" width="{{ .Sizes.Small.W }}" src="data:image/jpeg;base64,{{ base64 .Media_url }}" alt="{{ .ExtAltText }}"/></a>
|
|
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
<a rel="noopener" target="_blank" class="{{ className }} footer" href="https://twitter.com/{{ .User.ScreenName }}/status/{{ .Id }}">
|
|
<time class="{{ className }}" datetime="{{ isoDate .CreatedAt }}">{{ humanDate .CreatedAt }}</time>
|
|
</a>
|
|
</blockquote>
|
|
</foreignObject>
|
|
</svg>
|