svg
This commit is contained in:
parent
448d2f2b7e
commit
d73127b09e
|
@ -360,8 +360,10 @@ th.dt-center, td.dt-center { text-align: center; }
|
|||
}
|
||||
}
|
||||
|
||||
.grid-sizer { width: 10%; margin-bottom: 0%;float:left;}
|
||||
.grid-sizer { width: 5%; margin-bottom: 0%;float:left;}
|
||||
.grid-item-size { width: 10%; margin-bottom: 0%;float:left;}
|
||||
.grid-item-size-1 { width: 10%; margin-bottom: 0%;float:left;}
|
||||
.grid-item-size-15 { width: 15%; margin-bottom: 0%;float:left;}
|
||||
.grid-item-size-2 { width: 20%; margin-bottom: 0%;float:left;}
|
||||
.grid-item-size-3 { width: 30%; margin-bottom: 0%;float:left;}
|
||||
.grid-item-size-4 { width: 40%; margin-bottom: 0%;float:left;}
|
||||
|
@ -373,7 +375,7 @@ th.dt-center, td.dt-center { text-align: center; }
|
|||
.grid-item-full { width: 100%; margin-bottom: 0%; font-size:20px;float:left; }
|
||||
.grid-item-full h1 {margin: 0; border:none; padding: 20px 0px 0px 10px; }
|
||||
.gutter-sizer { width: 0%;float:left; }
|
||||
.member{display:flex; flex-direction: column; align-items: center;}
|
||||
.member{display:flex; flex-direction: column; align-items: center; background-color: var(--colorbgbodydarkdarker); border-radius:10px; padding:10px;}
|
||||
.member img{border-radius:100%;width:60px; height: 60px;}
|
||||
@media (max-width: 980px) {
|
||||
.grid-sizer { width: 10%; margin-bottom: 0%;}
|
||||
|
|
|
@ -14,7 +14,7 @@ class HomeController extends AbstractController
|
|||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$users = $em->getRepository("App:User")->findBy([],["pseudo"=>"ASC"]);
|
||||
$illustrations = $em->getRepository("App:Illustration")->findAll();
|
||||
$illustrations = $em->getRepository("App:Illustration")->findBy([],["submittime"=>"DESC"]);
|
||||
$links = $em->getRepository("App:Link")->findBy(["user"=>null]);
|
||||
$webzines = $em->getRepository("App:Webzine")->findBy(["user"=>null], ['set' => 'ASC', 'order' => 'ASC']);
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ class Category
|
|||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="Illustration", mappedBy="category", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @ORM\OrderBy({"id" = "DESC"})
|
||||
* @ORM\OrderBy({"submittime" = "DESC"})
|
||||
*/
|
||||
private $illustrations;
|
||||
|
||||
|
|
|
@ -21,5 +21,31 @@
|
|||
foreach($configs as $config) {
|
||||
$this->session->set($config->getKeyid(), strval($config->getValue()));
|
||||
}
|
||||
|
||||
$this->session->set("colorbgbodydarkdarker",$this->adjustBrightness($this->session->get("colorbgbodydark"),-20));
|
||||
}
|
||||
|
||||
|
||||
public function adjustBrightness($hex, $steps) {
|
||||
// Steps should be between -255 and 255. Negative = darker, positive = lighter
|
||||
$steps = max(-255, min(255, $steps));
|
||||
|
||||
// Normalize into a six character long hex string
|
||||
$hex = str_replace('#', '', $hex);
|
||||
if (strlen($hex) == 3) {
|
||||
$hex = str_repeat(substr($hex,0,1), 2).str_repeat(substr($hex,1,1), 2).str_repeat(substr($hex,2,1), 2);
|
||||
}
|
||||
|
||||
// Split into three parts: R, G and B
|
||||
$color_parts = str_split($hex, 2);
|
||||
$return = '';
|
||||
|
||||
foreach ($color_parts as $color) {
|
||||
$color = hexdec($color); // Convert to decimal
|
||||
$color = max(0,min(255,$color + $steps)); // Adjust color
|
||||
$return .= str_pad(dechex($color), 2, '0', STR_PAD_LEFT); // Make two char hex code
|
||||
}
|
||||
|
||||
return "#".$return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,17 +29,25 @@
|
|||
{% block body %}
|
||||
|
||||
<!-- FOLIOMENU -----------------------------------------------------------------------------------------------------------------------------------------------!-->
|
||||
|
||||
<div class="foliomenu">
|
||||
<a href="#top"><img src="/{{ appAlias }}/uploads/logo/{{ app.session.get("logodark") }}" class="logo"></a>
|
||||
<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">
|
||||
|
@ -117,9 +125,11 @@
|
|||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="herobox"></div>
|
||||
|
||||
<div class="herotitle">
|
||||
<h1>{{ (app.session.get("appname")) }}</h1>
|
||||
<h1><a href="#site">{{ (app.session.get("appname")) }}</a></h1>
|
||||
|
||||
<div class="heromenu" >
|
||||
{% if not app.session.get("appsubname") is empty %}
|
||||
|
@ -149,8 +159,13 @@
|
|||
</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>
|
||||
|
@ -179,7 +194,9 @@
|
|||
|
||||
<!-- SITE ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
||||
<div>
|
||||
<div id="site" 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 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;">
|
||||
|
@ -219,22 +236,25 @@
|
|||
</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 %}
|
||||
<div class="grid-item grid-item-size grid-item-size-2 grid-item-size-small-3 grid-item-size-noresize" style="padding:0px 15px;">
|
||||
<div class="grid-item grid-item-size grid-item-size-15 grid-item-size-small-3 grid-item-size-noresize" style="padding:0px 5px;">
|
||||
<a class="member" href="{{path("app_home_user",{userpseudo:user.slug})}}">
|
||||
<img src="/{{ appAlias }}/uploads/avatar/{{ user.avatar }}">
|
||||
{{user.pseudo}}
|
||||
<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">Illustrations</h1></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") %}
|
||||
|
@ -284,12 +304,12 @@
|
|||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- WEBZINE ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
||||
<div>
|
||||
{% if not webzines is empty %}
|
||||
<div id="webzine" class="grid-item grid-item-full"><h1 class="mt-5">Webzines</h1></div>
|
||||
{% endif %}
|
||||
<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 %}
|
||||
|
@ -311,11 +331,12 @@
|
|||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- LINK ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
||||
{% if not links is empty %}
|
||||
<div>
|
||||
{% if not webzines is empty %}
|
||||
<div id="link" class="grid-item grid-item-full"><h1 class="mt-5">Liens</h1></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>
|
||||
|
@ -325,9 +346,10 @@
|
|||
<a href="{{link.url}}" target="_blank">{{ link.name }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- BOTTOM ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
||||
<div id="bottom" class="grid-item grid-item-full" style="height:300px">
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
:root{
|
||||
--colorbgbodylight: {{ app.session.get('colorbgbodylight')|raw }};
|
||||
--colorbgbodydark: {{ app.session.get('colorbgbodydark')|raw }};
|
||||
--colorbgbodydarkdarker: {{ app.session.get('colorbgbodydarkdarker')|raw }};
|
||||
--colorfttitlelight: {{ app.session.get('colorfttitlelight')|raw }};
|
||||
--colorfttitledark: {{ app.session.get('colorfttitledark')|raw }};
|
||||
--colorftbodylight: {{ app.session.get('colorftbodylight')|raw }};
|
||||
|
|
Loading…
Reference in New Issue