source: gs3-installations/atea/trunk/interfaces/atea/transform/pages/ocr.xsl@ 36745

Last change on this file since 36745 was 35997, checked in by cstephen, 2 years ago

Update langfrags to only pull in relevant lang strings

File size: 3.9 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!-- See ocr/README.md -->
3
4<xsl:stylesheet version="1.0"
5 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6 xmlns:java="http://xml.apache.org/xslt/java"
7 xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
8 xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
9 xmlns:gslib="http://www.greenstone.org/skinning"
10 extension-element-prefixes="java util"
11 exclude-result-prefixes="java util">
12
13 <!-- use the 'main' layout -->
14 <xsl:import href="layouts/main.xsl"/>
15
16 <xsl:variable name="groupPath"><xsl:value-of select="/page/pageRequest/paramList/param[@name='group']/@value"/></xsl:variable>
17 <!-- set page title -->
18 <xsl:template name="pageTitle">
19 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText('atea', /page/@lang, 'atea.ocr.Title')"/>
20 </xsl:template>
21
22 <!-- set page breadcrumbs -->
23 <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/>
24 <xsl:if test="$groupPath != ''">
25 <xsl:for-each select="/page/pageResponse/pathList/group">
26 <xsl:sort data-type="number" select="@position" />
27 <a>
28 <xsl:attribute name="href"><gslib:groupHref path="{@path}"/></xsl:attribute>
29 <xsl:attribute name="title"><gslib:groupName path="{@path}"/></xsl:attribute>
30 <gslib:groupName path="{@path}" />
31 </a>
32 <gslib:rightArrow/>
33 </xsl:for-each>
34 </xsl:if>
35 </xsl:template>
36
37 <!-- the page content -->
38 <xsl:template match="/page">
39 <xsl:call-template name="atea-ocr" />
40 </xsl:template>
41
42 <xsl:template name="atea-ocr">
43 <link rel="icon" href="interfaces/{$interface_name}/ocr/dist/favicon.png" />
44 <link href="interfaces/{$interface_name}/ocr/dist/css/app.css" rel="preload" as="style" />
45 <link href="interfaces/{$interface_name}/ocr/dist/js/app.js" rel="preload" as="script" />
46 <link href="interfaces/{$interface_name}/ocr/dist/js/chunk-vendors.js" rel="preload" as="script" />
47 <link href="interfaces/{$interface_name}/ocr/dist/css/app.css" rel="stylesheet" />
48
49 <gsf:style>
50 .ui-widget-content a {
51 color: inherit;
52 }
53
54 body {
55 display: flex;
56 flex-direction: column;
57 align-items: stretch;
58 }
59
60 #container {
61 background-color: var(--page-bg-color);
62 line-height: initial;
63 flex-grow: 1;
64 max-width: none;
65 margin: 0;
66 }
67
68 #gs_content {
69 padding: 0;
70 background-color: var(--page-bg-color);
71 height: 100%;
72 }
73
74 #gs_banner {
75 display: none;
76 }
77
78 #topArea {
79 margin: 0;
80 max-width: none;
81 background-color: rgb(var(--primary-bg-color));
82 }
83
84 .app-bar {
85 box-shadow: 0 3px 4px -3px #404040;
86 border-radius: 0 0 5px 5px;
87 }
88
89 .ui-button {
90 background-color: rgb(var(--primary-bg-color-l1));
91 color: var(--fg-color);
92 border-color: white;
93 }
94 </gsf:style>
95
96 <noscript>
97 <strong>We're sorry, but the Māori OCR Service doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
98 </noscript>
99
100 <div id="app"></div>
101 <!-- built files will be auto injected -->
102
103 <gslib:langfrag name="atea.ocr" />
104 <gsf:script src="interfaces/{$interface_name}/ocr/dist/js/chunk-vendors.js"></gsf:script>
105 <gsf:script src="interfaces/{$interface_name}/ocr/dist/js/app.js"></gsf:script>
106 </xsl:template>
107
108</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.