mediawiki-extensions-Popups/resources/ext.popups/templates/preview.mustache
Sam Smith b2f9ffa9b0 previews: Add generic fallback preview
Changes:
* Make the gateway handle missing pages, which are characterised by the
  MediaWiki API response having both the missing property set to truthy
  and the page not having any revisions.
* Add the preview-empty template and associated "mwe-popups-is-empty"
  CSS class, which describe what an empty preview contains and how it
  should look.

Supporting changes:
* Move the original preview template into the ext.popups module.

Bug: T151054
Change-Id: Ife75bf9c6bafdfe0a6cc3e20eea853b4ac8f951b
2016-12-02 12:02:43 +00:00

14 lines
599 B
Plaintext

{{! Extracted from `mw.popups.render.createPopupElement` }}
<div class="mwe-popups" role="tooltip" aria-hidden>
<div class="mwe-popups-container">
{{#hasThumbnail}}
<a href="{{url}}" class="mwe-popups-discreet"></a>
{{/hasThumbnail}}
<a dir="{{langdir}}" lang="{{langcode}}" class="mwe-popups-extract" href="{{url}}"></a>
<footer>
<span class="{{#isRecent}}mwe-popups-timestamp-recent{{/isRecent}}{{^isRecent}}mwe-popups-timestamp-older{{/isRecent}}">{{lastModifiedMsg}}</span>
<a class="mwe-popups-icon mwe-popups-settings-icon"></a>
</footer>
</div>
</div>