Seppo.Social -> Seppo.mro.name
[Seppo.git] / doc / wb / themes / current / configform.xsl
blob2f9ad658b0fd013558ed3d9da47836f80a1b99e1
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 _ _ ____ _
4 _| || |_/ ___| ___ _ __ _ __ ___ | |
5 |_ .. _\___ \ / _ \ '_ \| '_ \ / _ \| |
6 |_ _|___) | __/ |_) | |_) | (_) |_|
7 |_||_| |____/ \___| .__/| .__/ \___/(_)
8 |_| |_|
10 Personal Social Web.
12 Copyright (C) The #Seppo contributors. All rights reserved.
14 This program is free software: you can redistribute it and/or modify
15 it under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
19 This program is distributed in the hope that it will be useful,
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 GNU General Public License for more details.
24 You should have received a copy of the GNU General Public License
25 along with this program. If not, see <http://www.gnu.org/licenses/>.
27 http://www.w3.org/TR/xslt/
28 -->
29 <xsl:stylesheet
30 xmlns="http://www.w3.org/1999/xhtml"
31 xmlns:h="http://www.w3.org/1999/xhtml"
32 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
33 version="1.0">
35 <!-- replace linefeeds with <br> tags -->
36 <xsl:template name="linefeed2br">
37 <xsl:param name="string" select="''"/>
38 <xsl:param name="pattern" select="'&#10;'"/>
39 <xsl:choose>
40 <xsl:when test="contains($string, $pattern)">
41 <xsl:value-of select="substring-before($string, $pattern)"/><br class="br"/><xsl:comment>Why do we see 2 br on Safari and output/@method=html here? http://purl.mro.name/safari-xslt-br-bug</xsl:comment>
42 <xsl:call-template name="linefeed2br">
43 <xsl:with-param name="string" select="substring-after($string, $pattern)"/>
44 <xsl:with-param name="pattern" select="$pattern"/>
45 </xsl:call-template>
46 </xsl:when>
47 <xsl:otherwise>
48 <xsl:value-of select="$string"/>
49 </xsl:otherwise>
50 </xsl:choose>
51 </xsl:template>
53 <xsl:output
54 method="html"
55 doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
56 doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"/>
58 <xsl:variable name="xml_base">../</xsl:variable>
59 <xsl:variable name="xml_base_pub" select="concat($xml_base,'o')"/>
60 <xsl:variable name="skin_base" select="concat($xml_base,'themes/current')"/>
61 <xsl:variable name="cgi_base" select="concat($xml_base,'seppo.cgi')"/>
63 <xsl:template match="/">
64 <xsl:apply-templates select="h:html"/>
65 </xsl:template>
67 <xsl:template match="h:html">
68 <html xmlns="http://www.w3.org/1999/xhtml" bgcolor="darkgreen">
69 <head>
70 <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
71 <!-- https://developer.apple.com/library/IOS/documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html#//apple_ref/doc/uid/TP40006509-SW26 -->
72 <!-- http://maddesigns.de/meta-viewport-1817.html -->
73 <!-- meta name="viewport" content="width=device-width"/ -->
74 <!-- http://www.quirksmode.org/blog/archives/2013/10/initialscale1_m.html -->
75 <meta name="viewport" content="width=device-width,initial-scale=1.0"/>
76 <!-- meta name="viewport" content="width=400"/ -->
77 <link href="{$skin_base}/style.css" rel="stylesheet" type="text/css"/>
78 <link rel="icon" type="image/png" data-emoji="|S"/>
79 <link rel="icon" type="image/jpg" href="../me-avatar.jpg"/>
81 <title><xsl:value-of select="h:head/h:title"/></title>
82 </head>
83 <xsl:for-each select="h:body/h:form">
84 <body onload="document.{@name}.title.focus();">
85 <label form="{@name}" class="h1"><xsl:value-of select="../../h:head/h:title"/></label>
86 <p><img
87 width="600px" height="100px"
88 alt="../app/ access permission check: ok (https://Seppo.mro.name/S1005)"
89 title="if a security alert is visible here, ../app/ is publicly accessible from the www. See https://Seppo.mro.name/S1005"
90 src="../app/i-must-be-403.svg"/></p>
91 <p>You are invited, but not obliged, to have a look at the files on
92 your webspace. You find a directory <code>themes/current/</code> that contains the
93 overall look of your #Seppo!. Most importantly <a href="../themes/current/style.css"><code>style.css</code></a>.</p>
95 <p>All files outside <code>./app/</code> are unpacked from
96 <code>seppo.cgi</code> or created during operation. To get a fresh copy,
97 delete a file and the marker file <code>delete-me-to-unpack-missing</code> and
98 you'll get a fresh copy after visiting <a href="../
99 seppo.cgi"><code>seppo.cgi</code></a>.</p>
101 <h3>Banner</h3>
102 <div id="banner">
103 <img width="720" height="240" alt="Banner" src="../me-banner.jpg" title="adjust 'me-banner.jpg' next to seppo.cgi"/>
104 </div>
105 <p>Upload a jpg to your webspace and rename it to <code><a href="../me-banner.jpg">me-banner.jpg</a></code>
106 (next to <code>seppo.cgi</code>). See also <a href="https://seppo.mro.name/S1007">S1007</a></p>
108 <h3>Avatar</h3>
109 <p id="avatar">
110 <img alt="Avatar" src="../me-avatar.jpg" title="adjust 'me-avatar.jpg' next to seppo.cgi"/>
111 </p>
112 <p>Upload a jpg to your webspace and rename it to <code><a href="../me-avatar.jpg">me-avatar.jpg</a></code>
113 (next to <code>seppo.cgi</code>). See also <a href="https://seppo.mro.name/S1007">S1007</a></p>
115 <xsl:copy>
116 <xsl:apply-templates select="@*|node()"/>
117 </xsl:copy>
118 </body>
119 </xsl:for-each>
120 </html>
121 </xsl:template>
123 <xsl:template match="h:input">
124 <xsl:if test="@type != 'hidden'">
125 <label for="{@name}" class="h3"><xsl:value-of select="@name"/></label>
126 </xsl:if>
127 <xsl:copy>
128 <xsl:apply-templates select="@*|node()"/>
129 </xsl:copy>
130 </xsl:template>
132 <xsl:template match="h:textarea">
133 <label for="{@name}" class="h3"><xsl:value-of select="@name"/></label>
134 <xsl:copy>
135 <xsl:apply-templates select="@*|node()"/>
136 </xsl:copy>
137 </xsl:template>
139 <xsl:template match="@*|node()">
140 <xsl:copy>
141 <xsl:apply-templates select="@*|node()"/>
142 </xsl:copy>
143 </xsl:template>
144 </xsl:stylesheet>