diff options
| author | Mark Felder <feld@FreeBSD.org> | 2020-06-25 14:16:28 -0500 | 
|---|---|---|
| committer | Mark Felder <feld@FreeBSD.org> | 2020-06-25 14:26:21 -0500 | 
| commit | 433c01b370f4bf68d3f016d86c1527b1319e7a0c (patch) | |
| tree | 607d6c7e4e578d6e0ff95963b5565baefc207d85 /priv/static | |
| parent | d4b20c96c4030ebb5eb908dc6efcf45be7a8355d (diff) | |
| parent | 1d0804b49f56fe722b12f83269d98acfdee7ac77 (diff) | |
| download | pleroma-433c01b370f4bf68d3f016d86c1527b1319e7a0c.tar.gz pleroma-433c01b370f4bf68d3f016d86c1527b1319e7a0c.zip | |
Merge branch 'develop' into refactor/notification_settings
Diffstat (limited to 'priv/static')
| -rw-r--r-- | priv/static/embed.css | 115 | ||||
| -rw-r--r-- | priv/static/embed.js | 43 | ||||
| -rw-r--r-- | priv/static/schemas/litepub-0.1.jsonld | 1 | 
3 files changed, 159 insertions, 0 deletions
| diff --git a/priv/static/embed.css b/priv/static/embed.css new file mode 100644 index 000000000..cc79ee7ab --- /dev/null +++ b/priv/static/embed.css @@ -0,0 +1,115 @@ +body { +  background-color: #282c37; +  font-family: sans-serif; +  color: white; +  margin: 0; +  padding: 1em; +  padding-bottom: 0; +} + +.avatar { +  cursor: pointer; +} + +.avatar img { +  float: left; +  border-radius: 4px; +  margin-right: 4px; +} + +.activity-content { +  padding-top: 1em; +} + +.attachment { +  margin-top: 1em; +} + +.attachment img { +  max-width: 100%; +} + +.date a { +  text-decoration: none; +} + +.date a:hover { +  text-decoration: underline; +} + +.date a, +.counts { +  color: #666; +  font-size: 0.9em; +} + +.counts dt, +.counts dd { +  float: left; +  margin-left: 1em; +} + +a { +  color: white; +} + +.h-card { +  min-height: 48px; +  margin-bottom: 8px; +} + +.h-card a { +  text-decoration: none; +} + +.h-card a:hover { +  text-decoration: underline; +} + +.display-name { +  padding-top: 4px; +  display: block; +  text-overflow: ellipsis; +  overflow: hidden; +  color: white; +} + +/* keep emoji from being hilariously huge */ +.display-name img { +  max-height: 1em; +} + +.display-name .nickname { +  padding-top: 4px; +  display: block; +} + +.nickname:hover { +  text-decoration: none; +} + +.pull-right { +  float: right; +} + +.collapse { +  margin: 0; +  width: auto; +} + +a.button { +  box-sizing: border-box; +  display: inline-block; +  color: white; +  background-color: #419bdd; +  border-radius: 4px; +  border: none; +  padding: 10px; +  font-weight: 500; +  font-size: 0.9em; +} + +a.button:hover { +  text-decoration: none; +  background-color: #61a6d9; +} diff --git a/priv/static/embed.js b/priv/static/embed.js new file mode 100644 index 000000000..f675f6417 --- /dev/null +++ b/priv/static/embed.js @@ -0,0 +1,43 @@ +(function () { +  'use strict' + +  var ready = function (loaded) { +    if (['interactive', 'complete'].indexOf(document.readyState) !== -1) { +      loaded() +    } else { +      document.addEventListener('DOMContentLoaded', loaded) +    } +  } + +  ready(function () { +    var iframes = [] + +    window.addEventListener('message', function (e) { +      var data = e.data || {} + +      if (data.type !== 'setHeightPleromaEmbed' || !iframes[data.id]) { +        return +      } + +      iframes[data.id].height = data.height +    }); + +    [].forEach.call(document.querySelectorAll('iframe.pleroma-embed'), function (iframe) { +      iframe.scrolling = 'no' +      iframe.style.overflow = 'hidden' + +      iframes.push(iframe) + +      var id = iframes.length - 1 + +      iframe.onload = function () { +        iframe.contentWindow.postMessage({ +          type: 'setHeightPleromaEmbed', +          id: id +        }, '*') +      } + +      iframe.onload() +    }) +  }) +})() diff --git a/priv/static/schemas/litepub-0.1.jsonld b/priv/static/schemas/litepub-0.1.jsonld index 278ad2f96..7cc3fee40 100644 --- a/priv/static/schemas/litepub-0.1.jsonld +++ b/priv/static/schemas/litepub-0.1.jsonld @@ -30,6 +30,7 @@                  "@type": "@id"              },              "EmojiReact": "litepub:EmojiReact", +            "ChatMessage": "litepub:ChatMessage",              "alsoKnownAs": {                  "@id": "as:alsoKnownAs",                  "@type": "@id" | 
