changement dans l'architecture du projet
733
assets/css/style.css
Normal file
@ -0,0 +1,733 @@
|
||||
/* http://meyerweb.com/eric/tools/css/reset/
|
||||
v2.0 | 20110126
|
||||
License: none (public domain)
|
||||
*/
|
||||
|
||||
html,
|
||||
body,
|
||||
div,
|
||||
span,
|
||||
applet,
|
||||
object,
|
||||
iframe,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
p,
|
||||
blockquote,
|
||||
pre,
|
||||
a,
|
||||
abbr,
|
||||
acronym,
|
||||
address,
|
||||
big,
|
||||
cite,
|
||||
code,
|
||||
del,
|
||||
dfn,
|
||||
em,
|
||||
img,
|
||||
ins,
|
||||
kbd,
|
||||
q,
|
||||
s,
|
||||
samp,
|
||||
small,
|
||||
strike,
|
||||
strong,
|
||||
sub,
|
||||
sup,
|
||||
tt,
|
||||
var,
|
||||
b,
|
||||
u,
|
||||
i,
|
||||
center,
|
||||
dl,
|
||||
dt,
|
||||
dd,
|
||||
ol,
|
||||
ul,
|
||||
li,
|
||||
fieldset,
|
||||
form,
|
||||
label,
|
||||
legend,
|
||||
table,
|
||||
caption,
|
||||
tbody,
|
||||
tfoot,
|
||||
thead,
|
||||
tr,
|
||||
th,
|
||||
td,
|
||||
article,
|
||||
aside,
|
||||
canvas,
|
||||
details,
|
||||
embed,
|
||||
figure,
|
||||
figcaption,
|
||||
footer,
|
||||
header,
|
||||
hgroup,
|
||||
menu,
|
||||
nav,
|
||||
output,
|
||||
ruby,
|
||||
section,
|
||||
summary,
|
||||
time,
|
||||
mark,
|
||||
audio,
|
||||
video {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
/* HTML5 display-role reset for older browsers */
|
||||
article,
|
||||
aside,
|
||||
details,
|
||||
figcaption,
|
||||
figure,
|
||||
footer,
|
||||
header,
|
||||
hgroup,
|
||||
menu,
|
||||
nav,
|
||||
section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
body {
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
blockquote,
|
||||
q {
|
||||
quotes: none;
|
||||
}
|
||||
|
||||
blockquote:before,
|
||||
blockquote:after,
|
||||
q:before,
|
||||
q:after {
|
||||
content: '';
|
||||
content: none;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
/******************************
|
||||
* Fin reset.css
|
||||
*****************************/
|
||||
header {
|
||||
box-shadow: 1px 1px 30px 1px lightgrey;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
background-color: #eee;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-weight: 600;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-weight: 400;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.title-small {
|
||||
font-weight: 200;
|
||||
font-size: 15px;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.contenue {
|
||||
height: 285vh;
|
||||
}
|
||||
|
||||
.articleHome {
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
margin-top: 100px;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
padding-left: 2%;
|
||||
padding-right: 2%;
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 992px) {
|
||||
.articleHome {
|
||||
padding-right: 10%;
|
||||
padding-left: 10%;
|
||||
}
|
||||
}
|
||||
|
||||
.nav_imie {
|
||||
height: 40px;
|
||||
background-color: #1c1c1c;
|
||||
}
|
||||
|
||||
.nav_blog {
|
||||
height: 80px;
|
||||
background-color: #110230;
|
||||
}
|
||||
|
||||
.item_nav_imie {
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.item_nav_imie a {
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
-webkit-transition: 400ms;
|
||||
-o-transition: 400ms;
|
||||
transition: 400ms;
|
||||
}
|
||||
|
||||
.item_nav_imie a:hover {
|
||||
color: #a5a5a5;
|
||||
}
|
||||
|
||||
.item_nav_imie {
|
||||
display: inline-block;
|
||||
color: white;
|
||||
float: right;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.social {
|
||||
padding: 9px 0px 0px 20px;
|
||||
}
|
||||
|
||||
.link {
|
||||
padding: 11px 0px 0px 20px;
|
||||
}
|
||||
|
||||
.item_nav_blog_gauche {
|
||||
padding-top: 25px;
|
||||
vertical-align: center;
|
||||
display: inline-block;
|
||||
color: black;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.item_nav_blog_droite {
|
||||
color: #fff;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
margin-top: 30px;
|
||||
margin-right: 60px;
|
||||
display: inline-block;
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
-webkit-transition: 400ms;
|
||||
-o-transition: 400ms;
|
||||
transition: 400ms;
|
||||
}
|
||||
|
||||
.item_nav_blog_droite:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.item_nav_blog_droite.dev:hover {
|
||||
color: #ffd75f;
|
||||
}
|
||||
|
||||
.item_nav_blog_droite.digi:hover {
|
||||
color: #6bb194;
|
||||
}
|
||||
|
||||
.item_nav_blog_droite.ops:hover {
|
||||
color: #2ea3f2;
|
||||
}
|
||||
|
||||
.item_nav_blog_droite.devops:hover {
|
||||
color: #ff1c4a;
|
||||
}
|
||||
|
||||
.item_nav_blog_droite_icon {
|
||||
padding-top: 27px;
|
||||
display: inline-block;
|
||||
float: right;
|
||||
color: rgba(0, 0, 0, .5);
|
||||
padding-bottom: 10px;
|
||||
border-bottom: rgba(255, 255, 255, 0.1) solid 2px;
|
||||
}
|
||||
|
||||
.bloc_principal {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
margin-top: 70px;
|
||||
background: url("../img/img-home.jpg");
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
box-shadow: 1px 1px 30px 1px lightgrey;
|
||||
}
|
||||
|
||||
.cover-black {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
.bloc_principal_titre {
|
||||
text-align: center;
|
||||
padding-top: 15px;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
background-color: #150032;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-size: 20px;
|
||||
color: white;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.cover-text {
|
||||
padding: 0px 90px;
|
||||
margin-top: 100px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.content-homediv {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.item_nav_blog_logo {
|
||||
padding-top: 2px;
|
||||
display: inline-block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.bloc-plus {
|
||||
margin-top: 40px;
|
||||
float: right;
|
||||
background-color: #190034;
|
||||
padding: 10px 15px;
|
||||
color: white;
|
||||
-webkit-transition: 300ms;
|
||||
-o-transition: 300ms;
|
||||
transition: 300ms;
|
||||
|
||||
}
|
||||
|
||||
.bloc-plus:hover {
|
||||
background-color: #42027e;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.p-home {
|
||||
padding-top: 20px;
|
||||
color: white;
|
||||
line-height: 23px;
|
||||
}
|
||||
|
||||
input {
|
||||
outline: none
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------
|
||||
* Articles
|
||||
* ----------------------------------------------------- */
|
||||
|
||||
.articles>div {
|
||||
margin-bottom: 75px;
|
||||
}
|
||||
|
||||
.article {
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
padding: 22px 10% 0 10%;
|
||||
background-color: white;
|
||||
box-shadow: 1px 1px 30px 1px lightgrey;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
border-bottom: 5px solid black;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.article.dev {
|
||||
border-bottom-color: #f2d761;
|
||||
}
|
||||
|
||||
.article.digi {
|
||||
border-bottom-color: #6bb194;
|
||||
}
|
||||
|
||||
.article.ops {
|
||||
border-bottom-color: #64bdea;
|
||||
}
|
||||
|
||||
.article.devops {
|
||||
border-bottom-color: #ff1c4a;
|
||||
}
|
||||
|
||||
.article .etiquettes,
|
||||
.post .etiquettes {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.article .date,
|
||||
.article .cat,
|
||||
.post .cat,
|
||||
.post .date {
|
||||
padding: 2px 10px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.article .date,
|
||||
.post .date {
|
||||
color: gray;
|
||||
background-color: #eee;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.article .cat,
|
||||
.post .cat {
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.article.ops .cat,
|
||||
.post.ops .cat {
|
||||
background-color: #2ea3f2;
|
||||
}
|
||||
|
||||
.article.digi .cat,
|
||||
.post.digi .cat {
|
||||
background-color: #6bb194;
|
||||
}
|
||||
|
||||
.article.dev .cat,
|
||||
.post.dev .cat {
|
||||
background-color: #ffd75f;
|
||||
}
|
||||
|
||||
.article.devops .cat,
|
||||
.post.devops .cat {
|
||||
background-color: #ff1c4a;
|
||||
}
|
||||
|
||||
.article .title {
|
||||
line-height: 24px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.article .text {
|
||||
margin-top: 15px;
|
||||
color: #848484;
|
||||
font-size: 15px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------
|
||||
* Posts
|
||||
* ----------------------------------------------------- */
|
||||
.bloc-post {
|
||||
width: 69%;
|
||||
margin-top: 70px;
|
||||
box-shadow: 1px 1px 30px 1px lightgrey;
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
display: inline-block;
|
||||
border-radius: 5px;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.search {
|
||||
border-bottom: 5px solid #2ea3f2;
|
||||
}
|
||||
|
||||
.container-post {
|
||||
background-color: white;
|
||||
padding: 45px;
|
||||
}
|
||||
|
||||
.author {
|
||||
margin-top: 25px;
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
}
|
||||
|
||||
.by {
|
||||
margin-left: 20px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.name {
|
||||
margin-bottom: 6px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.job {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.bloc-filter {
|
||||
width: 25%;
|
||||
margin-top: 70px;
|
||||
background-color: white;
|
||||
background-size: cover;
|
||||
box-shadow: 1px 1px 30px 1px lightgrey;
|
||||
float: right;
|
||||
padding: 45px;
|
||||
}
|
||||
|
||||
.post .text {
|
||||
font-size: 14px;
|
||||
color: #737272ee;
|
||||
line-height: 1.5;
|
||||
margin-top: 28px;
|
||||
}
|
||||
|
||||
.credit {
|
||||
background-color: #110230;
|
||||
color: white;
|
||||
padding: 45px;
|
||||
}
|
||||
|
||||
.fullFooter {
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
width: 100%;
|
||||
height: 220px;
|
||||
background-color: #1c1c1c;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.upFooter {
|
||||
height: 160px;
|
||||
background-color: #150032;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.lowFooter {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.lowFooterItem {
|
||||
font-size: 16px;
|
||||
color: white;
|
||||
padding-top: 22px;
|
||||
display: inline-block;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.iconOnFooter {
|
||||
padding-top: 60px;
|
||||
display: inline-block;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.pad {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.contenue-recent {
|
||||
box-shadow: 1px 1px 30px 1px lightgrey;
|
||||
padding: 14px;
|
||||
background-color: white;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.next {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.filtre {
|
||||
width: 100%;
|
||||
padding: 6px 10px 6px 10px;
|
||||
color: white;
|
||||
text-transform: uppercase;
|
||||
font-size: 14px;
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.dev-color {
|
||||
background-color: #fccb3a;
|
||||
}
|
||||
|
||||
.digi-color {
|
||||
background-color: #6bb194;
|
||||
}
|
||||
|
||||
.ops-color {
|
||||
background-color: #2ea3f2;
|
||||
}
|
||||
|
||||
.devops-color {
|
||||
background-color: #ff1c4a;
|
||||
}
|
||||
|
||||
.bloc-recent {
|
||||
width: 69%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.titre-recent {
|
||||
padding-left: 8px;
|
||||
float: left;
|
||||
color: #848484;
|
||||
}
|
||||
|
||||
.tag {
|
||||
color: white;
|
||||
background-color: #cccccc;
|
||||
text-transform: uppercase;
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
padding: 7px 12px;
|
||||
border-radius: 18px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.icon-recent {
|
||||
padding-right: 16px;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.phraseFooter {
|
||||
font-size: 17px;
|
||||
padding-top: 10px;
|
||||
color: white;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
#twi {
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
}
|
||||
|
||||
#fb {
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
}
|
||||
|
||||
#search {
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
width: 180px;
|
||||
}
|
||||
|
||||
#glass {
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
#info-plus {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
#titre-home {
|
||||
color: white;
|
||||
padding-bottom: 20px;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#titre-between {
|
||||
margin-top: 130px;
|
||||
margin-bottom: 30px;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-size: 22px;
|
||||
|
||||
}
|
||||
|
||||
@media screen and (max-width: 640px) {
|
||||
.nav_imie {
|
||||
height: 0;
|
||||
}
|
||||
|
||||
#twi {
|
||||
height: 0;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
#fb {
|
||||
height: 0;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.img-home {
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
.test1 {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.articleHome2 {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
#titre-home {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.p-home {
|
||||
padding-top: 7px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.bloc_principal {
|
||||
height: 630px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 365px) {
|
||||
#search {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
width: 60px;
|
||||
border-bottom: #1c1c1c solid 2px;
|
||||
}
|
||||
|
||||
.img-home {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.test1 {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.articleHome {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
#titre-home {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.p-home {
|
||||
padding-top: 7px;
|
||||
}
|
||||
|
||||
.bloc_principal_titre {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.bloc_principal {
|
||||
height: 650px;
|
||||
}
|
||||
}
|
BIN
assets/font/Zona_Black.ttf
Normal file
BIN
assets/font/blod.otf
Normal file
BIN
assets/font/roman.otf
Normal file
16
assets/html/404.html
Normal file
@ -0,0 +1,16 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<p>404</p>
|
||||
</body>
|
||||
<header>
|
||||
<tag type="includes" file="header" />
|
||||
</header>
|
||||
<footer>
|
||||
<tag type="includes" file="footer" />
|
||||
</footer>
|
||||
|
||||
</html>
|
25
assets/html/includes/footer.html
Normal file
@ -0,0 +1,25 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12 pad">
|
||||
<div class="fullFooter">
|
||||
<div class="upFooter">
|
||||
<ul>
|
||||
<li class="iconOnFooter"><a>
|
||||
<tag type="svg" file="facebook" style="color: white; width: 23px; height: 23px" /></a></li>
|
||||
<li class="iconOnFooter"><a>
|
||||
<tag type="svg" file="twitter" style="color: white; width: 23px; height: 23px" /></a></li>
|
||||
</ul>
|
||||
<p class="phraseFooter">Suivez-nous sur les réseaux</p>
|
||||
</div>
|
||||
<div class="lowFooter">
|
||||
<ul>
|
||||
<li class="lowFooterItem">Politique et confidentialité</li>
|
||||
<li class="lowFooterItem">Mentions légales</li>
|
||||
<li class="lowFooterItem">Contact</li>
|
||||
<li class="lowFooterItem">Connexion</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
7
assets/html/includes/head.html
Normal file
@ -0,0 +1,7 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<title>Page Title</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous" />
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="/assets/css/style.css"/>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
40
assets/html/includes/header.html
Normal file
@ -0,0 +1,40 @@
|
||||
<div>
|
||||
<div class="nav_imie">
|
||||
<div class="container-fluid">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
|
||||
<ul>
|
||||
<li class="item_nav_imie link"><a>Connexion</a></li>
|
||||
<li class="item_nav_imie link"><a href="https://imie44.ymag.cloud">Accès Net-Yparéo</a></li>
|
||||
<li class="item_nav_imie link"><a href="https://www.imie.fr">IMIE Numérique</a></li>
|
||||
<li class="item_nav_imie social"><a href="https://twitter.com/EcoleIMIE">
|
||||
<tag type="svg" file="twitter" style="color: white; width: 18px; height: 18px" /></a></li>
|
||||
<li class="item_nav_imie social"><a href="https://www.facebook.com/EcolesIMIE/">
|
||||
<tag type="svg" file="facebook" style="color: white; width: 18px; height: 18px" /></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<nav class="nav_blog">
|
||||
<div class="container-fluid">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
|
||||
<ul>
|
||||
<li class="item_nav_blog_logo"><a href="/">
|
||||
<tag type="svg" file="logo-imie-blog" style="color: white; width: 200px; height: 64px; margin-top: 6px;" /></a></li>
|
||||
<li class="item_nav_blog_droite_icon"><input id="search" type="text" placeholder="Recherche"><a>
|
||||
<tag type="svg" file="mignify" style="color: rgba(0, 0, 0, .5); width: 18px; height: 18px" /></a></li>
|
||||
<li class="item_nav_blog_droite devops"><a>DEVOPS</a></li>
|
||||
<li class="item_nav_blog_droite ops"><a>OPS</a></li>
|
||||
<li class="item_nav_blog_droite digi"><a>DIGI</a></li>
|
||||
<li class="item_nav_blog_droite dev"><a>DEV</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
63
assets/html/index.html
Normal file
@ -0,0 +1,63 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<head>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<tag type="includes" file="header" />
|
||||
</header>
|
||||
<main class="test container">
|
||||
<div class="bloc_principal">
|
||||
<div class="cover-black">
|
||||
<div class="bloc_principal_titre">
|
||||
<h1>LE BLOG DES APPRENANTS</h1>
|
||||
</div>
|
||||
<div class="cover-text">
|
||||
<h2 id="titre-home">Ceci est un magnifique titre</h2>
|
||||
<p class="p-home">
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
|
||||
do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
||||
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
||||
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit
|
||||
in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
|
||||
cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
</p>
|
||||
<div class="bloc-plus">
|
||||
En savoir plus
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h3 id="titre-between">Articles récents</h3>
|
||||
<div class="row articles">
|
||||
<tag type="loop" for="posts" limit="6">
|
||||
<div class="col-12 col-md-6 col-lg-4">
|
||||
<div class="article column-categorie">
|
||||
<h4 class="title">
|
||||
<loop column="title" />
|
||||
</h4>
|
||||
<div class="etiquettes">
|
||||
<span class="cat">
|
||||
<loop column="categorie" />
|
||||
</span>
|
||||
<span class="date">
|
||||
<loop column="date" />
|
||||
</span>
|
||||
</div>
|
||||
<div class="text">
|
||||
<loop column="content" />
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</tag>
|
||||
</div>
|
||||
</main>
|
||||
<footer>
|
||||
<tag type="includes" file="footer" />
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
</html>
|
112
assets/html/post.html
Normal file
@ -0,0 +1,112 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<tag type="includes" file="header" />
|
||||
</header>
|
||||
<main class="test container">
|
||||
<div class="bloc-post">
|
||||
<div class="container-post post ops">
|
||||
<h2 class="title">Mettre en place un serveur web sous linux</h2>
|
||||
<div class="etiquettes">
|
||||
<span class="cat">OPS</span>
|
||||
<span class="date">26-06-2018</span>
|
||||
</div>
|
||||
<p class="post text">Dum apud Persas, ut supra narravimus, perfidia regis motus agitat insperatos,
|
||||
et in eois tractibus bella rediviva consurgunt, anno sexto decimo et eo diutius
|
||||
post Nepotiani exitium, saeviens per urbem aeternam urebat cuncta Bellona, ex primordiis
|
||||
<br>
|
||||
<br>
|
||||
Dum apud Persas, ut supra narravimus, perfidia regis motus agitat insperatos,
|
||||
et in eois tractibus bella rediviva consurgunt, anno sexto decimo et eo diutius
|
||||
post Nepotiani exitium, saeviens per urbem aeternam urebat cuncta Bellona, ex primordiis
|
||||
</p>
|
||||
</div>
|
||||
<p class="post text">Dum apud Persas, ut supra narravimus, perfidia regis motus agitat insperatos,
|
||||
et in eois tractibus bella rediviva consurgunt, anno sexto decimo et eo diutius
|
||||
post Nepotiani exitium, saeviens per urbem aeternam urebat cuncta Bellona, ex primordiis
|
||||
<br>
|
||||
<br>
|
||||
Dum apud Persas, ut supra narravimus, perfidia regis motus agitat insperatos,
|
||||
et in eois tractibus bella rediviva consurgunt, anno sexto decimo et eo diutius
|
||||
post Nepotiani exitium, saeviens per urbem aeternam urebat cuncta Bellona, ex primordiis
|
||||
</p>
|
||||
</div>
|
||||
<div class="credit">
|
||||
<h3>Auteur</h3>
|
||||
<div class="author">
|
||||
<a>
|
||||
<tag type="svg" file="avatar" style="color: white; height: 64px" /></a>
|
||||
<div class="by">
|
||||
<h3 class="name">Adrien Huchet</h3>
|
||||
<h3 class="job">Apprenant IT START</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bloc-filter">
|
||||
<p class="title-second">Plus d'articles</p>
|
||||
<div class="filtre dev-color">dev</div>
|
||||
<div class="filtre digi-color">digi</div>
|
||||
<div class="filtre ops-color">ops</div>
|
||||
<div class="filtre devops-color">devops</div>
|
||||
</div>
|
||||
|
||||
<div class="bloc-filter">
|
||||
<h3>Plus d'articles</h3>
|
||||
<p class="title-small">Catégories</p>
|
||||
<div class="filtre dev-color">dev</div>
|
||||
<div class="filtre digi-color">digi</div>
|
||||
<div class="filtre ops-color">ops</div>
|
||||
<div class="filtre devops-color">devops</div>
|
||||
<p class="title-small">Tags</p>
|
||||
<div class="tag">html</div>
|
||||
<div class="tag">js</div>
|
||||
<div class="tag">css</div>
|
||||
<div class="tag">html</div>
|
||||
<div class="tag">php</div>
|
||||
</div>
|
||||
|
||||
<div class="bloc-recent">
|
||||
<div class="contenue-recent">Article précédent</div>
|
||||
<div class="contenue-recent next">Article suivant</div>
|
||||
</div>
|
||||
|
||||
<h3 id="titre-between">Dans le même thème</h3>
|
||||
<div class="row articles">
|
||||
<tag type="loop" for="posts" limit="6">
|
||||
<div class="col-12 col-md-6 col-lg-4">
|
||||
<div class="article column-categorie">
|
||||
<h4 class="title">
|
||||
<loop column="title" />
|
||||
</h4>
|
||||
<div class="etiquettes">
|
||||
<span class="cat">
|
||||
<loop column="categorie" />
|
||||
</span>
|
||||
<span class="date">
|
||||
<loop column="date" />
|
||||
</span>
|
||||
</div>
|
||||
<div class="text">
|
||||
<loop column="content" />
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</tag>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<tag type="includes" file="footer" />
|
||||
</footer>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
|
||||
crossorigin="anonymous"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
47
assets/html/search.html
Normal file
@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<tag type="includes" file="header" />
|
||||
</header>
|
||||
<main class="test container">
|
||||
<div class="bloc-recent">
|
||||
<div class="contenue-recent">
|
||||
<div class="titre-recent">
|
||||
<p>récent</p>
|
||||
</div>
|
||||
<div class="icon-recent">
|
||||
<tag type="svg" file="arrow" style="color: #848484; width: 18px; height: 18px" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bloc-post search">
|
||||
<div class="container-post post ops">
|
||||
<h2 class="title">Mettre en place un serveur web sous linux</h2>
|
||||
<div class="etiquettes">
|
||||
<span class="cat">OPS</span>
|
||||
<span class="date">26-06-2018</span>
|
||||
</div>
|
||||
<p class="post text">Dum apud Persas, ut supra narravimus, perfidia regis motus agitat insperatos,
|
||||
et in eois tractibus bella rediviva consurgunt, anno sexto decimo et eo diutius post Nepotiani exitium, saeviens
|
||||
per urbem aeternam urebat cuncta Bellona, ex primordiis
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bloc-filter">
|
||||
</div>
|
||||
</main>
|
||||
<footer>
|
||||
<tag type="includes" file="footer" />
|
||||
</footer>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
|
||||
crossorigin="anonymous"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
5
assets/img/arrow.svg
Normal file
@ -0,0 +1,5 @@
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 129 129" xmlns:xlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 129 129">
|
||||
<g>
|
||||
<path d="m121.3,34.6c-1.6-1.6-4.2-1.6-5.8,0l-51,51.1-51.1-51.1c-1.6-1.6-4.2-1.6-5.8,0-1.6,1.6-1.6,4.2 0,5.8l53.9,53.9c0.8,0.8 1.8,1.2 2.9,1.2 1,0 2.1-0.4 2.9-1.2l53.9-53.9c1.7-1.6 1.7-4.2 0.1-5.8z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 380 B |
18
assets/img/avatar.svg
Normal file
@ -0,0 +1,18 @@
|
||||
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 107.4 106.4" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#FFFFFF;}
|
||||
.st1{fill:none;stroke:#FFFFFF;stroke-width:4;stroke-linejoin:round;stroke-miterlimit:10;}
|
||||
</style>
|
||||
<path class="st0" d="M63.2,72.2C63.2,72.2,63.2,72.2,63.2,72.2C63.2,72.2,63.3,72.2,63.2,72.2c5.2-3.6,9-9.6,9-14.3V36.1
|
||||
c0,0,0.6-18.2-17.6-18.2S36.9,36.1,36.9,36.1v21.8c0,4.7,3.9,10.7,9,14.3c0,0,0.1,0,0.1,0c0,0,0,0,0,0c-0.4,2.3-1.7,5.7-6.1,7.6
|
||||
c-4.6,2.1-14.4,6.6-20.5,12.6c9.1,7.9,21.1,12.7,34.2,12.7c13.5,0,25.9-5.1,35.1-13.5c-6.1-5.6-15.2-9.8-19.6-11.7
|
||||
C64.9,77.9,63.6,74.5,63.2,72.2"/>
|
||||
<path class="st1" d="M63.2,72.2C63.2,72.2,63.2,72.2,63.2,72.2C63.2,72.2,63.3,72.2,63.2,72.2c5.2-3.6,9-9.6,9-14.3V36.1
|
||||
c0,0,0.6-18.2-17.6-18.2S36.9,36.1,36.9,36.1v21.8c0,4.7,3.9,10.7,9,14.3c0,0,0.1,0,0.1,0c0,0,0,0,0,0c-0.4,2.3-1.7,5.7-6.1,7.6
|
||||
c-4.6,2.1-14.4,6.6-20.5,12.6c9.1,7.9,21.1,12.7,34.2,12.7c13.5,0,25.9-5.1,35.1-13.5c-6.1-5.6-15.2-9.8-19.6-11.7
|
||||
C64.9,77.9,63.6,74.5,63.2,72.2z"/>
|
||||
<path class="st1" d="M53.7,2C25.3,2,2.2,25.1,2.2,53.7c0,15.6,6.9,29.5,17.7,39c6-6,15.7-10.5,20.3-12.6c4.3-1.9,5.4-5.3,5.8-7.6
|
||||
c-5.1-3.6-8.9-9.6-8.9-14.3V36.4c0,0-0.6-18.1,17.5-18.1C72.6,18.3,72,36.4,72,36.4v21.8c0,4.7-3.7,10.7-8.8,14.3
|
||||
c0.4,2.3,1.7,5.7,6,7.6c4.4,2,13.4,6.2,19.4,11.7c10.3-9.5,16.8-23.1,16.8-38.2C105.3,25.1,82.2,2,53.7,2z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
1
assets/img/facebook.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg fill="#fff" aria-hidden="true" data-prefix="fab" data-icon="facebook-f" class="svg-inline--fa fa-facebook-f fa-w-9" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 264 512"><path fill="currentColor" d="M76.7 512V283H0v-91h76.7v-71.7C76.7 42.4 124.3 0 193.8 0c33.3 0 61.9 2.5 70.2 3.6V85h-48.2c-37.8 0-45.1 18-45.1 44.3V192H256l-11.7 91h-73.6v229"></path></svg>
|
After Width: | Height: | Size: 376 B |
BIN
assets/img/img-home.jpg
Normal file
After Width: | Height: | Size: 931 KiB |
139
assets/img/logo-imie-blog.svg
Normal file
@ -0,0 +1,139 @@
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 738.1 233.6" style="enable-background:new 0 0 738.1 233.6;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#FFFFFF;}
|
||||
.st1{fill:none;}
|
||||
.st2{enable-background:new ;}
|
||||
.st3{display:none;}
|
||||
.st4{display:inline;fill:#FFFFFF;}
|
||||
.st5{fill:#0B0B0E;}
|
||||
.st6{display:none;fill:#0B0B0E;}
|
||||
.st7{fill:#FF2A53;}
|
||||
.st8{fill:#2EA3F2;}
|
||||
</style>
|
||||
<g>
|
||||
<path class="st0" d="M618.1,169.8c1.1-1.2,2.2-2.2,3.7-2.9c1.7-0.9,3.5-1.3,5.5-1.3c3.5,0,7.1,0,10.7,0c8.4,0,15.6,6.3,15.6,13.8
|
||||
c0.1,8.3,0,16.8,0,25.1c0,0.9-0.4,1-1.2,1c-3.8,0-7.6-0.1-11.4,0c-1.1,0-1.2-0.4-1.2-1.2c0-8,0-15.9,0-23.9c0-1.9-0.7-2.5-2.7-2.5
|
||||
c-3.1,0-6.3,0-9.4,0c-2,0-2.7,0.7-2.7,2.6c0,7.9,0,15.7,0,23.6c0,1.1-0.2,1.4-1.5,1.4c-3.5-0.1-7.1-0.1-10.7,0
|
||||
c-1.2,0-1.7-0.2-1.6-1.4c0.1-7.8,0-15.6,0-23.4c0-2-0.7-2.7-2.9-2.7c-2.9,0-5.9,0-8.9,0c-2.5,0-3.2,0.6-3.2,2.8
|
||||
c0,7.8,0,15.6,0,23.4c0,1-0.3,1.2-1.4,1.2c-3.7-0.1-7.5,0-11.3,0c-0.8,0-1.2-0.2-1.2-1c0-8.3-0.1-16.8,0.1-25.1
|
||||
c0.1-7.7,7.3-13.8,16-13.8c3.3,0,6.5,0.1,9.8,0C612.3,165.4,615.4,166.9,618.1,169.8z"/>
|
||||
<path class="st0" d="M698.8,191.3c-4.4,0-9,0-13.4,0c-1.2,0-1.8,0.3-1.9,1.3c-0.1,1.1,0.4,1.6,1.7,1.7c4.2,0.4,8.4,0.4,12.7,0.4
|
||||
c5,0.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7-1.2-1.1c-0.8-0.9-1.5-1.8-2.7-0.3
|
||||
c-0.3,0.4-0.7,0.3-1.1-0.1c-0.4-0.4-0.9-0.9-1.3-1.3c-1.5-1.4-1.5-1.4,0.3-2.7c2.7-2,5.7-3.2,9.1-3.2c5.3-0.1,10.6,0,15.9,0.1
|
||||
c2.2,0,4.4,0.5,6.5,1.4c3.8,1.7,5.6,4.6,5.8,8.3c0.2,4.2-1,8.2-1.8,12.3c-0.3,1.2-0.1,2.7-1,3.3c-1,0.7-2.7,0.2-4,0.2
|
||||
c-3.5,0-7.1,0-10.7,0C698.8,191.2,698.8,191.3,698.8,191.3z"/>
|
||||
<path class="st0" d="M565.9,186.3c0-5.9,0-11.9,0-17.9c0-1,0.3-1.2,1.3-1.2c3.7,0.1,7.5,0.1,11.3,0c1,0,1.2,0.3,1.2,1.2
|
||||
c0,12,0,24,0,36c0,0.9-0.3,1.2-1.2,1.1c-3.7-0.1-7.5-0.1-11.3,0c-1.1,0-1.3-0.3-1.3-1.2C565.9,198.2,565.9,192.3,565.9,186.3z"/>
|
||||
<path class="st0" d="M670.3,186.4c0,5.9,0,11.9,0,17.9c0,1-0.3,1.2-1.3,1.2c-3.8-0.1-7.6-0.1-11.4,0c-0.9,0-1.1-0.2-1.1-1
|
||||
c0-12.1,0-24.2,0-36.3c0-0.8,0.3-1,1.2-1c3.8,0,7.7,0,11.5,0c1,0,1.2,0.3,1.2,1.1C670.3,174.3,670.3,180.3,670.3,186.4z"/>
|
||||
<path class="st0" d="M572.8,165.6c-2,0-3.9,0-5.9,0c-0.7,0-1.2-0.1-1.1-0.9c0.1-2,0.1-3.9,0-5.9c0-0.6,0.3-0.9,1-0.9
|
||||
c4,0,8.1,0,12.1,0c0.8,0,1.1,0.3,1,1c0,2-0.1,3.8,0,5.8c0,0.7-0.3,1-1.1,0.9C576.9,165.5,574.8,165.6,572.8,165.6z"/>
|
||||
<path class="st0" d="M663.5,158c2,0,3.9,0,5.9,0c0.8,0,1.2,0.2,1.2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7-4.8c0.8-0.8,1.4-1.5,2-2.1s1-1.2,1.4-1.7c0.4-0.5,0.8-0.9,1-1.2
|
||||
c0.3-0.3,0.5-0.4,0.7-0.4c0.4,0,0.7,0.1,1,0.5c0.2,0.4,0.4,1,0.4,1.8c0,0.5-0.2,1-0.6,1.7c-0.4,0.7-1.2,1.8-2.3,3.5
|
||||
c-1.1,1.6-2.2,3.3-3.3,5.1c-1.1,1.8-2.2,3.7-3.4,5.9c0.1-0.1,0.6-0.6,1.5-1.5c1-1,2-2,3.1-3c1.1-1,2-1.9,2.7-2.5
|
||||
c0.7-0.6,1.6-1.4,2.6-2.2v1.7c-2.3,2.4-4.3,4.7-6.2,6.9c-1.8,2.2-3.3,3.9-4.3,5.2c-1,1.3-1.6,2.1-1.8,2.3c-0.5,0.6-0.9,1.1-1.2,1.7
|
||||
c-0.4,0.5-0.7,0.9-0.9,1.2s-0.4,0.4-0.6,0.4c-0.4,0-0.7-0.3-0.9-1c-0.3-0.7-0.4-1.3-0.4-1.9c0-0.5,0.1-0.9,0.3-1.3
|
||||
C534.5,207.8,537.2,203.1,541.5,196.3z"/>
|
||||
</g>
|
||||
<g class="st3">
|
||||
<rect x="-105.2" y="-53.5" class="st4" width="951.2" height="309"/>
|
||||
</g>
|
||||
<rect x="502" y="-1" class="st0" width="236.2" height="234"/>
|
||||
<path class="st5" d="M688,158.3h-12.3V151H688V158.3z M687.8,197.5h-12.1V160h12.1V197.5z M673.1,197.5h-12.1v-25.1c0-1.1-0.9-2-2-2
|
||||
h-9.6c-1.1,0-2,0.9-2,2v25.1h-12.1v-25.1c0-1.1-0.9-2-2-2h-9.5c-1.1,0-2,0.9-2,2v25.1h-12.1v-25.1c0-7.8,6.4-14.1,14.1-14.1h9.5
|
||||
c3,0,6.4,2,8,4.4c1.6-2.5,5.1-4.4,8-4.4h9.6c7.7,0,14,6.3,14,14.1v25.1H673.1z M607.4,158.3h-12.3V151h12.3V158.3z M607.2,197.5
|
||||
h-12.1V160h12.1V197.5z"/>
|
||||
<g>
|
||||
<path class="st5" d="M702.3,197.7c-8.2,0-12.3-4.1-12.3-12.1v-15.1c0-7.6,4.1-11.4,12.2-11.4h11c8.2,0,12.2,3.8,12.2,11.4v1.4
|
||||
c0,7.1-4.1,10.6-12.2,10.6H700v4.3c0,1.5,0.8,2.3,2.3,2.3h20.2v8.5L702.3,197.7L702.3,197.7z M702.3,167.5c-1.5,0-2.3,0.5-2.3,1.7
|
||||
v6.3h13.3c1.5,0,2.3-0.7,2.3-2.2v-4.1c0-1.1-0.8-1.7-2.3-1.7H702.3z"/>
|
||||
</g>
|
||||
<rect x="502" y="-1" class="st1" width="230.5" height="231.9"/>
|
||||
<path class="st6" d="M604.3,164.4l-2.2,2.5c2.5,0.2,4.8,0.5,6.8,0.9s3.8,0.8,5.5,1.3s3.2,1,4.5,1.5c4.5,1.9,6.7,4.5,6.7,7.8
|
||||
c0,2-0.9,4-2.8,6c-1.9,1.9-4.3,3.7-7.3,5.2s-6.1,2.7-9.3,3.6c-3.2,0.9-6.1,1.3-8.6,1.3c-4.3,0-7.7-0.8-10.1-2.4
|
||||
c-2.4-1.6-3.6-3.8-3.6-6.5c0-1.9,0.7-4.2,2.2-6.8s3.8-5.8,6.9-9.7c-2.3-0.1-4-0.5-4.9-1s-1.5-1.4-1.5-2.4c0-0.6,0.2-1.1,0.6-1.5
|
||||
c0.4-0.3,0.9-0.6,1.5-0.7c0.6-0.2,1.8-0.3,3.6-0.6s4.1-0.5,6.8-0.8c3.1-3.8,5.9-6.6,8.3-8.5s5.1-3,7.9-3.3c0.2,0,0.5,0,0.7,0
|
||||
s0.4,0.1,0.4,0.2c0,0.2-0.3,0.6-1,1.4c-0.6,0.7-1.7,1.9-3.1,3.5c-1.4,1.6-3.1,3.5-5.1,5.7c5.3-0.7,9.7-1.5,13.1-2.4
|
||||
c3.4-0.9,6-2,7.7-3.3s2.6-2.7,2.6-4.2c0-1.9-0.9-3.3-2.8-4.1c-1.8-0.8-4.7-1.3-8.5-1.3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,110.5z M270.3,109.1h5.2
|
||||
c1.3,0,2.3-0.3,2.9-0.8c0.6-0.5,0.9-1.2,0.9-2c0-0.8-0.3-1.5-0.9-2s-1.6-0.8-2.9-0.8h-5.2V109.1z M278.3,130.2
|
||||
c3.1,0,5.3-0.5,6.6-1.5c1.2-1.1,1.9-2.5,1.9-4.3c0-0.7-0.2-1.4-0.4-2c-0.3-0.7-0.8-1.2-1.5-1.9c-0.7-0.5-1.5-1-2.6-1.3
|
||||
c-1.1-0.4-2.3-0.5-3.8-0.5h-8v11.4L278.3,130.2L278.3,130.2z"/>
|
||||
<path class="st7" d="M344.6,130.6v10.9h-37.3V92.1h13.7v38.4L344.6,130.6L344.6,130.6z"/>
|
||||
<path class="st7" d="M375.1,91.6c3.6,0,7.1,0.7,10.3,2c3.2,1.3,6,3.1,8.4,5.4s4.3,5,5.7,8.1s2,6.4,2,9.8c0,3.5-0.7,6.8-2,9.8
|
||||
c-1.4,3.1-3.3,5.8-5.7,8.1c-2.4,2.3-5.1,4.1-8.4,5.4c-3.2,1.3-6.7,2-10.3,2c-3.6,0-7.1-0.7-10.3-2c-3.2-1.3-6-3.1-8.4-5.4
|
||||
s-4.3-5-5.7-8.1c-1.4-3.1-2-6.4-2-9.8c0-3.5,0.7-6.8,2-9.8c1.4-3.1,3.3-5.8,5.7-8.1c2.4-2.3,5.2-4.1,8.4-5.4
|
||||
C368,92.2,371.4,91.6,375.1,91.6z M375.1,130c1.7,0,3.4-0.4,4.9-1c1.5-0.7,2.8-1.6,4-2.8c1.2-1.2,2-2.6,2.7-4.2s1-3.3,1-5.1
|
||||
c0-1.9-0.4-3.5-1-5.1s-1.6-3-2.7-4.2c-1.2-1.2-2.5-2.1-4-2.8c-1.5-0.7-3.1-1-4.9-1c-1.7,0-3.4,0.4-4.9,1c-1.5,0.7-2.8,1.6-4,2.8
|
||||
c-1.2,1.2-2,2.6-2.7,4.2c-0.6,1.6-1,3.3-1,5.1c0,1.9,0.4,3.5,1,5.1c0.6,1.6,1.5,3,2.7,4.2c1.2,1.2,2.4,2.1,4,2.8
|
||||
C371.7,129.6,373.3,130,375.1,130z"/>
|
||||
<path class="st7" d="M454.9,116v18.9c-1.9,1.5-3.9,2.8-6.2,3.9c-2.3,1.2-4.8,2-7.4,2.5c-2.5,0.5-5.1,0.8-7.9,0.8
|
||||
c-3.6,0-7.1-0.7-10.3-2c-3.2-1.3-6-3.1-8.4-5.4s-4.3-5-5.7-8.1c-1.4-3.1-2-6.4-2-9.8c0-3.5,0.7-6.8,2-9.8c1.4-3.1,3.3-5.8,5.7-8.1
|
||||
c2.4-2.3,5.2-4.1,8.4-5.4c3.2-1.3,6.7-2,10.3-2c4.2,0,7.9,0.6,11.3,1.9c3.4,1.2,6.2,3,8.6,5.2l-8.5,9.1c-1.4-1.2-3.1-2.2-5.1-2.9
|
||||
c-2-0.7-4.1-1.1-6.3-1.1c-1.7,0-3.4,0.4-4.9,1c-1.5,0.7-2.8,1.6-4,2.8c-1.2,1.2-2,2.6-2.7,4.2s-1,3.3-1,5.1c0,2,0.4,3.8,1,5.5
|
||||
s1.5,3.1,2.7,4.3c1.2,1.2,2.5,2.2,4,2.9c1.5,0.7,3.1,1.1,4.9,1.1c1.5,0,2.9-0.2,4.2-0.6c1.3-0.4,2.6-1,3.7-1.7V127h-8.9v-10.9
|
||||
L454.9,116L454.9,116z"/>
|
||||
<path class="st8" d="M40.4,200.7V212H0.7v-49.4H39v11.3H13.9v8.7h20.7v10.9H13.9v7.2L40.4,200.7L40.4,200.7z"/>
|
||||
<path class="st8" d="M87.7,173.9H73.1v38H59.4v-38H44.7v-11.3h43V173.9z"/>
|
||||
<path class="st8" d="M138.7,192.1c0,2.1-0.3,4.2-0.9,6.1c-0.5,2-1.4,3.7-2.5,5.4c-1.1,1.7-2.5,3.1-4.2,4.4c-1.7,1.2-3.5,2.3-5.8,3
|
||||
c-2.8,1-6,1.5-9.7,1.5s-6.8-0.5-9.5-1.5c-3.5-1.2-6.4-3.1-8.5-5.6c-2.1-2.5-3.5-5.4-4.3-8.6c-0.3-1.4-0.4-3-0.4-4.8v-29.5h13.2v26
|
||||
c0,4.5,0.8,7.6,2.4,9.4c1.6,1.8,4,2.7,7.2,2.7c3.2,0,5.6-0.9,7.2-2.7c1.6-1.8,2.5-4.9,2.5-9.4v-26h13.3L138.7,192.1z"/>
|
||||
<path class="st8" d="M193.2,187.3c0,3.3-0.6,6.4-1.9,9.2c-1.2,2.9-2.8,5.4-5,7.6c-2.1,2.2-4.5,4-7.4,5.4c-2.8,1.4-5.9,2.1-9,2.3
|
||||
h-23.3v-49.4h21.7c3.4,0,6.7,0.6,9.7,2c3,1.2,5.7,3,7.9,5.3c2.2,2.2,4,4.9,5.3,7.9C192.5,180.7,193.2,183.9,193.2,187.3z M168.7,200
|
||||
c1.5-0.1,3-0.4,4.3-1.2c1.3-0.7,2.5-1.6,3.5-2.7c1-1.2,1.8-2.5,2.3-4c0.6-1.5,0.9-3.1,0.9-4.8s-0.3-3.4-0.9-5
|
||||
c-0.6-1.6-1.4-2.9-2.5-4.1s-2.2-2-3.6-2.7c-1.4-0.7-2.8-1-4.4-1h-8.5V200L168.7,200L168.7,200z"/>
|
||||
<path class="st8" d="M214.1,212h-13.7v-49.4h13.7V212z"/>
|
||||
<path class="st8" d="M256.1,203.7H237l-3.5,8.2h-14.3l24.1-49.4h6.5l24.2,49.4h-14.3L256.1,203.7z M241.8,192.8h9.5l-4.8-10.7
|
||||
L241.8,192.8z"/>
|
||||
<path class="st8" d="M325,162.6V212h-6.5l-26.2-25.4V212h-13.7v-49.4h6.5l26.2,25.4v-25.4H325z"/>
|
||||
<path class="st8" d="M374,173.9h-14.6v38h-13.7v-38H331v-11.3h43V173.9z"/>
|
||||
<path class="st8" d="M403.9,156.1h10.8l-31,64.8h-10.8L403.9,156.1z"/>
|
||||
<path class="st8" d="M418.7,195l17-7.6l-17-7.7v-12.4l34.8,17.1v6l-34.8,17V195z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 13 KiB |
9
assets/img/mignify.svg
Normal file
@ -0,0 +1,9 @@
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#FFFFFF;}
|
||||
</style>
|
||||
<path class="st0" d="M508.5,481.6l-129-129c-2.3-2.3-5.3-3.5-8.5-3.5h-10.3C395,312,416,262.5,416,208C416,93.1,322.9,0,208,0
|
||||
S0,93.1,0,208s93.1,208,208,208c54.5,0,104-21,141.1-55.2V371c0,3.2,1.3,6.2,3.5,8.5l129,129c4.7,4.7,12.3,4.7,17,0l9.9-9.9
|
||||
C513.2,493.9,513.2,486.3,508.5,481.6z M208,384c-97.3,0-176-78.7-176-176S110.7,32,208,32s176,78.7,176,176S305.3,384,208,384z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 634 B |
1
assets/img/search-solid.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg aria-hidden="true" data-prefix="fas" data-icon="search" class="svg-inline--fa fa-search fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"></path></svg>
|
After Width: | Height: | Size: 559 B |
1
assets/img/twitter.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg aria-hidden="true" data-prefix="fab" data-icon="twitter" class="svg-inline--fa fa-twitter fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"></path></svg>
|
After Width: | Height: | Size: 1007 B |
11
assets/js/script.js
Normal file
@ -0,0 +1,11 @@
|
||||
// Fichier des scripts (logiquement que pour les requets AJAX et pour certaines animations) (plusieurs fichiers sont possible bien sur)
|
||||
|
||||
var processForm = () => {
|
||||
var request = new XMLHttpRequest();
|
||||
var form = new FormData();
|
||||
form.append("photo", document.querySelector("#file").files[0]);
|
||||
request.open("POST", "/test/", true);
|
||||
request.send(form);
|
||||
}
|
||||
|
||||
document.querySelector("button").addEventListener("click", processForm);
|
148
assets/php/Functions.php
Normal file
@ -0,0 +1,148 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use DOMDocument;
|
||||
use DOMNode;
|
||||
use PDO;
|
||||
|
||||
/**
|
||||
* @author Avior <florian.bouillon@delta-wings.net>
|
||||
* @author Cl<43>ment Fourrier
|
||||
*/
|
||||
class Functions {
|
||||
public static function endsWith($haystack, $needle) {
|
||||
$length = strlen($needle);
|
||||
if ($length == 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return (substr($haystack, -$length) === $needle);
|
||||
}
|
||||
|
||||
public static function connect() {
|
||||
$host = "127.0.0.1";
|
||||
$db = "blog";
|
||||
$user = "blog";
|
||||
$pass = "blog";
|
||||
$charset="utf8mb4";
|
||||
|
||||
$dsn = "mysql:host=$host;dbname=$db;charset=$charset";
|
||||
try {
|
||||
$pdo = new PDO($dsn, $user, $pass, null);
|
||||
} catch (\PDOException $e) {
|
||||
throw new \PDOException($e->getMessage(), (int)$e->getCode());
|
||||
}
|
||||
return $pdo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Undocumented function
|
||||
*
|
||||
* @param DOMNode $parent
|
||||
* @param [type] $source
|
||||
*
|
||||
* @var DOMNode $node
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function appendHTML(DOMNode $parent, $source) {
|
||||
$tmpDoc = new DOMDocument("1.0", "UTF-8");
|
||||
$html = "<html><body>";
|
||||
$html .= $source;
|
||||
$html .= "</body></html>";
|
||||
$tmpDoc->loadHTML($html);
|
||||
// $tmpDoc->loadHTML('<?xml encoding="UTF-8">'.$html);
|
||||
|
||||
// foreach ($tmpDoc->childNodes as $item)
|
||||
// if ($item->nodeType == XML_PI_NODE)
|
||||
// $tmpDoc->removeChild($item);
|
||||
// $tmpDoc->encoding = 'UTF-8';
|
||||
|
||||
/** @var DOMNode $node */
|
||||
foreach($tmpDoc->getElementsByTagName('body')->item(0)->childNodes as $node) {
|
||||
$importedNode = $parent->ownerDocument->importNode($node, true);
|
||||
$parent->appendChild($importedNode);
|
||||
}
|
||||
}
|
||||
|
||||
public static function loadRoutes() {
|
||||
//recup<75>ration du router
|
||||
$router = Router::getRouter();
|
||||
|
||||
$postCharacters = "[a-z0-9-]";
|
||||
|
||||
//page d'accueil
|
||||
$home = function () {
|
||||
return file_get_contents("../html/index.html");
|
||||
};
|
||||
|
||||
$router->addRoute("/^\/$/", $home); // route : "/"
|
||||
|
||||
//page de post
|
||||
$post = function () {
|
||||
return file_get_contents("../html/post.html");
|
||||
};
|
||||
|
||||
$router->addRoute("/^\/post\/" . $postCharacters . "+\/*$/", $post); // route "/post/*"
|
||||
|
||||
//page de recherche
|
||||
$search = function () {
|
||||
return file_get_contents("../html/search.html");
|
||||
};
|
||||
|
||||
$router->addRoute("/^\/search\/$/", $search); // route "/search/*"
|
||||
|
||||
$edit = function() {
|
||||
$_POST = array_merge($_POST, $_GET); //debug uniquement
|
||||
var_dump($_POST);
|
||||
/*
|
||||
$_POST should contain
|
||||
post :
|
||||
id
|
||||
title
|
||||
content
|
||||
category
|
||||
author
|
||||
|
||||
UPDATE posts
|
||||
SET
|
||||
title = title,
|
||||
url = strtolower(preg_replace(["/\ /", '/[\'\/~`\!@#\$%\^&\*\(\)\+=\{\}\[\]\|;:"\<\>,\.\?\\\]/'], ["_", ""], title));
|
||||
content = content,
|
||||
short = substr(content, 0, 253) . "...";
|
||||
category = categoryId
|
||||
author = authorId
|
||||
WHERE id = id
|
||||
*/
|
||||
|
||||
$request = "UPDATE posts SET `title`=:title, `url`=:url, `content`=:content, `short`=:short, `category`=:category, `author`=:author, WHERE `id`=:id";
|
||||
|
||||
$title = $_POST["title"];
|
||||
$url = strtolower(preg_replace(["/\ /", '/[\'\/~`\!@#\$%\^&\*\(\)\+=\{\}\[\]\|;:"\<\>,\.\?\\\]/'], ["_", ""], $title));
|
||||
$content = $_POST["content"];
|
||||
$short = substr($content, 0, 253) . "...";
|
||||
$category = intval($_POST["category"]);
|
||||
$author = intval($_POST["author"]);
|
||||
|
||||
$id = intval($_POST["id"]);
|
||||
|
||||
|
||||
$pdo = Functions::connect();
|
||||
$prepared = $pdo->prepare($request);
|
||||
$prepared->bindParam(":title", $title);
|
||||
$prepared->bindParam(":url", $url);
|
||||
$prepared->bindParam(":content", $content);
|
||||
$prepared->bindParam(":short", $short);
|
||||
$prepared->bindParam(":category", $category, PDO::PARAM_INT);
|
||||
$prepared->bindParam(":author", $author, PDO::PARAM_INT);
|
||||
$prepared->bindParam(":id", $id, PDO::PARAM_INT);
|
||||
|
||||
$prepared->execute();
|
||||
};
|
||||
|
||||
$router->addRoute("/^\/post\/" . $postCharacters . "+\/edit\/*$/", $edit);
|
||||
|
||||
}
|
||||
|
||||
}
|
49
assets/php/Router.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
/**
|
||||
* classe pour gerer le routage des pages
|
||||
* la variable static $router sert a utiliser le router dans plusieurs fichier
|
||||
* sans forcement avoir une obligation de nom de variable
|
||||
* de plus ils sert a garder une route unique
|
||||
*/
|
||||
class Router {
|
||||
//variable static pour stocker le router
|
||||
private static $router = null;
|
||||
|
||||
//definit le router
|
||||
public function __construct() {
|
||||
//TODO faire que si un router existe déjà retourner le routeur existant
|
||||
if(Router::$router != null) {
|
||||
return Router::$router;
|
||||
} else Router::$router = $this;
|
||||
}
|
||||
|
||||
//fonction static pour recuperer un router déjà crée
|
||||
public static function getRouter() {
|
||||
return Router::$router;
|
||||
}
|
||||
|
||||
//liste des routes
|
||||
private $routeList = array();
|
||||
|
||||
|
||||
//ajout d'une route
|
||||
public function addRoute($route, $page) {
|
||||
$this->routeList[$route] = $page;
|
||||
}
|
||||
|
||||
//fonction de recherche d'une route par rapport a un texte
|
||||
//return function
|
||||
public function search($path) {
|
||||
foreach ($this->routeList as $reg => $page) {
|
||||
if(preg_match($reg, $path)) {
|
||||
return $page;
|
||||
}
|
||||
}
|
||||
return function () {
|
||||
return file_get_contents("../html/404.html");
|
||||
};
|
||||
}
|
||||
}
|
33
assets/php/Tags/Article.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Tags;
|
||||
|
||||
use App\Tags\Tag;
|
||||
use App\Functions;
|
||||
|
||||
/**
|
||||
* inputs <tag type="article" column="(voir les collones de la table post)/>
|
||||
* return text
|
||||
*/
|
||||
class Article extends Tag {
|
||||
public function render() {
|
||||
|
||||
$post = array( //testing purpose
|
||||
'title'=> "test",
|
||||
'url'=> "pokemongo",
|
||||
'content'=> "<p>azerthjjhhdsqmlkjhgfd</p>"
|
||||
);
|
||||
|
||||
$pok = $this->getElement();
|
||||
$attr = $pok->getAttribute("column");
|
||||
|
||||
$doc = $this->getDoc();
|
||||
|
||||
if($attr == "content") {
|
||||
Functions::appendHTML($pok->parentNode, $post[$attr]);
|
||||
} else {
|
||||
$txt = $doc->createTextNode($post[$attr]);
|
||||
$pok->parentNode->insertBefore($txt, $pok);
|
||||
}
|
||||
}
|
||||
}
|
31
assets/php/Tags/Author.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Tags;
|
||||
|
||||
use App\Tags\Tag;
|
||||
|
||||
/**
|
||||
* input <tag type="author" column="(column name)"/>
|
||||
* return text
|
||||
*/
|
||||
class Author extends Tag {
|
||||
public function render() {
|
||||
|
||||
$post = array( //testing purpose
|
||||
'name'=> "test",
|
||||
'image'=> "pokemon",
|
||||
'linkedin'=> "pouet"
|
||||
);
|
||||
|
||||
|
||||
|
||||
$pok = $this->getElement();
|
||||
$attr = $pok->getAttribute("column");
|
||||
|
||||
$doc = $this->getDoc();
|
||||
|
||||
$txt = $doc->createTextNode($post[$attr]);
|
||||
|
||||
$pok->parentNode->insertBefore($txt, $pok);
|
||||
}
|
||||
}
|
29
assets/php/Tags/Bold.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Tags;
|
||||
|
||||
use App\Tags\Tag;
|
||||
|
||||
//ce tag est juste la pour donner les possibilité de mon composant
|
||||
/**
|
||||
* input <tag type="bold">test</tag>
|
||||
* result <span style="font-weight: bold">test</span>
|
||||
*/
|
||||
class Bold extends Tag {
|
||||
public function render() {
|
||||
//recuperation de la balise de base (<tag type="bold">pouet</tag>)
|
||||
$pok = $this->getElement();
|
||||
//recuperation du document (necessaire a la création de balises
|
||||
$doc = $this->getDoc();
|
||||
//creation de la balise "span"
|
||||
$res = $doc->createElement("span");
|
||||
//creation du texte et assignation du texte se trouvant dans la balise de base
|
||||
$text = $doc->createTextNode($pok->textContent);
|
||||
//rajout dans la balise span notre texte
|
||||
$res->appendChild($text);
|
||||
//on rajoute a la balise span du style pour le mettre en gras
|
||||
$res->setAttribute("style", "font-weight: bold");
|
||||
//enfin on met la div final dans le fichier
|
||||
$pok->parentNode->insertBefore($res, $pok);
|
||||
}
|
||||
}
|
22
assets/php/Tags/Includes.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Tags;
|
||||
|
||||
use App\Tags\Tag;
|
||||
use App\Functions;
|
||||
|
||||
/**
|
||||
* input <tag type="includes" file="(html file in includes folder)"/>
|
||||
* return the content of the file
|
||||
*/
|
||||
class Includes extends Tag {
|
||||
public function render() {
|
||||
$el = $this->getElement();
|
||||
$attr = $el->getAttribute("file");
|
||||
|
||||
$p = file_get_contents("../html/includes/".$attr.".html");
|
||||
|
||||
// var_dump($p);
|
||||
Functions::appendHTML($el->parentNode, $p);
|
||||
}
|
||||
}
|
36
assets/php/Tags/IsLoggedIn.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Tags;
|
||||
|
||||
use App\Tags\Tag;
|
||||
|
||||
/**
|
||||
*
|
||||
* <tag type="isloggedin">
|
||||
* <if true>
|
||||
*
|
||||
* </if>
|
||||
* <if false>
|
||||
*
|
||||
* </if>
|
||||
* </tag>
|
||||
*/
|
||||
class IsLoggedIn extends Tag {
|
||||
public function render() {
|
||||
|
||||
$el = $this->getElement();
|
||||
|
||||
//debugging purpose
|
||||
$loggedin = false;
|
||||
|
||||
foreach ($el->getElementsByTagName("if") as $element) {
|
||||
if($element->hasAttribute("true") && $loggedin) {
|
||||
$r = $element->childNodes->item(1);
|
||||
$el->parentNode->insertBefore($r, $el);
|
||||
} elseif ($element->hasAttribute("false")) {
|
||||
$r = $element->childNodes->item(1);
|
||||
$el->parentNode->insertBefore($r, $el);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
70
assets/php/Tags/Loop.php
Normal file
@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
namespace App\Tags;
|
||||
|
||||
use App\Tags\Tag;
|
||||
use DomXPath;
|
||||
use App\Functions;
|
||||
use App\DB\Post;
|
||||
|
||||
/**
|
||||
* input
|
||||
* <tag type="loop" for="(table)" limit="(nombre-max g<>n<EFBFBD>r<EFBFBD>)">
|
||||
* <loop column="element"/>
|
||||
* </tag>
|
||||
*/
|
||||
class Loop extends Tag {
|
||||
public function render() {
|
||||
$el = $this->getElement();
|
||||
|
||||
$doc = $this->getDoc();
|
||||
|
||||
$limit = (int) $el->getAttribute("limit");
|
||||
|
||||
$posts = Post::list($limit);
|
||||
|
||||
$pdo = Functions::connect();
|
||||
$query = $pdo->query("SELECT title, categories.name as categorie, dt as date, short as content
|
||||
FROM posts
|
||||
INNER JOIN categories ON categories.id=posts.categorie
|
||||
ORDER BY date DESC
|
||||
LIMIT 6;");
|
||||
$posts = $query->fetchAll();
|
||||
|
||||
$parent = $el->parentNode;
|
||||
//var_dump($parent);
|
||||
|
||||
|
||||
$limit = $limit > count($posts) ? count($posts) : $limit;
|
||||
|
||||
for ($i=0; $i < $limit; $i++) {
|
||||
$pok = $el->childNodes->item(0)->cloneNode(true);
|
||||
|
||||
$parent->insertBefore($pok, $el);
|
||||
|
||||
$elements = $pok->getElementsByTagName("loop");
|
||||
|
||||
foreach ($elements as $ele) {
|
||||
if($ele->getAttribute("column") == "content") {
|
||||
Functions::appendHTML($ele->parentNode, $posts[$i]["content"]);
|
||||
} else {
|
||||
$txt = $doc->createTextNode($posts[$i][$ele->getAttribute("column")]);
|
||||
$ele->parentNode->insertBefore($txt, $ele);
|
||||
}
|
||||
}
|
||||
|
||||
$finder = new DomXPath($doc);
|
||||
$nodes = $finder->query("//*[contains(@class, 'column-cat')]");
|
||||
|
||||
if(count($nodes) >= 1) $nodes[0]->setAttribute("class", str_replace("column-categorie", $posts[$i]["categorie"], $nodes[0]->getAttribute("class")));
|
||||
|
||||
$loop = $pok->getElementsByTagName("loop");
|
||||
|
||||
while ($loop->count() >= 1) {
|
||||
$loop->item(0)->parentNode->removeChild($loop->item(0));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
20
assets/php/Tags/Svg.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Tags;
|
||||
|
||||
use App\Tags\Tag;
|
||||
use App\Functions;
|
||||
|
||||
/**
|
||||
* <tag type="svg" style="color: white; width: 18px; height: 18px""/>
|
||||
*/
|
||||
class Svg extends Tag {
|
||||
public function render() {
|
||||
$el = $this->getElement();
|
||||
$attr = $el->getAttribute("file");
|
||||
$t = $this->getDoc()->createDocumentFragment();
|
||||
$p = file_get_contents("../img/".$attr.".svg");
|
||||
Functions::appendHTML($el->parentNode, $p);
|
||||
$el->nextSibling->setAttribute("style", $el->getAttribute("style"));
|
||||
}
|
||||
}
|
110
assets/php/Tags/Tag.php
Normal file
@ -0,0 +1,110 @@
|
||||
<?php
|
||||
|
||||
namespace App\Tags;
|
||||
|
||||
use DOMDocument;
|
||||
use DOMElement;
|
||||
use DOMNode;
|
||||
|
||||
/**
|
||||
* @author Avior <florian.bouillon@delta-wings.net>
|
||||
*
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class Tag {
|
||||
|
||||
/** @var DOMDocument */
|
||||
private $document;
|
||||
|
||||
/** @var DOMElement */
|
||||
private $element;
|
||||
|
||||
/** @var boolean */
|
||||
private $debug;
|
||||
|
||||
/**
|
||||
* Tag Constructor (will receive variables used in the tags)
|
||||
*
|
||||
* @param DOMDocument $doc the document
|
||||
* @param DOMElement $DOMContent the element
|
||||
* @param boolean $debug is debug enable or not ?
|
||||
*/
|
||||
public function __construct(DOMDocument $document, DOMElement $element, bool $debug) {
|
||||
$this->document = $document;
|
||||
$this->element = $element;
|
||||
$this->debug = $debug;
|
||||
}
|
||||
|
||||
/** @return DOMDocument return the document */
|
||||
public function getDoc(): DOMDocument {
|
||||
return $this->document;
|
||||
}
|
||||
|
||||
/**
|
||||
* get the element
|
||||
*
|
||||
* @return DOMElement the element
|
||||
*/
|
||||
public function getElement(): DOMElement {
|
||||
return $this->element;
|
||||
}
|
||||
|
||||
/** @return boolean */
|
||||
public function isDebugging(): bool {
|
||||
return $this->debug;
|
||||
}
|
||||
|
||||
public function render() {}
|
||||
|
||||
/**
|
||||
* Load tags from html $content and return the resulting String
|
||||
*
|
||||
* @param String $content base html file containing <tag />
|
||||
*
|
||||
* @return String the result html
|
||||
*/
|
||||
public static function loadTags(String $content): String {
|
||||
$dom = new DOMDocument('1.0', 'UTF-8');
|
||||
libxml_use_internal_errors(true);
|
||||
$dom->loadHTML('<?xml encoding="UTF-8">'.$content);
|
||||
libxml_clear_errors();
|
||||
|
||||
// fix UTF-8 problem
|
||||
/** @var DOMNode $item */
|
||||
foreach ($dom->childNodes as $item)
|
||||
if ($item->nodeType == XML_PI_NODE)
|
||||
$dom->removeChild($item);
|
||||
$dom->encoding = 'UTF-8';
|
||||
|
||||
|
||||
|
||||
$head = $dom->getElementsByTagName("head");
|
||||
if($head->count() >= 1) {
|
||||
$t = $dom->createDocumentFragment();
|
||||
$p = file_get_contents("../html/includes/head.html");
|
||||
$t->appendXML($p);
|
||||
$head->item(0)->appendChild($t);
|
||||
}
|
||||
|
||||
|
||||
$list = $dom->getElementsByTagName("tag");
|
||||
|
||||
//charge et supprimme les tags
|
||||
while($lst = $list->item(0)) {
|
||||
|
||||
$tgs = "\\App\\Tags\\" . ucfirst($lst->getAttribute("type"));
|
||||
$tg = new $tgs($dom, $lst, false);
|
||||
|
||||
$tg->render();
|
||||
|
||||
$lst->parentNode->removeChild($lst);
|
||||
|
||||
$list = $dom->getElementsByTagName("tag");
|
||||
}
|
||||
|
||||
$res = $dom->saveHTML();
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
}
|
12
assets/php/db/Author.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App\DB;
|
||||
|
||||
class Author {
|
||||
|
||||
private $id;
|
||||
|
||||
private $username;
|
||||
|
||||
private $linkedin;
|
||||
}
|
99
assets/php/db/Categorie.php
Normal file
@ -0,0 +1,99 @@
|
||||
<?php
|
||||
|
||||
namespace App\DB;
|
||||
|
||||
use App\Functions;
|
||||
use PDO;
|
||||
|
||||
|
||||
class Categorie {
|
||||
|
||||
private $id;
|
||||
|
||||
private $name;
|
||||
|
||||
public function __construct($id, $name) {
|
||||
$this->id = $id;
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
public static function fromArray($array) {
|
||||
return new Self($array["id"], $array["name"]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Undocumented function
|
||||
*
|
||||
* @param boolean $recent sort by most recent of less recent
|
||||
* @param int $limit
|
||||
*
|
||||
* @return Categorie[]
|
||||
*/
|
||||
public static function list($recent = true, $limit = 100) {
|
||||
$sort = $recent ? "DESC" : "ASC";
|
||||
$query = "SELECT * FROM categories ORDER BY " . $sort . " LIMIT " . $limit;
|
||||
|
||||
$pdo = Functions::connect();
|
||||
$cats = $pdo->query($query)->fetchAll();
|
||||
|
||||
$res = array();
|
||||
|
||||
foreach ($cats as $cat) {
|
||||
$res[] = new Categorie($cat["id"], $cat["name"]);
|
||||
}
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
public static function get(int $id) {
|
||||
return Categorie::fromArray(Functions::connect()->query("SELECT * FROM categories WHERE id=" . $id)->fetch());
|
||||
}
|
||||
|
||||
public static function add(Categorie $categorie) {
|
||||
$query = "INSERT INTO categories (id, name)
|
||||
VALUES (NULL, ':name');";
|
||||
|
||||
$pdo = Functions::connect();
|
||||
$prepared = $pdo->prepare($query);
|
||||
$prepared->bindParam(":name", $categorie->getName());
|
||||
$prepared->execute();
|
||||
}
|
||||
|
||||
public static function remove(Categorie $categorie) {
|
||||
Functions::connect()->prepare("DELETE FROM categories WHERE id=" . $categorie->getName())->execute();
|
||||
|
||||
}
|
||||
|
||||
public static function update(Categorie $categorie) {
|
||||
$query = ""
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the value of name
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of name
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->name = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value of id
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
}
|
71
assets/php/db/Post.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
namespace App\DB;
|
||||
|
||||
class Post {
|
||||
|
||||
|
||||
private $id;
|
||||
|
||||
private $title;
|
||||
|
||||
private $url;
|
||||
|
||||
private $content;
|
||||
|
||||
private $short;
|
||||
|
||||
private $categorie;
|
||||
|
||||
private $author;
|
||||
|
||||
private $dt;
|
||||
|
||||
/**
|
||||
* list of posts
|
||||
*
|
||||
* @param boolean $recent sort by most recent or not
|
||||
* @param integer $limit limit the number of result
|
||||
*
|
||||
* @return array(Post)
|
||||
*/
|
||||
public static function list($recent = true, $limit = 100) {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* get a specific Post
|
||||
*
|
||||
* @param integer $id the id
|
||||
*
|
||||
* @return Post
|
||||
*/
|
||||
public static function get(int $id) {
|
||||
}
|
||||
|
||||
/**
|
||||
* add a post to the db
|
||||
*
|
||||
* @param Post $post
|
||||
*
|
||||
*/
|
||||
public static function add(Post $post) {
|
||||
}
|
||||
|
||||
/**
|
||||
* remove the post
|
||||
*
|
||||
* @param Post $post
|
||||
*
|
||||
*/
|
||||
public static function remove(Post $post) {}
|
||||
|
||||
/**
|
||||
* update the post data on the db
|
||||
*
|
||||
* @param Post $post
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function update(Post $post) {}
|
||||
}
|
57
assets/php/db/Tag.php
Normal file
@ -0,0 +1,57 @@
|
||||
<?php
|
||||
namespace App\DB;
|
||||
|
||||
class Tag {
|
||||
|
||||
private $id;
|
||||
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* list of posts
|
||||
*
|
||||
* @param boolean $recent sort by most recent or not
|
||||
* @param integer $limit limit the number of result
|
||||
*
|
||||
* @return array(Post)
|
||||
*/
|
||||
public static function list($recent = true, $limit = 100) {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* get a specific Post
|
||||
*
|
||||
* @param integer $id the id
|
||||
*
|
||||
* @return Post
|
||||
*/
|
||||
public static function get(int $id) {
|
||||
}
|
||||
|
||||
/**
|
||||
* add a post to the db
|
||||
*
|
||||
* @param Post $post
|
||||
*
|
||||
*/
|
||||
public static function add(Post $post) {
|
||||
}
|
||||
|
||||
/**
|
||||
* remove the post
|
||||
*
|
||||
* @param Post $post
|
||||
*
|
||||
*/
|
||||
public static function remove(Post $post) {}
|
||||
|
||||
/**
|
||||
* update the post data on the db
|
||||
*
|
||||
* @param Post $post
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function update(Post $post) {}
|
||||
}
|
71
assets/php/handler.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?php
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', 'On');
|
||||
|
||||
require_once "../../vendor/autoload.php";
|
||||
|
||||
use App\Router;
|
||||
use App\Functions;
|
||||
use App\Tags\Tag;
|
||||
|
||||
//renvoie vers le fichier css si il est demand<6E>
|
||||
if(Functions::endsWith($_GET["page"], ".css")) {
|
||||
echo file_get_contents("../css/style.css");
|
||||
die;
|
||||
}
|
||||
|
||||
//renvoie vers le fichier js si demand<6E>
|
||||
if(Functions::endsWith($_GET["page"], ".js")) {
|
||||
echo file_get_contents("../js/script.js");
|
||||
die;
|
||||
}
|
||||
|
||||
// var_dump(sizeof($_GET));
|
||||
|
||||
// si page non / & finit pas par / at pas de ?
|
||||
if($_GET["page"] != "" && !Functions::endsWith($_GET["page"], "/") && count($_GET) <= 1) {
|
||||
header("Location: /".$_GET["page"]."/");
|
||||
die;
|
||||
}
|
||||
|
||||
//enleve les / du d<>but & fin
|
||||
$_GET['page'] = trim($_GET['page'], '/');
|
||||
|
||||
// si taille sup<75>rieur <20> 1 $_getpost = element
|
||||
if(count(explode("/", $_GET["page"])) > 1) {
|
||||
$_GET["post"] = explode("/", $_GET["page"])[1];
|
||||
}
|
||||
|
||||
// $_get[page] = $_get[page][0]
|
||||
$_GET['page'] = "/" . $_GET['page'];
|
||||
|
||||
// si len $_get[page] > 1 (mot ou autre) on rajoute le slash de fin
|
||||
if(strlen($_GET['page']) > 1) {
|
||||
$_GET['page'] = $_GET["page"] . "/";
|
||||
}
|
||||
|
||||
// var_dump($_GET["page"]);
|
||||
|
||||
//page de test pour des functions
|
||||
// A ENLEVER LORS DES COMMITS DE FIN
|
||||
// var_dump($_GET);
|
||||
if($_GET["page"] == "/test/") {
|
||||
require_once "test.php";
|
||||
die;
|
||||
}
|
||||
|
||||
/**
|
||||
* D<>marrage du routage du contenu
|
||||
*/
|
||||
|
||||
$router = new Router();
|
||||
|
||||
Functions::loadRoutes();
|
||||
|
||||
|
||||
|
||||
//chargement des tags contenu sur la page
|
||||
|
||||
$pokemon = Tag::loadTags($router->search($_GET["page"])(), false);
|
||||
|
||||
echo $pokemon;
|
83
assets/php/pages.php
Normal file
@ -0,0 +1,83 @@
|
||||
<?php
|
||||
// // include_once "router.php";
|
||||
|
||||
// use App\Router;
|
||||
|
||||
// //recup<75>ration du router
|
||||
// $router = Router::getRouter();
|
||||
|
||||
// $postCharacters = "[a-z0-9-]";
|
||||
|
||||
// //page d'accueil
|
||||
// $home = function () {
|
||||
// return file_get_contents("../html/index.html");
|
||||
// };
|
||||
|
||||
// $router->addRoute("/^\/$/", $home); // route : "/"
|
||||
|
||||
// //page de post
|
||||
// $post = function () {
|
||||
// return file_get_contents("../html/post.html");
|
||||
// };
|
||||
|
||||
// $router->addRoute("/^\/post\/" . $postCharacters . "+\/*$/", $post); // route "/post/*"
|
||||
|
||||
// //page de recherche
|
||||
// $search = function () {
|
||||
// return file_get_contents("../html/search.html");
|
||||
// };
|
||||
|
||||
// $router->addRoute("/^\/search\/$/", $search); // route "/search/*"
|
||||
|
||||
// $edit = function() {
|
||||
// $_POST = array_merge($_POST, $_GET); //debug uniquement
|
||||
// var_dump($_POST);
|
||||
// /*
|
||||
// $_POST should contain
|
||||
// post :
|
||||
// id
|
||||
// title
|
||||
// content
|
||||
// category
|
||||
// author
|
||||
|
||||
// UPDATE posts
|
||||
// SET
|
||||
// title = title,
|
||||
// url = strtolower(preg_replace(["/\ /", '/[\'\/~`\!@#\$%\^&\*\(\)\+=\{\}\[\]\|;:"\<\>,\.\?\\\]/'], ["_", ""], title));
|
||||
// content = content,
|
||||
// short = substr(content, 0, 253) . "...";
|
||||
// category = categoryId
|
||||
// author = authorId
|
||||
// WHERE id = id
|
||||
// */
|
||||
|
||||
// require_once "functions.php";
|
||||
|
||||
|
||||
// $request = "UPDATE posts SET `title`=:title, `url`=:url, `content`=:content, `short`=:short, `category`=:category, `author`=:author, WHERE `id`=:id";
|
||||
|
||||
// $title = $_POST["title"];
|
||||
// $url = strtolower(preg_replace(["/\ /", '/[\'\/~`\!@#\$%\^&\*\(\)\+=\{\}\[\]\|;:"\<\>,\.\?\\\]/'], ["_", ""], $title));
|
||||
// $content = $_POST["content"];
|
||||
// $short = substr($content, 0, 253) . "...";
|
||||
// $category = intval($_POST["category"]);
|
||||
// $author = intval($_POST["author"]);
|
||||
|
||||
// $id = intval($_POST["id"]);
|
||||
|
||||
|
||||
// $pdo = connect();
|
||||
// $prepared = $pdo->prepare($request);
|
||||
// $prepared->bindParam(":title", $title);
|
||||
// $prepared->bindParam(":url", $url);
|
||||
// $prepared->bindParam(":content", $content);
|
||||
// $prepared->bindParam(":short", $short);
|
||||
// $prepared->bindParam(":category", $category, PDO::PARAM_INT);
|
||||
// $prepared->bindParam(":author", $author, PDO::PARAM_INT);
|
||||
// $prepared->bindParam(":id", $id, PDO::PARAM_INT);
|
||||
|
||||
// $prepared->execute();
|
||||
// };
|
||||
|
||||
// $router->addRoute("/^\/post\/" . $postCharacters . "+\/edit\/*$/", $edit);
|
38
assets/php/test.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
if(isset($_GET["image"]) && !empty($_GET["image"])) $_POST["image"] = $_GET["image"];
|
||||
|
||||
$id = 1; //post id
|
||||
|
||||
$uploadFolder = "../../uploads/posts/$id/";
|
||||
|
||||
if(!file_exists($uploadFolder)) {
|
||||
mkdir($uploadFolder, 0660, true);
|
||||
}
|
||||
|
||||
if(isset($_FILES["photo"]) && !empty($_FILES["photo"])) {
|
||||
var_dump($_FILES["photo"]);
|
||||
move_uploaded_file($_FILES["photo"]["tmp_name"], $uploadFolder.$_FILES["photo"]["name"]);
|
||||
// require_once "functions.php";
|
||||
// file_put_contents($uploadFolder."/pouet.jpg", base64_decode($_POST["image"]));
|
||||
// base64_to_jpeg($_POST["image"], $uploadFolder."/pouet.jpg");
|
||||
// file_put_content($uploadFolder."/pouet.jpg", base64_decode(preg_replace('#^data:image/\w+;base64,#i', '', $_POST["image"])));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
echo '<input id="file" type="file" multiple/><button>Send !</button>';
|
||||
|
||||
echo '
|
||||
<script defer>
|
||||
var processForm = () => {
|
||||
var request = new XMLHttpRequest();
|
||||
var form = new FormData();
|
||||
form.append("photo", document.querySelector("#file").files[0]);
|
||||
request.open("POST", "/test/", true);
|
||||
request.send(form);
|
||||
}
|
||||
|
||||
document.querySelector("button").addEventListener("click", processForm);
|
||||
</script>
|
||||
';
|