From d7e5f0ca75cb405ca02c9b8d32a9c256fed47992 Mon Sep 17 00:00:00 2001
From: Danang Probo Sayekti
Date: Wed, 22 Jan 2014 17:39:42 +0700
Subject: [PATCH] Can edit tag and URL
Can edit tag and URL (both blog post and static page).
---
admin/action/create_page.php | 17 +++++++--------
admin/action/create_post.php | 4 ++--
admin/action/delete_page.php | 2 +-
admin/action/delete_post.php | 2 +-
admin/action/edit_page.php | 18 ++++++++++++++--
admin/action/edit_post.php | 26 +++++++++++++++++++++--
admin/action/login.php | 8 +++----
admin/includes/page_list.php | 4 ++--
admin/includes/post_list.php | 22 +++++++++++++------
admin/index.php | 4 ++--
admin/resources/style.css | 50 ++++++++++++++++++++++++++++++++++++++++++++
11 files changed, 126 insertions(+), 31 deletions(-)
diff --git a/admin/action/create_page.php b/admin/action/create_page.php
index 1a0d17c..1377eb1 100644
--- a/admin/action/create_page.php
+++ b/admin/action/create_page.php
@@ -50,7 +50,7 @@
+ var editor = new Markdown.Editor(converter);
+
+ editor.run();
+ })();
+
@@ -48,8 +68,10 @@
diff --git a/admin/action/login.php b/admin/action/login.php
index abea591..ffdf589 100644
--- a/admin/action/login.php
+++ b/admin/action/login.php
@@ -29,9 +29,9 @@
Login Form
@@ -59,9 +59,9 @@ EOF;
Login Form
diff --git a/admin/includes/page_list.php b/admin/includes/page_list.php
index 9a5b1b8..f0398ca 100644
--- a/admin/includes/page_list.php
+++ b/admin/includes/page_list.php
@@ -29,8 +29,8 @@
echo '';
echo '| ' . $v . ' | ';
- echo ' | ';
- echo ' | ';
+ echo ' | ';
+ echo ' | ';
echo '
';
}
diff --git a/admin/includes/post_list.php b/admin/includes/post_list.php
index a61d0d2..e2aa054 100644
--- a/admin/includes/post_list.php
+++ b/admin/includes/post_list.php
@@ -72,11 +72,21 @@ function get_posts($posts, $page = 1, $perpage = 0){
// The post URL
$post->url = site_url().date('Y/m', $post->date).'/'.str_replace('.md','',$arr[2]);
- // The post tag
- $post->tag = str_replace($replaced,'',$arr[1]);
+ $tag = array();
+ $url = array();
- // The post tag url
- $post->tagurl = site_url(). 'tag/' . $arr[1];
+ $t = explode(',', $arr[1]);
+ foreach($t as $tt) {
+ $tag[] = array($tt, site_url(). 'tag/' . $tt);
+ }
+
+ foreach($tag as $a) {
+ $url[] = ''. $a[0] .'';
+ }
+
+ $post->tag = implode(', ', $url);
+
+ $post->tagb = implode(' ยป ', $url);
$post->file = $filepath;
@@ -126,8 +136,8 @@ function get_post_list() {
foreach($posts as $p) {
echo '';
echo '| ' . $p->file . ' | ';
- echo ' | ';
- echo ' | ';
+ echo ' | ';
+ echo ' | ';
echo '
';
}
echo '';
diff --git a/admin/index.php b/admin/index.php
index 09b3ffe..d6c7326 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -39,9 +39,9 @@
Login Form
diff --git a/admin/resources/style.css b/admin/resources/style.css
index afc4145..f2a0eef 100644
--- a/admin/resources/style.css
+++ b/admin/resources/style.css
@@ -39,4 +39,54 @@ table td {
width:100%;
}
+}
+
+/*----------------------------
+ Video
+-----------------------------*/
+
+.video-wrapper {
+ margin:1em 0;
+}
+
+@media all and (min-width: 420px) {
+
+ .video-wrapper {
+ padding-top:315px!important;
+ position:relative;
+ width:100%;
+ max-width:420px!important;
+ max-height:315px!important;
+ }
+
+ .video-wrapper iframe, .video-wrapper object, .video-wrapper embed {
+ height: 100%;
+ left: 0;
+ position: absolute;
+ top: 0;
+ max-width:420px!important;
+ width: 100%;
+ max-height:315px!important;
+ }
+
+}
+
+@media all and (max-width: 420px) {
+
+ .video-wrapper {
+ position: relative;
+ padding-bottom: 56.25%;
+ padding-top: 30px;
+ height: 0;
+ overflow: hidden;
+ }
+
+ .video-wrapper iframe, .video-wrapper object, .video-wrapper embed {
+ height: 100%;
+ left: 0;
+ position: absolute;
+ top: 0;
+ width: 100%;
+ }
+
}
\ No newline at end of file