Adding first web page skeleton

This commit is contained in:
BrokenFire 2017-12-22 19:20:26 +01:00
parent 4e0909038d
commit adb6ef44f7
25 changed files with 19733 additions and 32 deletions

View File

@ -36,5 +36,8 @@ dependencies {
compile group: 'org.json', name: 'json', version: '20160810' compile group: 'org.json', name: 'json', version: '20160810'
testCompile('org.springframework.boot:spring-boot-starter-test') testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile('com.jayway.jsonpath:json-path') testCompile('com.jayway.jsonpath:json-path')
compile("org.springframework.boot:spring-boot-starter-thymeleaf") {
exclude group:"org.springframework.boot", module: "spring-boot-starter-logging"
}
} }

View File

@ -1,6 +1,6 @@
#Mon Dec 11 22:24:31 CET 2017 #Wed Dec 20 20:07:15 CET 2017
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip

View File

@ -101,7 +101,7 @@ public class Move implements Commande {
if(userL.size()<1 ||roleL.size()<1) if(userL.size()<1 ||roleL.size()<1)
{ {
logger.info("Mentionnement Incorect."); logger.warn("Mentionnement Incorect.");
Message rest = event.getTextChannel().sendMessage(EmbedMessageUtils.getMoveError("Utilisateur ou Role mal mentioner.")).complete(); Message rest = event.getTextChannel().sendMessage(EmbedMessageUtils.getMoveError("Utilisateur ou Role mal mentioner.")).complete();
List<Message> messages = new ArrayList<Message>(){{ List<Message> messages = new ArrayList<Message>(){{
add(rest); add(rest);
@ -118,7 +118,7 @@ public class Move implements Commande {
{ {
logger.info("Autorisation suffisante, deplacement autorisé"); logger.info("Autorisation suffisante, deplacement autorisé");
logger.info("Utilisateur trouvée"); logger.debug("Utilisateur trouvée");
try { try {
boolean erreur=this.exc(user,roleL,true,serveur,serveur.getManager()); boolean erreur=this.exc(user,roleL,true,serveur,serveur.getManager());
if(erreur) if(erreur)
@ -169,7 +169,7 @@ public class Move implements Commande {
} }
else else
{ {
logger.info("Autorisation insuffisante, deplacement refusé"); logger.warn("Autorisation insuffisante, deplacement refusé");
Message rest = event.getTextChannel().sendMessage(EmbedMessageUtils.getMoveError("Vous n'avez pas l'autorisation de faicre ça!")).complete(); Message rest = event.getTextChannel().sendMessage(EmbedMessageUtils.getMoveError("Vous n'avez pas l'autorisation de faicre ça!")).complete();
List<Message> messages = new ArrayList<Message>(){{ List<Message> messages = new ArrayList<Message>(){{
add(rest); add(rest);

View File

@ -24,7 +24,7 @@ public class Init {
static JDA initBot(String token, boolean dev){ static JDA initBot(String token, boolean dev){
boolean okInit; boolean okInit;
JDA jda = null; JDA jda = null;
logger.info("-------------------INITIALISATION-------------------"); logger.debug("-------------------INITIALISATION-------------------");
//Bot démarrer sans token //Bot démarrer sans token
if (token == null) { if (token == null) {
@ -75,32 +75,32 @@ public class Init {
//on recupere les utilisateur //on recupere les utilisateur
List<Member> utilisateurCo = serveur.getMembers(); List<Member> utilisateurCo = serveur.getMembers();
logger.info("Utilisatieur connecté: "); logger.info("Utilisatieur connecté: "+utilisateurCo.size());
for (Member anUtilisateurCo : utilisateurCo) for (Member anUtilisateurCo : utilisateurCo)
{ {
if (anUtilisateurCo.getOnlineStatus().equals(OnlineStatus.ONLINE)) if (anUtilisateurCo.getOnlineStatus().equals(OnlineStatus.ONLINE))
logger.info("\t*" + anUtilisateurCo.getEffectiveName()); logger.debug("\t*" + anUtilisateurCo.getEffectiveName());
} }
logger.info("Utilisatieur absent: "); logger.debug("Utilisatieur absent: ");
for (Member anUtilisateurCo : utilisateurCo) for (Member anUtilisateurCo : utilisateurCo)
{ {
if (anUtilisateurCo.getOnlineStatus().equals(OnlineStatus.DO_NOT_DISTURB)) if (anUtilisateurCo.getOnlineStatus().equals(OnlineStatus.DO_NOT_DISTURB))
logger.info("\t*" + anUtilisateurCo.getEffectiveName()); logger.debug("\t*" + anUtilisateurCo.getEffectiveName());
} }
logger.info("Utilisatieur hors ligne: "); logger.debug("Utilisatieur hors ligne: ");
for (Member anUtilisateurCo : utilisateurCo) for (Member anUtilisateurCo : utilisateurCo)
{ {
if (anUtilisateurCo.getOnlineStatus().equals(OnlineStatus.OFFLINE)) if (anUtilisateurCo.getOnlineStatus().equals(OnlineStatus.OFFLINE))
logger.info("\t*" + anUtilisateurCo.getEffectiveName()); logger.debug("\t*" + anUtilisateurCo.getEffectiveName());
} }
MainBot.ModoTimer modotimer = new MainBot.ModoTimer(); MainBot.ModoTimer modotimer = new MainBot.ModoTimer();
modotimer.start(); modotimer.start();
DayListener dayListener = new DayListener(); DayListener dayListener = new DayListener();
dayListener.start(); dayListener.start();
logger.info("-----------------FIN INITIALISATION-----------------"); logger.debug("-----------------FIN INITIALISATION-----------------");
jda.getPresence().setGame(Game.of("Statut: Ok!")); jda.getPresence().setGame(Game.of("Statut: Ok!"));

View File

@ -14,6 +14,7 @@ import org.springframework.boot.ExitCodeGenerator;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.stereotype.Controller;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@ -22,6 +23,7 @@ import java.util.HashMap;
* Created by seb65 on 19/10/2016. * Created by seb65 on 19/10/2016.
*/ */
@SpringBootApplication @SpringBootApplication
@Controller
public class MainBot { public class MainBot {
public static final CommandParser parser =new CommandParser(); public static final CommandParser parser =new CommandParser();
@ -38,11 +40,9 @@ public class MainBot {
public static void main(String[] args) { public static void main(String[] args) {
logger.trace("trace"); logger.info("=======================================");
logger.debug("debug"); logger.info("--------------Starting Bot-------------");
logger.info("info"); logger.info("=======================================");
logger.warn("warn");
logger.error("error");
boolean dev = false; boolean dev = false;
String token = null; String token = null;
@ -118,10 +118,7 @@ public class MainBot {
public static class ModoTimer extends Thread{ public static class ModoTimer extends Thread{
public ModoTimer() public ModoTimer(){}
{
}
@Override @Override

View File

@ -0,0 +1,13 @@
package net.Broken.webView;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class MusicWebView {
@RequestMapping("/music")
public String music(Model model){
return "music";
}
}

View File

@ -1,26 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="error"> <Configuration status="error" packages="com.coralogix.sdk.appenders">
<Appenders> <Appenders>
<Console name="Console" target="SYSTEM_OUT"> <Console name="Console" target="SYSTEM_OUT">
<!--<PatternLayout pattern="[%d{HH:mm:ss.SSS}]%highlight{[%-5level]}{FATAL=red blink, ERROR=red, WARN=bright yellow , INFO=blue, DEBUG=bright black, TRACE=cyan}[%-30.30c{1.}]: %highlight{%msg%n}{FATAL=red blink, ERROR=red, WARN=bright yellow , INFO=blue, DEBUG=bright black, TRACE=cyan}" />--> <PatternLayout pattern="[%d{HH:mm:ss.SSS}]%highlight{[%-5level]}{FATAL=red blink, ERROR=red, WARN=bright yellow , INFO=blue, DEBUG=bright black, TRACE=cyan}[%-30.30c{1.}]: %highlight{%msg%n}{FATAL=red blink, ERROR=red, WARN=bright yellow , INFO=blue, DEBUG=bright black, TRACE=cyan}" />
<PatternLayout pattern="[%d{HH:mm:ss.SSS}][%-5level][%-30.30c{1.}]: %msg%n" />
</Console> </Console>
<!--<RollingFile name="RollingFile" fileName="/logs/curent.log" <RollingFile name="RollingFile" fileName="./logs/curent.log"
filePattern="/logs/$${date:yyyy-MM}/discordBot-%d{yyyy-MM-dd-HH}-%i.log.gz"> filePattern="./logs/$${date:yyyy-MM}/discordBot-%d{yyyy-MM-dd-HH}-%i.log.gz">
<PatternLayout> <PatternLayout>
<Pattern>[%d{yyy-MM-dd ~ HH:mm:ss.SSS}][%-5level]%logger{36}: %msg%n</Pattern> <Pattern>[%d{yyy-MM-dd ~ HH:mm:ss.SSS}][%-5level]%-30.30c{1.}: %msg%n</Pattern>
</PatternLayout> </PatternLayout>
<Policies> <Policies>
<OnStartupTriggeringPolicy minSize="1B"/> <OnStartupTriggeringPolicy minSize="1B"/>
<TimeBasedTriggeringPolicy/> <TimeBasedTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="250 MB"/> <SizeBasedTriggeringPolicy size="250 MB"/>
</Policies> </Policies>
</RollingFile>--> </RollingFile>
</Appenders> </Appenders>
<Loggers> <Loggers>
<Root level="debug"> <Root level="info">
<AppenderRef ref="RollingFile" level="info" />
<AppenderRef ref="Console" level="info"/> <AppenderRef ref="Console" level="info"/>
<!--<AppenderRef ref="RollingFile" level="info"/>--> <AppenderRef ref="RollingFile" level="info"/>
</Root>
</Loggers>
</Configuration>
<Configuration status="error" packages="com.coralogix.sdk.appenders">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="[%d{HH:mm:ss.SSS}]%highlight{[%-5level]}{FATAL=red blink, ERROR=red, WARN=bright yellow , INFO=blue, DEBUG=bright black, TRACE=cyan}[%-30.30c{1.}]: %highlight{%msg%n}{FATAL=red blink, ERROR=red, WARN=bright yellow , INFO=blue, DEBUG=bright black, TRACE=cyan}" />
<PatternLayout pattern="[%d{HH:mm:ss.SSS}]%highlight{[%-5level]}{FATAL=red blink, ERROR=red, WARN=bright yellow , INFO=blue, DEBUG=bright black, TRACE=cyan}[%-30.30c{1.}]: %highlight{%msg%n}{FATAL=red blink, ERROR=red, WARN=bright yellow , INFO=blue, DEBUG=bright black, TRACE=cyan}" />
<<<<<<< Updated upstream
=======
<!--<PatternLayout pattern="[%d{HH:mm:ss.SSS}][%-5level][%-30.30c{1.}]: %msg%n" />-->
>>>>>>> Stashed changes
</Console>
<RollingFile name="RollingFile" fileName="./logs/curent.log"
filePattern="./logs/$${date:yyyy-MM}/discordBot-%d{yyyy-MM-dd-HH}-%i.log.gz">
<PatternLayout>
<Pattern>[%d{yyy-MM-dd ~ HH:mm:ss.SSS}][%-5level]%-30.30c{1.}: %msg%n</Pattern>
</PatternLayout>
<Policies>
<OnStartupTriggeringPolicy minSize="1B"/>
<TimeBasedTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="250 MB"/>
</Policies>
</RollingFile>
</Appenders>
<Loggers>
<Root level="info">
<AppenderRef ref="RollingFile" level="info" />
<AppenderRef ref="Console" level="info"/>
<AppenderRef ref="RollingFile" level="info"/>
<<<<<<< Updated upstream
<AppenderRef ref="RollingFile" level="info"/>
=======
>>>>>>> Stashed changes
</Root> </Root>
</Loggers> </Loggers>
</Configuration> </Configuration>

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,22 @@
.main, footer {
padding-right: 300px;
}
.side-nav{
top: 10.2%;
}
.nav-wrapper{
margin-right: 1%;
margin-left: 1%;
width: 100%;
}
@media only screen and (max-width : 992px) {
.main, footer {
padding-right: 0;
}
.side-nav{
top: 0%;
}
}

View File

@ -0,0 +1,96 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0"/>
<title>Starter Template - Materialize</title>
<!-- CSS -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"/>
<link href="css/materialize.css" type="text/css" rel="stylesheet" media="screen,projection"/>
<link href="css/style.css" type="text/css" rel="stylesheet" media="screen,projection"/>
</head>
<body class="blue-grey lighten-5" >
<nav class="blue-grey darken-4 z-depth-3" role="navigation">
<div class="nav-wrapper container">
<a id="logo-container" href="#" class="brand-logo">Discrod IMERIR Social Club</a>
<ul class="right hide-on-med-and-down">
<li>
<a href="#" data-target="slide-out" class="sidenav-trigger">Home</a>
</li>
<li class="active">
<a href="#" >Music Control</a>
</li>
</ul>
<ul id="nav-mobile" class="side-nav">
<li>
<a href="#" data-target="slide-out" class="sidenav-trigger">Home</a>
</li>
<li>
<a href="#" data-activates="slide-out" class="button-collapse"><i class="material-icons">ac_unit</i></a>
</li>
</ul>
<a href="#" data-activates="nav-mobile" class="button-collapse"><i class="material-icons">menu</i></a>
</div>
</nav>
<div class="section no-pad-bot main" id="index-banner">
<div class="container">
<div class="row center">
<img class="responsive-img z-depth-3" style="max-width: 30%" src="https://s3-storage.textopus.nl/wp-content/uploads/2014/06/21163734/The-Test-Fun-for-Friends-iPhone-iPad.png"/>
</div>
<h4 class="center">Test- By test</h4>
<div class="row center">
<div class="progress col s6 offset-s3 z-depth-3">
<div class="determinate" style="width: 70%"></div>
</div>
</div>
<div class="row center">
<div class="col s2 offset-s3 center">
<a class="btn-large blue-grey darken-4 z-depth-3 waves-effect waves-light">
<i class="material-icons medium">skip_previous</i>
</a>
</div>
<div class="col s2 center">
<a class="btn-large blue-grey darken-4 z-depth-3 waves-effect waves-light">
<i class="material-icons medium">play_arrow</i>
</a>
</div>
<div class="col s2 center">
<a class="btn-large blue-grey darken-4 z-depth-3 waves-effect waves-light" >
<i class="material-icons">skip_next</i>
</a>
</div>
</div>
<div class="row center">
<div class="col s2 center offset-s4">
<a class="btn blue-grey darken-4 z-depth-3 waves-effect waves-light">
<i class="material-icons">stop</i>
</a>
</div>
<div class="col s2 center">
<a class="btn blue-grey darken-4 z-depth-3 waves-effect waves-light">
<i class="material-icons">info</i>
</a>
</div>
</div>
</div>
<ul id="slide-out" class="side-nav fixed z-depth-3">
</ul>
</div>
<!-- Scripts-->
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="js/materialize.js"></script>
<script src="js/init.js"></script>
</body>
</html>

View File

@ -0,0 +1,7 @@
$('.button-collapse').sideNav({
menuWidth: 300, // Default is 300
edge: 'right', // Choose the horizontal origin
closeOnClick: true, // Closes side-nav on <a> clicks, useful for Angular/Meteor
draggable: true // Choose whether you can drag to open on touch screens,
}
);

10021
src/main/resources/static/js/materialize.js vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,96 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0"/>
<title>Starter Template - Materialize</title>
<!-- CSS -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"/>
<link href="css/materialize.css" type="text/css" rel="stylesheet" media="screen,projection"/>
<link href="css/style.css" type="text/css" rel="stylesheet" media="screen,projection"/>
</head>
<body class="blue-grey lighten-5" >
<nav class="blue-grey darken-4 z-depth-3" role="navigation">
<div class="nav-wrapper container">
<a id="logo-container" href="#" class="brand-logo"><i class="material-icons large">people</i></a>
<ul class="right hide-on-med-and-down">
<li>
<a href="#" data-target="slide-out" class="sidenav-trigger">Home</a>
</li>
<li class="active">
<a href="#" >Music Control</a>
</li>
</ul>
<ul id="nav-mobile" class="side-nav">
<li>
<a href="#" data-target="slide-out" class="sidenav-trigger">Home</a>
</li>
<li>
<a href="#" data-activates="slide-out" class="button-collapse"><i class="material-icons">ac_unit</i></a>
</li>
</ul>
<a href="#" data-activates="nav-mobile" class="button-collapse"><i class="material-icons">menu</i></a>
</div>
</nav>
<div class="section no-pad-bot main" id="index-banner">
<div class="container">
<div class="row center">
<img class="responsive-img z-depth-3" style="max-width: 30%" src="https://s3-storage.textopus.nl/wp-content/uploads/2014/06/21163734/The-Test-Fun-for-Friends-iPhone-iPad.png"/>
</div>
<h4 class="center">Test- By test</h4>
<div class="row center">
<div class="progress col s6 offset-s3 z-depth-3">
<div class="determinate" style="width: 70%"></div>
</div>
</div>
<div class="row center">
<div class="col s2 offset-s3 center">
<a class="btn-large blue-grey darken-4 z-depth-3 waves-effect waves-light">
<i class="material-icons medium">skip_previous</i>
</a>
</div>
<div class="col s2 center">
<a class="btn-large blue-grey darken-4 z-depth-3 waves-effect waves-light">
<i class="material-icons medium">play_arrow</i>
</a>
</div>
<div class="col s2 center">
<a class="btn-large blue-grey darken-4 z-depth-3 waves-effect waves-light" >
<i class="material-icons">skip_next</i>
</a>
</div>
</div>
<div class="row center">
<div class="col s2 center offset-s4">
<a class="btn blue-grey darken-4 z-depth-3 waves-effect waves-light">
<i class="material-icons">stop</i>
</a>
</div>
<div class="col s2 center">
<a class="btn blue-grey darken-4 z-depth-3 waves-effect waves-light">
<i class="material-icons">info</i>
</a>
</div>
</div>
</div>
<ul id="slide-out" class="side-nav fixed z-depth-3">
</ul>
</div>
<!-- Scripts-->
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="js/materialize.js"></script>
<script src="js/init.js"></script>
</body>
</html>