This is an automated email from the ASF dual-hosted git repository. jeb pushed a commit to branch SLING-7858 in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git
commit be68da91d683b318d42a36465ee5945ffb31d920 Author: JE Bailey <[email protected]> AuthorDate: Mon Aug 27 08:52:24 2018 -0400 initial changes to support bulma --- .../cms/contentbreadcrumb/contentbreadcrumb.jsp | 55 ++++++++-------- .../components/cms/contentnav/contentnav.jsp | 62 +++++++++--------- .../components/cms/contenttable/contenttable.jsp | 74 +++++++++++----------- .../components/cms/staticnav/staticnav.jsp | 20 +++--- .../libs/sling-cms/components/pages/base/body.jsp | 36 ++++++----- .../libs/sling-cms/components/pages/base/nav.jsp | 28 +++++--- 6 files changed, 148 insertions(+), 127 deletions(-) diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentbreadcrumb/contentbreadcrumb.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentbreadcrumb/contentbreadcrumb.jsp index 651fc93..4e7d055 100644 --- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentbreadcrumb/contentbreadcrumb.jsp +++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentbreadcrumb/contentbreadcrumb.jsp @@ -18,30 +18,33 @@ */ --%> <%@include file="/libs/sling-cms/global.jsp"%> <sling:getParent resource="${slingRequest.requestPathInfo.suffixResource}" var="root" level="${resource.valueMap.depth}" /> -<ul class="Breadcrumb"> - <li class="Breadcrumb-Item"> - <a href="${resource.valueMap.prefix}${root.path}"> - <sling:encode value="${root.valueMap['jcr:title'] != null ? root.valueMap['jcr:title'] : root.valueMap['jcr:content/jcr:title']}" default="${root.name}" mode="HTML" /> - </a> - </li> - <c:if test="${site.path != slingRequest.requestPathInfo.suffix && site.path != slingRequest.requestPathInfo.suffixResource.parent.path}"> - <c:forEach var="parent" items="${sling:getParents(slingRequest.requestPathInfo.suffixResource,(resource.valueMap.depth + 1))}"> - <li class="Breadcrumb-Item"> - <a href="${resource.valueMap.prefix}${parent.path}"> - <sling:encode value="${parent.valueMap['jcr:title'] != null ? parent.valueMap['jcr:title'] : parent.valueMap['jcr:content/jcr:title']}" default="${parent.name}" mode="HTML" /> - </a> - </li> - </c:forEach> - </c:if> - <c:if test="${root.path != slingRequest.requestPathInfo.suffix}"> - <li class="Breadcrumb-Item"> - <sling:encode value="${slingRequest.requestPathInfo.suffixResource.valueMap['jcr:title'] != null ? slingRequest.requestPathInfo.suffixResource.valueMap['jcr:title'] : slingRequest.requestPathInfo.suffixResource.valueMap['jcr:content/jcr:title']}" default="${slingRequest.requestPathInfo.suffixResource.name}" mode="HTML" /> - </li> - </c:if> - <li class="Pull-Right"> - <form method="get" class="content-filter"> - <label for="filter" class="Hide">Filter</label> - <input type="text" placeholder="Filter..." /> - </form> - </li> +<span class="breadcrumb has-bullet-separator" aria-label="breadcrumbs"> +<ul> + <li> + <a href="${resource.valueMap.prefix}${root.path}"> + <sling:encode value="${root.valueMap['jcr:title'] != null ? root.valueMap['jcr:title'] : root.valueMap['jcr:content/jcr:title']}" default="${root.name}" mode="HTML" /> + </a> + </li> + <c:if test="${site.path != slingRequest.requestPathInfo.suffix && site.path != slingRequest.requestPathInfo.suffixResource.parent.path}"> + <c:forEach var="parent" items="${sling:getParents(slingRequest.requestPathInfo.suffixResource,(resource.valueMap.depth + 1))}"> + <li> + <a href="${resource.valueMap.prefix}${parent.path}"> + <sling:encode value="${parent.valueMap['jcr:title'] != null ? parent.valueMap['jcr:title'] : parent.valueMap['jcr:content/jcr:title']}" default="${parent.name}" mode="HTML" /> + </a> + </li> + </c:forEach> + </c:if> + <c:if test="${root.path != slingRequest.requestPathInfo.suffix}"> + <li class="is-active"> + <a href="#"> + <sling:encode value="${slingRequest.requestPathInfo.suffixResource.valueMap['jcr:title'] != null ? slingRequest.requestPathInfo.suffixResource.valueMap['jcr:title'] : slingRequest.requestPathInfo.suffixResource.valueMap['jcr:content/jcr:title']}" default="${slingRequest.requestPathInfo.suffixResource.name}" mode="HTML" /> + </a> + </li> + </c:if> + <li> + <form method="get" class="content-filter"> + <label for="filter" class="Hide">Filter</label> + <input type="text" placeholder="Filter..." /> + </form> + </li> </ul> diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentnav/contentnav.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentnav/contentnav.jsp index d306ac4..71b693b 100644 --- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentnav/contentnav.jsp +++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentnav/contentnav.jsp @@ -18,33 +18,35 @@ */ --%> <%@include file="/libs/sling-cms/global.jsp"%> <sling:findResources var="content" query="${properties.query}" language="JCR-SQL2" /> -<h3 class="Nav-Header Toggle-Hidden" data-target="#Nav-${fn:replace(properties.title,' ','-')}">${properties.title}</h3> -<ul class="Nav ${fn:startsWith(slingRequest.requestURI, properties.prefix) ? '' : 'Hide'}" id="Nav-${fn:replace(properties.title,' ','-')}"> - <c:forEach var="item" items="${content}"> - <c:set var="prefixPath" value="${item.path}/" /> - <li class="Nav-Item ${(fn:startsWith(slingRequest.requestPathInfo.suffix, prefixPath) || slingRequest.requestPathInfo.suffix == item.path) ? 'Active' : ''}"> - <a href="${properties.itemPrefix}${item.path}" title="View ${item.valueMap['jcr:title']}"> - <c:choose> - <c:when test="${sling:getRelativeResource(item,'jcr:content') != null}"> - <sling:encode value="${sling:getRelativeResource(item,'jcr:content').valueMap['jcr:title']}" mode="HTML" /> - </c:when> - <c:when test="${not empty item.valueMap['jcr:title']}"> - <sling:encode value="${item.valueMap['jcr:title']}" mode="HTML" /> - </c:when> - <c:otherwise> - <sling:encode value="${item.name}" mode="HTML" /> - </c:otherwise> - </c:choose> - </a> - </li> - </c:forEach> - <c:choose> - <c:when test="${not empty properties.createTitle}"> - <c:set var="createTitle" value="${properties.createTitle}" /> - </c:when> - <c:otherwise> - <c:set var="createTitle" value="${properties.title}" /> - </c:otherwise> - </c:choose> - <li class="Nav-Item"><a href="${properties.createPath}" title="Create a new ${createTitle}" class="Fetch-Modal" data-title="Create ${createTitle}" data-path=".Main-Content form">+ ${createTitle}</a></li> -</ul> \ No newline at end of file +<aside class="container is-fluid menu"> +<a class="menu-label Toggle-Hidden" data-target="#Nav-${fn:replace(properties.title,' ','-')}">${properties.title}</a> +<ul class="menu-list ${fn:startsWith(slingRequest.requestURI, properties.prefix) ? '' : 'Hide'}" id="Nav-${fn:replace(properties.title,' ','-')}"> + <c:forEach var="item" items="${content}"> + <c:set var="prefixPath" value="${item.path}/" /> + <li class="${(fn:startsWith(slingRequest.requestPathInfo.suffix, prefixPath) || slingRequest.requestPathInfo.suffix == item.path) ? 'is-active' : ''}"> + <a href="${properties.itemPrefix}${item.path}" title="View ${item.valueMap['jcr:title']}"> + <c:choose> + <c:when test="${sling:getRelativeResource(item,'jcr:content') != null}"> + <sling:encode value="${sling:getRelativeResource(item,'jcr:content').valueMap['jcr:title']}" mode="HTML" /> + </c:when> + <c:when test="${not empty item.valueMap['jcr:title']}"> + <sling:encode value="${item.valueMap['jcr:title']}" mode="HTML" /> + </c:when> + <c:otherwise> + <sling:encode value="${item.name}" mode="HTML" /> + </c:otherwise> + </c:choose> + </a> + </li> + </c:forEach> + <c:choose> + <c:when test="${not empty properties.createTitle}"> + <c:set var="createTitle" value="${properties.createTitle}" /> + </c:when> + <c:otherwise> + <c:set var="createTitle" value="${properties.title}" /> + </c:otherwise> + </c:choose> + <li><a href="${properties.createPath}" title="Create a new ${createTitle}" data-title="Create ${createTitle}" data-path=".Main-Content form"><span class="icon is-small"><i class="jam jam-plus"></i></a></li> +</ul> +</aside> \ No newline at end of file diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contenttable/contenttable.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contenttable/contenttable.jsp index 9b4d233..9a19fdf 100644 --- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contenttable/contenttable.jsp +++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contenttable/contenttable.jsp @@ -17,41 +17,41 @@ * under the License. */ --%> <%@include file="/libs/sling-cms/global.jsp"%> -<table class="sortable"> - <thead> - <tr> - <th class="sortable__header Col-id" data-attribute="id"> - # - <span class="sortable__indicator"></span> - </th> - <c:forEach var="column" items="${sling:listChildren(sling:getRelativeResource(resource,'columns'))}"> - <th class="${column.name == 'actions' ? 'Hide' : '' } sortable__header Col-${column.name}" data-attribute="${column.name}"> - <sling:encode value="${column.valueMap.title}" mode="HTML" /> - <span class="sortable__indicator"></span> - </th> - </c:forEach> - </tr> - </thead> - <tbody> - <c:set var="parentPath" value="${slingRequest.requestPathInfo.suffix}${not empty properties.appendSuffix ? properties.appendSuffix : ''}" /> - <c:set var="count" value="1" /> - <c:forEach var="child" items="${sling:listChildren(sling:getResource(resourceResolver, parentPath))}"> - <sling:getResource var="typeConfig" base="${resource}" path="types/${child.valueMap['jcr:primaryType']}" /> - <c:if test="${typeConfig != null && !fn:contains(child.name,':')}"> - <tr class="sortable__row" data-resource="${child.path}" data-type="${typeConfig.path}"> - <td class="Cell-Static" title="# ${status.index + 1}}" data-sort-value="<fmt:formatNumber pattern="0000" value="${count}" />"> - ${count} - </td> - <c:forEach var="column" items="${sling:listChildren(sling:getRelativeResource(typeConfig,'columns'))}"> - <c:set var="configPath" value="columns/${column.name}"/> - <c:set var="colConfig" value="${sling:getRelativeResource(typeConfig,configPath)}" scope="request" /> - <c:if test="${colConfig != null}"> - <sling:include path="${child.path}" resourceType="${colConfig.valueMap['sling:resourceType']}" /> - </c:if> - </c:forEach> - </tr> - <c:set var="count" value="${count + 1}" /> - </c:if> - </c:forEach> - </tbody> +<table class="sortable table"> + <thead> + <tr> + <th class="sortable__header Col-id" data-attribute="id"> + # + <span class="sortable__indicator"></span> + </th> + <c:forEach var="column" items="${sling:listChildren(sling:getRelativeResource(resource,'columns'))}"> + <th class="${column.name == 'actions' ? 'Hide' : '' } sortable__header Col-${column.name}" data-attribute="${column.name}"> + <sling:encode value="${column.valueMap.title}" mode="HTML" /> + <span class="sortable__indicator"></span> + </th> + </c:forEach> + </tr> + </thead> + <tbody> + <c:set var="parentPath" value="${slingRequest.requestPathInfo.suffix}${not empty properties.appendSuffix ? properties.appendSuffix : ''}" /> + <c:set var="count" value="1" /> + <c:forEach var="child" items="${sling:listChildren(sling:getResource(resourceResolver, parentPath))}"> + <sling:getResource var="typeConfig" base="${resource}" path="types/${child.valueMap['jcr:primaryType']}" /> + <c:if test="${typeConfig != null && !fn:contains(child.name,':')}"> + <tr class="sortable__row" data-resource="${child.path}" data-type="${typeConfig.path}"> + <td class="Cell-Static" title="# ${status.index + 1}}" data-sort-value="<fmt:formatNumber pattern="0000" value="${count}" />"> + ${count} + </td> + <c:forEach var="column" items="${sling:listChildren(sling:getRelativeResource(typeConfig,'columns'))}"> + <c:set var="configPath" value="columns/${column.name}"/> + <c:set var="colConfig" value="${sling:getRelativeResource(typeConfig,configPath)}" scope="request" /> + <c:if test="${colConfig != null}"> + <sling:include path="${child.path}" resourceType="${colConfig.valueMap['sling:resourceType']}" /> + </c:if> + </c:forEach> + </tr> + <c:set var="count" value="${count + 1}" /> + </c:if> + </c:forEach> + </tbody> </table> \ No newline at end of file diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/staticnav/staticnav.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/staticnav/staticnav.jsp index 9e77c0d..14fc237 100644 --- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/staticnav/staticnav.jsp +++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/staticnav/staticnav.jsp @@ -17,15 +17,17 @@ * under the License. */ --%> <%@include file="/libs/sling-cms/global.jsp"%> -<h3 class="Nav-Header Toggle-Hidden" data-target="#${fn:replace(properties.title,' ','-')}-Nav">${properties.title}</h3> +<div class="container is-fluid menu"> +<a class="menu-label Toggle-Hidden" data-target="#${fn:replace(properties.title,' ','-')}-Nav">${properties.title}</a> <c:set var="hidden" value="Hide" /> <c:forEach var="item" items="${sling:listChildren(sling:getRelativeResource(resource,'links'))}"> - <c:if test="${fn:startsWith(slingRequest.requestURI,item.valueMap.link)}"> - <c:set var="hidden" value="" /> - </c:if> + <c:if test="${fn:startsWith(slingRequest.requestURI,item.valueMap.link)}"> + <c:set var="hidden" value="" /> + </c:if> </c:forEach> -<ul id="${fn:replace(properties.title,' ','-')}-Nav" class="${hidden}"> - <c:forEach var="item" items="${sling:listChildren(sling:getRelativeResource(resource,'links'))}"> - <li class="Nav-Item ${fn:startsWith(slingRequest.requestURI,item.valueMap.link) ? 'active' : ''}"><a href="${item.valueMap.link}">${item.valueMap.text}</a></li> - </c:forEach> -</ul> \ No newline at end of file +<ul id="${fn:replace(properties.title,' ','-')}-Nav" class="menu-list ${hidden}"> + <c:forEach var="item" items="${sling:listChildren(sling:getRelativeResource(resource,'links'))}"> + <li class="${fn:startsWith(slingRequest.requestURI,item.valueMap.link) ? 'active' : ''}"><a href="${item.valueMap.link}">${item.valueMap.text}</a></li> + </c:forEach> +</ul> +</div> \ No newline at end of file diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/base/body.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/base/body.jsp index e3e0d19..51770c1 100644 --- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/base/body.jsp +++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/base/body.jsp @@ -17,20 +17,24 @@ * under the License. */ --%> <%@include file="/libs/sling-cms/global.jsp"%> -<body class="cms"> - <div class="Grid Fit-Small Home-Grid"> - <div class="Gradient"></div> - <nav class="Cell Cell-Pad Small-20"> - <sling:call script="nav.jsp" /> - </nav> - <div class="Cell Small-5"></div> - <div class="Cell Main-Content ${properties.center ? 'Align-Center' : '' }"> - <div class="Grid"> - <main class="Cell Cell-Pad Small-100"> - <sling:call script="content.jsp" /> - </main> - </div> - </div> - </div> - <sling:call script="scripts.jsp" /> +<body class="layout-documentation page-components"> + <section class="container is-fluid"> + <sling:call script="nav.jsp" /> + </section> + <section class="container is-fluid"> + </section> + <section> + <div class="columns"> + <div class="column is-one-quarter"> + <sling:include path="/mnt/overlay/sling-cms/content/start/jcr:content/nav" resourceType="sling-cms/components/general/container" /> + </div> + <div class="column"> + <main> + <sling:call script="content.jsp" /> + </main> + </div> + </div> + </div> + </section> + <sling:call script="scripts.jsp" /> </body> \ No newline at end of file diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/base/nav.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/base/nav.jsp index 80e4b53..af0aea5 100644 --- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/base/nav.jsp +++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/base/nav.jsp @@ -16,14 +16,24 @@ * specific language governing permissions and limitations * under the License. */ --%> - <%@include file="/libs/sling-cms/global.jsp"%> -<a class="Cell-Pad" href="http://sling.apache.org" target="_blank" title="Visit the Apache Sling website"> - <img src="/static/clientlibs/sling-cms/img/sling-logo.svg" alt="Apache Sling Logo"/> +<%@include file="/libs/sling-cms/global.jsp"%> +<nav class="navbar" role="navigation" aria-label="main mavigation"> +<div class="navbar-brand"> +<a class="navbar-item" href="http://sling.apache.org" > + <img style="max-height:2rem" src="/static/clientlibs/sling-cms/img/sling-logo.svg" width="100" alt="Apache Sling"/> </a> -<h1> - <a href="/cms/start.html"> - CMS - </a> +<h1 class="navbar-item"> + <a href="/cms/start.html" title="CMS Home"><span class="icon"><i class="jam jam-home-f"></i></span></a> </h1> -<sling:include path="/mnt/overlay/sling-cms/content/start/jcr:content/nav" resourceType="sling-cms/components/general/container" /> -<div><a href="/system/sling/logout" title="Logout of Apache Sling">Logout, ${resourceResolver.userID}</a></div> \ No newline at end of file +<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false"> + <span aria-hidden="true"></span> + <span aria-hidden="true"></span> + <span aria-hidden="true"></span> +</a> +</div> +<div class="navbar-menu"> +<div class="navbar-end"> +<a class="navbar-item " href="/system/sling/logout" title="Logout of Apache Sling CMS"><i class="jam jam-log-out"></i><span> ${resourceResolver.userID}</span></a> +</div> +</div> +</nav> \ No newline at end of file
