This commit is contained in:
Florian Bouillon 2019-03-06 09:43:45 +01:00
parent 110bb31616
commit 47524fec34
6 changed files with 47 additions and 9 deletions

View File

@ -938,3 +938,24 @@ table {
.bloc-filter label {
width: 80%;
}
.post u {
font-weight: 700;
}
.post i {
font-style: italic;
}
.post ol {
list-style: decimal-leading-zero;
}
.post ul {
list-style: disc;
}
.bloc-search a {
color: inherit;
text-decoration: inherit;
}

View File

@ -5,6 +5,7 @@
<script src="/assets/js/script.js" defer=""></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous" />
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<link href="http://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.11/summernote.css" rel="stylesheet" />
<script src="http://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.11/summernote.js"></script>

View File

@ -9,7 +9,7 @@
<tag type="includes" file="header" />
</header>
<main class="container">
<div class="bloc-recent">
<div class="bloc-recent recent">
<div class="contenue-recent-search">
<div class="titre-recent">
<p>récent</p>
@ -19,7 +19,6 @@
</div>
</div>
</div>
<!-- <tag type="search" /> -->
<div class="bloc-search">
<tag type="loop" limit="20">
<a class="column-link">

View File

@ -102,8 +102,10 @@ var submit = () => {
http.open("POST", "./", true);
http.onreadystatechange = function() {//Call a function when the state changes.
if(http.readyState == 4 && http.status == 200) {
document.write(http.responseText);
// window.location = window.location.href.replace("edit/", "");
// document.write(http.responseText);
let href = window.location.href.replace("edit/", "");
href.replace("new/", "");
window.location = href;
}
}
http.send(data);
@ -124,7 +126,23 @@ document.querySelectorAll(".filtre").forEach(function(el) {
var tag = (tagW != null ? "&tag=" + tagW : "");
var termW = new URL(window.location).searchParams.get("term");
var term = (termW != null ? "&term=" + termW : "");
window.location = "/search/?category=" + this.getAttribute("data-category") + tag + term;
var recentW = new URL(window.location).searchParams.get("recent");
var recent = (recentW != null ? "&recent=" + recentW : "");
window.location = "/search/?category=" + this.getAttribute("data-category") + tag + term + recent;
})
})
document.querySelectorAll(".recent").forEach(function(el) {
el.addEventListener("click", function() {
var tagW = new URL(window.location).searchParams.get("tag");
var tag = (tagW != null ? "&tag=" + tagW : "");
var termW = new URL(window.location).searchParams.get("term");
var term = (termW != null ? "&term=" + termW : "");
var recentW = new URL(window.location).searchParams.get("recent");
var recent = "?recent=" + (recentW != null && recentW == "false" ? "true" : "false");
var categoryW = new URL(window.location).searchParams.get("category");
var cetagory = (categoryW != null ? "&category=" + categoryW : "");
window.location = "/search/" + recent + tag + term + cetagory;
})
})
@ -145,15 +163,13 @@ $(document).ready(function() {
}
},
toolbar: [
['style', ['style']],
['font', ['bold', 'italic', 'underline', 'clear']],
['fontname', ['fontname']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']],
['table', ['table']],
['insert', ['link', 'picture', 'hr']],
['view', ['fullscreen', 'codeview']],
['view', ['codeview']],
['help', ['help']]
]
});

View File

@ -20,6 +20,7 @@ class Tags extends Tag {
$url = "?tag=" . $tag->getId();
if(isset($_GET["term"])) $url .= "&term=" . $_GET["term"];
if(isset($_GET["category"])) $url .= "&category=" . $_GET["category"];
if(isset($_GET["recent"])) $url .= "&recent=" . $_GET["recent"];
$res->setAttribute("href", "/search/" . $url);
$classes = "tag";
if(isset($_GET["tag"]) && $tag->getId() == $_GET["tag"]) $classes .= " active";

View File

@ -245,7 +245,7 @@ class Post {
$content = $post->getContent();
$category = $post->getCategory()->getId();
$author = $post->getAuthor()->getId();
$dt = (new DateTime())->format("d/m/Y h:i:s");
$dt = (new DateTime())->format("d/m/Y");
$pdo = Functions::connect();