diff --git a/config.php b/config.php index d5ec092..041068c 100644 --- a/config.php +++ b/config.php @@ -29,7 +29,7 @@ $bloganalytics = ''; // Footer - set here the text for your footer (e.g. a copyright info). You can replace the whole text after the '=' with your own one. $blogfooter = 'Rangitaki ' . date("Y") . ' github.com/mmk2410/Rangitaki'; // This enables the optional rangitaki control center. Please read the documentation before you enable it. -$rcc = 'no'; +$rcc = 'yes'; // Here you can disable and enable the navigation menu. Usefull if you have no subblogs and no home directory $nav_drawer = 'yes'; // Set here the name of your theme. Read the documentation for more themes diff --git a/index.php b/index.php index 746f71f..c1fd9d5 100644 --- a/index.php +++ b/index.php @@ -31,235 +31,240 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --> - - - - - <?php echo $blogtitle; // Setting the blog article?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - skip it - if ($nav_drawer == "yes") { - ?> -
- - // Set blog to "main" if on main blog, else to $getblog. This variable is needed later - if ($getblog == "") { - $blog = "main"; - } else { - $blog = $getblog; - } - ?> -
-
- - - - - - › "> - + + <?php echo $blogtitle; // Setting the blog article?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + skip it +if ($nav_drawer == "yes") { + ?> +
+
- 3) { // if there is no content, don't show the intro - ?> -
-
- setBreaksEnabled(true) // with linebreaks - ->text($file); - echo $intro; // PRINTS THE SH**** - ?> -
-
- tag view - $articles = scandir($articlesdir, 1); // save the content of the directory in the articles variable - foreach ($articles as $article) { // iterate through all articles - $tags = ArticleGenerator::getTags($articlesdir, $article); // get the article tags - if (in_array($gettag, $tags)) { // if the article has the requested tag - if (strlen($article) >= 3 && substr($article, -3) == ".md") { // check if the file is a article file - ArticleGenerator::newArticle($articlesdir, $article, $getblog); // generate the article + BlogListGenerator::listBlog("./blogs/", $blog, $blogmaintitle); // creating navigation item } } } - } elseif ($getarticle == "") { // NORMAL VIEW if there's no article request -> normal view - $articles = scandir($articlesdir, 1); // save the content of the directory in the articles variable - foreach ($articles as $article) { // iterate through this variable - if (strlen($article) >= 3 && substr($article, -3) == ".md") { // check if the file is a article file - ArticleGenerator::newArticle($articlesdir, $article, $getblog); // generate the article - } - } - } elseif (isset($getarticle)) { // ARTICLE VIEW - ArticleGenerator::newArticle($articlesdir, $getarticle . ".md", $getblog); // generate the requested article - include './res/php/Disqus.php'; // include disques - } else { // SOMETHING STRANGE: THIS SHOULDN'T HAPPEN - echo "Some error occured, please go back."; } + echo ""; + } elseif (isset($getarticle) || isset($gettag)) { // If viewing a blog or a tag ?> - + Go back - - -
- - -
+ + - + + +
+
+ + + + + + + › "> + + + + +
+ +
+ 3) { // if there is no content, don't show the intro + ?> +
+
+ setBreaksEnabled(true)// with linebreaks + ->text($file); + echo $intro; // PRINTS THE SH**** + ?> +
+
+ tag view + $articles = scandir($articlesdir, 1); // save the content of the directory in the articles variable + foreach ($articles as $article) { // iterate through all articles + $tags = ArticleGenerator::getTags($articlesdir, $article); // get the article tags + if (in_array($gettag, $tags)) { // if the article has the requested tag + if (strlen($article) >= 3 && substr($article, -3) == ".md") { // check if the file is a article file + ArticleGenerator::newArticle($articlesdir, $article, $getblog); // generate the article + } + } + } + } elseif ($getarticle == "") { // NORMAL VIEW if there's no article request -> normal view + $articles = scandir($articlesdir, 1); // save the content of the directory in the articles variable + foreach ($articles as $article) { // iterate through this variable + if (strlen($article) >= 3 && substr($article, -3) == ".md") { // check if the file is a article file + ArticleGenerator::newArticle($articlesdir, $article, $getblog); // generate the article + } + } + } elseif (isset($getarticle)) { // ARTICLE VIEW + ArticleGenerator::newArticle($articlesdir, $getarticle . ".md", $getblog); // generate the requested article + include './res/php/Disqus.php'; // include disques + } else { // SOMETHING STRANGE: THIS SHOULDN'T HAPPEN + echo "Some error occured, please go back."; + } + ?> + + +
+ + +
+ + + +
+
+ + + +
+
+ Share +
+
+ +
+ + + + diff --git a/rcc/index.php b/rcc/index.php index ea314ef..1e50b67 100644 --- a/rcc/index.php +++ b/rcc/index.php @@ -60,7 +60,7 @@ THE SOFTWARE. $_SESSION['login'] = true; ?>
-
File Upload
+
Post Upload
+ = 3 && substr($blog, -3) == ".md") { + $blog = substr($blog, 0, -3); + echo ""; + } + } + ?> + + +

Title:

+ +

Date:

+ +

Author:

+ +

Tags:

+ +

Text:

+ +

+ +
+
@@ -105,5 +135,6 @@ THE SOFTWARE. } ?> + diff --git a/rcc/newpost/index.php b/rcc/newpost/index.php new file mode 100644 index 0000000..1e7b0c4 --- /dev/null +++ b/rcc/newpost/index.php @@ -0,0 +1,69 @@ + + + + + + Rangitaki Control Center + + + + +
+ Rangitaki Control Center +
+
+
+
New Post
+ +
+
+ + diff --git a/rcc/res/rcc.css b/rcc/res/rcc.css index b7b142e..8893fbe 100644 --- a/rcc/res/rcc.css +++ b/rcc/res/rcc.css @@ -166,6 +166,8 @@ input.button{ border-width: 1px; font-size: 16px; line-height: 22px; + width: 400px; + max-width: 100%; border-bottom-color: #aaa; transition-property: border-bottom-color; transition-delay: 50ms; @@ -187,6 +189,38 @@ input.button{ outline: none; } +/* TEXTAREA */ + +.itextarea { + border-color: transparent; + border-width: 1px; + font-size: 16px; + line-height: 22px; + height: auto; + resize: none; + min-height: 100px; + width: calc(100% - 10px); + border-bottom-color: #aaa; + transition-property: border-bottom-color; + transition-delay: 50ms; + transition-duration: 125ms; + transition-timing-function: ease; + -moz-transition-property: border-bottom-color; + -moz-transition-delay: 50ms; + -moz-transition-duration: 125ms; + -moz-transition-timing-function: ease; + -webkit-transition-property: border-bottom-color; + -webkit-transition-delay: 50ms; + -webkit-transition-duration: 125ms; + -webkit-transition-timing-function: ease; +} + +.itextarea:focus { + border-bottom-color: #ff4415; + border-width: 2px; + outline: none; +} + /* FORM */ form{ margin-top: 20px; diff --git a/rcc/res/rcc.js b/rcc/res/rcc.js new file mode 100644 index 0000000..3e33f42 --- /dev/null +++ b/rcc/res/rcc.js @@ -0,0 +1,17 @@ +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 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 () { + resize(t); + }); +} \ No newline at end of file