1
0
Fork 0

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;
}