Changeset View
Changeset View
Standalone View
Standalone View
kde-navig-online.xsl
Show All 36 Lines | 1 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |||
---|---|---|---|---|---|
37 | <!-- end "only for the online version" --> | 37 | <!-- end "only for the online version" --> | ||
38 | 38 | | |||
39 | <xsl:template name="header.navigation"> | 39 | <xsl:template name="header.navigation"> | ||
40 | <xsl:param name="prev" select="/foo"/> | 40 | <xsl:param name="prev" select="/foo"/> | ||
41 | <xsl:param name="next" select="/foo"/> | 41 | <xsl:param name="next" select="/foo"/> | ||
42 | <xsl:variable name="home" select="/*[1]"/> | 42 | <xsl:variable name="home" select="/*[1]"/> | ||
43 | <xsl:variable name="up" select="parent::*"/> | 43 | <xsl:variable name="up" select="parent::*"/> | ||
44 | <xsl:if test="$suppress.navigation = '0'"> | 44 | <xsl:if test="$suppress.navigation = '0'"> | ||
45 | <div id="header"> | 45 | <header class="header clearfix"> | ||
46 | <div id="header_content"> | 46 | <nav id="kHeaderNav" class="navbar navbar-expand-sm container-fluid"> | ||
47 | <div id="header_left"> | 47 | <a class="navbar-brand navbar-brand-active" href="/" id="KDEGlobalLogo"> | ||
48 | <div id="header_right"> | 48 | <img src="/assets/img/icon-kde.svg" width="40px" height="40px"/> | ||
49 | <img src="{$kde.common}top-kde.jpg" width="36" height="34" /> | 49 | <span>KDE Documentation</span> | ||
50 | <!-- The space is for spacing between the logo and title text --> | 50 | </a> | ||
51 | <xsl:text> </xsl:text> | 51 | <xsl:apply-templates select="." mode="title.markup"/> | ||
52 | <xsl:apply-templates | 52 | </nav> | ||
53 | select="." mode="title.markup"/> | 53 | </header> | ||
54 | </div> | | |||
55 | </div> | | |||
56 | </div> | | |||
57 | </div> | | |||
58 | 54 | | |||
59 | <!-- output navigation links --> | 55 | <!-- output navigation links --> | ||
60 | <div class="navCenter"> | 56 | <nav aria-label="Documentation navigation" class="mt-2"> | ||
61 | <table class="navigation"> | 57 | <ul class="pagination d-flex justify-content-center"> | ||
62 | <tr> | 58 | <!-- Previous --> | ||
63 | <td class="upCell" colspan="3"> | | |||
64 | <a href="/">http://docs.kde.org/</a> | | |||
65 | </td> | | |||
66 | </tr> | | |||
67 | <tr> | | |||
68 | <td class="prevCell"> | | |||
69 | <xsl:if test="count($prev)>0"> | 59 | <xsl:if test="count($prev)>0"> | ||
70 | <a accesskey="p"> | 60 | <li class="page-item"> | ||
61 | <a accesskey="p" class="page-link"> | ||||
71 | <xsl:attribute name="href"> | 62 | <xsl:attribute name="href"> | ||
72 | <xsl:call-template name="href.target"> | 63 | <xsl:call-template name="href.target"> | ||
73 | <xsl:with-param name="object" select="$prev"/> | 64 | <xsl:with-param name="object" select="$prev"/> | ||
74 | </xsl:call-template> | 65 | </xsl:call-template> | ||
75 | </xsl:attribute> | 66 | </xsl:attribute> | ||
76 | <xsl:call-template name="gentext.nav.prev"/> | 67 | <xsl:call-template name="gentext.nav.prev"/> | ||
77 | </a> | 68 | </a> | ||
69 | </li> | ||||
78 | </xsl:if> | 70 | </xsl:if> | ||
79 | </td> | 71 | <xsl:if test="count($prev)=0"> | ||
80 | <td class="upCell"> | 72 | <li class="page-item disabled"> | ||
81 | <xsl:choose> | 73 | <span class="page-link"> | ||
82 | <xsl:when test="count($up) > 0 and $up != $home"> | 74 | <xsl:call-template name="gentext.nav.prev"/> | ||
83 | <xsl:apply-templates select="$up" mode="title.markup"/> | 75 | </span> | ||
84 | </xsl:when> | 76 | </li> | ||
85 | <xsl:otherwise> </xsl:otherwise> | 77 | </xsl:if> | ||
86 | </xsl:choose> | 78 | | ||
87 | </td> | 79 | <!-- page title --> | ||
88 | <td class="nextCell"> | 80 | <li class="page-item"> | ||
81 | <span class="page-link"> | ||||
82 | <a accesskey="h"> | ||||
83 | <xsl:attribute name="href"> | ||||
84 | <xsl:call-template name="href.target"> | ||||
85 | <xsl:with-param name="object" select="$up"/> | ||||
86 | </xsl:call-template> | ||||
87 | </xsl:attribute> | ||||
88 | <xsl:apply-templates select="." mode="title.markup"/> | ||||
89 | </a> | ||||
90 | </span> | ||||
91 | </li> | ||||
92 | | ||||
93 | <!-- Next --> | ||||
89 | <xsl:if test="count($next)>0"> | 94 | <xsl:if test="count($next)>0"> | ||
90 | <a accesskey="n"> | 95 | <li class="page-item"> | ||
96 | <a accesskey="p" class="page-link"> | ||||
91 | <xsl:attribute name="href"> | 97 | <xsl:attribute name="href"> | ||
92 | <xsl:call-template name="href.target"> | 98 | <xsl:call-template name="href.target"> | ||
93 | <xsl:with-param name="object" select="$next"/> | 99 | <xsl:with-param name="object" select="$next"/> | ||
94 | </xsl:call-template> | 100 | </xsl:call-template> | ||
95 | </xsl:attribute> | 101 | </xsl:attribute> | ||
96 | <xsl:call-template name="gentext.nav.next"/> | 102 | <xsl:call-template name="gentext.nav.next"/> | ||
97 | </a> | 103 | </a> | ||
104 | </li> | ||||
98 | </xsl:if> | 105 | </xsl:if> | ||
99 | </td> | 106 | <xsl:if test="count($next)=0"> | ||
100 | </tr> | 107 | <li class="page-item disabled"> | ||
101 | </table> | 108 | <span class="page-link"> | ||
102 | </div> | 109 | <xsl:call-template name="gentext.nav.next"/> | ||
110 | </span> | ||||
111 | </li> | ||||
112 | </xsl:if> | ||||
113 | </ul> | ||||
114 | </nav> | ||||
103 | </xsl:if> | 115 | </xsl:if> | ||
104 | </xsl:template> | 116 | </xsl:template> | ||
105 | 117 | | |||
106 | <!-- ==================================================================== --> | 118 | <!-- ==================================================================== --> | ||
107 | 119 | | |||
108 | <xsl:template name="footer.navigation"> | 120 | <xsl:template name="footer.navigation"> | ||
109 | <xsl:param name="prev" select="/foo"/> | 121 | <xsl:param name="prev" select="/foo"/> | ||
110 | <xsl:param name="next" select="/foo"/> | 122 | <xsl:param name="next" select="/foo"/> | ||
111 | <xsl:variable name="home" select="/*[1]"/> | 123 | <xsl:variable name="home" select="/*[1]"/> | ||
112 | <xsl:variable name="up" select="parent::*"/> | 124 | <xsl:variable name="up" select="parent::*"/> | ||
113 | 125 | | |||
114 | <xsl:if test="$suppress.navigation = '0'"> | 126 | <xsl:if test="$suppress.navigation = '0'"> | ||
115 | <div id="footer"> | | |||
116 | <!-- output navigation links --> | 127 | <!-- output navigation links --> | ||
117 | <div class="navCenter"> | 128 | <nav aria-label="Documentation navigation" class="mt-2"> | ||
118 | <table class="navigation"> | 129 | <ul class="pagination d-flex justify-content-center"> | ||
119 | <tr> | 130 | <!-- Previous --> | ||
120 | <td class="prevCell"> | | |||
121 | <xsl:if test="count($prev)>0"> | 131 | <xsl:if test="count($prev)>0"> | ||
122 | <a accesskey="p"> | 132 | <li class="page-item"> | ||
133 | <a accesskey="p" class="page-link"> | ||||
123 | <xsl:attribute name="href"> | 134 | <xsl:attribute name="href"> | ||
124 | <xsl:call-template name="href.target"> | 135 | <xsl:call-template name="href.target"> | ||
125 | <xsl:with-param name="object" select="$prev"/> | 136 | <xsl:with-param name="object" select="$prev"/> | ||
126 | </xsl:call-template> | 137 | </xsl:call-template> | ||
127 | </xsl:attribute> | 138 | </xsl:attribute> | ||
128 | <xsl:call-template name="gentext.nav.prev"/> | 139 | <xsl:call-template name="gentext.nav.prev"/> | ||
129 | </a> | 140 | </a> | ||
141 | </li> | ||||
130 | </xsl:if> | 142 | </xsl:if> | ||
131 | </td> | 143 | <xsl:if test="count($prev)=0"> | ||
132 | <td class="upCell"> | 144 | <li class="page-item disabled"> | ||
133 | <xsl:choose> | 145 | <span class="page-link"> | ||
134 | <xsl:when test="$home != ."> | 146 | <xsl:call-template name="gentext.nav.prev"/> | ||
147 | </span> | ||||
148 | </li> | ||||
149 | </xsl:if> | ||||
150 | | ||||
151 | <!-- TOC --> | ||||
152 | <li class="page-item"> | ||||
153 | <span class="page-link"> | ||||
135 | <a accesskey="h"> | 154 | <a accesskey="h"> | ||
136 | <xsl:attribute name="href"> | 155 | <xsl:attribute name="href"> | ||
137 | <xsl:call-template name="href.target"> | 156 | <xsl:call-template name="href.target"> | ||
138 | <xsl:with-param name="object" select="$home"/> | 157 | <xsl:with-param name="object" select="$up"/> | ||
139 | </xsl:call-template> | 158 | </xsl:call-template> | ||
140 | </xsl:attribute> | 159 | </xsl:attribute> | ||
141 | <xsl:call-template name="gentext.nav.home"/> | 160 | <xsl:call-template name="gentext.nav.home"/> | ||
142 | </a> | 161 | </a> | ||
143 | </xsl:when> | 162 | </span> | ||
144 | <xsl:otherwise> </xsl:otherwise> | 163 | </li> | ||
145 | </xsl:choose> | 164 | | ||
146 | </td> | 165 | <!-- Next --> | ||
147 | <td class="nextCell"> | | |||
148 | <xsl:if test="count($next)>0"> | 166 | <xsl:if test="count($next)>0"> | ||
149 | <a accesskey="n"> | 167 | <li class="page-item"> | ||
168 | <a accesskey="p" class="page-link"> | ||||
150 | <xsl:attribute name="href"> | 169 | <xsl:attribute name="href"> | ||
151 | <xsl:call-template name="href.target"> | 170 | <xsl:call-template name="href.target"> | ||
152 | <xsl:with-param name="object" select="$next"/> | 171 | <xsl:with-param name="object" select="$next"/> | ||
153 | </xsl:call-template> | 172 | </xsl:call-template> | ||
154 | </xsl:attribute> | 173 | </xsl:attribute> | ||
155 | <xsl:call-template name="gentext.nav.next"/> | 174 | <xsl:call-template name="gentext.nav.next"/> | ||
156 | </a> | 175 | </a> | ||
176 | </li> | ||||
157 | </xsl:if> | 177 | </xsl:if> | ||
158 | </td> | 178 | <xsl:if test="count($next)=0"> | ||
159 | </tr> | 179 | <li class="page-item disabled"> | ||
160 | <tr> | 180 | <span class="page-link"> | ||
161 | <td class="prevCell"> | 181 | <xsl:call-template name="gentext.nav.next"/> | ||
162 | <xsl:apply-templates select="$prev" mode="title.markup"/> | 182 | </span> | ||
163 | <xsl:text> </xsl:text> | 183 | </li> | ||
164 | </td> | 184 | </xsl:if> | ||
165 | <td class="upCell"> | 185 | </ul> | ||
166 | <xsl:choose> | 186 | </nav> | ||
167 | <xsl:when test="count($up) > 0 and $up != $home"> | | |||
168 | <xsl:apply-templates select="$up" mode="title.markup"/> | | |||
169 | </xsl:when> | | |||
170 | <xsl:otherwise> </xsl:otherwise> | | |||
171 | </xsl:choose> | | |||
172 | </td> | | |||
173 | <td class="nextCell"> | | |||
174 | <xsl:text> </xsl:text> | | |||
175 | <xsl:apply-templates select="$next" mode="title.markup"/> | | |||
176 | </td> | | |||
177 | </tr> | | |||
178 | <tr> | | |||
179 | <td class="upCell" colspan="3"> | | |||
180 | <a href="/">http://docs.kde.org/</a> | | |||
181 | </td> | | |||
182 | </tr> | | |||
183 | </table> | | |||
184 | </div> | | |||
185 | </div> | | |||
186 | </xsl:if> | 187 | </xsl:if> | ||
187 | </xsl:template> | 188 | </xsl:template> | ||
188 | 189 | | |||
189 | </xsl:stylesheet> | 190 | </xsl:stylesheet> |