github.com/SDLMoe/hugo@v0.47.1/tpl/tplimpl/embedded/templates/shortcodes/twitter_simple.html (about) 1 {{- $pc := .Page.Site.Config.Privacy.Twitter -}} 2 {{- $sc := .Page.Site.Config.Services.Twitter -}} 3 {{- if not $pc.Disable -}} 4 {{- $id := .Get 0 -}} 5 {{- $json := getJSON "https://api.twitter.com/1/statuses/oembed.json?id=" $id "&omit_script=true" -}} 6 {{- if not $sc.DisableInlineCSS -}} 7 {{ template "__h_simple_twitter_css" $ }} 8 {{- end -}} 9 {{ $json.html | safeHTML }} 10 {{- end -}} 11 12 {{ define "__h_simple_twitter_css" }} 13 {{ if not (.Page.Scratch.Get "__h_simple_twitter_css") }} 14 {{/* Only include once */}} 15 {{ .Page.Scratch.Set "__h_simple_twitter_css" true }} 16 <style type="text/css"> 17 .twitter-tweet { 18 font: 14px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; 19 border-left: 4px solid #2b7bb9; 20 padding-left: 1.5em; 21 color: #555; 22 } 23 .twitter-tweet a { 24 color: #2b7bb9; 25 text-decoration: none; 26 } 27 blockquote.twitter-tweet a:hover, 28 blockquote.twitter-tweet a:focus { 29 text-decoration: underline; 30 } 31 </style> 32 {{ end }} 33 {{ end }}