src/main/webapp/WEB-INF/jsp/site.jsp

Mon, 09 Aug 2021 16:57:56 +0200

author
Mike Becker <universe@uap-core.de>
date
Mon, 09 Aug 2021 16:57:56 +0200
changeset 217
a5ad7cd5d000
parent 213
5b55a5318a83
child 219
556c03f1dd4e
permissions
-rw-r--r--

#104 changes base layout from fixed to grid

     1 <%-- 
     2 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     4 Copyright 2021 Mike Becker. All rights reserved.
     6 Redistribution and use in source and binary forms, with or without
     7 modification, are permitted provided that the following conditions are met:
     9 1. Redistributions of source code must retain the above copyright
    10 notice, this list of conditions and the following disclaimer.
    12 2. Redistributions in binary form must reproduce the above copyright
    13 notice, this list of conditions and the following disclaimer in the
    14 documentation and/or other materials provided with the distribution.
    16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    17 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    18 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    19 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
    20 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    21 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
    22 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
    23 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    24 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    25 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    26 --%>
    27 <%@page contentType="text/html" pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %>
    28 <%@page import="de.uapcore.lightpit.Constants" %>
    29 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    30 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
    31 <%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
    33 <%-- Version suffix for forcing browsers to update the CSS / JS files --%>
    34 <c:set scope="page" var="versionSuffix" value="20210809b"/>
    36 <%-- Make the base href easily available at request scope --%>
    37 <c:set scope="page" var="baseHref" value="${requestScope[Constants.REQ_ATTR_BASE_HREF]}"/>
    39 <%-- The feed URL for this page. --%>
    40 <c:set scope="page" var="feedHref" value="${requestScope[Constants.REQ_ATTR_FEED_HREF]}"/>
    42 <%-- Define an alias for the request path --%>
    43 <c:set scope="page" var="requestPath" value="${requestScope[Constants.REQ_ATTR_PATH]}"/>
    45 <%-- Define an alias for the navigation menu --%>
    46 <c:set scope="page" var="navMenu" value="${requestScope[Constants.REQ_ATTR_NAVIGATION]}"/>
    48 <%-- Define an alias for the custom page title --%>
    49 <c:set scope="page" var="pageTitle" value="${requestScope[Constants.REQ_ATTR_PAGE_TITLE]}"/>
    51 <%-- Define an alias for the content page name --%>
    52 <c:set scope="page" var="contentPage" value="${requestScope[Constants.REQ_ATTR_CONTENT_PAGE]}"/>
    54 <%-- Define an alias for the optional redirect location --%>
    55 <c:set scope="page" var="redirectLocation" value="${requestScope[Constants.REQ_ATTR_REDIRECT_LOCATION]}"/>
    57 <%-- Define an alias for the additional stylesheet --%>
    58 <c:set scope="page" var="extraCss" value="${requestScope[Constants.REQ_ATTR_STYLESHEET]}"/>
    60 <%-- Define an alias for the optional JS file --%>
    61 <c:set scope="page" var="javascriptFile" value="${requestScope[Constants.REQ_ATTR_JAVASCRIPT]}"/>
    63 <%-- Load resource bundle --%>
    64 <fmt:setLocale scope="request" value="${pageContext.response.locale}"/>
    65 <fmt:setBundle scope="request" basename="localization.strings"/>
    67 <!DOCTYPE html>
    68 <html>
    69 <head>
    70     <base href="${baseHref}">
    71     <title>
    72         LightPIT
    73         <c:if test="${not empty pageTitle}"> - <c:out value="${pageTitle}"/></c:if>
    74     </title>
    75     <meta charset="UTF-8">
    76     <c:if test="${not empty redirectLocation}">
    77         <meta http-equiv="refresh" content="0; URL=${redirectLocation}">
    78     </c:if>
    79     <link rel="stylesheet" href="lightpit.css?v=${versionSuffix}" type="text/css">
    80     <c:if test="${not empty feedHref}">
    81         <link rel="alternate" type="application/rss+xml" title="RSS Feed" href="${feedHref}"/>
    82     </c:if>
    83     <c:if test="${not empty extraCss}">
    84         <c:forEach items="${extraCss}" var="cssFile">
    85             <link rel="stylesheet" href="${cssFile}?v=${versionSuffix}" type="text/css">
    86         </c:forEach>
    87     </c:if>
    88     <c:if test="${not empty javascriptFile}">
    89         <script src="${javascriptFile}?v=${versionSuffix}" type="text/javascript"></script>
    90     </c:if>
    91 </head>
    92 <body>
    93     <div id="body-area">
    94         <div id="mainMenu">
    95             <div class="menuEntry"
    96                  <c:if test="${fn:startsWith(requestPath, '/projects/')}">data-active</c:if> >
    97                 <a href="projects/">
    98                     <fmt:message key="menu.projects"/>
    99                 </a>
   100             </div>
   101             <div class="menuEntry"
   102                  <c:if test="${fn:startsWith(requestPath, '/users/')}">data-active</c:if> >
   103                 <a href="users/">
   104                     <fmt:message key="menu.users"/>
   105                 </a>
   106             </div>
   107             <div class="menuEntry"
   108                  <c:if test="${fn:startsWith(requestPath, '/language/')}">data-active</c:if> >
   109                 <a href="language/">
   110                     <fmt:message key="menu.languages"/>
   111                 </a>
   112             </div>
   113             <div class="menuEntry"
   114                  <c:if test="${fn:startsWith(requestPath, '/about/')}">data-active</c:if> >
   115                 <a href="about/">
   116                     <fmt:message key="menu.about"/>
   117                 </a>
   118             </div>
   119         </div>
   120         <c:if test="${not empty navMenu}">
   121             <div id="sideMenu">
   122                 <%@include file="../jspf/navmenu.jspf" %>
   123             </div>
   124         </c:if>
   125         <div id="content-area">
   126             <c:import url="${contentPage}"/>
   127         </div>
   128     </div>
   129 </body>
   130 </html>

mercurial