1
0
Fork 0
mirror of https://gitlab.com/sbrl/GalleryShare.git synced 2018-06-12 22:45:16 +00:00

Push preview image to background of element

This commit is contained in:
Starbeamrainbowlabs 2016-07-16 21:14:10 +01:00
parent 2d020ab168
commit b286d9b51d
2 changed files with 9 additions and 3 deletions

View file

@ -20,13 +20,12 @@
</xsl:template>
<xsl:template match="ListingEntry[@Type='File']">
<figure class='preview file'>
<img src="{Name}?type=thumbnail" />
<figure class="preview file" style="background-image: url('{Name}?type=thumbnail');">
<figcaption><xsl:value-of select="Name" /></figcaption>
</figure>
</xsl:template>
<xsl:template match="ListingEntry[@Type='Directory']">
<figure class='preview directory'>
<figure class="preview directory">
(coming soon)
<figcaption><xsl:value-of select="Name" /></figcaption>
</figure>

View file

@ -3,3 +3,10 @@ body
{
font-family: sans-serif;
}
figure
{
width: 10em; height: 7.5em;
background-position: center center;
background-size: cover;
}