blob: 091959e7805ccdeaf6d62494b23a3e73898e1c6d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:psso="urn:psso:xsl">
<xsl:output method="xml" encoding="UTF-8"
doctype-system="about:legacy-compat"/>
<xsl:variable name="site-name">
<xsl:choose>
<xsl:when test="/page/@site-name">
<xsl:value-of select="/page/@site-name"/>
</xsl:when>
<xsl:otherwise>Pleasant SSO</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:template match="/page">
<html xml:lang="en" lang="en">
<head>
<title>
<xsl:if test="@title">
<xsl:value-of select="@title"/>
—
</xsl:if>
<xsl:value-of select="$site-name"/>
</title>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<link rel="stylesheet" href="/static/style.css"/>
</head>
<body>
<xsl:call-template name="page-header"/>
<main>
<xsl:if test="@kind = 'challenges'">
<xsl:attribute name="class">challenge-page</xsl:attribute>
</xsl:if>
<xsl:if test="@title">
<h1><xsl:value-of select="@title"/></h1>
</xsl:if>
<xsl:apply-templates/>
</main>
<xsl:call-template name="page-footer"/>
</body>
</html>
</xsl:template>
<xsl:template name="page-header">
<header>
<site-name><xsl:value-of select="$site-name"/></site-name>
</header>
</xsl:template>
<xsl:template name="page-footer">
<footer>
<xsl:value-of select="psso:L('ui.powered-by')"/>
·
<a>
<xsl:attribute name="href">
<xsl:value-of select="/page/@source"/>
</xsl:attribute>
<xsl:value-of select="psso:L('ui.source-code')"/>
</a>
</footer>
</xsl:template>
<xsl:template match="content">
<xsl:copy-of select="*"/>
</xsl:template>
<xsl:template match="error">
<error-message>
<box-label><xsl:value-of select="psso:L('error')"/></box-label>
<xsl:value-of select="."/>
</error-message>
</xsl:template>
<xsl:template match="challenge-message">
<p class="challenge-message">
<xsl:value-of select="."/>
</p>
</xsl:template>
<xsl:template match="form">
<xsl:copy-of select="."/>
<xsl:if test="position() != last()">
<challenge-separator>
<xsl:value-of select="psso:L('challenge.separator')"/>
</challenge-separator>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
|