some work on main page

This commit is contained in:
Ziver Koc 2018-08-14 12:14:59 +02:00
parent 0e70893ee5
commit 2c75feddfe
7 changed files with 72 additions and 58 deletions

View file

@ -1,7 +1,7 @@
<%@tag description="Header template" pageEncoding="UTF-8" %> <%@ tag description="Header template" pageEncoding="UTF-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="t" tagdir="/WEB-INF/tags" %> <%@ taglib prefix="t" tagdir="/WEB-INF/tags" %>
<%@attribute name=”showMessages” %> <%@ attribute name="showMessages" required="false" %>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
@ -10,24 +10,24 @@
<meta name="author" content="Ziver Koc"> <meta name="author" content="Ziver Koc">
<link rel="icon" href="favicon.ico"> <link rel="icon" href="favicon.ico">
<title>${WEBSITE_NAME}</title> <title>${WEBSITE_TITLE}</title>
<!-- Bootstrap core CSS --> <!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> <link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-theme.min.css"> <link rel="stylesheet" href="css/bootstrap-theme.min.css">
<link rel="stylesheet" href="css/form-elements.css">
<link rel="stylesheet" href="css/register3.css">
<link rel="stylesheet" href="css/zallery.css"> <link rel="stylesheet" href="css/zallery.css">
<!-- Bootstrap core JavaScript --> <!-- Bootstrap core JavaScript -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <script src="js/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <script src="js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.imagesloaded/3.1.8/imagesloaded.pkgd.min.js"></script> <script src="js/imagesloaded.pkgd.min.js"></script>
<script src="js/masonry.pkgd.min.js"></script> <script src="js/masonry.pkgd.min.js"></script>
<jsp:doBody /> <jsp:doBody />
</head> </head>
<body> <body>
<c:if test="${showMessages == null || showMessages == false}">
<t:messages /> <t:messages />
</c:if>

View file

@ -11,7 +11,7 @@
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
<a class="navbar-brand" href="#">Project name</a> <a class="navbar-brand" href="#">${WEBSITE_NAME}</a>
</div> </div>
<div class="navbar-collapse collapse"> <div class="navbar-collapse collapse">

View file

@ -1,22 +1,24 @@
<%@page contentType="text/html" pageEncoding="UTF-8"%> <%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="t" tagdir="/WEB-INF/tags" %> <%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
<t:header /> <t:header />
<t:navbar /> <div class="container">
<t:navbar />
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
$('.image-grid').imagesLoaded(function(){ $('.image-grid').imagesLoaded(function(){
$('.grid').masonry({ $('.grid').masonry({
itemSelector: '.grid-item', itemSelector: '.grid-item',
columnWidth: '.grid-item', columnWidth: '.grid-item',
}); });
}); });
}); });
</script> </script>
<div class="content"> <div class="content">
<div class="gallery col-center col-md-11"> <div class="gallery col-center col-md-11">
<div class="row"> <div class="row">
@ -41,6 +43,8 @@ $(function(){
</div> </div>
</div> <!-- /gallery --> </div> <!-- /gallery -->
</div> <!-- /content --> </div> <!-- /content -->
</div> <!-- /container -->
<t:footer /> <t:footer />

View file

@ -1,7 +1,11 @@
<%@page contentType="text/html" pageEncoding="UTF-8"%> <%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="t" tagdir="/WEB-INF/tags" %> <%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
<t:header />
<t:header>
<link rel="stylesheet" href="css/form-elements.css">
<link rel="stylesheet" href="css/register3.css">
</t:header>
<div class="container"> <div class="container">
<div class="row"> <div class="row">

View file

@ -1,7 +1,11 @@
<%@page contentType="text/html" pageEncoding="UTF-8"%> <%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="t" tagdir="/WEB-INF/tags" %> <%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
<t:header />
<t:header>
<link rel="stylesheet" href="css/form-elements.css">
<link rel="stylesheet" href="css/register3.css">
</t:header>
<div class="container"> <div class="container">
<div class="row"> <div class="row">

View file

@ -9,6 +9,7 @@ public interface ZalleryConstants {
/** Session Constants **/ /** Session Constants **/
public static String ENV_KEY_WEBSITE_TITLE = "WEBSITE_TITLE";
public static String ENV_KEY_WEBSITE_NAME = "WEBSITE_NAME"; public static String ENV_KEY_WEBSITE_NAME = "WEBSITE_NAME";
public static String ENV_KEY_WEBSITE_URL = "WEBSITE_URL"; public static String ENV_KEY_WEBSITE_URL = "WEBSITE_URL";
public static String ENV_KEY_ADMIN_EMAIL = "ADMIN_EMAIL"; public static String ENV_KEY_ADMIN_EMAIL = "ADMIN_EMAIL";

View file

@ -23,6 +23,7 @@ public abstract class ZalleryServlet extends HttpServlet {
public final void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException { public final void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException {
DBConnection db = null; DBConnection db = null;
try { try {
request.setAttribute(ENV_KEY_WEBSITE_TITLE, Zallery.WEBSITE_NAME);
request.setAttribute(ENV_KEY_WEBSITE_NAME, Zallery.WEBSITE_NAME); request.setAttribute(ENV_KEY_WEBSITE_NAME, Zallery.WEBSITE_NAME);
request.setAttribute(ENV_KEY_WEBSITE_URL, Zallery.WEBSITE_URL); request.setAttribute(ENV_KEY_WEBSITE_URL, Zallery.WEBSITE_URL);
request.setAttribute(ENV_KEY_ADMIN_NAME, Zallery.ADMIN_NAME); request.setAttribute(ENV_KEY_ADMIN_NAME, Zallery.ADMIN_NAME);