Rohan Sircar
5 years ago
33 changed files with 1316 additions and 197 deletions
-
0chatto/.attach_pid30353
-
1chatto/config/application.properties
-
1chatto/config/messages.properties
-
2chatto/message.properties
-
2chatto/messages.properties
-
40chatto/pom.xml
-
16chatto/src/main/java/org/ros/chatto/BeanConfigurations.java
-
15chatto/src/main/java/org/ros/chatto/ChattoApplication.java
-
2chatto/src/main/java/org/ros/chatto/RESTAuthenticationEntryPoint.java
-
73chatto/src/main/java/org/ros/chatto/WebSecurityConfiguration.java
-
47chatto/src/main/java/org/ros/chatto/config/CacheConfig.java
-
19chatto/src/main/java/org/ros/chatto/config/CustomCacheEventLogger.java
-
9chatto/src/main/java/org/ros/chatto/controller/ChatMessageController.java
-
26chatto/src/main/java/org/ros/chatto/controller/Home.java
-
5chatto/src/main/java/org/ros/chatto/model/ChatUser.java
-
3chatto/src/main/java/org/ros/chatto/repository/UserRoleRepository.java
-
138chatto/src/main/java/org/ros/chatto/security/MyUserDetailsService.java
-
54chatto/src/main/java/org/ros/chatto/service/DBInitializerService.java
-
6chatto/src/main/resources/application.properties
-
44chatto/src/main/resources/ehcache.xml
-
1chatto/src/main/resources/messages.properties
-
322chatto/src/main/resources/static/css/colors.css
-
128chatto/src/main/resources/static/css/master.css
-
BINchatto/src/main/resources/static/img/home.jpg
-
25chatto/src/main/resources/static/js/chat.js
-
22chatto/src/main/resources/static/js/chatStatic.js
-
17chatto/src/main/resources/templates/NewFile.html
-
111chatto/src/main/resources/templates/chat.html
-
34chatto/src/main/resources/templates/fragments/head.html
-
60chatto/src/main/resources/templates/fragments/navbar.html
-
112chatto/src/main/resources/templates/home.html
-
121chatto/src/main/resources/templates/login.html
-
57chatto/src/main/resources/templates/user/home.html
@ -0,0 +1 @@ |
|||
test.bindAddress=192.168.1.106 |
@ -0,0 +1,2 @@ |
|||
#Sat Oct 12 01:13:02 IST 2019 |
|||
test.bindAddress=192.168.1.106 |
@ -0,0 +1,2 @@ |
|||
#Sat Oct 12 01:15:41 IST 2019 |
|||
test.bindAddress=192.168.1.106 |
@ -0,0 +1,47 @@ |
|||
package org.ros.chatto.config; |
|||
|
|||
|
|||
import org.ros.chatto.security.MyUserDetailsService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.cache.Cache; |
|||
import org.springframework.cache.CacheManager; |
|||
import org.springframework.cache.annotation.Cacheable; |
|||
import org.springframework.cache.annotation.EnableCaching; |
|||
import org.springframework.context.annotation.Bean; |
|||
import org.springframework.context.annotation.Configuration; |
|||
import org.springframework.security.core.userdetails.UserCache; |
|||
import org.springframework.security.core.userdetails.cache.SpringCacheBasedUserCache; |
|||
|
|||
@EnableCaching |
|||
@Configuration |
|||
public class CacheConfig { |
|||
|
|||
@Autowired |
|||
private CacheManager cacheManager; |
|||
|
|||
|
|||
@Bean |
|||
public UserCache userCache() throws Exception { |
|||
// return new EhCacheBasedUserCache(); |
|||
// Cache cache = (Cache) cacheManager().getCache("userCache"); |
|||
Cache cache = cacheManager.getCache("chatUser"); |
|||
return new SpringCacheBasedUserCache(cache); |
|||
} |
|||
|
|||
// private net.sf.ehcache.CacheManager cacheManager; |
|||
|
|||
// @PreDestroy |
|||
// public void destroy() { |
|||
// cacheManager.shutdown(); |
|||
// } |
|||
// |
|||
// @Bean |
|||
// public CacheManager cacheManager() { |
|||
//// log.debug("Starting Ehcache"); |
|||
// cacheManager = net.sf.ehcache.CacheManager.create(); |
|||
// cacheManager.getConfiguration().setMaxBytesLocalHeap("16M"); |
|||
// EhCacheCacheManager ehCacheManager = new EhCacheCacheManager(); |
|||
// ehCacheManager.setCacheManager(cacheManager); |
|||
// return ehCacheManager; |
|||
// } |
|||
} |
@ -0,0 +1,19 @@ |
|||
package org.ros.chatto.config; |
|||
|
|||
import org.ehcache.event.CacheEvent; |
|||
import org.ehcache.event.CacheEventListener; |
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
//@Component |
|||
public class CustomCacheEventLogger implements CacheEventListener<Object, Object> { |
|||
|
|||
private static final Logger LOG = LoggerFactory.getLogger(CustomCacheEventLogger.class); |
|||
|
|||
@Override |
|||
public void onEvent(CacheEvent<? extends Object, ? extends Object> cacheEvent) { |
|||
LOG.info("custom Caching event {} key = {} old {} new {} ", cacheEvent.getType(), cacheEvent.getKey(), |
|||
cacheEvent.getOldValue(), cacheEvent.getNewValue()); |
|||
} |
|||
} |
@ -0,0 +1,44 @@ |
|||
<config xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' |
|||
xmlns='http://www.ehcache.org/v3' |
|||
xmlns:jsr107='http://www.ehcache.org/v3/jsr107'> |
|||
|
|||
<service> |
|||
<jsr107:defaults enable-statistics="true" /> |
|||
</service> |
|||
|
|||
<cache alias="chatUser"> |
|||
<key-type>java.lang.String</key-type> |
|||
<value-type>org.springframework.security.core.userdetails.UserDetails</value-type> |
|||
<expiry> |
|||
<ttl unit="seconds">600</ttl> |
|||
</expiry> |
|||
<listeners> |
|||
<listener> |
|||
<class>org.ros.chatto.config.CustomCacheEventLogger</class> |
|||
<event-firing-mode>ASYNCHRONOUS</event-firing-mode> |
|||
<event-ordering-mode>UNORDERED</event-ordering-mode> |
|||
<events-to-fire-on>CREATED</events-to-fire-on> |
|||
<events-to-fire-on>UPDATED</events-to-fire-on> |
|||
<events-to-fire-on>EXPIRED</events-to-fire-on> |
|||
<events-to-fire-on>REMOVED</events-to-fire-on> |
|||
<events-to-fire-on>EVICTED</events-to-fire-on> |
|||
</listener> |
|||
</listeners> |
|||
<resources> |
|||
<heap unit="entries">2000</heap> |
|||
<offheap unit="MB">100</offheap> |
|||
</resources> |
|||
</cache> |
|||
|
|||
<!-- <cache alias="user" |
|||
maxEntriesLocalHeap="10000" |
|||
maxEntriesLocalDisk="1000" |
|||
eternal="false" |
|||
diskSpoolBufferSizeMB="20" |
|||
timeToIdleSeconds="300" timeToLiveSeconds="600" |
|||
memoryStoreEvictionPolicy="LFU" |
|||
transactionalMode="off"> |
|||
<persistence strategy="localTempSwap" /> |
|||
</cache> --> |
|||
|
|||
</config> |
@ -0,0 +1 @@ |
|||
#test.bindAddress=192.168.1.106 |
@ -0,0 +1,322 @@ |
|||
/*------------------------------------ |
|||
- COLOR primary |
|||
------------------------------------*/ |
|||
|
|||
|
|||
/* |
|||
.alert-primary { |
|||
color: #191d21; |
|||
background-color: #b8c1c9; |
|||
border-color: #adb6c0; |
|||
} |
|||
|
|||
.alert-primary hr { |
|||
border-top-color: #9eaab5; |
|||
} |
|||
|
|||
.alert-primary .alert-link { |
|||
color: #030404; |
|||
} |
|||
|
|||
.badge-primary { |
|||
color: #fff; |
|||
background-color: #4f5b67; |
|||
} |
|||
|
|||
.badge-primary[href]:hover, |
|||
.badge-primary[href]:focus { |
|||
color: #fff; |
|||
background-color: #38414a; |
|||
} |
|||
|
|||
.bg-primary { |
|||
background-color: #4f5b67 !important; |
|||
} |
|||
|
|||
a.bg-primary:hover, |
|||
a.bg-primary:focus, |
|||
button.bg-primary:hover, |
|||
button.bg-primary:focus { |
|||
background-color: #38414a !important; |
|||
} |
|||
|
|||
.border-primary { |
|||
border-color: #4f5b67 !important; |
|||
} |
|||
|
|||
.btn-primary { |
|||
color: #fff; |
|||
background-color: #4f5b67; |
|||
border-color: #4f5b67; |
|||
} |
|||
|
|||
.btn-primary:hover { |
|||
color: #fff; |
|||
background-color: #3f4952; |
|||
border-color: #38414a; |
|||
} |
|||
|
|||
.btn-primary:focus, |
|||
.btn-primary.focus { |
|||
box-shadow: 0 0 0 0.2rem rgba(79, 91, 103, 0.5); |
|||
} |
|||
|
|||
.btn-primary.disabled, |
|||
.btn-primary:disabled { |
|||
color: #fff; |
|||
background-color: #4f5b67; |
|||
border-color: #4f5b67; |
|||
} |
|||
|
|||
.btn-primary:not(:disabled):not(.disabled):active, |
|||
.btn-primary:not(:disabled):not(.disabled).active, |
|||
.show>.btn-primary.dropdown-toggle { |
|||
color: #fff; |
|||
background-color: #38414a; |
|||
border-color: #323941; |
|||
} |
|||
|
|||
.btn-primary:not(:disabled):not(.disabled):active:focus, |
|||
.btn-primary:not(:disabled):not(.disabled).active:focus, |
|||
.show>.btn-primary.dropdown-toggle:focus { |
|||
box-shadow: 0 0 0 0.2rem rgba(79, 91, 103, 0.5); |
|||
} |
|||
|
|||
.btn-outline-primary { |
|||
color: #4f5b67; |
|||
background-color: transparent; |
|||
border-color: #4f5b67; |
|||
} |
|||
|
|||
.btn-outline-primary:hover { |
|||
color: #fff; |
|||
background-color: #4f5b67; |
|||
border-color: #4f5b67; |
|||
} |
|||
|
|||
.btn-outline-primary:focus, |
|||
.btn-outline-primary.focus { |
|||
box-shadow: 0 0 0 0.2rem rgba(79, 91, 103, 0.5); |
|||
} |
|||
|
|||
.btn-outline-primary.disabled, |
|||
.btn-outline-primary:disabled { |
|||
color: #4f5b67; |
|||
background-color: transparent; |
|||
} |
|||
|
|||
.btn-outline-primary:not(:disabled):not(.disabled):active, |
|||
.btn-outline-primary:not(:disabled):not(.disabled).active, |
|||
.show>.btn-outline-primary.dropdown-toggle { |
|||
color: #fff; |
|||
background-color: #4f5b67; |
|||
border-color: #4f5b67; |
|||
} |
|||
|
|||
.btn-outline-primary:not(:disabled):not(.disabled):active:focus, |
|||
.btn-outline-primary:not(:disabled):not(.disabled).active:focus, |
|||
.show>.btn-outline-primary.dropdown-toggle:focus { |
|||
box-shadow: 0 0 0 0.2rem rgba(79, 91, 103, 0.5); |
|||
} |
|||
|
|||
.list-group-item-primary { |
|||
color: #191d21; |
|||
background-color: #adb6c0; |
|||
} |
|||
|
|||
.list-group-item-primary.list-group-item-action:hover, |
|||
.list-group-item-primary.list-group-item-action:focus { |
|||
color: #191d21; |
|||
background-color: #9eaab5; |
|||
} |
|||
|
|||
.list-group-item-primary.list-group-item-action.active { |
|||
color: #fff; |
|||
background-color: #191d21; |
|||
border-color: #191d21; |
|||
} |
|||
|
|||
.table-primary, |
|||
.table-primary>th, |
|||
.table-primary>td { |
|||
background-color: #adb6c0; |
|||
} |
|||
|
|||
.table-hover .table-primary:hover { |
|||
background-color: #9eaab5; |
|||
} |
|||
|
|||
.table-hover .table-primary:hover>td, |
|||
.table-hover .table-primary:hover>th { |
|||
background-color: #9eaab5; |
|||
} |
|||
|
|||
.text-primary { |
|||
color: #4f5b67 !important; |
|||
} |
|||
|
|||
a.text-primary:hover, |
|||
a.text-primary:focus { |
|||
color: #38414a !important; |
|||
} */ |
|||
|
|||
|
|||
/*------------------------------------ |
|||
- COLOR primary |
|||
------------------------------------*/ |
|||
|
|||
.alert-primary { |
|||
color: #14171b; |
|||
background-color: #b1bbc4; |
|||
border-color: #a5b0bb; |
|||
} |
|||
|
|||
.alert-primary hr { |
|||
border-top-color: #97a4b0; |
|||
} |
|||
|
|||
.alert-primary .alert-link { |
|||
color: #000000; |
|||
} |
|||
|
|||
.badge-primary { |
|||
color: #fff; |
|||
background-color: #495561; |
|||
} |
|||
|
|||
.badge-primary[href]:hover, |
|||
.badge-primary[href]:focus { |
|||
color: #fff; |
|||
background-color: #333b43; |
|||
} |
|||
|
|||
.bg-primary { |
|||
background-color: #495561 !important; |
|||
} |
|||
|
|||
a.bg-primary:hover, |
|||
a.bg-primary:focus, |
|||
button.bg-primary:hover, |
|||
button.bg-primary:focus { |
|||
background-color: #333b43 !important; |
|||
} |
|||
|
|||
.border-primary { |
|||
border-color: #495561 !important; |
|||
} |
|||
|
|||
.btn-primary { |
|||
color: #fff; |
|||
background-color: #495561; |
|||
border-color: #495561; |
|||
} |
|||
|
|||
.btn-primary:hover { |
|||
color: #fff; |
|||
background-color: #39434c; |
|||
border-color: #333b43; |
|||
} |
|||
|
|||
.btn-primary:focus, |
|||
.btn-primary.focus { |
|||
box-shadow: 0 0 0 0.2rem rgba(73, 85, 97, 0.5); |
|||
} |
|||
|
|||
.btn-primary.disabled, |
|||
.btn-primary:disabled { |
|||
color: #fff; |
|||
background-color: #495561; |
|||
border-color: #495561; |
|||
} |
|||
|
|||
.btn-primary:not(:disabled):not(.disabled):active, |
|||
.btn-primary:not(:disabled):not(.disabled).active, |
|||
.show>.btn-primary.dropdown-toggle { |
|||
color: #fff; |
|||
background-color: #333b43; |
|||
border-color: #2c333b; |
|||
} |
|||
|
|||
.btn-primary:not(:disabled):not(.disabled):active:focus, |
|||
.btn-primary:not(:disabled):not(.disabled).active:focus, |
|||
.show>.btn-primary.dropdown-toggle:focus { |
|||
box-shadow: 0 0 0 0.2rem rgba(73, 85, 97, 0.5); |
|||
} |
|||
|
|||
.btn-outline-primary { |
|||
color: #495561; |
|||
background-color: transparent; |
|||
border-color: #495561; |
|||
} |
|||
|
|||
.btn-outline-primary:hover { |
|||
color: #fff; |
|||
background-color: #495561; |
|||
border-color: #495561; |
|||
} |
|||
|
|||
.btn-outline-primary:focus, |
|||
.btn-outline-primary.focus { |
|||
box-shadow: 0 0 0 0.2rem rgba(73, 85, 97, 0.5); |
|||
} |
|||
|
|||
.btn-outline-primary.disabled, |
|||
.btn-outline-primary:disabled { |
|||
color: #495561; |
|||
background-color: transparent; |
|||
} |
|||
|
|||
.btn-outline-primary:not(:disabled):not(.disabled):active, |
|||
.btn-outline-primary:not(:disabled):not(.disabled).active, |
|||
.show>.btn-outline-primary.dropdown-toggle { |
|||
color: #fff; |
|||
background-color: #495561; |
|||
border-color: #495561; |
|||
} |
|||
|
|||
.btn-outline-primary:not(:disabled):not(.disabled):active:focus, |
|||
.btn-outline-primary:not(:disabled):not(.disabled).active:focus, |
|||
.show>.btn-outline-primary.dropdown-toggle:focus { |
|||
box-shadow: 0 0 0 0.2rem rgba(73, 85, 97, 0.5); |
|||
} |
|||
|
|||
.list-group-item-primary { |
|||
color: #14171b; |
|||
background-color: #a5b0bb; |
|||
} |
|||
|
|||
.list-group-item-primary.list-group-item-action:hover, |
|||
.list-group-item-primary.list-group-item-action:focus { |
|||
color: #14171b; |
|||
background-color: #97a4b0; |
|||
} |
|||
|
|||
.list-group-item-primary.list-group-item-action.active { |
|||
color: #fff; |
|||
background-color: #14171b; |
|||
border-color: #14171b; |
|||
} |
|||
|
|||
.table-primary, |
|||
.table-primary>th, |
|||
.table-primary>td { |
|||
background-color: #a5b0bb; |
|||
} |
|||
|
|||
.table-hover .table-primary:hover { |
|||
background-color: #97a4b0; |
|||
} |
|||
|
|||
.table-hover .table-primary:hover>td, |
|||
.table-hover .table-primary:hover>th { |
|||
background-color: #97a4b0; |
|||
} |
|||
|
|||
.text-primary { |
|||
color: #495561 !important; |
|||
} |
|||
|
|||
a.text-primary:hover, |
|||
a.text-primary:focus { |
|||
color: #333b43 !important; |
|||
} |
@ -1,24 +1,126 @@ |
|||
.myClass { |
|||
/* .myClass { |
|||
color: red; |
|||
} */ |
|||
|
|||
|
|||
/* https://arcusiridis.com/images/background.jpg */ |
|||
|
|||
body { |
|||
background: #333; |
|||
color: #ffffff; |
|||
/* background-image: url('https://bluestnight.com/images/background_lg.jpg'); */ |
|||
} |
|||
#body-container { |
|||
|
|||
|
|||
/* #body-container { |
|||
margin: 0 auto 0 auto; |
|||
max-width: 80%; |
|||
/* vertical-align: auto; */ |
|||
} |
|||
.shadow-sm { |
|||
width: 50%; |
|||
} |
|||
input[type="radio"]{ |
|||
/*position:fixed;*/ |
|||
opacity:0; |
|||
vertical-align: auto; |
|||
} |
|||
*/ |
|||
|
|||
input[type="radio"] { |
|||
/*position:fixed;*/ |
|||
opacity: 0; |
|||
} |
|||
|
|||
input[type=radio]+label { |
|||
font-weight: normal; |
|||
font-weight: normal; |
|||
} |
|||
|
|||
input[type=radio]:checked+label { |
|||
font-weight: bold; |
|||
font-weight: bold; |
|||
background-color: #566069; |
|||
} |
|||
|
|||
input[type=radio]:focus+label { |
|||
border: 1px dotted #000; |
|||
border: 1px dotted #000; |
|||
} |
|||
|
|||
#home-section { |
|||
background-image: url('../img/home.jpg'); |
|||
background-repeat: no-repeat; |
|||
background-size: cover; |
|||
background-attachment: fixed; |
|||
min-height: 900px; |
|||
height: auto; |
|||
} |
|||
|
|||
#home-section .home-inner { |
|||
padding-top: 75px; |
|||
/* padding-bottom: 10px; */ |
|||
/* background: #333; */ |
|||
} |
|||
|
|||
|
|||
/* #home-section .card-form { |
|||
opacity: 0.8; |
|||
} */ |
|||
|
|||
#home-section .dark-overlay { |
|||
position: absolute; |
|||
top: 0; |
|||
left: 0; |
|||
width: 100%; |
|||
min-height: 900px; |
|||
background: rgba(0, 0, 0, 0.7); |
|||
} |
|||
|
|||
#chat-section { |
|||
/* background-image: url('../img/home.jpg'); */ |
|||
background: #495561; |
|||
/* background-repeat: no-repeat; |
|||
background-size: cover; |
|||
background-attachment: fixed; */ |
|||
min-height: 500px; |
|||
} |
|||
|
|||
#chat-section .chat-inner { |
|||
padding-top: 75px; |
|||
/* background: #333; */ |
|||
} |
|||
|
|||
#chat-section .dark-overlay { |
|||
position: absolute; |
|||
top: 0; |
|||
left: 0; |
|||
width: 100%; |
|||
min-height: 600px; |
|||
/* background: rgba(0, 0, 0, 0.7); */ |
|||
} |
|||
|
|||
textarea { |
|||
-webkit-box-sizing: border-box; |
|||
-moz-box-sizing: border-box; |
|||
box-sizing: border-box; |
|||
width: 100%; |
|||
} |
|||
|
|||
#chatTextArea { |
|||
min-height: 300px; |
|||
} |
|||
|
|||
|
|||
/* .container { |
|||
width: 50%; |
|||
} */ |
|||
|
|||
.my-form-inputs { |
|||
width: 80%; |
|||
} |
|||
|
|||
#login-card { |
|||
width: 40%; |
|||
/* margin: 0 auto; */ |
|||
/* Added */ |
|||
/* float: none; */ |
|||
/* Added */ |
|||
/* margin-bottom: 10px; */ |
|||
/* Added */ |
|||
} |
|||
|
|||
@media only screen and (max-width: 600px) { |
|||
#login-card { |
|||
width: 90%; |
|||
} |
|||
} |
After Width: 1920 | Height: 1280 | Size: 307 KiB |
@ -0,0 +1,22 @@ |
|||
var chatTextArea = document.getElementById('chatTextArea'); |
|||
function handleChatForm() { |
|||
let chatInput = document.getElementById('chatInput'); |
|||
let myForm = document.getElementById('chatMessageForm').addEventListener( |
|||
'submit', function (e) { |
|||
e.preventDefault(); |
|||
|
|||
// let user = getSelectedUser();
|
|||
// if (!isCheckedUser) {
|
|||
// window.alert('please select a user');
|
|||
// return;
|
|||
// }
|
|||
// console.log('second user = ' + user);
|
|||
let messageContent = chatInput.value; |
|||
let localDate = new Date(); |
|||
let messageLine = localDate.toLocaleDateString() + localDate.toLocaleTimeString() + 'fromUser' + ': ' + messageContent; |
|||
chatTextArea.append(messageLine + "\n"); |
|||
chatTextArea.scrollTop = chatTextArea.scrollHeight; |
|||
}) |
|||
} |
|||
|
|||
handleChatForm(); |
@ -0,0 +1,17 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<div th:replace="fragments/head :: headFragment"> |
|||
<meta charset="UTF-8"> |
|||
<title id="pageTitle">Home</title> |
|||
</div> |
|||
<script src="https://code.jquery.com/jquery-2.1.4.min.js" th:if="false"></script> |
|||
<script src="http://blackpeppersoftware.github.io/thymeleaf-fragment.js/thymeleaf-fragment.js" defer="defer" |
|||
th:if="false"></script> |
|||
<meta charset="UTF-8"> |
|||
<title></title> |
|||
</head> |
|||
<body> |
|||
|
|||
</body> |
|||
</html> |
@ -0,0 +1,60 @@ |
|||
<!DOCTYPE html> |
|||
<html xmlns:th="http://www.thymeleaf.org"> |
|||
|
|||
<head> |
|||
<div th:replace="fragments/head :: headFragment"> |
|||
<meta charset="UTF-8"> |
|||
<title id="pageTitle">Navbar Fragment</title> |
|||
</div> |
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.15.0/esm/popper.js" type="module" th:if="false"></script> |
|||
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap.css" th:if="false" rel="stylesheet" type="text/css"> |
|||
<script src="https://code.jquery.com/jquery-2.1.4.min.js" th:if="false"></script> |
|||
<script src="http://blackpeppersoftware.github.io/thymeleaf-fragment.js/thymeleaf-fragment.js" defer="defer" th:if="false"></script> |
|||
</head> |
|||
|
|||
<body> |
|||
<th:block th:fragment="navbarFragment"> |
|||
<!-- <div class="container"> --> |
|||
<nav class="navbar navbar-expand-sm bg-dark navbar-dark fixed-top"> |
|||
<div class="container"> |
|||
<a href="home.html" th:href="@{/}" class="navbar-brand">Chatto</a> |
|||
<div class="navbar-header"> |
|||
<button class="navbar-toggler" data-toggle="collapse" data-target="#navbarCollapse"> |
|||
<!-- <span class="navbar-toggle-icon">Menu</span> --> |
|||
<!-- Menu --> |
|||
<!-- <i class="fas fa-angle-double-up"></i> --> |
|||
<!-- <i class="glyphicon glyphicon-align-left"></i> --> |
|||
<i class="fas fa-chevron-down"></i> |
|||
|
|||
</button> |
|||
</div> |
|||
<div class="collapse navbar-collapse" id="navbarCollapse"> |
|||
<ul class="navbar-nav ml-auto"> |
|||
<li class="nav-item"> |
|||
<a href="home.html" th:href="@{/}" class="nav-link">Home</a> |
|||
</li> |
|||
<li class="nav-item"> |
|||
<a href="user/home.html" th:href="@{/user}" class="nav-link">User Area</a> |
|||
</li> |
|||
<li class="nav-item"> |
|||
<a th:href="chat" href="chat.html" class="nav-link">Chat</a> |
|||
</li> |
|||
<li class="nav-item"> |
|||
<a th:href="login" href="login.html" class="nav-link">Login</a> |
|||
</li> |
|||
<li class="nav-item"> |
|||
<a href="#" class="nav-link">About</a> |
|||
</li> |
|||
<li class="nav-item"> |
|||
<a href="#" class="nav-link">Contact</a> |
|||
</li> |
|||
|
|||
</ul> |
|||
</div> |
|||
</div> |
|||
</nav> |
|||
<!-- </div> --> |
|||
</th:block> |
|||
</body> |
|||
|
|||
</html> |
@ -1,19 +1,107 @@ |
|||
<!DOCTYPE HTML> |
|||
<html xmlns:th="http://www.thymeleaf.org"> |
|||
|
|||
<head> |
|||
<title>Title</title> |
|||
<div th:replace="fragments/head :: headFragment"> |
|||
<meta charset="UTF-8"> |
|||
<title id="pageTitle">Home</title> |
|||
</div> |
|||
|
|||
<!-- <script th:src="@{js/my_Crypto.js}" type="text/javascript"></script> --> |
|||
|
|||
|
|||
|
|||
<script src="https://code.jquery.com/jquery-2.1.4.min.js" th:if="false"></script> |
|||
<script src="http://blackpeppersoftware.github.io/thymeleaf-fragment.js/thymeleaf-fragment.js" defer="defer" th:if="false"></script> |
|||
|
|||
|
|||
</link> |
|||
</head> |
|||
|
|||
<body> |
|||
<div> |
|||
Web Application. Passed parameter : <span th:text="${message}"></span> |
|||
</div> |
|||
<!-- <p th:if="${chatUser}" th:text="'username: ' + ${chatUser.userName}">You need to login</p> |
|||
<th:block th:each="userName: ${userNames}"> |
|||
<div th:text="${userName}"></div> |
|||
</th:block> --> |
|||
<p>Welcome to home page. Please login to access any features.</p> |
|||
<a href="login">login</a> |
|||
|
|||
|
|||
<div th:include="fragments/navbar :: navbarFragment"></div> |
|||
<header id="home-section"> |
|||
<div class="dark-overlay"> |
|||
<div class="home-inner container"> |
|||
<div class="row"> |
|||
<div class="col-lg-8 col-md-6 d-lg-block "> |
|||
|
|||
<!-- <div class="jumbotron bg-primary"> --> |
|||
<div class="d-flex rounded"> |
|||
|
|||
<div class="p-4 align-self-end"> |
|||
<h1 class="display-4">Chatto - Self Hosted, Minimal E2E Chat</h1> |
|||
<!-- <p th:if="${chatUser}" th:text="'username: ' + ${chatUser.userName}">You need to login</p> |
|||
<th:block th:each="userName: ${userNames}"> |
|||
<div th:text="${userName}"></div> |
|||
</th:block> --> |
|||
<span th:if="${message}"> Welcome <span th:text="${message}"></span></span> |
|||
<p>Chatto is a minimal, end to end encrypted chat application.</p> |
|||
<!-- <button class="btn btn-secondary"> <a href="registration.html" th:href="{@/registration}">Get Started</a></button> --> |
|||
<a class="btn btn-secondary" href="registration.html" th:href="@{/registration}">Get Started</a> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
<div class="col-lg-4 col-md-6"> |
|||
<div class="card bg-primary text-justified"> |
|||
<h2 class="card-header text-center">Features</h2> |
|||
<div class="card-body "> |
|||
|
|||
<p class="card-text lead"> |
|||
<ul class=""> |
|||
<li> |
|||
<p class="lead"> |
|||
<!-- <i class="fas fa-check"></i> --> |
|||
Self Hosted</p> |
|||
</li> |
|||
<li> |
|||
<p class="lead"> |
|||
<!-- <i class="fas fa-check"></i> --> |
|||
End To End Encrypted Messaging</p> |
|||
</li> |
|||
<li> |
|||
<p class="lead"> |
|||
<!-- <i class="fas fa-check"></i> --> |
|||
Free Software (AGPLv3 Licensed)</p> |
|||
</li> |
|||
<li> |
|||
<p class="lead"> |
|||
<!-- <i class="fas fa-check"></i> --> |
|||
Built With Java And Spring</p> |
|||
</li> |
|||
</ul> |
|||
</p> |
|||
<!-- <p class="card-text"> |
|||
Open Source |
|||
</p> |
|||
<p class="card-text"> |
|||
Built with Java |
|||
</p> --> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</header> |
|||
<section id="my-section"> |
|||
<div class="container"> |
|||
<div class="row"> |
|||
<div class="col text-center py-5"> |
|||
<h1 class="display-4"> |
|||
<p class="lead">Lorem ipsum dolor sit, amet consectetur adipisicing elit. Aliquid illum ea accusamus animi voluptate. Quam temporibus aperiam, similique in labore sint quasi harum. Praesentium enim iste dicta quaerat perspiciatis eos.</p> |
|||
</h1> |
|||
<a href="#" class="btn btn-secondary">Find out more</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<script> |
|||
console.log(hostAddress); |
|||
/* console.log(hostAddress2); */ |
|||
</script> |
|||
</body> |
|||
|
|||
</html> |
@ -1,13 +1,58 @@ |
|||
<!DOCTYPE html> |
|||
<html xmlns:th="http://www.thymeleaf.org"> |
|||
|
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<title>Insert title here</title> |
|||
<div th:replace="fragments/head :: headFragment"> |
|||
<title id="pageTitle">User Home</title> |
|||
</div> |
|||
<script src="https://code.jquery.com/jquery-2.1.4.min.js" th:if="false"></script> |
|||
<script |
|||
src="http://blackpeppersoftware.github.io/thymeleaf-fragment.js/thymeleaf-fragment.js" |
|||
data-template-prefix="../" defer="defer" th:if="false"></script> |
|||
<link th:href="@{/css/master.css}" href="../../static/css/master.css" |
|||
rel="stylesheet" th:if="false"> |
|||
<link th:href="@{/css/colors.css}" href="../../static/css/colors.css" |
|||
rel="stylesheet" th:if="false"> |
|||
</head> |
|||
|
|||
<body> |
|||
user page |
|||
<form action="#" th:action="@{/perform_logout}" method="POST"> |
|||
<input type="submit" value="logout"> |
|||
</form> |
|||
<div th:include="fragments/navbar :: navbarFragment"></div> |
|||
|
|||
<header> |
|||
<div class="container "> |
|||
<div class="row"> |
|||
<div class="col-sm py-5"> |
|||
<!-- <h4 class="display-4 text-center py-2">Chat</h4> --> |
|||
|
|||
<div |
|||
class="card text-white bg-primary mb-3 text-center card-form rounded mx-auto"> |
|||
<h1 class="display-4">User Page</h1> |
|||
<div class="card-body rounded"> |
|||
<!-- <h4 class="card-title">Chat</h4> --> |
|||
<!-- <div class="form-group"> |
|||
<textarea id="chatTextArea" class="form-control-lg py-2" disabled></textarea> |
|||
</div> --> |
|||
<!-- <form action="#" th:action="@{/seedstartermng}" th:object="${seedStarter}" method="post"> --> |
|||
<!-- th:action="@{/api/chat}" --> |
|||
|
|||
<div class="card-text"> |
|||
|
|||
<div class="form-group"> |
|||
<form action="#" th:action="@{/logout}" method="POST"> |
|||
<!-- <input type="submit" value="logout"> --> |
|||
<!-- <input type="hidden" th:name="${_csrf.parameterName}" |
|||
th:value="${_csrf.token}" /> --> |
|||
<button class="btn btn-secondary form-control">Logout</button> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</header> |
|||
|
|||
</body> |
|||
|
|||
</html> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue