Skip to content

Commit

Permalink
Merge pull request #142 from tdrwenski/add-template-fragments
Browse files Browse the repository at this point in the history
Add custom template fragments
  • Loading branch information
haileyajohnson authored Mar 25, 2024
2 parents fb7c073 + 6ffb7bc commit ba3e8de
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 13 deletions.
37 changes: 37 additions & 0 deletions thredds/templates/tdsTemplateFragments.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>TDS custom template fragments</title>
</head>

<body>

<div th:fragment="banner" class="banner">
<h2>
Welcome to the NSF Unidata THREDDS Data Server!
</h2>
</div>

<div th:fragment="footer">
<div class="footer-buffer"></div>
<div class="footer">
<h4>
<a class="static" th:href="${installUrl}" th:text="${installName}"></a> at <a class="static" th:href="${hostInstUrl}" th:text="${hostInst}"></a> see <a class="static" th:href="${contextPath} + '/info/serverInfo.html'"> Info </a></h4>

<h4><th:block th:text="${webappName} + ' [Version ' + ${webappVersion} + ' - ' + ${webappBuildTimestamp} + ']'"/></h4>

<h4>
<a class="static" href="https://docs.unidata.ucar.edu/tds/current/userguide/index.html">TDS Documentation</a>&nbsp;&nbsp;&#124;&nbsp;&nbsp;
<a class="static" href="https://www.unidata.ucar.edu/data/web_scraping.html">Web Scraping Policy</a>&nbsp;&nbsp;&#124;&nbsp;&nbsp;
<a class="static" href="https://ucar.edu/privacy-notice">Privacy Policy</a>&nbsp;&nbsp;&#124;&nbsp;&nbsp;
<a class="static" href="https://ucar.edu/terms-of-use">Terms Of Use</a>&nbsp;&nbsp;&#124;&nbsp;&nbsp;
<a class="static" href="https://ucar.edu/accessibility">Accessibility</a>&nbsp;&nbsp;&#124;&nbsp;&nbsp;
<a class="static" href="https://www.unidata.ucar.edu/data/guidelines.html">Guidelines for Data Use</a>
</h4>
</div>
</div>

</body>

</html>
29 changes: 16 additions & 13 deletions threddsDev/templates/tdsTemplateFragments.html
Original file line number Diff line number Diff line change
@@ -1,34 +1,37 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
<head>
<meta charset="UTF-8">
<title>TDS custom template fragments</title>
</head>
</head>


<body>

<!-- place customized Thymeleaf template fragments here -->
<body>

<div th:fragment="banner" class="banner">
<h2>
Welcome to the Unidata Development THREDDS Data Server!
Welcome to the NSF Unidata Development THREDDS Data Server!
</h2>
</div>

<div th:fragment="footer">
<div class="footer-buffer"></div>
<div class="footer">
<h4>
<a class="static" th:href="${installUrl}" th:text="${installName}"></a> at <a class="static" th:href="${hostInstUrl}" th:text="${hostInst}"></a> see <a class="static" th:href="${contextPath} + '/info/serverInfo.html'"> Info </a></h4>
<a class="static" th:href="${installUrl}" th:text="${installName}"></a> at <a class="static" th:href="${hostInstUrl}" th:text="${hostInst}"></a> see <a class="static" th:href="${contextPath} + '/info/serverInfo.html'"> Info </a></h4>

<h4><th:block th:text="${webappName} + ' [Version ' + ${webappVersion} + ' - ' + ${webappBuildTimestamp} + ']'"/></h4>

<h4><th:block th:text="${webappName} + ' [Version ' + ${webappVersion} + ' - ' + ${webappBuildTimestamp} + ']'"/><a class="static" href="https://docs.unidata.ucar.edu/thredds/5.0.0-SNAPSHOT/userguide/index.html"> Documentation</a></h4>


<h4><a class="static" href="https://www2.ucar.edu/privacy-policy">privacy policy</a>&nbsp;&nbsp;&nbsp;&nbsp;<a class="static" href="https://www2.ucar.edu/terms-of-use">terms of use</a></h4>
<h4>
<a class="static" href="https://docs.unidata.ucar.edu/tds/current/userguide/index.html">TDS Documentation</a>&nbsp;&nbsp;&#124;&nbsp;&nbsp;
<a class="static" href="https://www.unidata.ucar.edu/data/web_scraping.html">Web Scraping Policy</a>&nbsp;&nbsp;&#124;&nbsp;&nbsp;
<a class="static" href="https://ucar.edu/privacy-notice">Privacy Policy</a>&nbsp;&nbsp;&#124;&nbsp;&nbsp;
<a class="static" href="https://ucar.edu/terms-of-use">Terms Of Use</a>&nbsp;&nbsp;&#124;&nbsp;&nbsp;
<a class="static" href="https://ucar.edu/accessibility">Accessibility</a>&nbsp;&nbsp;&#124;&nbsp;&nbsp;
<a class="static" href="https://www.unidata.ucar.edu/data/guidelines.html">Guidelines for Data Use</a>
</h4>
</div>
</div>

</body>
</body>

</html>
37 changes: 37 additions & 0 deletions threddsTest/templates/tdsTemplateFragments.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>TDS custom template fragments</title>
</head>

<body>

<div th:fragment="banner" class="banner">
<h2>
Welcome to the NSF Unidata Test THREDDS Data Server!
</h2>
</div>

<div th:fragment="footer">
<div class="footer-buffer"></div>
<div class="footer">
<h4>
<a class="static" th:href="${installUrl}" th:text="${installName}"></a> at <a class="static" th:href="${hostInstUrl}" th:text="${hostInst}"></a> see <a class="static" th:href="${contextPath} + '/info/serverInfo.html'"> Info </a></h4>

<h4><th:block th:text="${webappName} + ' [Version ' + ${webappVersion} + ' - ' + ${webappBuildTimestamp} + ']'"/></h4>

<h4>
<a class="static" href="https://docs.unidata.ucar.edu/tds/current/userguide/index.html">TDS Documentation</a>&nbsp;&nbsp;&#124;&nbsp;&nbsp;
<a class="static" href="https://www.unidata.ucar.edu/data/web_scraping.html">Web Scraping Policy</a>&nbsp;&nbsp;&#124;&nbsp;&nbsp;
<a class="static" href="https://ucar.edu/privacy-notice">Privacy Policy</a>&nbsp;&nbsp;&#124;&nbsp;&nbsp;
<a class="static" href="https://ucar.edu/terms-of-use">Terms Of Use</a>&nbsp;&nbsp;&#124;&nbsp;&nbsp;
<a class="static" href="https://ucar.edu/accessibility">Accessibility</a>&nbsp;&nbsp;&#124;&nbsp;&nbsp;
<a class="static" href="https://www.unidata.ucar.edu/data/guidelines.html">Guidelines for Data Use</a>
</h4>
</div>
</div>

</body>

</html>

0 comments on commit ba3e8de

Please sign in to comment.