diff options
author | Hsieh Chin Fan <typebrook@gmail.com> | 2022-02-02 13:34:47 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2024-11-30 21:09:29 +0800 |
commit | 9934dd538b0ce116e3b1600272cb46369b082246 (patch) | |
tree | 2f28c6c362201151eaf8218e566479ed7eb72070 /nginx/layout/simple-gal.xslt |
init commit
Diffstat (limited to 'nginx/layout/simple-gal.xslt')
-rw-r--r-- | nginx/layout/simple-gal.xslt | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/nginx/layout/simple-gal.xslt b/nginx/layout/simple-gal.xslt new file mode 100644 index 0000000..749be72 --- /dev/null +++ b/nginx/layout/simple-gal.xslt | |||
@@ -0,0 +1,36 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | ||
3 | <xsl:output method="html" encoding="utf-8" indent="yes" /> | ||
4 | <xsl:template match="/"> | ||
5 | <xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text> | ||
6 | <html> | ||
7 | <head> | ||
8 | <title><xsl:value-of select="$title" /></title> | ||
9 | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
10 | <style> | ||
11 | img { | ||
12 | display: inline; | ||
13 | width: 23%; | ||
14 | margin: 2mm; | ||
15 | vertical-align: bottom; | ||
16 | } | ||
17 | @media all and (max-width: 20.4cm) { | ||
18 | img { | ||
19 | max-width: calc(100% - 4mm); | ||
20 | } | ||
21 | } | ||
22 | body { | ||
23 | margin: 0; | ||
24 | } | ||
25 | </style> | ||
26 | </head> | ||
27 | <body> | ||
28 | <xsl:for-each select="list/file"> | ||
29 | <a href="{.}" title="click to enlarge"> | ||
30 | <img src="{.}" alt="{.}"/> | ||
31 | </a> | ||
32 | </xsl:for-each> | ||
33 | </body> | ||
34 | </html> | ||
35 | </xsl:template> | ||
36 | </xsl:stylesheet> | ||