"
+ 'content' => $text
);
$amount += 1;
}
@@ -88,11 +92,14 @@ if ($_SESSION['login']) {
$feed = $writer->execute();
$file = fopen($feed_path, "w");
+
if (fwrite($file, $feed) === false) {
echo "-1";
exit;
}
+
fclose($file);
+
echo "0";
}
?>
diff --git a/rcc/index.php b/rcc/index.php
index 9657df7..e7cdf75 100644
--- a/rcc/index.php
+++ b/rcc/index.php
@@ -1,207 +1,308 @@
+
+ * @license MIT License
+ * @link https://mmk2410.org/rangitaki
+ *
+ * Main page of RCC (Rangitaki Control Center)
+ *
+ * The MIT License
+ *
+ * Copyright 2015 mmk2410.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+?>
+
-
Rangitaki Control Center
-
+
+
+
+
+
+
+
+
+
+
-
+ The entered password was wrong, please try again.
+
+
+
+
+
+
+
Rangitaki Control Center
- The Rangitaki Control Center is disabled. You can enable it in
- your config file. But please read first the documentation.
+ The Rangitaki Control Center is disabled. You can enable
+ it in your config file. But please read first the
+ documentation.
+
+
+
+
+
diff --git a/rcc/media/index.php b/rcc/media/index.php
index 1e66ea8..db16346 100644
--- a/rcc/media/index.php
+++ b/rcc/media/index.php
@@ -1,60 +1,100 @@
+
+ * @license MIT License
+ * @link https://mmk2410.org/rangitaki
+ *
+ * Media page of RCC (Rangitaki Control Center)
+ *
+ * The MIT License
+ *
+ * Copyright 2015 mmk2410.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+?>
+
-
-
-
- Rangitaki Control Center
-
-
-
-
-
+
diff --git a/rcc/newpost/index.php b/rcc/newpost/index.php
index 3d45780..526d3a8 100644
--- a/rcc/newpost/index.php
+++ b/rcc/newpost/index.php
@@ -1,54 +1,82 @@
+ * @license MIT License
+ * @link https://mmk2410.org/rangitaki
+ *
+ * Newpost page of RCC (Rangitaki Control Center)
+ *
+ * The MIT License
+ *
+ * Copyright 2015 mmk2410.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
date_default_timezone_set('UTC');
?>
+
-
+
Rangitaki Control Center
-
+
+
+
+
+
+
+
+
+
+
-
" +
+ "Now select the post you want to delete. " +
+ "Remember that once a post is deleted it can't be restored.
"
+ );
+ $("#delete_select_post").append(
+ ""
+ );
+
$.each($.parseJSON(data), function (index, value) {
var post = value.substring(0, value.length - 3);
- $("#delete_selected_post").append("");
+ $("#delete_selected_post").append(
+ ""
+ );
});
- $("#delete_select_post").after("DELETE POST")
+
+ $("#delete_select_post").after(
+ "DELETE POST"
+ );
});
});
@@ -37,10 +52,12 @@ function deletePostButton() {
var selectedBlog = $("#delete_selected_blog").val();
var selectedPost = $("#delete_selected_post").val();
+
$.get("res/delete_post.php", {
blog: selectedBlog,
post: selectedPost
}, function (data) {
+
$("#delete_select_post").remove();
$("#delete_select_post_info").remove();
$("#delete_post_button").remove();
@@ -51,7 +68,10 @@ function deletePostButton() {
} else if (data == "941") {
alert("ERROR 941: No blog as get argument given");
} else if (data == "961") {
- alert("ERROR 961: Error while deleting the file. Check if the web server has the permission to do so.");
+ alert(
+ "ERROR 961: Error while deleting the file. Check if the" +
+ "web server has the permission to do so."
+ );
} else if (data == "0") {
alert("Post successfully deleted.");
}
@@ -59,4 +79,4 @@ function deletePostButton() {
}
-$(document).ready(main());
\ No newline at end of file
+$(document).ready(main());
diff --git a/rcc/res/delete_post.php b/rcc/res/delete_post.php
index 77b46ee..ac5450b 100644
--- a/rcc/res/delete_post.php
+++ b/rcc/res/delete_post.php
@@ -2,8 +2,35 @@
/**
* PHP Version 7
*
- * User: mmk2410
- * Date: 12/6/15
+ * @category Blogging
+ * @package Rcc
+ * @author Marcel Kapfer (mmk2410)
+ * @license MIT License
+ * @link https://mmk2410.org/rangitaki
+ *
+ * delete post script
+ *
+ * The MIT License
+ *
+ * Copyright 2015 mmk2410.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*
* Error Codes:
* 901 No post given as get argument
@@ -11,17 +38,24 @@
* 941 No blog given as get argument
* 961 Error while deleting the post
*/
+
$post = $_GET["post"];
$blog = $_GET["blog"];
-if (!isset($post)) {
- echo "901";
-} else if (!isset($blog)) {
- echo "941";
-} else if (!file_exists("./../../articles/$blog/$post.md")) {
- echo "921";
-} else {
- if (unlink("./../../articles/$blog/$post.md")) {
- echo "0";
+
+session_start();
+if ($_SESSION['login']) {
+ if (!isset($post)) {
+ echo "901";
+ } else if (!isset($blog)) {
+ echo "941";
+ } else if (!file_exists("./../../articles/$blog/$post.md")) {
+ echo "921";
+ } else {
+ if (unlink("./../../articles/$blog/$post.md")) {
+ echo "0";
+ }
+ echo "961";
}
- echo "961";
}
+
+?>
diff --git a/rcc/res/edit.js b/rcc/res/edit.js
index 6f101bd..3ff4973 100644
--- a/rcc/res/edit.js
+++ b/rcc/res/edit.js
@@ -1,41 +1,54 @@
/**
- * Created by mmk2410 on 12/6/15.
+ * JavaScript for the ajax request to edit a article
*
- * JavaScript for the functionality to delete blogs
+ * Copyright (c) 2016 by mmk2410
+ * License: MIT License
*/
function main() {
// listener and function for recieving the posts of the selected blogs
$("#edit_get_posts").click(function () {
+
var selectedBlog = $("#edit_selected_blog").val();
$.get("res/get_posts.php", {
blog: selectedBlog
}, function (data) {
+
$("#edit_select_post").remove();
$("#edit_select_post_info").remove();
$("#edit_post_button").remove();
$("#edit_get_posts").after("");
- $("#edit_get_posts").after("
"
+ );
+ $("#edit_select_post").append(
+ ""
+ );
$.each($.parseJSON(data), function (index, value) {
var post = value.substring(0, value.length - 3);
- $("#edit_selected_post").append("");
+ $("#edit_selected_post").append(
+ ""
+ );
});
- $("#edit_select_post").after("EDIT POST")
+ $("#edit_select_post").after(
+ "EDIT POST"
+ );
});
});
$("#save_changes").click(function () {
+
var postTitle = $("#title").val();
var postDate = $("#date").val();
var postAuthor = $("#author").val();
var postTags = $("#tags").val();
var postText = $("#text").val();
- var file = "../../articles/" + getVariables['blog'] + "/" + getVariables['post'] + ".md";
- console.log(file);
+ var file = "../../articles/" + getVariables.blog +
+ "/" + getVariables.post + ".md";
$.post("../res/save.php", {
title: postTitle,
@@ -69,4 +82,4 @@ function editPostButton() {
}
-$(document).ready(main());
\ No newline at end of file
+$(document).ready(main());
diff --git a/rcc/res/get_posts.php b/rcc/res/get_posts.php
index 313d3db..fb3a2c0 100644
--- a/rcc/res/get_posts.php
+++ b/rcc/res/get_posts.php
@@ -2,26 +2,57 @@
/**
* PHP Version 7
*
- * User: mmk2410
- * Date: 12/6/15
+ * @category Blogging
+ * @package Rcc
+ * @author Marcel Kapfer (mmk2410)
+ * @license MIT License
+ * @link https://mmk2410.org/rangitaki
+ *
+ * get post script
+ *
+ * The MIT License
+ *
+ * Copyright 2015 mmk2410.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
*
* Error Codes:
* 901 No blog given as get argument
* 921 No blog with the given name available
*/
-$blog = $_GET["blog"];
-if (!isset($blog)) {
- echo "901";
-} else if (!file_exists("./../../blogs/$blog.md")) {
- echo "921";
-} else {
- $posts = array();
- $i = 0;
- foreach (scandir("./../../articles/$blog/") as $article) {
- if (substr($article, -3) == ".md") {
- $posts[$i] = $article;
- $i++;
+
+session_start();
+if ($_SESSION['login']) {
+ $blog = $_GET["blog"];
+ if (!isset($blog)) {
+ echo "901";
+ } else if (!file_exists("./../../blogs/$blog.md")) {
+ echo "921";
+ } else {
+ $posts = array();
+ $i = 0;
+ foreach (scandir("./../../articles/$blog/") as $article) {
+ if (substr($article, -3) == ".md") {
+ $posts[$i] = $article;
+ $i++;
+ }
}
+ print json_encode($posts);
}
- print json_encode($posts);
}
diff --git a/rcc/res/rcc.css b/rcc/res/rcc.css
index d86933b..ddda642 100644
--- a/rcc/res/rcc.css
+++ b/rcc/res/rcc.css
@@ -1,30 +1,29 @@
/*
-The MIT License
-
-Copyright 2015 mmk2410.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-*/
-/*
- Created on : Jun 14, 2015, 6:13:38 PM
- Author : mmk2410
-*/
+ * RCC cascade style sheet
+ *
+ * Copyright (C) 2015-2016 Marcel Kapfer (mmk2410)
+ * MIT License
+ *
+ * The MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
/* BODY */
@@ -38,19 +37,19 @@ body{
.main{
height: 100%;
width: 100%;
- margin-left: 0px;
+ margin-left: 0;
}
/* HEADER */
.header{
background-color: #ff4415;
position: fixed;
- top: 0px;
- right: 0px;
- left: 0px;
+ top: 0;
+ right: 0;
+ left: 0;
width: 100%;
height: 64px;
- box-shadow: 2px 0px 2px 2px rgba(62, 62, 62, 0.45);
+ box-shadow: 2px 0 2px 2px rgba(62, 62, 62, 0.45);
}
.title{
@@ -82,7 +81,7 @@ body{
background: #fff;
border-radius: 2px;
padding: 24px;
- box-shadow: 0px 1px 1.5px 1.5px rgba(62, 62, 62, 0.3);
+ box-shadow: 0 1px 1.5px 1.5px rgba(62, 62, 62, 0.3);
margin-bottom: 40px;
max-width: 1160px;
}
@@ -145,9 +144,9 @@ body{
border-width: 1px;
border-style: solid;
border-color: #ff4415;
- box-shadow: 0.4px 1px 1.5px 1px #aaa;
- -moz-box-shadow: 0.4px 1px 1.5px 1px #aaa;
-webkit-box-shadow: 0.4px 1px 1.5px 1px #aaa;
+ -moz-box-shadow: 0.4px 1px 1.5px 1px #aaa;
+ box-shadow: 0.4px 1px 1.5px 1px #aaa;
border-radius: 2px;
margin-top: 4px;
margin-bottom: 5px;
@@ -158,6 +157,10 @@ body{
transition-delay: 50ms;
transition-duration: 125ms;
transition-timing-function: ease;
+ -o-transition-property: box-shadow;
+ -o-transition-delay: 50ms;
+ -o-transition-duration: 125ms;
+ -o-transition-timing-function: ease;
-moz-transition-property: box-shadow;
-moz-transition-delay: 50ms;
-moz-transition-duration: 125ms;
@@ -170,12 +173,13 @@ body{
}
.button:hover, .button:hover {
- box-shadow: 0.5px 1.8px 2.1px 1.4px #aaa;
+ -webkit-box-shadow: 0.5px 1.8px 2.1px 1.4px #aaa;
-moz-box-shadow: 0.5px 1.8px 2.1px 1.4px #aaa;
- -webkit-box-shadow: 0.5px 1.8px 2.1px 1.4px #aaa; }
+ box-shadow: 0.5px 1.8px 2.1px 1.4px #aaa;
+}
input.button{
- padding: 0px 8px;
+ padding: 0 8px;
}
/* INPUT FIELD */
@@ -192,6 +196,10 @@ input.button{
transition-delay: 50ms;
transition-duration: 125ms;
transition-timing-function: ease;
+ -o-transition-property: border-bottom-color;
+ -o-transition-delay: 50ms;
+ -o-transition-duration: 125ms;
+ -o-transition-timing-function: ease;
-moz-transition-property: border-bottom-color;
-moz-transition-delay: 50ms;
-moz-transition-duration: 125ms;
@@ -224,6 +232,10 @@ input.button{
transition-delay: 50ms;
transition-duration: 125ms;
transition-timing-function: ease;
+ -o-transition-property: border-bottom-color;
+ -o-transition-delay: 50ms;
+ -o-transition-duration: 125ms;
+ -o-transition-timing-function: ease;
-moz-transition-property: border-bottom-color;
-moz-transition-delay: 50ms;
-moz-transition-duration: 125ms;
@@ -273,4 +285,4 @@ form{
#back-card {
display: none;
}
-}
\ No newline at end of file
+}
diff --git a/rcc/res/rcc.js b/rcc/res/rcc.js
index 6539a71..f95995b 100644
--- a/rcc/res/rcc.js
+++ b/rcc/res/rcc.js
@@ -1,20 +1,32 @@
+/**
+ * JavaScript for RCC
+ *
+ * Copyright (c) 2016 by mmk2410
+ * License: MIT License
+ */
+
window.onload = function () {
var t = document.getElementsByTagName('textarea')[0];
- var offset = !window.opera ? (t.offsetHeight - t.clientHeight) : (t.offsetHeight + parseInt(window.getComputedStyle(t, null).getPropertyValue('border-top-width')));
+ var offset = !window.opera ? (t.offsetHeight - t.clientHeight) : (
+ t.offsetHeight + parseInt(
+ window.getComputedStyle(t, null).getPropertyValue('border-top-width')
+ )
+ );
/**
- * The following three code clocks are for proper resizing of the input textarea
+ * The following three code clocks are for proper resizing of the input
+ * textarea
*/
var resize = function (t) {
t.style.height = 'auto';
t.style.height = (t.scrollHeight + offset ) + 'px';
- }
+ };
t.addEventListener && t.addEventListener('input', function (event) {
resize(t);
});
- t['attachEvent'] && t.attachEvent('onkeyup', function () {
+ t.attachEvent && t.attachEvent('onkeyup', function () {
resize(t);
});
-}
\ No newline at end of file
+};
diff --git a/rcc/res/save.php b/rcc/res/save.php
index bd96296..88abcf7 100644
--- a/rcc/res/save.php
+++ b/rcc/res/save.php
@@ -1,11 +1,46 @@
+ * @license MIT License
+ * @link https://mmk2410.org/rangitaki
+ *
+ *
+ * The MIT License
+ *
+ * Copyright 2015 mmk2410.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+session_start();
+if ($_SESSION['login']) {
+ $title = $_POST["title"];
+ $date = $_POST["date"];
+ $author = $_POST["author"];
+ $tags = $_POST["tags"];
+ $text = $_POST["text"];
+ $filename = $_POST["file"];
+ $md = <<
+ * @license MIT License
+ * @link https://mmk2410.org/rangitaki
+ *
+ * Main page of RCC (Rangitaki Control Center)
+ *
+ * The MIT License
+ *
+ * Copyright 2015 mmk2410.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+?>
+
-
-
-
- Rangitaki Control Center
-
-
-
-
-
+
diff --git a/res/css/no-nav.css b/res/css/no-nav.css
index e455925..716ee41 100644
--- a/res/css/no-nav.css
+++ b/res/css/no-nav.css
@@ -1,57 +1,3 @@
-/*
-Rangitaki Project
+.nav{display:none}.nav-img{display:none}@media screen and (min-width: 1440px){.header{left:0}.main{margin-left:0;width:100%}}@media screen and (max-width: 720px){.title{left:25px}}
-The MIT License
-
-Copyright 2015 mmk2410.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-*/
-/*
- Created on : Jun 18, 2015, 7:07:45 PM
- Author : mmk2410
-*/
-/*
- A stylesheet for overriding the default styles if the navigation drawer is disabled
-*/
-
-.nav{ /* hide the navigation drawer */
- display: none;
-}
-
-.nav-img{ /* hide the hamburger icon */
- display: none;
-}
-
-@media screen and (min-width: 1440px) { /* large devices */
- .header { /* full width */
- left: 0;
- }
-
- .main{ /* full width */
- margin-left: 0;
- width: 100%;
- }
-}
-
-@media screen and (max-width: 720px){ /* small devices */
- .title{ /* move the title more to the left */
- left: 25px;
- }
-}
+/*# sourceMappingURL=no-nav.css.map */
diff --git a/res/css/no-nav.css.map b/res/css/no-nav.css.map
new file mode 100644
index 0000000..c12e32a
--- /dev/null
+++ b/res/css/no-nav.css.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-nav.css","sources":["no-nav.sass"],"sourcesContent":["/*\n * Rangitaki Project\n *\n * The MIT License\n *\n * Copyright 2015 mmk2410.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n * A stylesheet for overriding the default styles if the navigation drawer is disabled\n */\n\n.nav {\n display: none; }\n\n.nav-img {\n display: none; }\n\n@media screen and (min-width: 1440px) {\n .header {\n left: 0; }\n\n .main {\n margin-left: 0;\n width: 100%; } }\n\n@media screen and (max-width: 720px) {\n\n .title {\n left: 25px; } }\n"],"mappings":"AA4BA,AAAA,IAAI,AAAC,CACD,OAAO,CAAE,IAAK,CAAG,AAErB,AAAA,QAAQ,AAAC,CACL,OAAO,CAAE,IAAK,CAAG,AAErB,MAAM,CAAN,MAAM,MAAM,SAAS,EAAE,MAAM,EACzB,AAAA,OAAO,AAAC,CACJ,IAAI,CAAE,CAAE,CAAG,AAEf,AAAA,KAAK,AAAC,CACF,WAAW,CAAE,CAAE,CACf,KAAK,CAAE,IAAK,CAAG,CAEvB,MAAM,CAAN,MAAM,MAAM,SAAS,EAAE,KAAK,EAExB,AAAA,MAAM,AAAC,CACH,IAAI,CAAE,IAAK,CAAG","names":[]}
\ No newline at end of file
diff --git a/res/css/rangitaki.css b/res/css/rangitaki.css
index 54ecfea..58fe6aa 100644
--- a/res/css/rangitaki.css
+++ b/res/css/rangitaki.css
@@ -1,305 +1,3 @@
-/*
-Rangitaki Project
+body{margin-top:94px}.main{height:100%;margin-left:0}.overlay{opacity:0;position:fixed;top:0;left:0;background-color:black;width:100%;z-index:30;height:100%;display:none}.header{top:0;right:0;left:0;width:100%;height:64px;position:absolute}.title{color:#fff;font-size:23px;text-decoration:none;line-height:64px;vertical-align:middle;left:75px}.title>a{text-decoration:none;color:#fff}.fadeout{position:absolute;height:64px;top:0;right:0;width:40px}.nav-img{height:26px;padding:19px;cursor:pointer}.nav{width:300px;position:fixed;height:100%;top:0;left:-301px;z-index:40}.nav-item,.nav-item-static{text-decoration:none;text-indent:0;display:inline-block;height:48px;vertical-align:middle;width:284px;line-height:48px;padding-left:16px;transition:background-color 125ms ease-in-out 0ms}.nav-close{cursor:pointer}.nav-close-img{height:35px;padding:12px}.nav-item{cursor:pointer}.divider{width:100%}.card{margin-right:auto;margin-left:auto;width:75%;padding:24px;margin-bottom:40px;max-width:1160px}.card a{-moz-hyphens:auto;-epub-hyphens:auto;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;word-wrap:break-word}.headline{display:block;padding-bottom:8px}.card img{max-width:100%;max-height:400px;display:block;margin-left:auto;margin-right:auto}.author{display:block}.fabmenu{position:fixed;bottom:20px;right:20px}.fab{height:60px;width:60px;border-radius:30px;cursor:pointer}.fab-img{width:28px;padding:15px}.subfab{height:45px;width:45px;border-radius:30px;margin-right:auto;margin-left:auto;margin-bottom:25px;display:none}.subfab-img{width:22px;padding:12px}.pag_buttons{margin-right:auto;margin-left:auto;width:calc(75% + 48px);margin-bottom:80px;max-width:1160px;text-align:right}.button{text-decoration:none;color:#fff;line-height:36px;min-width:64px;text-align:center;height:36px;padding:8px;margin-top:4px;margin-bottom:5px;cursor:pointer}.pag_next{margin-left:8px}.footer a{transition:border-bottom-color 150ms ease-in-out 100ms}.footer a:hover{border-bottom-color:#383838}@media screen and (min-width: 1440px){.nav{left:0;padding-top:64px}.nav-close-img{display:none}.nav-close{display:none}.nav-img{display:none}.header{left:300px}.main{margin-left:300px;width:calc(100% - 300px)}}@media screen and (max-width: 720px){.card{width:82%}.pag_buttons{width:calc(82% + 48px)}}
-The MIT License
-
-Copyright 2015 mmk2410.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-*/
-/*
- Created on : Jun 14, 2015, 6:13:38 PM
- Author : mmk2410
-*/
-
-/* BODY */
-
-body{
- margin-top: 94px; /* Set enough space for the header */
-}
-
-.main{ /* main content */
- height: 100%;
- margin-left: 0;
-}
-
-.overlay { /* overlay: used for a darker background when the navigation drawer is open */
- opacity: 0;
- position: fixed;
- top: 0;
- left: 0;
- background-color: black;
- width: 100%;
- z-index: 30;
- height: 100%;
- display: none; /* because the thing is hidden at the beginning and shown with js */
-}
-
-/* HEADER */
-.header{
- top: 0;
- right: 0;
- left: 0;
- width: 100%;
- height: 64px;
- position: absolute;
-}
-
-.title{ /* title in the header */
- color: #fff;
- font-size: 23px;
- text-decoration: none;
- line-height: 64px;
- vertical-align: middle;
- left: 75px;
-}
-
-.title > a{ /* and a a styling */
- text-decoration: none;
- color: #fff;
-}
-
-.fadeout{ /* a fadeout if the title is to long */
- position: absolute;
- height: 64px;
- top: 0;
- right: 0;
- width: 40px;
-}
-
-.nav-img{ /* the hamburger icon */
- height: 26px;
- padding: 19px;
- cursor: pointer;
-}
-
-/* NAV DRAWER */
-
-.nav{ /* the main object */
- width: 300px;
- position: fixed;
- height: 100%;
- top: 0;
- left: -301px;
- z-index: 40;
-}
-
-.nav-item, .nav-item-static{ /* a nav-item */
- text-decoration: none;
- text-indent: 0;
- display: inline-block;
- height: 48px;
- vertical-align: middle;
- width: 284px;
- line-height: 48px;
- padding-left: 16px;
- transition: background-color 125ms ease-in-out 0ms;
-}
-
-.nav-close {
- cursor: pointer;
-}
-
-.nav-close-img{ /* the hamburger icon */
- height: 35px;
- padding: 12px;
-}
-
-.nav-item{ /* additional setting for clickable nav items */
- cursor: pointer;
-}
-
-.divider{ /* a simple divider with all options. better than */
- width: 100%;
-}
-
-/* MAIN */
-
-.card{ /* just a card */
- margin-right: auto;
- margin-left: auto;
- width: 75%;
- padding: 24px;
- margin-bottom: 40px;
- max-width: 1160px;
-}
-
-.card a{ /* and another a styling */
- -moz-hyphens: auto;
- -epub-hyphens: auto;
- -ms-hyphens: auto;
- -webkit-hyphens: auto;
- hyphens: auto;
- word-wrap: break-word; /* until here: break long links */
-}
-
-.card a:hover{ /* hovered card links; just here to help you create a own theme*/
-
-}
-
-.headline{ /* title in a card */
- display: block;
- padding-bottom: 8px;
-}
-
-
-.card img{ /* image in a card*/
- max-width: 100%; /* regulate width */
- max-height: 400px; /* regulate height */
- display: block; /* centered */
- margin-left: auto; /* centerd */
- margin-right: auto; /* centred */
-}
-
-.date{ /* possibility to style the date */
-
-}
-
-.articletext{ /* posibitlity to style the text */
-
-}
-
-.author{ /* styling for the author */
- display: block;
-}
-
-.tag{ /* possibility to style the text */
-
-}
-
-/* FAB */
-
-.fabmenu{ /* surrounds the complete fab menu */
- position: fixed;
- bottom: 20px;
- right: 20px;
-}
-
-.fab{ /* the main fab (always visible if enabled) */
- height: 60px;
- width: 60px;
- border-radius: 30px;
- cursor: pointer;
-}
-
-.fab-img{ /* fab image for the main fab */
- width: 28px;
- padding: 15px;
-}
-
-.subfab{ /* a smaller fab in the fab menu */
- height: 45px;
- width: 45px;
- border-radius: 30px;
- margin-right: auto;
- margin-left: auto;
- margin-bottom: 25px;
- display: none;
-}
-
-.subfab-img{ /* and the image for it */
- width: 22px;
- padding: 12px;
-}
-
-/* BUTTON */
-
-.pag_buttons {
- margin-right: auto;
- margin-left: auto;
- width: calc(75% + 48px);
- margin-bottom: 80px;
- max-width: 1160px;
- text-align: right;
-}
-
-.button {
- text-decoration: none;
- color: #fff;
- line-height: 36px;
- min-width: 64px;
- text-align: center;
- height: 36px;
- padding: 8px;
- margin-top: 4px;
- margin-bottom: 5px;
- cursor: pointer;
-}
-
-.pag_next{
- margin-left: 8px;
-}
-
-/* FOOTER */
-
-.footer{ /* possibility for styling the footer */
-
-}
-
-
-.footer a{ /* styling of the footer a */
- transition: border-bottom-color 150ms ease-in-out 100ms;
-}
-
-.footer a:hover{ /* and the hovered one*/
- border-bottom-color: #383838;
-}
-
-@media screen and (min-width: 1440px) { /* make it responsive: large devices */
-
- .nav{ /* always show navigation bar */
- left: 0;
- padding-top: 64px;
- }
-
- .nav-close-img {
- display: none;
- }
-
- .nav-close {
- display: none;
- }
-
- .nav-img{ /* always hide navigation bar icon*/
- display: none;
- }
-
- .header{ /* move header to the right */
- left: 300px;
- }
-
- .main{ /* move main content to the right and limit its width */
- margin-left: 300px;
- width: calc(100% - 300px);
- }
-
-}
-
-
-@media screen and (max-width: 720px){ /* make it responsive: small devices */
-
- .card{ /* wider cards */
- width: 82%;
- }
-
- .pag_buttons {
- width: calc(82% + 48px);
- }
-
-}
+/*# sourceMappingURL=rangitaki.css.map */
diff --git a/res/css/rangitaki.css.map b/res/css/rangitaki.css.map
new file mode 100644
index 0000000..c02a79c
--- /dev/null
+++ b/res/css/rangitaki.css.map
@@ -0,0 +1 @@
+{"version":3,"file":"rangitaki.css","sources":["rangitaki.sass"],"sourcesContent":["/*\n * Rangitaki Project\n *\n * The MIT License\n *\n * Copyright 2015 mmk2410.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n * A stylesheet for overriding the default styles if the navigation drawer is disabled\n */\n\n/* BODY */\n\nbody {\n margin-top: 94px; }\n\n.main {\n height: 100%;\n margin-left: 0; }\n\n.overlay {\n opacity: 0;\n position: fixed;\n top: 0;\n left: 0;\n background-color: black;\n width: 100%;\n z-index: 30;\n height: 100%;\n display: none; }\n\n/* HEADER */\n.header {\n top: 0;\n right: 0;\n left: 0;\n width: 100%;\n height: 64px;\n position: absolute; }\n\n.title {\n color: #fff;\n font-size: 23px;\n text-decoration: none;\n line-height: 64px;\n vertical-align: middle;\n left: 75px; }\n\n.title > a {\n text-decoration: none;\n color: #fff; }\n\n.fadeout {\n position: absolute;\n height: 64px;\n top: 0;\n right: 0;\n width: 40px; }\n\n.nav-img {\n height: 26px;\n padding: 19px;\n cursor: pointer; }\n\n/* NAV DRAWER */\n\n.nav {\n width: 300px;\n position: fixed;\n height: 100%;\n top: 0;\n left: -301px;\n z-index: 40; }\n\n.nav-item, .nav-item-static {\n text-decoration: none;\n text-indent: 0;\n display: inline-block;\n height: 48px;\n vertical-align: middle;\n width: 284px;\n line-height: 48px;\n padding-left: 16px;\n transition: background-color 125ms ease-in-out 0ms; }\n\n.nav-close {\n cursor: pointer; }\n\n.nav-close-img {\n height: 35px;\n padding: 12px; }\n\n.nav-item {\n cursor: pointer; }\n\n.divider {\n width: 100%; }\n\n/* MAIN */\n\n.card {\n margin-right: auto;\n margin-left: auto;\n width: 75%;\n padding: 24px;\n margin-bottom: 40px;\n max-width: 1160px; }\n\n.card a {\n -moz-hyphens: auto;\n -epub-hyphens: auto;\n -ms-hyphens: auto;\n -webkit-hyphens: auto;\n hyphens: auto;\n word-wrap: break-word; }\n\n.card a:hover {}\n\n.headline {\n display: block;\n padding-bottom: 8px; }\n\n.card img {\n max-width: 100%;\n max-height: 400px;\n display: block;\n margin-left: auto;\n margin-right: auto; }\n\n.date {}\n\n.articletext {}\n\n.author {\n display: block; }\n\n.tag {}\n\n/* FAB */\n\n.fabmenu {\n position: fixed;\n bottom: 20px;\n right: 20px; }\n\n.fab {\n height: 60px;\n width: 60px;\n border-radius: 30px;\n cursor: pointer; }\n\n.fab-img {\n width: 28px;\n padding: 15px; }\n\n.subfab {\n height: 45px;\n width: 45px;\n border-radius: 30px;\n margin-right: auto;\n margin-left: auto;\n margin-bottom: 25px;\n display: none; }\n\n.subfab-img {\n width: 22px;\n padding: 12px; }\n\n/* BUTTON */\n\n.pag_buttons {\n margin-right: auto;\n margin-left: auto;\n width: calc(75% + 48px);\n margin-bottom: 80px;\n max-width: 1160px;\n text-align: right; }\n\n.button {\n text-decoration: none;\n color: #fff;\n line-height: 36px;\n min-width: 64px;\n text-align: center;\n height: 36px;\n padding: 8px;\n margin-top: 4px;\n margin-bottom: 5px;\n cursor: pointer; }\n\n.pag_next {\n margin-left: 8px; }\n\n/* FOOTER */\n\n.footer {}\n\n.footer a {\n transition: border-bottom-color 150ms ease-in-out 100ms; }\n\n.footer a:hover {\n border-bottom-color: #383838; }\n\n@media screen and (min-width: 1440px) {\n\n .nav {\n left: 0;\n padding-top: 64px; }\n\n .nav-close-img {\n display: none; }\n\n .nav-close {\n display: none; }\n\n .nav-img {\n display: none; }\n\n .header {\n left: 300px; }\n\n .main {\n margin-left: 300px;\n width: calc(100% - 300px); } }\n\n@media screen and (max-width: 720px) {\n\n .card {\n width: 82%; }\n\n .pag_buttons {\n width: calc(82% + 48px); } }\n"],"mappings":"AA8BA,AAAA,IAAI,AAAC,CACD,UAAU,CAAE,IAAK,CAAG,AAExB,AAAA,KAAK,AAAC,CACF,MAAM,CAAE,IAAK,CACb,WAAW,CAAE,CAAE,CAAG,AAEtB,AAAA,QAAQ,AAAC,CACL,OAAO,CAAE,CAAE,CACX,QAAQ,CAAE,KAAM,CAChB,GAAG,CAAE,CAAE,CACP,IAAI,CAAE,CAAE,CACR,gBAAgB,CAAE,KAAM,CACxB,KAAK,CAAE,IAAK,CACZ,OAAO,CAAE,EAAG,CACZ,MAAM,CAAE,IAAK,CACb,OAAO,CAAE,IAAK,CAAG,AAGrB,AAAA,OAAO,AAAC,CACJ,GAAG,CAAE,CAAE,CACP,KAAK,CAAE,CAAE,CACT,IAAI,CAAE,CAAE,CACR,KAAK,CAAE,IAAK,CACZ,MAAM,CAAE,IAAK,CACb,QAAQ,CAAE,QAAS,CAAG,AAE1B,AAAA,MAAM,AAAC,CACH,KAAK,CAAE,IAA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
+++ b/res/js/app.js
@@ -1,112 +1 @@
-/*
- * Rangitaki Project
- *
- * The MIT License
- *
- * Copyright 2015 mmk2410.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-var main = function () { // main function; called below
-
- var fabActive = false; // fab hidden at begin
- $('.fabmenu').click( // action on fab click
- function () {
- if (!(fabActive)) { // if fab is hidden
- fabFadeIn(); // fade fab in
- fabActive = true; // fab = active
- } else { // if fab is shown
- fabFadeOut(); // fade fab out
- fabActive = false; // fab = hidden
- }
- }
- );
-
- var navOpen = false; // nav hidden at begin
- $('.nav-img, .overlay, .nav-close').click( // action on hamburger click
- function () {
- if (!(navOpen)) { // if nav is hidden
- openNav(); // open the nav drawer
- navOpen = true; // nav = open
- } else { // if nav is closed
- closeNav(); // close the nav drawer
- navOpen = false; // nav = closed
- }
- }
- );
-
- /**
- * Keyhandling for the navigation drawer.
- * opens the drawer on 'm' (key code: 77)
- * closes the drawer on 'Esc' (key code: 27)
- */
- $(document).keyup(function (e) {
- if (navOpen && (e.which === 27)) {
- closeNav();
- navOpen = false;
- } else if (!(navOpen) && (e.which === 77)) {
- openNav();
- navOpen = true;
- }
- });
-
-
-};
-
-$(document).ready(main); // run if document is loaded
-
-function goBack() { // go back function
- history.go(-1);
-}
-
-function fabFadeIn() { // fade fab in
- $('.subfab').fadeIn(125); // fade subfabs in
- $('.fab-img').fadeOut( // fade fab share image out
- 60, function callback() {
- $('.fab-img').attr("src", "./res/img/close.svg"); // change to fab close image
- }
- );
- $('.fab-img').fadeIn(60); // fade fab close image in
-}
-
-function fabFadeOut() { // fade fab out
- $('.subfab').fadeOut(125); // fade subfabs out
- $('.fab-img').fadeOut( // fade fab close image out
- 60, function callback() {
- $('.fab-img').attr("src", "./res/img/share.svg"); // change to fab share image
- }
- );
- $('.fab-img').fadeIn(60); // fade fab share image in
-}
-
-function openNav() { // fade navigation drawer in
- $('.nav').animate({"left": "0px"}, 125); // slide in
- $('.overlay').show(); // set overlay to show ...
- $('.overlay').animate({"opacity": "0.4"}, 125); // ... and fade to a darker transparent color
-}
-
-function closeNav() { // fade navigation drawer out
- $('.nav').animate({"left": "-301px"}, 125); // slide out
- $('.overlay').animate(
- {"opacity": "0.0"}, 125, function () { // fade the overlay to complete transparency
- $('.overlay').hide(); // hide it then
- }
- );
-}
+(function(){var n,t,a,e,r,i;r=function(){var e,r;return e=!1,$(".fabmenu").click(function(){return e?(a(),e=!1):(t(),e=!0)}),r=!1,$(".nav-img, .overlay, .nav-close").click(function(){return r?(n(),r=!1):(i(),r=!0)}),$(document).keyup(function(t){return r&&27===t.which?(n(),r=!1):r||77!==t.which?void 0:(i(),r=!0)}),$(".articletext a").attr("target","_blank")},$(document).ready(r),e=function(){return history.go(-1)},t=function(){return $(".subfab").fadeIn(125),$(".fab-img").fadeOut(60,function(){return $(".fab-img").attr("src","./res/img/close.svg"),$(".fab-img").fadeIn(60)})},a=function(){return $(".subfab").fadeOut(125),$(".fab-img").fadeOut(60,function(){return $(".fab-img").attr("src","./res/img/share.svg"),$(".fab-img").fadeIn(60)})},i=function(){return $(".nav").animate({left:"0px"},125),$(".overlay").show(),$(".overlay").animate({opacity:"0.4"},125)},n=function(){return $(".nav").animate({left:"-301px"},125),$(".overlay").animate({opacity:"0.0"},125,function(){return $(".overlay").hide})}}).call(this);
\ No newline at end of file
diff --git a/res/php/ArticleGenerator.php b/res/php/ArticleGenerator.php
index 86f4fa5..f259c9d 100644
--- a/res/php/ArticleGenerator.php
+++ b/res/php/ArticleGenerator.php
@@ -265,4 +265,46 @@ class ArticleGenerator
return $article;
}
+ /**
+ * A function to get a array of the article
+ *
+ * @param $directory The directory where the article is stored
+ * @param $articlefile The name of the article file
+ * @return string
+ */
+ public function getArray($directory, $articlefile)
+ {
+ $article = file_get_contents($directory . $articlefile);
+
+ if (substr($article, 0, 6) == "%TITLE") { // get and remove the title
+ $title = substr($article, 8, strpos($article, "\n") - 8);
+ $article = substr($article, strpos($article, "\n") + 1);
+ }
+
+ if (substr($article, 0, 5) == "%DATE") { // get and remove the title
+ $date = substr($article, 7, strpos($article, "\n") - 7);
+ $article = substr($article, strpos($article, "\n") + 1);
+ }
+
+ if (substr($article, 0, 7) == "%AUTHOR") { // get and remove the title
+ $author = substr($article, 9, strpos($article, "\n") - 9);
+ $article = substr($article, strpos($article, "\n") + 1);
+ }
+
+ if (substr($article, 0, 5) == "%TAGS") { // get and remove the tags
+ $tags = substr($article, 7, strpos($article, "\n") - 7); // get the tags
+ $tags = explode(", ", $tags); // split them into an array
+ $article = substr($article, strpos($article, "\n") + 1);
+ }
+
+ $data = array(
+ "title" => $title,
+ "date" => $date,
+ "author" => $author,
+ "tags" => $tags,
+ "text" => $article
+ );
+
+ return $data;
+ }
}
diff --git a/res/php/Config.php b/res/php/Config.php
new file mode 100644
index 0000000..7eab4f4
--- /dev/null
+++ b/res/php/Config.php
@@ -0,0 +1,74 @@
+
+ * @license MIT License
+ * @link http://marcel-kapfer.de/rangitaki
+ */
+namespace mmk2410\rbe\config;
+
+/**
+ * PHP Version 7
+ *
+ * Configuration parser for yaml configuration files
+ *
+ * @category Configuration
+ * @package Rbe
+ * @author Marcel Kapfer (mmk2410)
+ * @license MIT License
+ * @link http://marcel-kapfer.de/rangitaki
+ */
+class Config
+{
+
+ /**
+ * Path to yaml file
+ * @var string
+ */
+ private $file;
+
+ /**
+ * Constructor for the Config class
+ *
+ * @param $config path to the yaml file
+ * @param $composer path to the composer autoload
+ */
+ public function __construct($config, $composer)
+ {
+ $this->file = $config;
+ require $composer;
+ }
+
+ /**
+ * Return yaml config as PHP array
+ *
+ * @return config array
+ */
+ public function getConfig()
+ {
+ $yaml = new \Symfony\Component\Yaml\Parser();
+ return $yaml->parse(file_get_contents($this->file));
+ }
+
+ /*
+ * Write array into confi*
+ * Write array into config file
+ *
+ * @param array config new config
+ *
+ * @return FALSE if failed to write
+ */
+ public function writeConfig($config)
+ {
+ $dumper = new \Symfony\Component\Yaml\Dumper();
+
+ $yaml = $dumper->dump($config, 2);
+
+ return file_put_contents($this->file, $yaml);
+ }
+}
diff --git a/res/php/Disqus.php b/res/php/Disqus.php
index c97f89f..45c1f20 100644
--- a/res/php/Disqus.php
+++ b/res/php/Disqus.php
@@ -27,7 +27,7 @@ THE SOFTWARE.