Compare commits
18 Commits
71eb7db988
...
users
Author | SHA1 | Date | |
---|---|---|---|
c7daabaa5a | |||
b0db9f0dea | |||
e12208891a | |||
0c3eacadde | |||
b4745b657c | |||
f0ec919b6d | |||
fd472ca39e | |||
40274c306c | |||
e68d1797dd | |||
f04915f759 | |||
eba2e1c745 | |||
a6ef2a4d7b | |||
97263e96c3 | |||
340e99dad2 | |||
e26fdb13f1 | |||
02906d09e2 | |||
4e65d68057 | |||
8d2970959c |
@ -196,6 +196,18 @@ app_illustration_submit:
|
|||||||
path: /user/illustration/submit/{by}/{userid}
|
path: /user/illustration/submit/{by}/{userid}
|
||||||
defaults: { _controller: App\Controller\IllustrationController:submit }
|
defaults: { _controller: App\Controller\IllustrationController:submit }
|
||||||
|
|
||||||
|
app_illustration_submits01:
|
||||||
|
path: /user/illustration/submits01/{by}/{userid}
|
||||||
|
defaults: { _controller: App\Controller\IllustrationController:submits01 }
|
||||||
|
|
||||||
|
app_illustration_submits02:
|
||||||
|
path: /user/illustration/submits02/{by}/{userid}/{categoryid}
|
||||||
|
defaults: { _controller: App\Controller\IllustrationController:submits02 }
|
||||||
|
|
||||||
|
app_illustration_submits03:
|
||||||
|
path: /user/illustration/submits03/{by}/{userid}/{categoryid}
|
||||||
|
defaults: { _controller: App\Controller\IllustrationController:submits03 }
|
||||||
|
|
||||||
app_illustration_update:
|
app_illustration_update:
|
||||||
path: /user/illustration/update/{id}/{by}
|
path: /user/illustration/update/{id}/{by}
|
||||||
defaults: { _controller: App\Controller\IllustrationController:update }
|
defaults: { _controller: App\Controller\IllustrationController:update }
|
||||||
@ -269,7 +281,7 @@ app_link_delete:
|
|||||||
#== Slide =====================================================================================================
|
#== Slide =====================================================================================================
|
||||||
|
|
||||||
app_slide:
|
app_slide:
|
||||||
path: /slide
|
path: /slide/{userpseudo}
|
||||||
defaults: { _controller: App\Controller\SlideController:slide }
|
defaults: { _controller: App\Controller\SlideController:slide }
|
||||||
|
|
||||||
#== Home USer==================================================================================================
|
#== Home USer==================================================================================================
|
||||||
@ -277,3 +289,7 @@ app_slide:
|
|||||||
app_home_user:
|
app_home_user:
|
||||||
path: /{userpseudo}
|
path: /{userpseudo}
|
||||||
defaults: { _controller: App\Controller\HomeController:user }
|
defaults: { _controller: App\Controller\HomeController:user }
|
||||||
|
|
||||||
|
app_home_userhero:
|
||||||
|
path: /hero/{userpseudo}
|
||||||
|
defaults: { _controller: App\Controller\HomeController:userhero }
|
||||||
|
@ -297,7 +297,7 @@ th.dt-center, td.dt-center { text-align: center; }
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
position:absolute;
|
position:absolute;
|
||||||
top: 80px;
|
top: 80px;
|
||||||
left:50px;
|
padding-left:50px;
|
||||||
z-index: 9000;
|
z-index: 9000;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -346,7 +346,7 @@ th.dt-center, td.dt-center { text-align: center; }
|
|||||||
|
|
||||||
@media (max-width: 980px) {
|
@media (max-width: 980px) {
|
||||||
.herobox { display: none; }
|
.herobox { display: none; }
|
||||||
.herotitle { width:100%; top: 70px; left:0px; text-align:center; }
|
.herotitle { width:100%; top: 70px; padding-left:0px; text-align:center; }
|
||||||
.slick-dots { top: 120px; left: 0px; text-align: center; width: 100%; }
|
.slick-dots { top: 120px; left: 0px; text-align: center; width: 100%; }
|
||||||
.heromenu .facatmenu {display: none;}
|
.heromenu .facatmenu {display: none;}
|
||||||
.catmenu { display:none }
|
.catmenu { display:none }
|
||||||
|
@ -71,6 +71,22 @@ class HomeController extends AbstractController
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function userhero($userpseudo)
|
||||||
|
{
|
||||||
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
$user=$em->getRepository("App:User")->findOneBy(["slug"=>$userpseudo]);
|
||||||
|
$illustrations = $em->getRepository("App:Illustration")->findByUser($user);
|
||||||
|
$webzines = $em->getRepository("App:Webzine")->findBy(["user"=>$user], ['set' => 'ASC', 'order' => 'ASC']);
|
||||||
|
$config = $em->getRepository("App:Config")->getUserConfig($user);
|
||||||
|
|
||||||
|
return $this->render('Home/userhero.html.twig',[
|
||||||
|
"user" => $user,
|
||||||
|
"config" => $config,
|
||||||
|
"illustrations" => $illustrations,
|
||||||
|
"webzines" => $webzines
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public function feedhome($nb)
|
public function feedhome($nb)
|
||||||
{
|
{
|
||||||
|
@ -2,13 +2,15 @@
|
|||||||
|
|
||||||
namespace App\Controller;
|
namespace App\Controller;
|
||||||
|
|
||||||
|
use App\Entity\Category;
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||||
use Symfony\Component\Form\FormError;
|
|
||||||
|
|
||||||
use App\Entity\Illustration as Entity;
|
use App\Entity\Illustration as Entity;
|
||||||
use App\Form\IllustrationType as Form;
|
use App\Form\IllustrationType as Form;
|
||||||
|
use App\Form\IllustrationCategoryType as FormCategory;
|
||||||
|
use DateTime;
|
||||||
|
|
||||||
class IllustrationController extends AbstractController
|
class IllustrationController extends AbstractController
|
||||||
{
|
{
|
||||||
@ -58,6 +60,9 @@ class IllustrationController extends AbstractController
|
|||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$data = new Entity();
|
$data = new Entity();
|
||||||
|
|
||||||
|
$nowWithMicroseconds = DateTime::createFromFormat('U.u', sprintf('%.6F', microtime(true)));
|
||||||
|
$data->setSubmittime($nowWithMicroseconds);
|
||||||
|
|
||||||
// Permission
|
// Permission
|
||||||
if(!$this->getUser()->hasRole("ROLE_ADMIN")&&($by=="admin"||$by=="update")) {
|
if(!$this->getUser()->hasRole("ROLE_ADMIN")&&($by=="admin"||$by=="update")) {
|
||||||
return $this->redirectToRoute("app_home");
|
return $this->redirectToRoute("app_home");
|
||||||
@ -80,8 +85,9 @@ class IllustrationController extends AbstractController
|
|||||||
// Sur validation
|
// Sur validation
|
||||||
if ($form->get('submit')->isClicked() && $form->isValid()) {
|
if ($form->get('submit')->isClicked() && $form->isValid()) {
|
||||||
$data = $form->getData();
|
$data = $form->getData();
|
||||||
$data->setSubmittime(new \DateTime());
|
$nowWithMicroseconds = DateTime::createFromFormat('U.u', sprintf('%.6F', microtime(true)));
|
||||||
$data->setUpdatetime(new \DateTime());
|
$data->setSubmittime($nowWithMicroseconds);
|
||||||
|
$data->setUpdatetime($nowWithMicroseconds);
|
||||||
$em->persist($data);
|
$em->persist($data);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
@ -108,6 +114,119 @@ class IllustrationController extends AbstractController
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function submits01($by, $userid, Request $request)
|
||||||
|
{
|
||||||
|
// Initialisation de l'enregistrement
|
||||||
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
$data = new Entity();
|
||||||
|
$nowWithMicroseconds = DateTime::createFromFormat('U.u', sprintf('%.6F', microtime(true)));
|
||||||
|
$data->setSubmittime($nowWithMicroseconds);
|
||||||
|
|
||||||
|
// Permission
|
||||||
|
if(!$this->getUser()->hasRole("ROLE_ADMIN")&&($by=="admin"||$by=="update")) {
|
||||||
|
return $this->redirectToRoute("app_home");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Création du formulaire
|
||||||
|
if($by=="admin"||$by=="update") {
|
||||||
|
$form = $this->createForm(FormCategory::class,$data,array("mode"=>"submit","by"=>$by,"user"=>$em->getRepository("App:User")->find($userid)));
|
||||||
|
} else {
|
||||||
|
$form = $this->createForm(FormCategory::class,$data,array("mode"=>"submit","by"=>$by,"user"=>$this->getUser()));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Récupération des data du formulaire
|
||||||
|
$form->handleRequest($request);
|
||||||
|
|
||||||
|
// Sur erreur
|
||||||
|
$this->getErrorForm(null,$form,$request,$data,"submit");
|
||||||
|
|
||||||
|
// Sur validation
|
||||||
|
if ($form->get('submit')->isClicked() && $form->isValid()) {
|
||||||
|
$data = $form->getData();
|
||||||
|
$categoryid=$data->getCategory()->getId();
|
||||||
|
|
||||||
|
return $this->redirectToRoute('app_illustration_submits02',["by"=>$by,"userid"=>$userid,"categoryid"=>$categoryid]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Affichage du formulaire
|
||||||
|
return $this->render($this->render.'submits01.html.twig', [
|
||||||
|
'useheader' => true,
|
||||||
|
'usesidebar' => ($by=="admin" || $by=="update"),
|
||||||
|
$this->data => $data,
|
||||||
|
'mode' => 'submit',
|
||||||
|
'form' => $form->createView(),
|
||||||
|
'by' => $by,
|
||||||
|
'userid' => $userid,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function submits02($by, $userid, $categoryid, Request $request)
|
||||||
|
{
|
||||||
|
// Initialisation de l'enregistrement
|
||||||
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
$data = new Entity();
|
||||||
|
$nowWithMicroseconds = DateTime::createFromFormat('U.u', sprintf('%.6F', microtime(true)));
|
||||||
|
$data->setSubmittime($nowWithMicroseconds);
|
||||||
|
|
||||||
|
// Permission
|
||||||
|
if(!$this->getUser()->hasRole("ROLE_ADMIN")&&($by=="admin"||$by=="update")) {
|
||||||
|
return $this->redirectToRoute("app_home");
|
||||||
|
}
|
||||||
|
if($by!="admin"&&$by!="update") {
|
||||||
|
if($this->getUser()!=$em->getRepository(Category::class)->find($categoryid)->getUser()&&!$this->getUser()->hasRole("ROLE_ADMIN"))
|
||||||
|
return $this->redirectToRoute("app_home");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Affichage du formulaire
|
||||||
|
return $this->render($this->render.'submits02.html.twig', [
|
||||||
|
'useheader' => true,
|
||||||
|
'usesidebar' => ($by=="admin" || $by=="update"),
|
||||||
|
$this->data => $data,
|
||||||
|
'mode' => 'submit',
|
||||||
|
'by' => $by,
|
||||||
|
'userid' => $userid,
|
||||||
|
'categoryid' => $categoryid,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function submits03($by, $userid, $categoryid, Request $request)
|
||||||
|
{
|
||||||
|
// Initialisation de l'enregistrement
|
||||||
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
$data = new Entity();
|
||||||
|
$nowWithMicroseconds = DateTime::createFromFormat('U.u', sprintf('%.6F', microtime(true)));
|
||||||
|
$data->setSubmittime($nowWithMicroseconds);
|
||||||
|
$data->setUpdatetime($nowWithMicroseconds);
|
||||||
|
$category=$em->getRepository(Category::class)->find($categoryid);
|
||||||
|
|
||||||
|
// Permission
|
||||||
|
if(!$this->getUser()->hasRole("ROLE_ADMIN")&&($by=="admin"||$by=="update")) {
|
||||||
|
return $this->redirectToRoute("app_home");
|
||||||
|
}
|
||||||
|
if($by!="admin"&&$by!="update") {
|
||||||
|
if($this->getUser()!=$category->getUser()&&!$this->getUser()->hasRole("ROLE_ADMIN"))
|
||||||
|
return $this->redirectToRoute("app_home");
|
||||||
|
}
|
||||||
|
|
||||||
|
$illustration=$request->request->get('illustration');
|
||||||
|
$width=$request->request->get('width');
|
||||||
|
$height=$request->request->get('height');
|
||||||
|
$name=$request->request->get('name');
|
||||||
|
|
||||||
|
$data->setName($name);
|
||||||
|
$data->setIllustration($illustration);
|
||||||
|
$data->setWidth($width);
|
||||||
|
$data->setHeight($height);
|
||||||
|
$data->setCategory($category);
|
||||||
|
|
||||||
|
$em->persist($data);
|
||||||
|
$em->flush();
|
||||||
|
|
||||||
|
return new JsonResponse();
|
||||||
|
}
|
||||||
|
|
||||||
public function update($id,$by,Request $request)
|
public function update($id,$by,Request $request)
|
||||||
{
|
{
|
||||||
// Initialisation de l'enregistrement
|
// Initialisation de l'enregistrement
|
||||||
|
@ -17,229 +17,30 @@ class SlideController extends AbstractController
|
|||||||
private $render = "Illustration/";
|
private $render = "Illustration/";
|
||||||
private $entity = "App:Illustration";
|
private $entity = "App:Illustration";
|
||||||
|
|
||||||
public function slide(Request $request)
|
public function slide($userpseudo,Request $request)
|
||||||
{
|
{
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$datas = $em->getRepository($this->entity)->findAll();
|
$user=$em->getRepository("App:User")->findOneBy(["slug"=>$userpseudo]);
|
||||||
|
if(!$user) return $this->redirectToRoute("app_home");
|
||||||
|
|
||||||
|
$qb = $em ->createQueryBuilder()
|
||||||
|
->select('i')
|
||||||
|
->from("App:Illustration", 'i')
|
||||||
|
->from("App:Category", 'c')
|
||||||
|
->from("App:User",'u')
|
||||||
|
->Where('c=i.category')
|
||||||
|
->andWhere('u=c.user')
|
||||||
|
->andWhere('u.slug=:userpseudo')
|
||||||
|
->setParameter('userpseudo',$userpseudo)
|
||||||
|
->orderBy('i.submittime','DESC');
|
||||||
|
$illustrations=$qb->getQuery()->getResult();
|
||||||
|
|
||||||
return $this->render($this->render.'slide.html.twig',[
|
return $this->render($this->render.'slide.html.twig',[
|
||||||
$this->data."s" => $datas,
|
$this->data."s" => $illustrations,
|
||||||
"useheader" => false,
|
"useheader" => false,
|
||||||
"usesidebar" => false,
|
"usesidebar" => false,
|
||||||
"usemonocolor" => true,
|
"usemonocolor" => true,
|
||||||
|
"user" => $user,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function view($idcat,$id,Request $request)
|
|
||||||
{
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
|
||||||
$data=$em->getRepository($this->entity)->find($id);
|
|
||||||
|
|
||||||
$datanext=$this->getDataAllNext($idcat,$id);
|
|
||||||
$dataprev=$this->getDataAllPrev($idcat,$id);
|
|
||||||
|
|
||||||
$pathinfo=pathinfo($data->getIllustration());
|
|
||||||
|
|
||||||
if(!$data) return $this->redirectToRoute('app_home');
|
|
||||||
|
|
||||||
return $this->render($this->render.'view.html.twig', array(
|
|
||||||
$this->data => $data,
|
|
||||||
"prev" => $dataprev,
|
|
||||||
"next" => $datanext,
|
|
||||||
"pathinfo" => $pathinfo,
|
|
||||||
"usemonocolor" => true,
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public function submit($by, Request $request)
|
|
||||||
{
|
|
||||||
// Initialisation de l'enregistrement
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
|
||||||
$data = new Entity();
|
|
||||||
|
|
||||||
// Création du formulaire
|
|
||||||
$form = $this->createForm(Form::class,$data,array("mode"=>"submit"));
|
|
||||||
|
|
||||||
// Récupération des data du formulaire
|
|
||||||
$form->handleRequest($request);
|
|
||||||
|
|
||||||
// Sur erreur
|
|
||||||
$this->getErrorForm(null,$form,$request,$data,"submit");
|
|
||||||
|
|
||||||
// Sur validation
|
|
||||||
if ($form->get('submit')->isClicked() && $form->isValid()) {
|
|
||||||
$data = $form->getData();
|
|
||||||
$data->setSubmittime(new \DateTime());
|
|
||||||
$em->persist($data);
|
|
||||||
$em->flush();
|
|
||||||
|
|
||||||
// Retour à la liste
|
|
||||||
if($by=="console")
|
|
||||||
return $this->redirectToRoute($this->route);
|
|
||||||
else
|
|
||||||
return $this->redirectToRoute("app_home");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Affichage du formulaire
|
|
||||||
return $this->render($this->render.'edit.html.twig', [
|
|
||||||
'useheader' => true,
|
|
||||||
'usesidebar' => false,
|
|
||||||
$this->data => $data,
|
|
||||||
'mode' => 'submit',
|
|
||||||
'form' => $form->createView(),
|
|
||||||
'by' => $by,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function update($id,$by,Request $request)
|
|
||||||
{
|
|
||||||
// Initialisation de l'enregistrement
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
|
||||||
$data=$em->getRepository($this->entity)->find($id);
|
|
||||||
|
|
||||||
// Création du formulaire
|
|
||||||
$form = $this->createForm(Form::class,$data,array("mode"=>"update"));
|
|
||||||
|
|
||||||
// Récupération des data du formulaire
|
|
||||||
$form->handleRequest($request);
|
|
||||||
|
|
||||||
// Sur erreur
|
|
||||||
$this->getErrorForm($id,$form,$request,$data,"update");
|
|
||||||
|
|
||||||
// Sur validation
|
|
||||||
if ($form->get('submit')->isClicked() && $form->isValid()) {
|
|
||||||
$data = $form->getData();
|
|
||||||
$em->persist($data);
|
|
||||||
$em->flush();
|
|
||||||
|
|
||||||
// Retour à l'illustration
|
|
||||||
if($by=="console")
|
|
||||||
return $this->redirectToRoute($this->route);
|
|
||||||
else
|
|
||||||
return $this->redirectToRoute($this->route.'_view',array("idcat"=>$data->getCategory()->getId(),"id"=> $id));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Affichage du formulaire
|
|
||||||
return $this->render($this->render.'edit.html.twig', [
|
|
||||||
'useheader' => true,
|
|
||||||
'usesidebar' => false,
|
|
||||||
$this->data => $data,
|
|
||||||
'mode' => 'update',
|
|
||||||
'form' => $form->createView(),
|
|
||||||
'by' => $by,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function delete($id,$by,Request $request)
|
|
||||||
{
|
|
||||||
// Initialisation de l'enregistrement
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
|
||||||
$data=$em->getRepository($this->entity)->find($id);
|
|
||||||
|
|
||||||
// Controle avant suppression
|
|
||||||
$error=false;
|
|
||||||
if($id<0) $error=true;
|
|
||||||
|
|
||||||
if($error)
|
|
||||||
return $this->redirectToRoute($this->route."_update",["id"=>$id]);
|
|
||||||
else {
|
|
||||||
$em->remove($data);
|
|
||||||
$em->flush();
|
|
||||||
|
|
||||||
// Retour à la liste
|
|
||||||
if($by=="console")
|
|
||||||
return $this->redirectToRoute($this->route);
|
|
||||||
else
|
|
||||||
return $this->redirectToRoute("app_home");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function upload()
|
|
||||||
{
|
|
||||||
return $this->render($this->render.'upload.html.twig');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected function getDataAllNext($idcat,$id)
|
|
||||||
{
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
|
||||||
$data = $em->createQueryBuilder()
|
|
||||||
->select('e')
|
|
||||||
->from($this->entity, 'e')
|
|
||||||
->where('e.id>:id')
|
|
||||||
->andWhere('e.category=:idcat')
|
|
||||||
->getQuery()
|
|
||||||
->setParameter("id", $id)
|
|
||||||
->setParameter("idcat", $idcat)
|
|
||||||
->setMaxResults(1)
|
|
||||||
->getResult();
|
|
||||||
|
|
||||||
// Si pas de suivant on recherche le premier
|
|
||||||
if(!$data) {
|
|
||||||
$data = $em->createQueryBuilder()
|
|
||||||
->select('e')
|
|
||||||
->from($this->entity, 'e')
|
|
||||||
->Where('e.category=:idcat')
|
|
||||||
->getQuery()
|
|
||||||
->setParameter("idcat", $idcat)
|
|
||||||
->setMaxResults(1)
|
|
||||||
->getResult();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $data;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getDataAllPrev($idcat,$id)
|
|
||||||
{
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
|
||||||
$data = $em->createQueryBuilder()
|
|
||||||
->select('e')
|
|
||||||
->from($this->entity, 'e')
|
|
||||||
->where('e.id<:id')
|
|
||||||
->andWhere('e.category=:idcat')
|
|
||||||
->orderBy('e.id','DESC')
|
|
||||||
->getQuery()
|
|
||||||
->setParameter("id", $id)
|
|
||||||
->setParameter("idcat", $idcat)
|
|
||||||
->setMaxResults(1)
|
|
||||||
->getResult();
|
|
||||||
|
|
||||||
// Si pas de précedent on recherche le dernier
|
|
||||||
if(!$data) {
|
|
||||||
$data = $em->createQueryBuilder()
|
|
||||||
->select('e')
|
|
||||||
->from($this->entity, 'e')
|
|
||||||
->Where('e.category=:idcat')
|
|
||||||
->orderBy('e.id','DESC')
|
|
||||||
->getQuery()
|
|
||||||
->setParameter("idcat", $idcat)
|
|
||||||
->setMaxResults(1)
|
|
||||||
->getResult();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $data;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getErrorForm($id,$form,$request,$data,$mode) {
|
|
||||||
if ($form->get('submit')->isClicked()&&$mode=="delete") {
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($form->get('submit')->isClicked() && $mode=="submit") {
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($form->get('submit')->isClicked() && ($mode=="submit" || $mode=="update")) {
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($form->get('submit')->isClicked() && !$form->isValid()) {
|
|
||||||
$this->get('session')->getFlashBag()->clear();
|
|
||||||
|
|
||||||
$errors = $form->getErrors();
|
|
||||||
foreach( $errors as $error ) {
|
|
||||||
$request->getSession()->getFlashBag()->add("error", $error->getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ class UserController extends AbstractController
|
|||||||
|
|
||||||
|
|
||||||
// Création du formulaire
|
// Création du formulaire
|
||||||
$form = $this->createForm(Form::class,$data,array("mode"=>"submit"));
|
$form = $this->createForm(Form::class,$data,array("mode"=>"submit","appNinegateactivate"=>$this->getParameter("appNinegateactivate")));
|
||||||
|
|
||||||
// Récupération des data du formulaire
|
// Récupération des data du formulaire
|
||||||
$form->handleRequest($request);
|
$form->handleRequest($request);
|
||||||
|
@ -284,8 +284,8 @@ class WebzineController extends AbstractController
|
|||||||
$page=$em->getRepository("App:Webzinepage")->find($id);
|
$page=$em->getRepository("App:Webzinepage")->find($id);
|
||||||
$sets=$em->getRepository($this->entity)->findBy(["set"=>$webzine->getSet()],["order"=>"ASC"]);
|
$sets=$em->getRepository($this->entity)->findBy(["set"=>$webzine->getSet()],["order"=>"ASC"]);
|
||||||
|
|
||||||
$datanext=$this->getDataAllNext($idcat,$id,$webzine);
|
$datanext=$this->getDataAllNext($idcat,$page->getOrder(),$webzine);
|
||||||
$dataprev=$this->getDataAllPrev($idcat,$id,$webzine);
|
$dataprev=$this->getDataAllPrev($idcat,$page->getOrder(),$webzine);
|
||||||
|
|
||||||
$pathinfo=pathinfo($page->getIllustration());
|
$pathinfo=pathinfo($page->getIllustration());
|
||||||
|
|
||||||
@ -304,17 +304,17 @@ class WebzineController extends AbstractController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected function getDataAllNext($idcat,$id,$webzine)
|
protected function getDataAllNext($idcat,$order,$webzine)
|
||||||
{
|
{
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$data = $em->createQueryBuilder()
|
$data = $em->createQueryBuilder()
|
||||||
->select('e')
|
->select('e')
|
||||||
->from("App:Webzinepage", 'e')
|
->from("App:Webzinepage", 'e')
|
||||||
->where('e.id>:id')
|
->where('e.order>:order')
|
||||||
->andWhere('e.webzine=:idcat')
|
->andWhere('e.webzine=:idcat')
|
||||||
->orderBy("e.order","ASC")
|
->orderBy("e.order","ASC")
|
||||||
->getQuery()
|
->getQuery()
|
||||||
->setParameter("id", $id)
|
->setParameter("order", $order)
|
||||||
->setParameter("idcat", $idcat)
|
->setParameter("idcat", $idcat)
|
||||||
->setMaxResults(1)
|
->setMaxResults(1)
|
||||||
->getResult();
|
->getResult();
|
||||||
@ -348,17 +348,17 @@ class WebzineController extends AbstractController
|
|||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getDataAllPrev($idcat,$id,$webzine)
|
protected function getDataAllPrev($idcat,$order,$webzine)
|
||||||
{
|
{
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$data = $em->createQueryBuilder()
|
$data = $em->createQueryBuilder()
|
||||||
->select('e')
|
->select('e')
|
||||||
->from("App:Webzinepage", 'e')
|
->from("App:Webzinepage", 'e')
|
||||||
->where('e.id<:id')
|
->where('e.order<:order')
|
||||||
->andWhere('e.webzine=:idcat')
|
->andWhere('e.webzine=:idcat')
|
||||||
->orderBy("e.order","DESC")
|
->orderBy("e.order","DESC")
|
||||||
->getQuery()
|
->getQuery()
|
||||||
->setParameter("id", $id)
|
->setParameter("order", $order)
|
||||||
->setParameter("idcat", $idcat)
|
->setParameter("idcat", $idcat)
|
||||||
->setMaxResults(1)
|
->setMaxResults(1)
|
||||||
->getResult();
|
->getResult();
|
||||||
|
@ -30,12 +30,12 @@ class Illustration
|
|||||||
private $description;
|
private $description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="datetime")
|
* @ORM\Column(type="datetime", precision=6)
|
||||||
*/
|
*/
|
||||||
private $submittime;
|
private $submittime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="datetime")
|
* @ORM\Column(type="datetime", precision=6)
|
||||||
*/
|
*/
|
||||||
private $updatetime;
|
private $updatetime;
|
||||||
|
|
||||||
@ -96,7 +96,6 @@ class Illustration
|
|||||||
public function setSubmittime(\DateTimeInterface $submittime): self
|
public function setSubmittime(\DateTimeInterface $submittime): self
|
||||||
{
|
{
|
||||||
$this->submittime = $submittime;
|
$this->submittime = $submittime;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -433,6 +433,7 @@ class User implements UserInterface, \Serializable
|
|||||||
{
|
{
|
||||||
$this->pseudo = $pseudo?$pseudo:$this->username;
|
$this->pseudo = $pseudo?$pseudo:$this->username;
|
||||||
$pseudo=strtolower($this->pseudo);
|
$pseudo=strtolower($this->pseudo);
|
||||||
|
$pseudo=str_replace("'","",$pseudo);
|
||||||
if($pseudo=="admin"||$pseudo=="user"||$pseudo=="feed"||$pseudo=="_uploader") $pseudo.="home";
|
if($pseudo=="admin"||$pseudo=="user"||$pseudo=="feed"||$pseudo=="_uploader") $pseudo.="home";
|
||||||
$this->slug = $pseudo;
|
$this->slug = $pseudo;
|
||||||
return $this;
|
return $this;
|
||||||
|
65
src/Form/IllustrationCategoryType.php
Normal file
65
src/Form/IllustrationCategoryType.php
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
<?php
|
||||||
|
namespace App\Form;
|
||||||
|
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\DateTimeType;
|
||||||
|
use FOS\CKEditorBundle\Form\Type\CKEditorType;
|
||||||
|
|
||||||
|
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||||
|
use Doctrine\ORM\EntityRepository;
|
||||||
|
use Doctrine\ORM\QueryBuilder;
|
||||||
|
|
||||||
|
class IllustrationCategoryType extends AbstractType
|
||||||
|
{
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
{
|
||||||
|
$builder->add('submit',
|
||||||
|
SubmitType::class, [
|
||||||
|
"label" => "Valider",
|
||||||
|
"attr" => ["class" => "btn btn-success no-print"],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
if($options["by"]=="admin") {
|
||||||
|
$builder->add('category',
|
||||||
|
EntityType::class, [
|
||||||
|
"class" => "App:Category",
|
||||||
|
"label" => "Categorie",
|
||||||
|
"choice_label"=> function($category) {
|
||||||
|
return $category->getUser()->getUsername(). ' = ' . $category->getName();
|
||||||
|
},
|
||||||
|
"group_by" => function($category) {
|
||||||
|
return $category->getUser()->getUsername();
|
||||||
|
},
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$builder->add('category',
|
||||||
|
EntityType::class, [
|
||||||
|
"class" => "App:Category",
|
||||||
|
"label" => "Categorie",
|
||||||
|
"choice_label"=> "name",
|
||||||
|
'query_builder' => function (EntityRepository $er) use ($options): QueryBuilder {
|
||||||
|
return $er->createQueryBuilder('c')->where('c.user=:user')->setParameter('user',$options['user']->getId())->orderBy('c.order', 'ASC');
|
||||||
|
},
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function configureOptions(OptionsResolver $resolver)
|
||||||
|
{
|
||||||
|
$resolver->setDefaults(array(
|
||||||
|
'data_class' => 'App\Entity\Illustration',
|
||||||
|
'mode' => 'string',
|
||||||
|
'by' => 'string',
|
||||||
|
'user' => 'App\Entity\User'
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
@ -7,6 +7,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
|
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\DateTimeType;
|
||||||
use FOS\CKEditorBundle\Form\Type\CKEditorType;
|
use FOS\CKEditorBundle\Form\Type\CKEditorType;
|
||||||
|
|
||||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||||
@ -42,6 +43,15 @@ class IllustrationType extends AbstractType
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$builder->add('submittime',
|
||||||
|
DateTimeType::class, [
|
||||||
|
"label" =>"Date de Publication",
|
||||||
|
"date_widget" => "single_text",
|
||||||
|
"time_widget" => "single_text",
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
if($options["by"]=="admin") {
|
if($options["by"]=="admin") {
|
||||||
$builder->add('category',
|
$builder->add('category',
|
||||||
EntityType::class, [
|
EntityType::class, [
|
||||||
|
@ -52,6 +52,7 @@ class UserType extends AbstractType
|
|||||||
if($options["mode"]!="profil") {
|
if($options["mode"]!="profil") {
|
||||||
$choices=[];
|
$choices=[];
|
||||||
$choices['Administrateur']='ROLE_ADMIN';
|
$choices['Administrateur']='ROLE_ADMIN';
|
||||||
|
$choices['Membre']='ROLE_MEMBER';
|
||||||
$choices['Utilisateur']='ROLE_USER';
|
$choices['Utilisateur']='ROLE_USER';
|
||||||
|
|
||||||
$builder->add('roles',
|
$builder->add('roles',
|
||||||
|
@ -55,6 +55,9 @@ class uploadListener
|
|||||||
case "image/x-png":
|
case "image/x-png":
|
||||||
$source=imagecreatefrompng($image);
|
$source=imagecreatefrompng($image);
|
||||||
break;
|
break;
|
||||||
|
case 'image/webp':
|
||||||
|
$source = imagecreatefromwebp($image);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$newImage = imagecreatetruecolor( $newImageWidth, $newImageHeight );
|
$newImage = imagecreatetruecolor( $newImageWidth, $newImageHeight );
|
||||||
@ -75,6 +78,8 @@ class uploadListener
|
|||||||
case "image/x-png":
|
case "image/x-png":
|
||||||
imagepng($newImage,$image);
|
imagepng($newImage,$image);
|
||||||
break;
|
break;
|
||||||
|
case 'image/webp':
|
||||||
|
imagewebp($newImage, $image, 90);
|
||||||
}
|
}
|
||||||
|
|
||||||
chmod($image, 0640);
|
chmod($image, 0640);
|
||||||
|
551
templates/Home/home.html copy.twig
Normal file
551
templates/Home/home.html copy.twig
Normal file
@ -0,0 +1,551 @@
|
|||||||
|
{% extends "base.html.twig" %}
|
||||||
|
|
||||||
|
{% block localstyle %}
|
||||||
|
#main {
|
||||||
|
padding: 0px;
|
||||||
|
display:none;
|
||||||
|
margin-bottom:200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
{% if app.session.get("appthumbfilter")=="1" %}
|
||||||
|
.cssfilter {
|
||||||
|
filter: grayscale({{app.session.get("appthumbfiltergrayscale")}}%) opacity({{app.session.get("appthumbfilteropacity")}}%) sepia({{app.session.get("appthumbfiltersepia")}}%);
|
||||||
|
transition: -webkit-filter 0.1s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cssfilter:hover {
|
||||||
|
filter: unset;
|
||||||
|
-webkit-filter: unset;
|
||||||
|
-moz-filter: unset;
|
||||||
|
-o-filter: unset;
|
||||||
|
-ms-filter: unset;
|
||||||
|
|
||||||
|
-webkit-transition: -webkit-filter 0.1s;
|
||||||
|
transition: -webkit-filter 0.1s;
|
||||||
|
}
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
|
||||||
|
<!-- FOLIOMENU -----------------------------------------------------------------------------------------------------------------------------------------------!-->
|
||||||
|
<div class="foliomenu">
|
||||||
|
<a href="#top"><img src="{{ asset("uploads/logo/"~app.session.get("logodark")) }}" class="logo"></a>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{% if users is not empty %}
|
||||||
|
<i class="fa fa-circle fa-fw"></i> <a href="#membre">Membres</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if illustrations is not empty %}
|
||||||
|
<i class="fa fa-circle fa-fw"></i> <a href="#illustration">Illustrations</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if not webzines is empty %}
|
||||||
|
<i class="fa fa-circle fa-fw"></i> <a href="#webzine">Webzines</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if not links is empty %}
|
||||||
|
<i class="fa fa-circle fa-fw"></i> <a href="#link">Liens</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="float-right">
|
||||||
|
{% if app.user %}
|
||||||
|
<a href="{{path("app_user_profil")}}">
|
||||||
|
<img src="{{app.user.avatar|urlavatar}}" class="avatar">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
{% if is_granted('ROLE_ADMIN') %}
|
||||||
|
<a href={{ path("app_admin") }} class="btn btn-link" title="Configuration">
|
||||||
|
<i class="fa fa-cog fa-fw"></i>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<a href="" data-toggle="modal" data-target="#addmodal">
|
||||||
|
<i class="fa fa-plus fa-fw"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href={{ path("app_logout") }} class="btn btn-link" title="Déconnexion">
|
||||||
|
<i class="fa fa-sign-out-alt fa-fw"></i>
|
||||||
|
</a>
|
||||||
|
{% else %}
|
||||||
|
{% if(appNinegateurl and appNinegatemoderegistration!="none") %}
|
||||||
|
<a href="{{appNinegateurl}}/registration?redirect={{app.request.uri}}" class="btn btn-link" title="Inscription">
|
||||||
|
<i class="fa fa-user-plus fa-fw"></i>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<a href={{ path("app_login") }} class="btn btn-link" title="Connexion">
|
||||||
|
<i class="fa fa-sign-in-alt fa-fw"></i>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="foliotop">
|
||||||
|
<a href="#top"><i class="fa fa-chevron-up"></i></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- HEROHEADER ------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
||||||
|
<div id="top" class="heroheader" displaynone>
|
||||||
|
{%if not app.session.get("hero01") is empty %}
|
||||||
|
<div class="cssfilter" style="background-image:url(/{{appAlias}}/uploads/hero/{{app.session.get("hero01")}})"></div>
|
||||||
|
{%endif%}
|
||||||
|
|
||||||
|
{%if not app.session.get("hero02") is empty %}
|
||||||
|
<div class="cssfilter"style="background-image:url(/{{appAlias}}/uploads/hero/{{app.session.get("hero02")}})"></div>
|
||||||
|
{%endif%}
|
||||||
|
|
||||||
|
{%if not app.session.get("hero03") is empty %}
|
||||||
|
<div class="cssfilter"style="background-image:url(/{{appAlias}}/uploads/hero/{{app.session.get("hero03")}})"></div>
|
||||||
|
{%endif%}
|
||||||
|
|
||||||
|
{%if not app.session.get("hero04") is empty %}
|
||||||
|
<div class="cssfilter"style="background-image:url(/{{appAlias}}/uploads/hero/{{app.session.get("hero04")}})"></div>
|
||||||
|
{%endif%}
|
||||||
|
|
||||||
|
{%if not app.session.get("hero05") is empty %}
|
||||||
|
<div class="cssfilter"style="background-image:url(/{{appAlias}}/uploads/hero/{{app.session.get("hero05")}})"></div>
|
||||||
|
{%endif%}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="herofloatmenu" style="position: absolute; top: 0px; right: 10px;">
|
||||||
|
{% if app.user %}
|
||||||
|
<a href="{{path("app_user_profil")}}">
|
||||||
|
<img src="{{app.user.avatar|urlavatar}}" class="avatar">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
{% if is_granted('ROLE_ADMIN') %}
|
||||||
|
<a href={{ path("app_admin") }} class="btn btn-link" title="Configuration">
|
||||||
|
<i class="fa fa-cog fa-fw"></i>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<a href="" data-toggle="modal" class="btn btn-link" data-target="#addmodal">
|
||||||
|
<i class="fa fa-plus fa-fw"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
<a href={{ path("app_logout") }} class="btn btn-link" title="Déconnexion">
|
||||||
|
<i class="fa fa-sign-out-alt fa-fw"></i>
|
||||||
|
</a>
|
||||||
|
{% else %}
|
||||||
|
{% if(appNinegateurl and appNinegatemoderegistration!="none") %}
|
||||||
|
<a href="{{appNinegateurl}}/registration?redirect={{app.request.uri}}" class="btn btn-link" title="Inscription">
|
||||||
|
<i class="fa fa-user-plus fa-fw"></i>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<a href={{ path("app_login") }} class="btn btn-link" title="Connexion">
|
||||||
|
<i class="fa fa-sign-in-alt fa-fw"></i>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="herobox"></div>
|
||||||
|
|
||||||
|
<div class="herotitle">
|
||||||
|
<h1><a href="#site">{{ (app.session.get("appname")) }}</a></h1>
|
||||||
|
|
||||||
|
<div class="heromenu" >
|
||||||
|
{% if not app.session.get("appsubname") is empty %}
|
||||||
|
<i style="font-size:80%;">{{ app.session.get("appsubname") }}</i><br>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="linkmenu" style="clear:both">
|
||||||
|
{% if app.session.get('email') is not empty %}
|
||||||
|
<a href="mailto:{{ app.session.get('email') }}" target="_blank" title="Email"><i class="fas fa-envelope fa-2x"></i></a>
|
||||||
|
{% endif %}
|
||||||
|
{% if app.session.get('facebook') is not empty %}
|
||||||
|
<a href="{{ app.session.get('facebook') }}" target="_blank" title="Facebook"><i class="fab fa-facebook fa-2x"></i></a>
|
||||||
|
{% endif %}
|
||||||
|
{% if app.session.get('instagram') is not empty %}
|
||||||
|
<a href="{{ app.session.get('instagram') }}" target="_blank" title="Instagram"><i class="fab fa-instagram fa-2x"></i></a>
|
||||||
|
{% endif %}
|
||||||
|
{% if app.session.get('twitter') is not empty %}
|
||||||
|
<a href="{{ app.session.get('twitter') }}" target="_blank" title="Twitter"><i class="fab fa-twitter fa-2x"></i></a>
|
||||||
|
{% endif %}
|
||||||
|
{% if app.session.get('google') is not empty %}
|
||||||
|
<a href="{{ app.session.get('google') }}" target="_blank" title="Google"><i class="fab fa-google-plus fa-2x"></i></a>
|
||||||
|
{% endif %}
|
||||||
|
{% if app.session.get('youtube') is not empty %}
|
||||||
|
<a href="{{ app.session.get('youtube') }}" target="_blank" title="Youtube"><i class="fab fa-youtube fa-2x"></i></a>
|
||||||
|
{% endif %}
|
||||||
|
<a href="{{ path("app_feedhome") }}" target="_blank" title="RSS"><i class="fa fa-rss-square fa-2x"></i></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="catmenu">
|
||||||
|
{% if not users is empty %}
|
||||||
|
<a href="#membre"><i class="fa fa-arrow-circle-right fa-fw facatmenu"></i> Membres</a><br>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if not illustrations is empty %}
|
||||||
|
<a href="#illustration"><i class="fa fa-arrow-circle-right fa-fw facatmenu"></i> Illustrations</a><br>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if not webzines is empty %}
|
||||||
|
<a href="#webzine"><i class="fa fa-arrow-circle-right fa-fw facatmenu"></i> Webzines</a><br>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if not links is empty %}
|
||||||
|
<a href="#link"><i class="fa fa-arrow-circle-right fa-fw facatmenu"></i> Liens</a><br>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if not items is empty %}
|
||||||
|
<div class="itemmenu" style="max-width:360px; display:flex; margin:20px auto 0px auto; flex-wrap: wrap; justify-content: center; zoom: 75%">
|
||||||
|
{% for item in items %}
|
||||||
|
{% if item.title|lower != "ninefolio" %}
|
||||||
|
<a href="{{ item.url }}" target="_blank">
|
||||||
|
<div class="item" style="display:flex; flex-direction: column; align-items: center; font-size:15px; padding:5px; width:90px;">
|
||||||
|
<img src="{{ item.icon }}" style="width:50px;height:50px">
|
||||||
|
<span style="margin-top:5px">{{ item.title }}</span>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="herologo">
|
||||||
|
<img src="/{{ appAlias }}/uploads/logo/{{ app.session.get('logodark') }}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- GRID ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
||||||
|
{% set style="margin:30px" %}
|
||||||
|
{% if app.session.get("appmaxthumbwidth")!="0" %}
|
||||||
|
{% set style="max-width:"~app.session.get("appmaxthumbwidth")~"px; margin:30px auto;" %}
|
||||||
|
{% endif %}
|
||||||
|
<div class="grid" style="{{ style }}">
|
||||||
|
<div class="grid-sizer"></div>
|
||||||
|
<div class="gutter-sizer"></div>
|
||||||
|
|
||||||
|
<!-- SITE ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
||||||
|
<div>
|
||||||
|
<div id="site" class="grid-item grid-item-full"><h1 class="mt-5 mb-3"></h1></div>
|
||||||
|
|
||||||
|
<div class="grid-item grid-item-size grid-item-size-3 grid-item-size-square cssfilter" style="height:200px;background-position: center; background-size: cover; background-image: url(/{{ appAlias }}/uploads/image/{{ app.session.get("imgcontact")}});">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="grid-item grid-item-size grid-item-size-6 grid-item-size-noresize" style="padding:0px 15px;word-break:break-word;">
|
||||||
|
<h1 style="border:none; padding:0px;">{{ app.session.get("appname")}}</h1>
|
||||||
|
|
||||||
|
{% if not app.session.get("appsubname") is empty %}
|
||||||
|
{{ app.session.get("appsubname")}}<br>
|
||||||
|
{%endif%}
|
||||||
|
|
||||||
|
{% if not app.session.get("appdescription") is empty %}
|
||||||
|
<br>{{ app.session.get("appdescription")|raw}}
|
||||||
|
{%endif%}
|
||||||
|
|
||||||
|
{% if app.session.get('email') is not empty or app.session.get('facebook') is not empty or app.session.get('instagram') is not empty or app.session.get('twitter') is not empty or app.session.get('google') is not empty or app.session.get('youtube') is not empty %}
|
||||||
|
<br><br>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if app.session.get('email') is not empty %}
|
||||||
|
<i class="fas fa-envelope"></i> Email = <a href="mailto:{{ app.session.get('email') }}" target="_blank" title="Email">{{ app.session.get('email') }}</a><br>
|
||||||
|
{% endif %}
|
||||||
|
{% if app.session.get('facebook') is not empty %}
|
||||||
|
<i class="fab fa-facebook"></i> Facebook = <a href="{{ app.session.get('facebook') }}" target="_blank" title="Facebook">{{ app.session.get('facebook') }}</a><br>
|
||||||
|
{% endif %}
|
||||||
|
{% if app.session.get('instagram') is not empty %}
|
||||||
|
<i class="fab fa-instagram"></i> Instagram = <a href="{{ app.session.get('instagram') }}" target="_blank" title="Instagram">{{ app.session.get('instagram') }}</a><br>
|
||||||
|
{% endif %}
|
||||||
|
{% if app.session.get('twitter') is not empty %}
|
||||||
|
<i class="fab fa-twitter"></i> Twitter = <a href="{{ app.session.get('twitter') }}" target="_blank" title="Twitter">{{ app.session.get('twitter') }}</a><br>
|
||||||
|
{% endif %}
|
||||||
|
{% if app.session.get('google') is not empty %}
|
||||||
|
<i class="fab fa-google-plus"></i> Google = <a href="{{ app.session.get('google') }}" target="_blank" title="Google">{{ app.session.get('google') }}</a><br>
|
||||||
|
{% endif %}
|
||||||
|
{% if app.session.get('youtube') is not empty %}
|
||||||
|
<i class="fab fa-youtube"></i> Youtube = <a href="{{ app.session.get('youtube') }}" target="_blank" title="Youtube">{{ app.session.get('youtube') }}</a><br>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- MEMBRE ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
||||||
|
{% if not users is empty %}
|
||||||
|
<div>
|
||||||
|
<div id="membre" class="grid-item grid-item-full"><h1 class="mt-5 mb-3">Membres</h1></div>
|
||||||
|
|
||||||
|
{% for user in users %}
|
||||||
|
{% if user.hasRole('ROLE_MEMBER') %}
|
||||||
|
<div class="grid-item grid-item-size grid-item-size-15 grid-item-size-small-3 grid-item-size-noresize" style="padding:0px 5px;margin-bottom:10px;">
|
||||||
|
<a class="member" href="{{path("app_home_user",{userpseudo:user.slug})}}">
|
||||||
|
<img src="/{{ appAlias }}/uploads/avatar/{{ user.avatar }}" class="mb-2">
|
||||||
|
<small>{{user.pseudo}}</small>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<!-- ILLUSTRATION ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
||||||
|
{% if not illustrations is empty %}
|
||||||
|
<div>
|
||||||
|
<div id="illustration" class="grid-item grid-item-full"><h1 class="mt-5 mb-3">Illustrations</h1></div>
|
||||||
|
|
||||||
|
{% for illustration in illustrations %}
|
||||||
|
{% set appthumbwidth=app.session.get("appthumbwidth") %}
|
||||||
|
{% set appthumbheight=app.session.get("appthumbheight") %}
|
||||||
|
|
||||||
|
{% set classmini="" %}
|
||||||
|
{% if appthumbwidth==0 %}
|
||||||
|
{% set class="" %}
|
||||||
|
{% if loop.index < 40 %}
|
||||||
|
{% if loop.index == 1 %}
|
||||||
|
{% set class="grid-item-size-4" %}
|
||||||
|
{% elseif loop.index is divisible by(28) %}
|
||||||
|
{% set class="grid-item-size-4" %}
|
||||||
|
{% elseif loop.index is divisible by(7) %}
|
||||||
|
{% set class="grid-item-size-2" %}
|
||||||
|
{% elseif loop.index is divisible by(46) %}
|
||||||
|
{% set class="grid-item-size-4" %}
|
||||||
|
{% endif %}
|
||||||
|
{% elseif loop.index > 48 %}
|
||||||
|
{% if loop.index == 49 %}
|
||||||
|
{% set class="grid-item-size-4" %}
|
||||||
|
{% elseif (loop.index-49) is divisible by(28) %}
|
||||||
|
{% set class="grid-item-size-4" %}
|
||||||
|
{% elseif (loop.index-49) is divisible by(7) %}
|
||||||
|
{% set class="grid-item-size-2" %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% set position = (loop.index - 1) % 10 + 1 %}
|
||||||
|
{% if position == 1 or position == 8 %}
|
||||||
|
{% set classmini = 'grid-item-mini-50' %}
|
||||||
|
{% else %}
|
||||||
|
{% set classmini = 'grid-item-mini-25' %}
|
||||||
|
{% endif %}
|
||||||
|
{% elseif appthumbwidth==1 %} {% set class="" %}
|
||||||
|
{% elseif appthumbwidth==2 %} {% set class="grid-item-size-2" %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{%if appthumbheight==0 %}
|
||||||
|
{% set class=class~" grid-item-size-square" %}
|
||||||
|
{% elseif appthumbheight==1 %}
|
||||||
|
{% set class=class~" grid-item-size-proportion" %}
|
||||||
|
{% else %}
|
||||||
|
{% set class=class~" grid-item-size-page" %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% set source="thumb_"~illustration.illustration %}
|
||||||
|
{% if appthumbheight!=0 %}
|
||||||
|
{% set source="thumbori_"~illustration.illustration %}
|
||||||
|
{% endif %}
|
||||||
|
{% set source=source~"?"~illustration.updatetime|date('ymdHis') %}
|
||||||
|
<a href="{{ path("app_illustration_view",{"by":"home","idcat":illustration.category.id,"id":illustration.id}) }}">
|
||||||
|
<div data-loop="{{loop.index}}" id="illustration{{illustration.id}}" class="grid-item grid-item-size {{class}} {{classmini}} cssfilter" data-width="{{illustration.width}}" data-background-image="/{{ appAlias }}/uploads/illustration/{{source}}" data-height="{{illustration.height}}" style="height:auto;background-position: center ; background-size: cover; background-image: url(/{{ appAlias }}/uploads/illustration/{{source}}");">
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<!-- WEBZINE ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
||||||
|
{% if not webzines is empty %}
|
||||||
|
<div>
|
||||||
|
<div id="webzine" class="grid-item grid-item-full"><h1 class="mt-5 mb-3">Webzines</h1></div>
|
||||||
|
|
||||||
|
{% set setname="" %}
|
||||||
|
{% for webzine in webzines %}
|
||||||
|
{% if not webzine.webzinepages is empty %}
|
||||||
|
{% if setname!=webzine.set %}
|
||||||
|
{% if not webzine.set is empty %}
|
||||||
|
<div id="webzine" class="grid-item grid-item-full"><h2 class="mt-3 pl-3">{{webzine.set}}</h2></div>
|
||||||
|
{% endif %}
|
||||||
|
{% set setname=webzine.set %}
|
||||||
|
{% endif %}
|
||||||
|
{% set page=webzine.webzinepages[0] %}
|
||||||
|
{% set source="thumbori_"~page.illustration %}
|
||||||
|
{% set class=" grid-item-size-2 grid-item-size-page" %}
|
||||||
|
|
||||||
|
<a href="{{ path("app_webzine_view",{"by":"home","idcat":webzine.id,"id":page.id}) }}">
|
||||||
|
<div id="webzine{{webzine.id}}" class="grid-item grid-item-size {{class}} cssfilter" data-width="{{page.width}}" data-background-image="/{{ appAlias }}/uploads/webzine/{{source}}" data-height="{{page.height}}" style="height:auto;background-position: center ; background-size: cover; background-image: url(/{{ appAlias }}/uploads/webzine/{{source}}");">
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<!-- LINK ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
||||||
|
{% if not links is empty %}
|
||||||
|
<div>
|
||||||
|
<div id="link" class="grid-item grid-item-full"><h1 class="mt-5 mb-3">Liens</h1></div>
|
||||||
|
|
||||||
|
<div class="grid-item grid-item-size grid-item-size-3 grid-item-size-square cssfilter" style="height:200px;background-position: center; background-size: cover; background-image: url(/{{ appAlias }}/uploads/image/{{ app.session.get("imglink")}});">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="grid-item grid-item-size grid-item-size-6 grid-item-size-noresize linkurl" style="padding:0px 15px;">
|
||||||
|
{% for link in links|sort((a, b) => a.order <=> b.order) %}
|
||||||
|
<a href="{{link.url}}" target="_blank">{{ link.name }}</a>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<!-- BOTTOM ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
||||||
|
<div id="bottom" class="grid-item grid-item-full" style="height:300px;margin-top:60px;">
|
||||||
|
<div style="text-align:center">
|
||||||
|
{% set qrCode = qr_code_result(absolute_url(path("app_home"))) %}
|
||||||
|
<img src="{{ qrCode.dataUri }}" width="200px" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- ADDMODAL ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
||||||
|
{% if app.user %}
|
||||||
|
<div id="addmodal" class="modal" tabindex="-1" role="dialog" style="z-index:100000">
|
||||||
|
<div class="modal-dialog modal-md" role="document">
|
||||||
|
<div class="modal-content" style="margin-top:120px">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-body" style="display:flex; flex-direction: column;">
|
||||||
|
<a href={{ path("app_illustration_submit",{"by":"user","userid":app.user.id}) }} class="btn btn-link" style="font-size:30px;" title="Créer une Illustration">
|
||||||
|
Ajouter une Illustration
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href={{ path("app_illustration_submits01",{"by":"user","userid":app.user.id}) }} class="btn btn-link" style="font-size:30px;" title="Créer une Illustration">
|
||||||
|
Ajouter des Illustrations en masse
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href={{ path("app_webzine_submit",{"by":"user","userid":app.user.id}) }} class="btn btn-link" style="font-size:30px;" title="Créer un Webzine">
|
||||||
|
Ajouter un Webzine
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block localjavascript %}
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('body').imagesLoaded(function() {
|
||||||
|
height=Math.max(500,$(window).height());
|
||||||
|
$('.heroheader').height(height);
|
||||||
|
himg=$('.herologo img').height();
|
||||||
|
$('.herologo').css({ top: (height-himg-50) +'px' });
|
||||||
|
|
||||||
|
$('.heroheader').slick({
|
||||||
|
slidesToShow: 1,
|
||||||
|
slidesToScroll: 1,
|
||||||
|
autoplay: true,
|
||||||
|
autoplaySpeed: 6000,
|
||||||
|
dots: true,
|
||||||
|
touchMove: false,
|
||||||
|
pauseOnDotsHover: true,
|
||||||
|
fade: true,
|
||||||
|
cssEase: 'linear',
|
||||||
|
prevArrow: false,
|
||||||
|
nextArrow: false,
|
||||||
|
customPaging: function(slider, i) {
|
||||||
|
return '<span class="heroheader-dot fa fa-circle fa-fw"></span>';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#main").show();
|
||||||
|
|
||||||
|
|
||||||
|
resizeThumb();
|
||||||
|
|
||||||
|
|
||||||
|
$('.grid').masonry({
|
||||||
|
columnWidth: '.grid-sizer',
|
||||||
|
gutter: '.gutter-sizer',
|
||||||
|
itemSelector: '.grid-item',
|
||||||
|
percentPosition: true,
|
||||||
|
horizontalOrder: false,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (location.hash) {
|
||||||
|
console.log(location.hash);
|
||||||
|
$(document).scrollTop( $(location.hash).offset().top -60);
|
||||||
|
// = location.hash;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$(window).resize(function() {
|
||||||
|
$(window).scroll();
|
||||||
|
height=Math.max(500,$(window).height());
|
||||||
|
$('.heroheader').height(height);
|
||||||
|
himg=$('.herologo img').height();
|
||||||
|
$('.herologo').css({ top: (height-himg-50) +'px' });
|
||||||
|
resizeThumb();
|
||||||
|
});
|
||||||
|
|
||||||
|
$(window).scroll(function () {
|
||||||
|
if($(window).width()>=980) {
|
||||||
|
// set distance user needs to scroll before we start fadeIn
|
||||||
|
if ($(this).scrollTop() > 300) {
|
||||||
|
if($('.foliomenu').is(":hidden")) $('.foliomenu').show();
|
||||||
|
} else {
|
||||||
|
if($('.foliomenu').is(":visible")) $('.foliomenu').hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if($('.foliomenu').is(":hidden")) $('.foliomenu').show();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($(this).scrollTop() > 300) {
|
||||||
|
if($('.foliotop').is(":hidden")) $('.foliotop').show();
|
||||||
|
} else {
|
||||||
|
if($('.foliotop').is(":visible")) $('.foliotop').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function resizeThumb() {
|
||||||
|
{% if app.session.get("appmaxthumbwidth")!="0" %}
|
||||||
|
width=$(window).width();
|
||||||
|
maxwidth={{ app.session.get("appmaxthumbwidth") }};
|
||||||
|
|
||||||
|
if(maxwidth+30>width) {
|
||||||
|
$(".grid").css("max-width","none");
|
||||||
|
$(".grid").css("margin","30px");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$(".grid").css("max-width","{{ app.session.get("appmaxthumbwidth") }}px");
|
||||||
|
$(".grid").css("margin","30px auto");
|
||||||
|
}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
$(".grid-item-size").each(function() {
|
||||||
|
if(!$(this).hasClass("grid-item-size-noresize")) {
|
||||||
|
if($(this).hasClass("grid-item-size-square")) {
|
||||||
|
$(this).height($(this).width());
|
||||||
|
}
|
||||||
|
else if($(this).hasClass("grid-item-size-proportion")) {
|
||||||
|
var width=$(this).width();
|
||||||
|
var oriwidth=$(this).data("width")
|
||||||
|
if(oriwidth>0) {
|
||||||
|
pourcentage=width*100/oriwidth;
|
||||||
|
height=$(this).data("height")*pourcentage/100;
|
||||||
|
$(this).height(height);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$(this).height($(this).width());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$(this).height($(this).width()*30/21);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -88,7 +88,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- HEROHEADER ------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
<!-- HEROHEADER ------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
||||||
<div id="top" class="heroheader" displaynone>
|
<div id="top" class="heroheader">
|
||||||
{%if not app.session.get("hero01") is empty %}
|
{%if not app.session.get("hero01") is empty %}
|
||||||
<div class="cssfilter" style="background-image:url(/{{appAlias}}/uploads/hero/{{app.session.get("hero01")}})"></div>
|
<div class="cssfilter" style="background-image:url(/{{appAlias}}/uploads/hero/{{app.session.get("hero01")}})"></div>
|
||||||
{%endif%}
|
{%endif%}
|
||||||
@ -145,7 +145,8 @@
|
|||||||
|
|
||||||
<div class="herobox"></div>
|
<div class="herobox"></div>
|
||||||
|
|
||||||
<div class="herotitle">
|
<div class="herotitle row" style="width:100%">
|
||||||
|
<div class="col-lg-2 px-3">
|
||||||
<h1><a href="#site">{{ (app.session.get("appname")) }}</a></h1>
|
<h1><a href="#site">{{ (app.session.get("appname")) }}</a></h1>
|
||||||
|
|
||||||
<div class="heromenu" >
|
<div class="heromenu" >
|
||||||
@ -194,13 +195,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if not items is empty %}
|
{% if not items is empty %}
|
||||||
<div class="itemmenu" style="width:270px; display:flex; margin:20px auto 0px auto; flex-wrap: wrap;">
|
<div class="itemmenu" style="max-width:360px; display:flex; margin:20px auto 30px auto; flex-wrap: wrap; justify-content: center;">
|
||||||
{% for item in items %}
|
{% for item in items %}
|
||||||
{% if item.title|lower != "ninefolio" %}
|
{% if item.title|lower != "ninefolio" %}
|
||||||
<a href="{{ item.url }}" target="_blank">
|
<a href="{{ item.url }}" target="_blank">
|
||||||
<div class="item" style="display:flex; flex-direction: column; align-items: center; font-size:10px; padding:5px; width:90px;">
|
<div class="item" style="display:flex; flex-direction: column; align-items: center; font-size:15px; padding:5px; width:90px;">
|
||||||
<img src="{{ item.icon }}" style="width:50px;height:50px">
|
<img src="{{ item.icon }}" style="width:50px;height:50px">
|
||||||
<span style="margin-top:10px">{{ item.title }}</span>
|
<span style="margin-top:5px">{{ item.title }}</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -210,194 +211,32 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="herologo">
|
<div class="col-lg-8 text-center">
|
||||||
<img src="/{{ appAlias }}/uploads/logo/{{ app.session.get('logodark') }}">
|
<img src="/{{ appAlias }}/uploads/logo/{{ app.session.get('logodark') }}" style="width:200px; border-radius:100%">
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- GRID ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
|
||||||
{% set style="margin:30px" %}
|
|
||||||
{% if app.session.get("appmaxthumbwidth")!="0" %}
|
|
||||||
{% set style="max-width:"~app.session.get("appmaxthumbwidth")~"px; margin:30px auto;" %}
|
|
||||||
{% endif %}
|
|
||||||
<div class="grid" style="{{ style }}">
|
|
||||||
<div class="grid-sizer"></div>
|
|
||||||
<div class="gutter-sizer"></div>
|
|
||||||
|
|
||||||
<!-- SITE ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
|
||||||
<div>
|
|
||||||
<div id="site" class="grid-item grid-item-full"><h1 class="mt-5 mb-3"></h1></div>
|
|
||||||
|
|
||||||
<div class="grid-item grid-item-size grid-item-size-3 grid-item-size-square cssfilter" style="height:200px;background-position: center; background-size: cover; background-image: url(/{{ appAlias }}/uploads/image/{{ app.session.get("imgcontact")}});">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="grid-item grid-item-size grid-item-size-6 grid-item-size-noresize" style="padding:0px 15px;word-break:break-word;">
|
|
||||||
<h1 style="border:none; padding:0px;">{{ app.session.get("appname")}}</h1>
|
|
||||||
|
|
||||||
{% if not app.session.get("appsubname") is empty %}
|
|
||||||
{{ app.session.get("appsubname")}}<br>
|
|
||||||
{%endif%}
|
|
||||||
|
|
||||||
{% if not app.session.get("appdescription") is empty %}
|
{% if not app.session.get("appdescription") is empty %}
|
||||||
<br>{{ app.session.get("appdescription")|raw}}
|
<div style="max-width:80%; text-align: justify; font-size:120%; margin:20px auto; padding:15px; background-color:var(--colorbgbodydarkdarker); border-radius:10px; opacity: 0.8;">
|
||||||
|
{{ app.session.get("appdescription")|raw}}
|
||||||
|
</div>
|
||||||
{%endif%}
|
{%endif%}
|
||||||
|
|
||||||
{% if app.session.get('email') is not empty or app.session.get('facebook') is not empty or app.session.get('instagram') is not empty or app.session.get('twitter') is not empty or app.session.get('google') is not empty or app.session.get('youtube') is not empty %}
|
|
||||||
<br><br>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if app.session.get('email') is not empty %}
|
|
||||||
<i class="fas fa-envelope"></i> Email = <a href="mailto:{{ app.session.get('email') }}" target="_blank" title="Email">{{ app.session.get('email') }}</a><br>
|
|
||||||
{% endif %}
|
|
||||||
{% if app.session.get('facebook') is not empty %}
|
|
||||||
<i class="fab fa-facebook"></i> Facebook = <a href="{{ app.session.get('facebook') }}" target="_blank" title="Facebook">{{ app.session.get('facebook') }}</a><br>
|
|
||||||
{% endif %}
|
|
||||||
{% if app.session.get('instagram') is not empty %}
|
|
||||||
<i class="fab fa-instagram"></i> Instagram = <a href="{{ app.session.get('instagram') }}" target="_blank" title="Instagram">{{ app.session.get('instagram') }}</a><br>
|
|
||||||
{% endif %}
|
|
||||||
{% if app.session.get('twitter') is not empty %}
|
|
||||||
<i class="fab fa-twitter"></i> Twitter = <a href="{{ app.session.get('twitter') }}" target="_blank" title="Twitter">{{ app.session.get('twitter') }}</a><br>
|
|
||||||
{% endif %}
|
|
||||||
{% if app.session.get('google') is not empty %}
|
|
||||||
<i class="fab fa-google-plus"></i> Google = <a href="{{ app.session.get('google') }}" target="_blank" title="Google">{{ app.session.get('google') }}</a><br>
|
|
||||||
{% endif %}
|
|
||||||
{% if app.session.get('youtube') is not empty %}
|
|
||||||
<i class="fab fa-youtube"></i> Youtube = <a href="{{ app.session.get('youtube') }}" target="_blank" title="Youtube">{{ app.session.get('youtube') }}</a><br>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- MEMBRE ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
|
||||||
{% if not users is empty %}
|
|
||||||
<div>
|
|
||||||
<div id="membre" class="grid-item grid-item-full"><h1 class="mt-5 mb-3">Membres</h1></div>
|
|
||||||
|
|
||||||
{% for user in users %}
|
{% for user in users %}
|
||||||
<div class="grid-item grid-item-size grid-item-size-15 grid-item-size-small-3 grid-item-size-noresize" style="padding:0px 5px;">
|
{% if user.hasRole('ROLE_MEMBER') %}
|
||||||
<a class="member" href="{{path("app_home_user",{userpseudo:user.slug})}}">
|
{{ render(path("app_home_userhero",{userpseudo:user.slug})) }}
|
||||||
<img src="/{{ appAlias }}/uploads/avatar/{{ user.avatar }}" class="mb-2">
|
|
||||||
<small>{{user.pseudo}}</small>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<!-- ILLUSTRATION ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
|
||||||
{% if not illustrations is empty %}
|
|
||||||
<div>
|
|
||||||
<div id="illustration" class="grid-item grid-item-full"><h1 class="mt-5 mb-3">Illustrations</h1></div>
|
|
||||||
|
|
||||||
{% for illustration in illustrations %}
|
|
||||||
{% set appthumbwidth=app.session.get("appthumbwidth") %}
|
|
||||||
{% set appthumbheight=app.session.get("appthumbheight") %}
|
|
||||||
|
|
||||||
{% set classmini="" %}
|
|
||||||
{% if appthumbwidth==0 %}
|
|
||||||
{% set class="" %}
|
|
||||||
{% if loop.index < 40 %}
|
|
||||||
{% if loop.index == 1 %}
|
|
||||||
{% set class="grid-item-size-4" %}
|
|
||||||
{% elseif loop.index is divisible by(28) %}
|
|
||||||
{% set class="grid-item-size-4" %}
|
|
||||||
{% elseif loop.index is divisible by(7) %}
|
|
||||||
{% set class="grid-item-size-2" %}
|
|
||||||
{% elseif loop.index is divisible by(46) %}
|
|
||||||
{% set class="grid-item-size-4" %}
|
|
||||||
{% endif %}
|
|
||||||
{% elseif loop.index > 48 %}
|
|
||||||
{% if loop.index == 49 %}
|
|
||||||
{% set class="grid-item-size-4" %}
|
|
||||||
{% elseif (loop.index-49) is divisible by(28) %}
|
|
||||||
{% set class="grid-item-size-4" %}
|
|
||||||
{% elseif (loop.index-49) is divisible by(7) %}
|
|
||||||
{% set class="grid-item-size-2" %}
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% set position = (loop.index - 1) % 10 + 1 %}
|
|
||||||
{% if position == 1 or position == 8 %}
|
|
||||||
{% set classmini = 'grid-item-mini-50' %}
|
|
||||||
{% else %}
|
|
||||||
{% set classmini = 'grid-item-mini-25' %}
|
|
||||||
{% endif %}
|
|
||||||
{% elseif appthumbwidth==1 %} {% set class="" %}
|
|
||||||
{% elseif appthumbwidth==2 %} {% set class="grid-item-size-2" %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{%if appthumbheight==0 %}
|
|
||||||
{% set class=class~" grid-item-size-square" %}
|
|
||||||
{% elseif appthumbheight==1 %}
|
|
||||||
{% set class=class~" grid-item-size-proportion" %}
|
|
||||||
{% else %}
|
|
||||||
{% set class=class~" grid-item-size-page" %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% set source="thumb_"~illustration.illustration %}
|
|
||||||
{% if appthumbheight!=0 %}
|
|
||||||
{% set source="thumbori_"~illustration.illustration %}
|
|
||||||
{% endif %}
|
|
||||||
{% set source=source~"?"~illustration.updatetime|date('ymdHis') %}
|
|
||||||
<a href="{{ path("app_illustration_view",{"by":"home","idcat":illustration.category.id,"id":illustration.id}) }}">
|
|
||||||
<div data-loop="{{loop.index}}" id="illustration{{illustration.id}}" class="grid-item grid-item-size {{class}} {{classmini}} cssfilter" data-width="{{illustration.width}}" data-background-image="/{{ appAlias }}/uploads/illustration/{{source}}" data-height="{{illustration.height}}" style="height:auto;background-position: center ; background-size: cover; background-image: url(/{{ appAlias }}/uploads/illustration/{{source}}");">
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<!-- WEBZINE ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
|
||||||
{% if not webzines is empty %}
|
|
||||||
<div>
|
|
||||||
<div id="webzine" class="grid-item grid-item-full"><h1 class="mt-5 mb-3">Webzines</h1></div>
|
|
||||||
|
|
||||||
{% set setname="" %}
|
|
||||||
{% for webzine in webzines %}
|
|
||||||
{% if not webzine.webzinepages is empty %}
|
|
||||||
{% if setname!=webzine.set %}
|
|
||||||
{% if not webzine.set is empty %}
|
|
||||||
<div id="webzine" class="grid-item grid-item-full"><h2 class="mt-3 pl-3">{{webzine.set}}</h2></div>
|
|
||||||
{% endif %}
|
|
||||||
{% set setname=webzine.set %}
|
|
||||||
{% endif %}
|
|
||||||
{% set page=webzine.webzinepages[0] %}
|
|
||||||
{% set source="thumbori_"~page.illustration %}
|
|
||||||
{% set class=" grid-item-size-2 grid-item-size-page" %}
|
|
||||||
|
|
||||||
<a href="{{ path("app_webzine_view",{"by":"home","idcat":webzine.id,"id":page.id}) }}">
|
|
||||||
<div id="webzine{{webzine.id}}" class="grid-item grid-item-size {{class}} cssfilter" data-width="{{page.width}}" data-background-image="/{{ appAlias }}/uploads/webzine/{{source}}" data-height="{{page.height}}" style="height:auto;background-position: center ; background-size: cover; background-image: url(/{{ appAlias }}/uploads/webzine/{{source}}");">
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<!-- LINK ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
<div style="text-align:center; padding:50px 0px">
|
||||||
{% if not links is empty %}
|
|
||||||
<div>
|
|
||||||
<div id="link" class="grid-item grid-item-full"><h1 class="mt-5 mb-3">Liens</h1></div>
|
|
||||||
|
|
||||||
<div class="grid-item grid-item-size grid-item-size-3 grid-item-size-square cssfilter" style="height:200px;background-position: center; background-size: cover; background-image: url(/{{ appAlias }}/uploads/image/{{ app.session.get("imglink")}});">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="grid-item grid-item-size grid-item-size-6 grid-item-size-noresize linkurl" style="padding:0px 15px;">
|
|
||||||
{% for link in links|sort((a, b) => a.order <=> b.order) %}
|
|
||||||
<a href="{{link.url}}" target="_blank">{{ link.name }}</a>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<!-- BOTTOM ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
|
||||||
<div id="bottom" class="grid-item grid-item-full" style="height:300px;margin-top:60px;">
|
|
||||||
<div style="text-align:center">
|
|
||||||
{% set qrCode = qr_code_result(absolute_url(path("app_home"))) %}
|
{% set qrCode = qr_code_result(absolute_url(path("app_home"))) %}
|
||||||
<img src="{{ qrCode.dataUri }}" width="200px" />
|
<img src="{{ qrCode.dataUri }}" width="200px" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="herologo">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- ADDMODAL ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
<!-- ADDMODAL ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
||||||
{% if app.user %}
|
{% if app.user %}
|
||||||
<div id="addmodal" class="modal" tabindex="-1" role="dialog" style="z-index:100000">
|
<div id="addmodal" class="modal" tabindex="-1" role="dialog" style="z-index:100000">
|
||||||
@ -414,6 +253,10 @@
|
|||||||
Ajouter une Illustration
|
Ajouter une Illustration
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
<a href={{ path("app_illustration_submits01",{"by":"user","userid":app.user.id}) }} class="btn btn-link" style="font-size:30px;" title="Créer une Illustration">
|
||||||
|
Ajouter des Illustrations en masse
|
||||||
|
</a>
|
||||||
|
|
||||||
<a href={{ path("app_webzine_submit",{"by":"user","userid":app.user.id}) }} class="btn btn-link" style="font-size:30px;" title="Créer un Webzine">
|
<a href={{ path("app_webzine_submit",{"by":"user","userid":app.user.id}) }} class="btn btn-link" style="font-size:30px;" title="Créer un Webzine">
|
||||||
Ajouter un Webzine
|
Ajouter un Webzine
|
||||||
</a>
|
</a>
|
||||||
@ -464,9 +307,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (location.hash) {
|
if (location.hash) {
|
||||||
console.log(location.hash);
|
|
||||||
$(document).scrollTop( $(location.hash).offset().top -60);
|
$(document).scrollTop( $(location.hash).offset().top -60);
|
||||||
// = location.hash;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -501,20 +342,6 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
function resizeThumb() {
|
function resizeThumb() {
|
||||||
{% if app.session.get("appmaxthumbwidth")!="0" %}
|
|
||||||
width=$(window).width();
|
|
||||||
maxwidth={{ app.session.get("appmaxthumbwidth") }};
|
|
||||||
|
|
||||||
if(maxwidth+30>width) {
|
|
||||||
$(".grid").css("max-width","none");
|
|
||||||
$(".grid").css("margin","30px");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$(".grid").css("max-width","{{ app.session.get("appmaxthumbwidth") }}px");
|
|
||||||
$(".grid").css("margin","30px auto");
|
|
||||||
}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
$(".grid-item-size").each(function() {
|
$(".grid-item-size").each(function() {
|
||||||
if(!$(this).hasClass("grid-item-size-noresize")) {
|
if(!$(this).hasClass("grid-item-size-noresize")) {
|
||||||
if($(this).hasClass("grid-item-size-square")) {
|
if($(this).hasClass("grid-item-size-square")) {
|
||||||
@ -537,6 +364,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
$(".userhero").each(function() {
|
||||||
|
height=$(this).find(".herouseravatar").height();
|
||||||
|
$(this).height(height+60);
|
||||||
|
pos=height+60;
|
||||||
|
height=$(this).find(".userherocontainer").css({ top: '-'+pos+'px' });
|
||||||
|
});
|
||||||
|
}, "100");
|
||||||
}
|
}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -63,7 +63,11 @@
|
|||||||
{% if not webzines is empty %}
|
{% if not webzines is empty %}
|
||||||
<i class="fa fa-circle fa-fw"></i> <a href="#webzine">Webzines</a>
|
<i class="fa fa-circle fa-fw"></i> <a href="#webzine">Webzines</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if not links is empty %}
|
||||||
<i class="fa fa-circle fa-fw"></i> <a href="#link">Liens</a>
|
<i class="fa fa-circle fa-fw"></i> <a href="#link">Liens</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<i class="fa fa-circle fa-fw"></i> <a href="#contact">Contact</a>
|
<i class="fa fa-circle fa-fw"></i> <a href="#contact">Contact</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -189,6 +193,7 @@
|
|||||||
<a href="{{ config.youtube }}" target="_blank" title="Youtube"><i class="fab fa-youtube fa-2x"></i></a>
|
<a href="{{ config.youtube }}" target="_blank" title="Youtube"><i class="fab fa-youtube fa-2x"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ path("app_feeduser",{userpseudo:user.slug}) }}" target="_blank" title="RSS"><i class="fa fa-rss-square fa-2x"></i></a>
|
<a href="{{ path("app_feeduser",{userpseudo:user.slug}) }}" target="_blank" title="RSS"><i class="fa fa-rss-square fa-2x"></i></a>
|
||||||
|
<a href="{{ path("app_slide",{userpseudo:user.slug}) }}" target="_blank" title="Slide show"><i class="ml-1 fa fa-play fa-2x"></i></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@ -355,13 +360,14 @@
|
|||||||
{% if not config.appsubname is empty %}
|
{% if not config.appsubname is empty %}
|
||||||
{{ config.appsubname }}<br>
|
{{ config.appsubname }}<br>
|
||||||
{%endif%}
|
{%endif%}
|
||||||
|
|
||||||
{% if not config.appdescription is empty %}
|
{% if not config.appdescription is empty %}
|
||||||
|
|
||||||
<small><br>{{ config.appdescription|raw }}</small><br>
|
<small><br>{{ config.appdescription|raw }}</small><br>
|
||||||
|
|
||||||
{%endif%}
|
{%endif%}
|
||||||
|
|
||||||
<br>
|
{% if user.email is not empty or config.facebook is not empty or config.instagram is not empty or config.twitter is not empty or config.google is not empty or config.youtube is not empty %}
|
||||||
|
<br><br>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if user.email is not empty %}
|
{% if user.email is not empty %}
|
||||||
<i class="fas fa-envelope"></i> Email = <a href="mailto:{{ user.email }}" target="_blank" title="Email">{{ user.email }}</a><br>
|
<i class="fas fa-envelope"></i> Email = <a href="mailto:{{ user.email }}" target="_blank" title="Email">{{ user.email }}</a><br>
|
||||||
@ -410,6 +416,11 @@
|
|||||||
Ajouter une Illustration
|
Ajouter une Illustration
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
<a href={{ path("app_illustration_submits01",{"by":"user","userid":app.user.id}) }} class="btn btn-link" style="font-size:30px;" title="Créer une Illustration">
|
||||||
|
Ajouter des Illustrations en masse
|
||||||
|
</a>
|
||||||
|
|
||||||
<a href={{ path("app_webzine_submit",{"by":"user","userid":app.user.id}) }} class="btn btn-link" style="font-size:30px;" title="Créer un Webzine">
|
<a href={{ path("app_webzine_submit",{"by":"user","userid":app.user.id}) }} class="btn btn-link" style="font-size:30px;" title="Créer un Webzine">
|
||||||
Ajouter un Webzine
|
Ajouter un Webzine
|
||||||
</a>
|
</a>
|
||||||
|
84
templates/Home/userhero.html.twig
Normal file
84
templates/Home/userhero.html.twig
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
|
||||||
|
{% set style="margin:30px" %}
|
||||||
|
|
||||||
|
|
||||||
|
<div class="userhero" style="padding:0px 15px;margin-bottom:10px; width:100%; height:400px;">
|
||||||
|
|
||||||
|
<div class="userherobackground" style="height:100%; text-align:left; background-image:url(/{{appAlias}}/uploads/hero/{{config.hero01}});background-size:cover; background-position: center; border-radius:10px;" >
|
||||||
|
|
||||||
|
<div class="userherodarker" style="padding:30px; width:100%; height:100%; position:relative; background-color:var(--colorbgbodydarkdarker); opacity:0.7; border:2px solid #fff; border-radius:10px;"></div>
|
||||||
|
|
||||||
|
<div class="userherocontainer" style="position:relative; top:-400px; display:flex; padding:30px; width:100%;"%>
|
||||||
|
|
||||||
|
<a class="herouseravatar" href="{{path("app_home_user",{userpseudo:user.slug})}}" style="width:200px">
|
||||||
|
<div style="padding: 0px 15px 0px 0px; text-align:center;">
|
||||||
|
<img src="/{{ appAlias }}/uploads/avatar/{{ user.avatar }}" class="mb-2" style="border-radius:100%; width:100px;">
|
||||||
|
<h2>{{user.pseudo}}</h2>
|
||||||
|
En voir plus
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<div class="userherogrid grid grid-user" style="width:100%">
|
||||||
|
<div class="grid-sizer"></div>
|
||||||
|
<div class="gutter-sizer"></div>
|
||||||
|
|
||||||
|
{% for illustration in illustrations|slice(0, 19) %}
|
||||||
|
{% set appthumbwidth=app.session.get("appthumbwidth") %}
|
||||||
|
{% set appthumbheight=app.session.get("appthumbheight") %}
|
||||||
|
|
||||||
|
{% set classmini="" %}
|
||||||
|
{% if appthumbwidth==0 %}
|
||||||
|
{% set class="" %}
|
||||||
|
{% if loop.index < 40 %}
|
||||||
|
{% if loop.index == 1 %}
|
||||||
|
{% set class="grid-item-size-4" %}
|
||||||
|
{% elseif loop.index is divisible by(28) %}
|
||||||
|
{% set class="grid-item-size-4" %}
|
||||||
|
{% elseif loop.index is divisible by(7) %}
|
||||||
|
{% set class="grid-item-size-2" %}
|
||||||
|
{% elseif loop.index is divisible by(46) %}
|
||||||
|
{% set class="grid-item-size-4" %}
|
||||||
|
{% endif %}
|
||||||
|
{% elseif loop.index > 48 %}
|
||||||
|
{% if loop.index == 49 %}
|
||||||
|
{% set class="grid-item-size-4" %}
|
||||||
|
{% elseif (loop.index-49) is divisible by(28) %}
|
||||||
|
{% set class="grid-item-size-4" %}
|
||||||
|
{% elseif (loop.index-49) is divisible by(7) %}
|
||||||
|
{% set class="grid-item-size-2" %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% set position = (loop.index - 1) % 10 + 1 %}
|
||||||
|
{% if position == 1 or position == 8 %}
|
||||||
|
{% set classmini = 'grid-item-mini-50' %}
|
||||||
|
{% else %}
|
||||||
|
{% set classmini = 'grid-item-mini-25' %}
|
||||||
|
{% endif %}
|
||||||
|
{% elseif appthumbwidth==1 %} {% set class="" %}
|
||||||
|
{% elseif appthumbwidth==2 %} {% set class="grid-item-size-2" %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{%if appthumbheight==0 %}
|
||||||
|
{% set class=class~" grid-item-size-square" %}
|
||||||
|
{% elseif appthumbheight==1 %}
|
||||||
|
{% set class=class~" grid-item-size-proportion" %}
|
||||||
|
{% else %}
|
||||||
|
{% set class=class~" grid-item-size-page" %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% set source="thumb_"~illustration.illustration %}
|
||||||
|
{% if appthumbheight!=0 %}
|
||||||
|
{% set source="thumbori_"~illustration.illustration %}
|
||||||
|
{% endif %}
|
||||||
|
{% set source=source~"?"~illustration.updatetime|date('ymdHis') %}
|
||||||
|
<a href="{{ path("app_illustration_view",{"by":"home","idcat":illustration.category.id,"id":illustration.id}) }}">
|
||||||
|
<div data-loop="{{loop.index}}" id="illustration{{illustration.id}}" class="grid-item grid-item-size {{class}} {{classmini}} cssfilter" data-width="{{illustration.width}}" data-background-image="/{{ appAlias }}/uploads/illustration/{{source}}" data-height="{{illustration.height}}" style="height:auto;background-position: center ; background-size: cover; background-image: url(/{{ appAlias }}/uploads/illustration/{{source}}"); min-width:100px;">
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
@ -62,6 +62,7 @@
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{{ form_row(form.name) }}
|
{{ form_row(form.name) }}
|
||||||
{{ form_row(form.category) }}
|
{{ form_row(form.category) }}
|
||||||
|
{{ form_row(form.submittime) }}
|
||||||
{{ form_row(form.description) }}
|
{{ form_row(form.description) }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -20,8 +20,17 @@
|
|||||||
/*box-shadow: 0px 0px 5px 1px rgba(255, 255, 255, 0.45);*/
|
/*box-shadow: 0px 0px 5px 1px rgba(255, 255, 255, 0.45);*/
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
<div id="content" style="display:flex">
|
||||||
|
<div style="width:70%; overflow:hidden;padding-left:35px;test-align:center;">
|
||||||
<img style="display:none;" id="illustration_illustration_img" src="/{{ appAlias }}/uploads/illustration/{{illustrations[0].illustration}}">
|
<img style="display:none;" id="illustration_illustration_img" src="/{{ appAlias }}/uploads/illustration/{{illustrations[0].illustration}}">
|
||||||
|
</div>
|
||||||
|
<div style="width:30%; display:flex; flex-direction: column; align-items:center;padding-top:15px">
|
||||||
|
<img id="avatar" src="{{asset("uploads/avatar/"~user.avatar)}}" style="width:150px; height:150px;border-radius:100%">
|
||||||
|
<h2 style="flex-grow:1">{{user.pseudo}}</h2>
|
||||||
|
{% set qrCode = qr_code_result(absolute_url(path("app_home_user",{userpseudo:user.slug}))) %}
|
||||||
|
<img id="qr" src="{{ qrCode.dataUri }}" width="200px" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block localjavascript %}
|
{% block localjavascript %}
|
||||||
@ -47,17 +56,19 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function resizeImage() {
|
function resizeImage() {
|
||||||
console.log("resize")
|
|
||||||
height=$(window).height()-70;
|
height=$(window).height()-70;
|
||||||
|
$("#content").height($(window).height()-35);
|
||||||
$("#illustration_illustration_img").css({height:height,width:'auto'});
|
$("#illustration_illustration_img").css({height:height,width:'auto'});
|
||||||
|
$("#avatar").height($(window).height()/6);
|
||||||
|
$("#avatar").width($(window).height()/6);
|
||||||
|
$("#qr").height($(window).height()/6);
|
||||||
|
$("#qr").width($(window).height()/6);
|
||||||
|
|
||||||
width=$(window).width()-90;
|
width=$(window).width()-90;
|
||||||
if($("#illustration_illustration_img").width()>width)
|
if($("#illustration_illustration_img").width()>width)
|
||||||
$("#illustration_illustration_img").css({width:width,height:'auto'});
|
$("#illustration_illustration_img").css({width:width,height:'auto'});
|
||||||
|
|
||||||
height=$("#illustration_illustration_img").height();
|
height=$("#illustration_illustration_img").height();
|
||||||
$("#bigright").css({height:height,"line-height":height+"px"});
|
|
||||||
$("#bigleft").css({height:height,"line-height":height+"px"});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
@ -65,7 +76,9 @@
|
|||||||
tbimg.push("{{illustration.illustration}}");
|
tbimg.push("{{illustration.illustration}}");
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
tbimg=shuffle(tbimg)
|
tbimg=shuffle(tbimg);
|
||||||
|
total=tbimg.length;
|
||||||
|
console.log(total);
|
||||||
$('body').imagesLoaded(function() {
|
$('body').imagesLoaded(function() {
|
||||||
resizeImage();
|
resizeImage();
|
||||||
$("#illustration_illustration_img").fadeIn();
|
$("#illustration_illustration_img").fadeIn();
|
||||||
@ -73,6 +86,7 @@
|
|||||||
|
|
||||||
var intervalId = window.setInterval(function(){
|
var intervalId = window.setInterval(function(){
|
||||||
posImg++;
|
posImg++;
|
||||||
|
if(posImg>=total) posImg=0;
|
||||||
img=tbimg[posImg];
|
img=tbimg[posImg];
|
||||||
console.log(img);
|
console.log(img);
|
||||||
url="/{{ appAlias }}/uploads/illustration/xxx";
|
url="/{{ appAlias }}/uploads/illustration/xxx";
|
||||||
|
64
templates/Illustration/submits01.html.twig
Executable file
64
templates/Illustration/submits01.html.twig
Executable file
@ -0,0 +1,64 @@
|
|||||||
|
{% extends 'base.html.twig' %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
{{ form_start(form) }}
|
||||||
|
<h1 class="page-header">
|
||||||
|
Création ILLUSTRATIONS EN MASSE
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
{{ form_widget(form.submit) }}
|
||||||
|
{% if by=="admin" %}
|
||||||
|
<a class="btn btn-secondary" href={{ path('app_admin_illustration',{'by':by,'userid':-1}) }}>Annuler</a>
|
||||||
|
{% elseif by=="update" %}
|
||||||
|
<a class="btn btn-secondary" href={{ path('app_user_update',{id:userid}) }}>Annuler</a>
|
||||||
|
{% elseif by=="profil" %}
|
||||||
|
<a class="btn btn-secondary" href={{ path('app_user_profil') }}>Annuler</a>
|
||||||
|
{% elseif by=="illustration" %}
|
||||||
|
<a class="btn btn-secondary" href={{ path('app_illustration_view',{'by':"user","idcat":illustration.category.id,"id":illustration.id}) }}>Annuler</a>
|
||||||
|
{% else %}
|
||||||
|
<a class="btn btn-secondary" href={{ path('app_home_user',{'userpseudo':app.user.pseudo}) }}>Annuler</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
{% if app.session.flashbag.has('error') %}
|
||||||
|
<div class='alert alert-danger' style='margin: 5px 0px'>
|
||||||
|
<strong>Erreur</strong><br>
|
||||||
|
{% for flashMessage in app.session.flashbag.get('error') %}
|
||||||
|
{{ flashMessage }}<br>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if app.session.flashbag.has('notice') %}
|
||||||
|
<div class='alert alert-info' style='margin: 5px 0px'>
|
||||||
|
<strong>Information</strong><br>
|
||||||
|
{% for flashMessage in app.session.flashbag.get('notice') %}
|
||||||
|
{{ flashMessage }}<br>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6 m-auto">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<i class="fa fa-pencil-alt fa-fw"></i> Informations
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
|
{{ form_row(form.category) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ form_end(form) }}
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block localjavascript %}
|
||||||
|
$(document).ready(function() {
|
||||||
|
$("#illustration_category").focus();
|
||||||
|
});
|
||||||
|
{% endblock %}
|
73
templates/Illustration/submits02.html.twig
Normal file
73
templates/Illustration/submits02.html.twig
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
{% extends "base.html.twig" %}
|
||||||
|
|
||||||
|
{% block encorelinktags %}
|
||||||
|
{{ encore_entry_link_tags('dropzone') }}
|
||||||
|
{% endblock encorelinktags %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
<h1 class="page-header">
|
||||||
|
Téléchargez vos Illustrations
|
||||||
|
</h3>
|
||||||
|
<a class="btn btn-secondary"href="{{path('app_home')}}">Annuler</a>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6 m-auto">
|
||||||
|
<form
|
||||||
|
action="{{ oneup_uploader_endpoint('illustration') }}"
|
||||||
|
class="dropzone"
|
||||||
|
id="mydropzone"
|
||||||
|
data-acceptedMimeTypes="image/*"
|
||||||
|
data-resizeWidth:2500,
|
||||||
|
style="margin-top:10px">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block encorescripttags %}
|
||||||
|
{{ encore_entry_script_tags('dropzone') }}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block localjavascript %}
|
||||||
|
function dropzoneinit( elt ) {
|
||||||
|
}
|
||||||
|
|
||||||
|
function dropzonesuccess( file, response ) {
|
||||||
|
parent.$("#illustration_illustration").val(response["file"]);
|
||||||
|
parent.$("#illustration_width").val(response["width"]);
|
||||||
|
parent.$("#illustration_height").val(response["height"]);
|
||||||
|
parent.$("#illustration_name").val(response["originalname"]);
|
||||||
|
parent.$("#illustration_illustration_img").attr("src","/{{ appAlias }}/uploads/illustration/"+response["file"]);
|
||||||
|
|
||||||
|
console.log('here');
|
||||||
|
console.log(response["file"]);
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
method: "POST",
|
||||||
|
url: "{{ path('app_illustration_submits03',{"by":by,"userid":userid,"categoryid":categoryid}) }}",
|
||||||
|
data: {
|
||||||
|
illustration:response["file"],
|
||||||
|
width:response["width"],
|
||||||
|
height:response["height"],
|
||||||
|
name:response["originalname"]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
function dropzonequeuecomplete(file) {
|
||||||
|
{% if by=="admin" %}
|
||||||
|
url='{{ path('app_admin_illustration',{'by':by,'userid':-1}) }}';
|
||||||
|
{% elseif by=="update" %}
|
||||||
|
url='{{ path('app_user_update',{id:userid}) }}';
|
||||||
|
{% elseif by=="profil" %}
|
||||||
|
url='{{ path('app_user_profil') }}';
|
||||||
|
{% elseif by=="illustration" %}
|
||||||
|
url='{{ path('app_illustration_view',{'by':"user","idcat":illustration.category.id,"id":illustration.id}) }}';
|
||||||
|
{% else %}
|
||||||
|
url='{{ path('app_home_user',{'userpseudo':app.user.slug}) }}';
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
window.location.href=url;
|
||||||
|
}
|
||||||
|
{% endblock %}
|
||||||
|
|
@ -49,8 +49,8 @@ UTILISATEURS
|
|||||||
Administrateur<br>
|
Administrateur<br>
|
||||||
{%elseif role=="ROLE_MODO" %}
|
{%elseif role=="ROLE_MODO" %}
|
||||||
Modérateur<br>
|
Modérateur<br>
|
||||||
{%elseif role=="ROLE_MASTER" %}
|
{%elseif role=="ROLE_MEMBER" %}
|
||||||
Master<br>
|
Membre<br>
|
||||||
{%elseif role=="ROLE_USER" %}
|
{%elseif role=="ROLE_USER" %}
|
||||||
Utilisateur<br>
|
Utilisateur<br>
|
||||||
{%endif%}
|
{%endif%}
|
||||||
|
Reference in New Issue
Block a user