Skip to content

Commit

Permalink
update overview template
Browse files Browse the repository at this point in the history
bug fix nav bar
create a new navigation without search form
add js files sample in custom
  • Loading branch information
hduchesne committed Jan 6, 2020
1 parent 8a7dba3 commit 9e47dac
Show file tree
Hide file tree
Showing 18 changed files with 1,096 additions and 863 deletions.
64 changes: 62 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,70 @@
# industrial

This module is a jahia ready to use implementation of the free template [industrial](https://colorlib.com/wp/template/industrial/).
This template is based on the open source toolkit [Bootstrap 4](https://getbootstrap.com/docs/). This module include the standard bootstrap css.
This module is designed for marketers to create quickly and easily landing pages or microsites.
It contains a template, two pages sample and a collection of components :
* Carousel (2 types : heading and testimonial)

![](./src/main/resources/images/readme/100_component_carousel.png)

![](./src/main/resources/images/readme/101_component_carousel.png)

* Gallery image

![](./src/main/resources/images/readme/102_component_gallery.png)

* Features list

![](./src/main/resources/images/readme/104_component_features.png)

* Cards elements

![](./src/main/resources/images/readme/105_component_cards.png)

* Text and illustration

![](./src/main/resources/images/readme/103_component_text.png)

* Navigation bar
* Footer components (about, contact, navigation)
* ...


This module contains a Jahia ready to use implementation of the free template [industrial](https://colorlib.com/wp/template/industrial/), based on the open source toolkit [Bootstrap 4](https://getbootstrap.com/docs/).
Following the concept of bootstrap 4, the template can be modified or used as his.

## Install

Before to use this module you need to install the dependence.
boostrap-4
forms
jexperience...

##Create a new website using `industrial` template set

1. Goto `Administration` mode
1. Click `Web Projects` entry and click `CREATE` in the right panel

![Create a new web project](./src/main/resources/images/readme/000_create_new_site.png)

1. Fill the website name and key with the name you want and click NEXT

![Create a new web project](./src/main/resources/images/readme/001_create_new_site.png)

1. Select the template set `industrial`
1. Choose modules to be deployed :
1. `Bootstrap 4 Components` : this enable all default bootstrap 4 elements as the usefull `Layout and Grid`
1. `Jahia Google Analytics` : this enable the `Google Analytics site settings` entry used to include your google analytics tag (explained later)

![Create a new web project](./src/main/resources/images/readme/002_create_new_site.png)




##Google Analytics site settings
Jahia offer to you an easy way to include your google analytics tag in your html page. To configure this feature follow the steps
1. Goto `Edit Mode`
1. In `PAGES` menu right click your site name and click `Edit`
1. In the edit form goto `Options` section
1. Enable the `Google Analytics site settings` entry :
1. fill your *Google Analytics site ID*
1. (optional) update the cookie live time
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log("je suis un script chargé dans le bottom du body")
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log("je suis un script chargé dans le header")
1,759 changes: 902 additions & 857 deletions src/main/import/repository.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
<c:set var="recursive" value="true"/>
</c:if>
<c:set var="root" value="${currentNode.properties.root.string}"/>
<c:set var="curentPageNode" value="${jcr:getMeAndParentsOfType(renderContext.mainResource.node,'jnt:page')}"/>
<c:set var="curentPageNode" value="${renderContext.mainResource.node}"/>
<c:if test="${! jcr:isNodeType(curentPageNode,'jmix:navMenuItem')}">
<c:set var="curentPageNode" value="${jcr:getParentOfType(curentPageNode, 'jmix:navMenuItem')}"/>
</c:if>

<c:choose>
<c:when test="${root eq 'currentPage'}">
<c:set var="rootNode" value="${curentPageNode}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@

<c:set var="root" value="${currentNode.properties.root.string}"/>
<c:set var="curentPageNode" value="${renderContext.mainResource.node}"/>
<c:if test="${! jcr:isNodeType(curentPageNode,'jmix:navMenuItem')}">
<c:set var="curentPageNode" value="${jcr:getParentOfType(curentPageNode, 'jmix:navMenuItem')}"/>
</c:if>

<c:choose>
<c:when test="${root eq 'currentPage'}">
Expand Down Expand Up @@ -87,7 +90,7 @@

<div class="navbar-nav ml-auto">
<form method="post" class="search-form">
<span class="icon ion ion-search"></span>
<span class="icon ion ion-md-search"></span>
<input type="text" class="form-control" placeholder="Search...">
</form>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<%@ taglib prefix="jcr" uri="http://www.jahia.org/tags/jcr" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="template" uri="http://www.jahia.org/tags/templateLib" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%--@elvariable id="currentNode" type="org.jahia.services.content.JCRNodeWrapper"--%>
<%--@elvariable id="renderContext" type="org.jahia.services.render.RenderContext"--%>

<template:addResources type="css" resources="bootstrap.min.css"/>
<template:addResources type="javascript" resources="jquery.min.js"/>
<template:addResources type="javascript" resources="popper.min.js"/>
<template:addResources type="javascript" resources="bootstrap.min.js"/>

<c:set var="siteNode" value="${renderContext.site}"/>
<c:choose>
<c:when test="${jcr:isNodeType(siteNode, 'bootstrap4mix:siteBrand')}">
<c:set var="brandImage" value="${siteNode.properties.brandImage.node}"/>
<c:set var="brandText" value="${siteNode.properties.brandText.string}"/>
</c:when>
<c:when test="${jcr:isNodeType(currentNode, 'bootstrap4mix:brand')}">
<c:set var="brandImage" value="${currentNode.properties.brandImage.node}"/>
<c:set var="brandText" value="${currentNode.properties.brandText.string}"/>
</c:when>
</c:choose>

<c:if test="${jcr:isNodeType(currentNode, 'bootstrap4mix:customButtonNavbar')}">
<c:set var="buttonClass" value="${currentNode.properties.buttonClass.string}"/>
</c:if>

<c:if test="${empty buttonClass}">
<c:set var="buttonClass" value="navbar-toggler navbar-toggler-right"/>
</c:if>

<c:if test="${jcr:isNodeType(currentNode, 'bootstrap4mix:advancedNavbar')}">
<c:set var="navClass" value="${currentNode.properties.navClass.string}"/>
<c:set var="divClass" value="${currentNode.properties.divClass.string}"/>
<c:set var="addContainerWithinTheNavbar" value="${currentNode.properties.addContainerWithinTheNavbar.boolean}"/>
<c:set var="addLoginButton" value="${currentNode.properties.addLoginButton.boolean}"/>
</c:if>
<c:if test="${empty navClass}">
<c:set var="navClass" value="navbar navbar-expand-lg navbar-light bg-light"/>
</c:if>
<c:if test="${empty divClass}">
<c:set var="divClass" value="collapse navbar-collapse"/>
</c:if>
<c:if test="${empty addContainerWithinTheNavbar}">
<c:set var="addContainerWithinTheNavbar" value="false"/>
</c:if>
<c:if test="${empty addLoginButton}">
<c:set var="addLoginButton" value="false"/>
</c:if>

<c:set var="root" value="${currentNode.properties.root.string}"/>
<c:set var="curentPageNode" value="${renderContext.mainResource.node}"/>
<c:if test="${! jcr:isNodeType(curentPageNode,'jmix:navMenuItem')}">
<c:set var="curentPageNode" value="${jcr:getParentOfType(curentPageNode, 'jmix:navMenuItem')}"/>
</c:if>

<c:choose>
<c:when test="${root eq 'currentPage'}">
<c:set var="rootNode" value="${curentPageNode}"/>
</c:when>
<c:when test="${root eq 'parentPage'}">
<c:set var="rootNode" value="${curentPageNode.parent}"/>
</c:when>
<c:otherwise>
<c:set var="rootNode" value="${renderContext.site.home}"/>
</c:otherwise>
</c:choose>
<nav class="${navClass}">
<c:if test="${addContainerWithinTheNavbar}">
<div class="container-fluid">
</c:if>
<c:url var="rootNodeUrl" value="${rootNode.url}"/>
<a class="navbar-brand" href="${rootNodeUrl}">
<c:if test="${! empty brandImage}">
<c:url var="brandImageUrl" value="${brandImage.url}"/>
<img src="${brandImageUrl}" class="d-inline-block align-top" alt="">
</c:if>
${brandText}
</a>

<button class="${buttonClass}" type="button" data-toggle="collapse"
data-target="#navbar-${currentNode.identifier}" aria-controls="navbar-${currentNode.identifier}"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

<div class="${divClass}" id="navbar-${currentNode.identifier}">
<template:include view="basenav"/>

<div class="navbar-nav ml-auto">
<span style="min-width: 276px;">&nbsp;</span>
<%-- <form method="post" class="search-form">--%>
<%-- <span class="icon ion ion-search"></span>--%>
<%-- <input type="text" class="form-control" placeholder="Search...">--%>
<%-- </form>--%>
</div>

<c:if test="${addLoginButton}">
<template:include view="hidden.login"/>
</c:if>
</div>
<c:if test="${addContainerWithinTheNavbar}">
</div>
</c:if>
</nav>
2 changes: 1 addition & 1 deletion src/main/resources/css/edit.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}

.j-owl-carousel-card-edit{
margin: 0 .5rem;
margin: .5rem 0 0 .5rem;
width: 18rem;
}
.j-owl-carousel-card-edit .card-body{
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 14 additions & 1 deletion src/main/resources/jnt_template/html/template.industrial.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,20 @@
<template:area path="header-container"/>
<div class="top-shadow ${renderContext.editMode?'edit':''}"></div>
<template:area path="page-content"/>
<template:area path="footer-container"/>
<footer class="site-footer" role="contentinfo">
<div class="container">
<template:area path="footer-container"/>
<div class="row">
<div class="col-12 text-md-center text-left">
<p class="copyright">
<!-- Link back to Colorlib can't be removed. Template is licensed under CC BY 3.0. -->
Copyright &copy;<script>document.write(new Date().getFullYear());</script> All rights reserved | This template is made with <i class="fa fa-heart text-danger" aria-hidden="true"></i> by <a href="https://colorlib.com" target="_blank" >Colorlib</a>
<!-- Link back to Colorlib can't be removed. Template is licensed under CC BY 3.0. -->
</p>
</div>
</div>
</div>
</footer>

<%-- <template:addResources type="javascript" resources="jquery-3.3.1.min.js" targetTag="body"/>--%>
<%-- <template:addResources type="javascript" resources="popper.min.js" targetTag="body"/>--%>
Expand Down

0 comments on commit 9e47dac

Please sign in to comment.