tweetsvg/tweet.svg.tmpl

46 lines
2.8 KiB
Cheetah
Raw Normal View History

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