mirror of
https://github.com/danpros/htmly.git
synced 2026-04-17 19:26:08 +05:30
Improve the admin integration
Improve the admin integration
This commit is contained in:
parent
fddeefde02
commit
572090f88b
12 changed files with 137 additions and 841 deletions
|
|
@ -33,7 +33,7 @@ function session($user, $pass) {
|
|||
}
|
||||
}
|
||||
|
||||
function edit_post($title, $tag, $url, $content, $oldfile) {
|
||||
function edit_post($title, $tag, $url, $content, $oldfile, $destination = null) {
|
||||
|
||||
$oldurl = explode('_', $oldfile);
|
||||
|
||||
|
|
@ -56,13 +56,36 @@ function edit_post($title, $tag, $url, $content, $oldfile) {
|
|||
rename($oldfile, $newfile);
|
||||
file_put_contents($newfile, print_r($post_content, true));
|
||||
}
|
||||
$redirect = site_url() . 'admin/posts';
|
||||
header("Location: $redirect");
|
||||
|
||||
$replaced = substr($oldurl[0], 0,strrpos($oldurl[0], '/')) . '/';
|
||||
$dt = str_replace($replaced,'',$oldurl[0]);
|
||||
$time = new DateTime($dt);
|
||||
$timestamp= $time->format("Y-m-d");
|
||||
// The post date
|
||||
$postdate = strtotime($timestamp);
|
||||
// The post URL
|
||||
$posturl = site_url().date('Y/m', $postdate).'/'.$url;
|
||||
|
||||
if($destination == 'admin/posts') {
|
||||
$redirect = site_url() . 'admin/posts';
|
||||
header("Location: $redirect");
|
||||
}
|
||||
elseif($destination == 'admin') {
|
||||
$redirect = site_url() . 'admin';
|
||||
header("Location: $redirect");
|
||||
}
|
||||
elseif ($destination == 'post') {
|
||||
header("Location: $posturl");
|
||||
}
|
||||
else {
|
||||
$redirect = site_url();
|
||||
header("Location: $redirect");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function edit_page($title, $url, $content, $oldfile) {
|
||||
function edit_page($title, $url, $content, $oldfile, $destination = null) {
|
||||
|
||||
$dir = substr($oldfile, 0, strrpos($oldfile, '/'));
|
||||
|
||||
|
|
@ -83,8 +106,21 @@ function edit_page($title, $url, $content, $oldfile) {
|
|||
rename($oldfile, $newfile);
|
||||
file_put_contents($newfile, print_r($post_content, true));
|
||||
}
|
||||
$redirect = site_url() . 'admin';
|
||||
header("Location: $redirect");
|
||||
|
||||
$posturl = site_url() . $url;
|
||||
|
||||
if($destination == 'admin') {
|
||||
$redirect = site_url() . 'admin';
|
||||
header("Location: $redirect");
|
||||
}
|
||||
elseif ($destination == 'post') {
|
||||
header("Location: $posturl");
|
||||
}
|
||||
else {
|
||||
$redirect = site_url();
|
||||
header("Location: $redirect");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -200,7 +236,7 @@ function get_recent_posts() {
|
|||
echo '<td>' . $p->title . '</td>';
|
||||
echo '<td>' . date('d F Y', $p->date) . '</td>';
|
||||
echo '<td>' . $p->tag . '</td>';
|
||||
echo '<td><a href="' . $p->url . '/edit">Edit</a> <a href="' . $p->url . '/delete">Delete</a></td>';
|
||||
echo '<td><a href="' . $p->url . '/edit?destination=admin">Edit</a> <a href="' . $p->url . '/delete?destination=admin">Delete</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
echo '</table>';
|
||||
|
|
@ -220,7 +256,7 @@ function get_recent_pages() {
|
|||
foreach($posts as $p) {
|
||||
echo '<tr>';
|
||||
echo '<td>' . $p->title . '</td>';
|
||||
echo '<td><a href="' . $p->url . '/edit">Edit</a> <a href="' . $p->url . '/delete">Delete</a></td>';
|
||||
echo '<td><a href="' . $p->url . '/edit?destination=admin">Edit</a> <a href="' . $p->url . '/delete?destination=admin">Delete</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
echo '</table>';
|
||||
|
|
|
|||
1
system/admin/views/.htaccess
Normal file
1
system/admin/views/.htaccess
Normal file
|
|
@ -0,0 +1 @@
|
|||
deny from all
|
||||
19
system/admin/views/404.html.php
Normal file
19
system/admin/views/404.html.php
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link href='<?php echo site_url() ?>favicon.ico' rel='icon' type='image/x-icon'/>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" user-scalable="no" />
|
||||
<title>404 Not Found - <?php echo config('blog.title') ?></title>
|
||||
<link href="<?php echo site_url() ?>themes/default/css/style.css" rel="stylesheet" />
|
||||
<!-- Include the Open Sans font -->
|
||||
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div class="center message">
|
||||
<h1>This page doesn't exist!</h1>
|
||||
<p>Would you like to try our <a href="<?php echo site_url() ?>">homepage</a> instead?</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,820 +0,0 @@
|
|||
/*-------------------------
|
||||
Simple reset
|
||||
--------------------------*/
|
||||
|
||||
*{
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
|
||||
body {
|
||||
font-family: Georgia, sans-serif, Arial;
|
||||
font-size: 17px;
|
||||
line-height: 1.6;
|
||||
color: #343A3F;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
section, footer, header, aside, nav{
|
||||
display: block;
|
||||
}
|
||||
|
||||
img {
|
||||
border: 0 none;
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
outline: 0 none;
|
||||
}
|
||||
|
||||
/*-------------------------
|
||||
Heading
|
||||
--------------------------*/
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: 'Open Sans',sans-serif;
|
||||
line-height: 1.3;
|
||||
margin: 0.5em 0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/*-------------------------
|
||||
Toolbar
|
||||
--------------------------*/
|
||||
|
||||
#toolbar {
|
||||
background: none repeat scroll 0 0 #666666;
|
||||
box-shadow: 0 3px 20px #000000;
|
||||
color: #CCCCCC;
|
||||
font-family: 'Open Sans',sans-serif;
|
||||
left: 0;
|
||||
margin: 0 -20px;
|
||||
padding: 0 25px;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: 0;
|
||||
z-index: 600;
|
||||
border: 0 none;
|
||||
font-size: 15px;
|
||||
text-align: left;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
#toolbar ul {
|
||||
margin:0;
|
||||
}
|
||||
|
||||
#toolbar ul li, #toolbar ul li a {
|
||||
float: left;
|
||||
list-style: none outside none;
|
||||
}
|
||||
#toolbar a {
|
||||
color: #FFFFFF;
|
||||
font-size: 0.846em;
|
||||
text-decoration: none;
|
||||
border-radius: 10px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
/*-------------------------
|
||||
Layout
|
||||
--------------------------*/
|
||||
|
||||
#outer-wrapper {
|
||||
margin:0;
|
||||
padding:0;
|
||||
float:left;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#inner-wrapper {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
#header-wrapper {
|
||||
background: #546673;
|
||||
position:relative;
|
||||
padding: 1em 0;
|
||||
float:left;
|
||||
width: 100%;
|
||||
color: #ffffff;
|
||||
font-family: Georgia, sans-serif;
|
||||
font-style:italic;
|
||||
}
|
||||
|
||||
#content-wrapper {
|
||||
float:left;
|
||||
width: 100%;
|
||||
padding: 3em 0;
|
||||
background-color: #FAFAFA;
|
||||
}
|
||||
|
||||
#menu, #header, #content, #footer {
|
||||
width: 980px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#header {
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.hide {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.wmd-panel {
|
||||
display:table-row;
|
||||
}
|
||||
|
||||
/*-------------------------
|
||||
Link
|
||||
--------------------------*/
|
||||
|
||||
a, a:visited {
|
||||
outline:none;
|
||||
color:#2E9FFF;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
a:hover{
|
||||
text-decoration:underline;
|
||||
}
|
||||
|
||||
/*-------------------------
|
||||
Text element
|
||||
--------------------------*/
|
||||
|
||||
blockquote:before {
|
||||
color: #BBBBBB;
|
||||
content: "“";
|
||||
font-size: 3em;
|
||||
line-height: 0.1em;
|
||||
margin-right: 0.2em;
|
||||
vertical-align: -0.4em;
|
||||
}
|
||||
|
||||
blockquote:after {
|
||||
color: #BBBBBB;
|
||||
content: "”";
|
||||
font-size: 3em;
|
||||
line-height: 0.1em;
|
||||
vertical-align: -0.45em;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
font-style: italic;
|
||||
margin: 1em 0 1em 1em;
|
||||
}
|
||||
|
||||
blockquote p {
|
||||
display:inline;
|
||||
}
|
||||
|
||||
pre {
|
||||
margin: 1em 0;
|
||||
overflow: auto;
|
||||
background: #F1F1FF;
|
||||
}
|
||||
|
||||
code {
|
||||
color: #333333;
|
||||
font-family: Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;
|
||||
font-size: 15px;
|
||||
padding: 5px 10px;
|
||||
background: #F1F1FF;
|
||||
}
|
||||
|
||||
pre code {
|
||||
color: #333333;
|
||||
display: block;
|
||||
font-family: Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;
|
||||
font-size: 14px;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
.thumbnail {
|
||||
float: left;
|
||||
height: 80px;
|
||||
width: 80px;
|
||||
margin: 5px 15px 0 0;
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
ul, ol {
|
||||
padding-left: 30px;
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
ul li, ol li{
|
||||
margin: 0.25em 0;
|
||||
}
|
||||
|
||||
input.text, input.password {
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
/*-------------------------
|
||||
Table
|
||||
--------------------------*/
|
||||
|
||||
table {
|
||||
font-size:12px;
|
||||
border: none;
|
||||
width:100%;
|
||||
color:#333333;
|
||||
border: 1px solid #E3E3E3;
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
table h2.title {
|
||||
margin:5px 0;
|
||||
}
|
||||
|
||||
th, td {
|
||||
padding: 5px 10px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
th.title {
|
||||
margin:5px 0;
|
||||
font-family: 'Open Sans',sans-serif;
|
||||
font-size:16px;
|
||||
font-weight:normal;
|
||||
}
|
||||
|
||||
td.title {
|
||||
font-weight:normal;
|
||||
background-color: #f6f6f6;
|
||||
font-family: 'Open Sans',sans-serif;
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #f6f6f6;
|
||||
border-bottom: 1px solid #E3E3E3;
|
||||
border-right: 1px solid #E3E3E3;
|
||||
font-family: 'Open Sans',sans-serif;
|
||||
font-size:16px;
|
||||
}
|
||||
|
||||
td {
|
||||
background-color: #fafafa;
|
||||
border: 1px solid #E3E3E3;
|
||||
border-top: none;
|
||||
border-left:none;
|
||||
}
|
||||
|
||||
/*-------------------------
|
||||
Menu
|
||||
--------------------------*/
|
||||
|
||||
#menu-wrapper {
|
||||
font-family: 'Open Sans',sans-serif;
|
||||
color: #7E909D;
|
||||
padding: 10px 0;
|
||||
float:left;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
#menu {
|
||||
font-weight:bold;
|
||||
font-family: 'Open Sans',sans-serif;
|
||||
color: #7E909D;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#menu ul {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
#menu a {
|
||||
color: #7E909D;
|
||||
}
|
||||
|
||||
#menu ul li {
|
||||
float:left;
|
||||
margin:0 20px 0 0;
|
||||
list-style:none;
|
||||
padding-top:3px;
|
||||
}
|
||||
|
||||
#menu ul li:last-child {
|
||||
margin:0;
|
||||
}
|
||||
|
||||
/*----------------------------
|
||||
Search form
|
||||
-----------------------------*/
|
||||
|
||||
#search-form {
|
||||
position:relative;
|
||||
float:right;
|
||||
}
|
||||
|
||||
.search-input{
|
||||
margin: 0;
|
||||
padding: 4px 15px;
|
||||
font-size:14px;
|
||||
border:1px solid #0076a3;
|
||||
border-top-left-radius: 5px 5px;
|
||||
border-bottom-left-radius: 5px 5px;
|
||||
width: 120px;
|
||||
color: #888888;
|
||||
}
|
||||
.search-button {
|
||||
margin: 0;
|
||||
padding: 4px;
|
||||
font-size:14px;
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
color: #ffffff;
|
||||
border: solid 1px #546673;
|
||||
border-right:0px;
|
||||
background: #0095cd;
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#2E9FFF), to(#2E9CCC));
|
||||
background: -moz-linear-gradient(top, #2E9FFF, #2E9CCC);
|
||||
border-top-right-radius: 5px 5px;
|
||||
border-bottom-right-radius: 5px 5px;
|
||||
width: 60px;
|
||||
}
|
||||
.search-button:hover {
|
||||
text-decoration: none;
|
||||
background: #007ead;
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#0095cc), to(#00678e));
|
||||
background: -moz-linear-gradient(top, #0095cc, #00678e);
|
||||
}
|
||||
/* Fixes submit button height problem in Firefox */
|
||||
.search-button::-moz-focus-inner {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/*-------------------------
|
||||
Post
|
||||
--------------------------*/
|
||||
|
||||
.post {
|
||||
border-bottom: 1px solid #EBF2F6;
|
||||
padding: 1em 0;
|
||||
float: left;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.inpost .post {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
p, ul {
|
||||
margin :1em 0;
|
||||
}
|
||||
|
||||
.breadcrumb {
|
||||
font-family: 'Open Sans',sans-serif;
|
||||
font-size: 14px;
|
||||
font-weight:normal;
|
||||
}
|
||||
|
||||
.date {
|
||||
font-family: 'Open Sans',sans-serif;
|
||||
font-size: 14px;
|
||||
color: #A7A7A7;
|
||||
font-weight:normal;
|
||||
margin:1em 0;
|
||||
}
|
||||
|
||||
h1.blog-title {
|
||||
font-style:normal;
|
||||
}
|
||||
|
||||
h1.title-post a, h2.title-index a{
|
||||
color:#4f4f4f;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
h1.title-post a:hover, h2.title-index a:hover {
|
||||
color: #2E9FFF;
|
||||
}
|
||||
|
||||
.inpost .post {
|
||||
padding-top:0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.inpage .border {
|
||||
padding:0;
|
||||
margin:0;
|
||||
border:0;
|
||||
}
|
||||
|
||||
.inpage .post {
|
||||
padding-top:0;
|
||||
}
|
||||
|
||||
.infront .first, .inpost .post, .intag .first, .inarchive .first, .insearch .first {
|
||||
padding-top:0;
|
||||
}
|
||||
|
||||
.infront .first h2.title-index {
|
||||
margin-top:0;
|
||||
}
|
||||
|
||||
.inprofile .bio {
|
||||
font-size: 14px;
|
||||
font-style:italic;
|
||||
border-bottom: 1px solid #EBF2F6;
|
||||
padding-bottom: 1em;
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
|
||||
.post-list {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/*-------------------------
|
||||
Comments
|
||||
--------------------------*/
|
||||
|
||||
.comments {
|
||||
position:relative;
|
||||
display:block;
|
||||
font-size:16px;
|
||||
float:left;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.border {
|
||||
border-top: 1px solid #DFDFDF;
|
||||
margin-bottom: 15px;
|
||||
margin-top: 10px;
|
||||
padding-bottom: 15px;
|
||||
width: 100%;
|
||||
float:left;
|
||||
}
|
||||
|
||||
.border #disqus_thread {
|
||||
padding-top: 1.2em;
|
||||
}
|
||||
|
||||
#disqus_thread {
|
||||
font-family: Georgia, Times, Cambria, serif;
|
||||
float:left;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
/*-------------------------
|
||||
Raleted posts
|
||||
--------------------------*/
|
||||
|
||||
.related {
|
||||
font-size: 14px;
|
||||
font-family: 'Open Sans',sans-serif;
|
||||
width:100%;
|
||||
float:left;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.related ul {
|
||||
margin:0;
|
||||
}
|
||||
|
||||
/*-------------------------
|
||||
Pagination + Postnav
|
||||
--------------------------*/
|
||||
|
||||
.postnav{
|
||||
width:100%;
|
||||
float:left;
|
||||
padding-bottom:1em;
|
||||
font-family: 'Open Sans',sans-serif;
|
||||
font-size: 12px;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
.postnav a {
|
||||
background: none repeat scroll 0 0 #E4E7EE;
|
||||
border-radius: 3px;
|
||||
color: #555555;
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.postnav a:hover {
|
||||
text-decoration:none;
|
||||
color:#333333;
|
||||
}
|
||||
|
||||
.postnav .newer {
|
||||
float:left;
|
||||
margin-right:1em;
|
||||
margin-bottom:0.1em;
|
||||
padding: 10px 15px 10px 25px;
|
||||
}
|
||||
|
||||
.postnav .older {
|
||||
float:right;
|
||||
padding: 10px 25px 10px 15px;
|
||||
}
|
||||
|
||||
.postnav .pagination-arrow{
|
||||
display: inline-block;
|
||||
border-radius: 3px;
|
||||
color: #555 !important;
|
||||
text-decoration: none !important;
|
||||
text-transform: none;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.postnav .pagination-arrow.newer:before,
|
||||
.postnav .pagination-arrow.older:before{
|
||||
content: '';
|
||||
border: 5px solid #555;
|
||||
border-color: transparent #555 transparent transparent;
|
||||
width: 0;
|
||||
height: 0;
|
||||
position: absolute;
|
||||
left: 5px;
|
||||
top: 12px;
|
||||
}
|
||||
|
||||
.postnav .pagination-arrow.older:before{
|
||||
left:auto;
|
||||
right:5px;
|
||||
border-color: transparent transparent transparent #555;
|
||||
}
|
||||
|
||||
.pager {
|
||||
width:100%;
|
||||
float:left;
|
||||
padding: 30px 0 1em 0;
|
||||
font-family: 'Open Sans',sans-serif;
|
||||
font-size: 12px;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
.pager a {
|
||||
background: none repeat scroll 0 0 #E4E7EE;
|
||||
border-radius: 3px;
|
||||
color: #555555;
|
||||
line-height: 1;
|
||||
padding: 10px 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pager .newer {
|
||||
float:left;
|
||||
}
|
||||
|
||||
.pager .older {
|
||||
float:right;
|
||||
}
|
||||
|
||||
.pager a:hover {
|
||||
text-decoration:none;
|
||||
color:#333333;
|
||||
}
|
||||
|
||||
/*-------------------------
|
||||
Footer
|
||||
--------------------------*/
|
||||
|
||||
#footer-wrapper {
|
||||
background: #546673;
|
||||
position:relative;
|
||||
padding: 20px 0;
|
||||
float:left;
|
||||
width: 100%;
|
||||
color: #ABB6C5;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
}
|
||||
|
||||
#footer {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#footer a {
|
||||
color: #CBD2DC;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
#footer ul {
|
||||
margin:0.5em 0;
|
||||
}
|
||||
|
||||
.footer-column {
|
||||
padding-bottom: 1.5em;
|
||||
float:left;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.column {
|
||||
float: left;
|
||||
width: 33%;
|
||||
}
|
||||
|
||||
.social {
|
||||
float:right;
|
||||
}
|
||||
|
||||
.social .inner {
|
||||
padding-left:30px;
|
||||
}
|
||||
|
||||
.tagcloud ul {
|
||||
padding:0;
|
||||
margin:0;
|
||||
}
|
||||
|
||||
.tagcloud ul li {
|
||||
float:left;
|
||||
list-style:none;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.copyright {
|
||||
font-size: 12px;
|
||||
float:left;
|
||||
width: 100%;
|
||||
border-top: 1px solid #ABB6C5;
|
||||
padding-top:1em;
|
||||
}
|
||||
|
||||
.copyright p {
|
||||
margin: 0.5em 0;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
/*----------------------------
|
||||
The 404 page
|
||||
-----------------------------*/
|
||||
|
||||
.message{
|
||||
padding:50px 20px 20px 20px;
|
||||
}
|
||||
|
||||
.message h1{
|
||||
font-size:36px;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.message p{
|
||||
font-size:13px;
|
||||
}
|
||||
|
||||
.center{
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.search-404 {
|
||||
position:relative;
|
||||
float:left;
|
||||
width:100%;
|
||||
margin-bottom: 1.2em;
|
||||
}
|
||||
|
||||
.search-404 #search-form {
|
||||
float:none;
|
||||
}
|
||||
|
||||
/*----------------------------
|
||||
Media queries
|
||||
-----------------------------*/
|
||||
|
||||
@media all and (max-width: 700px) {
|
||||
|
||||
#menu, #header, #content, #footer {
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#menu-wrapper {
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
#menu ul li {
|
||||
float:none;
|
||||
display:inline-block;
|
||||
}
|
||||
|
||||
#search-form {
|
||||
float:none;
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.author-info {
|
||||
width: 100%;
|
||||
float:left;
|
||||
}
|
||||
|
||||
.share {
|
||||
width:100%;
|
||||
margin-right: 0;
|
||||
padding-bottom: 1em;
|
||||
}
|
||||
|
||||
.column {
|
||||
float:left;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.postnav .newer {
|
||||
float:left;
|
||||
margin-bottom:1em;
|
||||
}
|
||||
|
||||
.postnav .older {
|
||||
float:left;
|
||||
}
|
||||
|
||||
.social .inner {
|
||||
padding-left:0px;
|
||||
}
|
||||
|
||||
pre {
|
||||
white-space: pre-wrap;
|
||||
word-wrap:break-word;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------
|
||||
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%;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -11,14 +11,14 @@
|
|||
<link rel="sitemap" href="<?php echo site_url() ?>sitemap.xml" />
|
||||
<link rel="canonical" href="<?php echo $canonical; ?>" />
|
||||
<link rel="alternate" type="application/rss+xml" title="<?php echo config('blog.title')?> Feed" href="<?php echo site_url()?>feed/rss" />
|
||||
<link href="<?php echo site_url() ?>system/admin/views/css/style.css" rel="stylesheet" />
|
||||
<link href="<?php echo site_url() ?>themes/default/css/style.css" rel="stylesheet" />
|
||||
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
|
||||
<?php if (publisher() == true):?><link href="<?php echo publisher() ?>" rel="publisher" /><?php endif;?>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body itemscope="itemscope" itemtype="http://schema.org/Blog">
|
||||
<body class="admin <?php echo $bodyclass; ?>" itemscope="itemscope" itemtype="http://schema.org/Blog">
|
||||
<div class="hide">
|
||||
<meta content="<?php echo config('blog.title') ?>" itemprop="name"/>
|
||||
<meta content="<?php echo config('blog.description')?>" itemprop="description"/>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
<td><?php echo $p->title ?></td>
|
||||
<td><?php echo date('d F Y', $p->date) ?></td>
|
||||
<td><?php echo $p->tag ?></td>
|
||||
<td><a href="<?php echo $p->url ?>/edit">Edit</a> <a href="<?php echo $p->url ?>/delete">Delete</a></td>
|
||||
<td><a href="<?php echo $p->url ?>/edit?destination=admin/posts">Edit</a> <a href="<?php echo $p->url ?>/delete">Delete</a></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ get('/:year/:month/:name/edit', function($year, $month, $name){
|
|||
'p' => $current,
|
||||
'canonical' => $current->url,
|
||||
'description' => $description = get_description($current->body),
|
||||
'bodyclass' => 'inedit',
|
||||
'bodyclass' => 'editpost',
|
||||
'breadcrumb' => '<span typeof="v:Breadcrumb"><a property="v:title" rel="v:url" href="' . config('site.url') . '">' .config('breadcrumb.home'). '</a></span> » '. $current->tagb . ' » ' . $current->title
|
||||
));
|
||||
}
|
||||
|
|
@ -142,8 +142,9 @@ post('/:year/:month/:name/edit', function() {
|
|||
$url = from($_REQUEST, 'url');
|
||||
$content = from($_REQUEST, 'content');
|
||||
$oldfile = from($_REQUEST, 'oldfile');
|
||||
$destination = from($_GET, 'destination');
|
||||
|
||||
edit_post($title, $tag, $url, $content, $oldfile);
|
||||
edit_post($title, $tag, $url, $content, $oldfile, $destination);
|
||||
|
||||
});
|
||||
|
||||
|
|
@ -166,7 +167,7 @@ get('/:year/:month/:name/delete', function($year, $month, $name){
|
|||
'p' => $current,
|
||||
'canonical' => $current->url,
|
||||
'description' => $description = get_description($current->body),
|
||||
'bodyclass' => 'inedit',
|
||||
'bodyclass' => 'deletepost',
|
||||
'breadcrumb' => '<span typeof="v:Breadcrumb"><a property="v:title" rel="v:url" href="' . config('site.url') . '">' .config('breadcrumb.home'). '</a></span> » '. $current->tagb . ' » ' . $current->title
|
||||
));
|
||||
}
|
||||
|
|
@ -244,7 +245,7 @@ get('/edit/profile', function(){
|
|||
'title' => 'Edit profile - ' . config('blog.title'),
|
||||
'canonical' => config('site.url') . '/profile',
|
||||
'description' => 'Edit profile.',
|
||||
'bodyclass' => 'inpage',
|
||||
'bodyclass' => 'editprofile',
|
||||
'breadcrumb' => '<a href="' . config('site.url') . '">' .config('breadcrumb.home'). '</a> » Edit profile',
|
||||
));
|
||||
}
|
||||
|
|
@ -299,7 +300,7 @@ get('/admin/posts', function(){
|
|||
'name' => $bio->title,
|
||||
'canonical' => config('site.url') . '/author/' . $profile,
|
||||
'description' => 'Profile page and all posts by ' . $bio->title . ' on ' . config('blog.title') . '.',
|
||||
'bodyclass' => 'inprofile',
|
||||
'bodyclass' => 'userposts',
|
||||
'breadcrumb' => '<a href="' . config('site.url') . '">' .config('breadcrumb.home'). '</a> » Profile for: ' . $bio->title,
|
||||
'pagination' => has_pagination($total, $perpage, $page)
|
||||
));
|
||||
|
|
@ -314,7 +315,7 @@ get('/admin/posts', function(){
|
|||
'name' => $bio->title,
|
||||
'canonical' => config('site.url') . '/author/' . $profile,
|
||||
'description' => 'Profile page and all posts by ' . $bio->title . ' on ' . config('blog.title') . '.',
|
||||
'bodyclass' => 'inprofile',
|
||||
'bodyclass' => 'userposts',
|
||||
'breadcrumb' => '<a href="' . config('site.url') . '">' .config('breadcrumb.home'). '</a> » Profile for: ' . $bio->title,
|
||||
'pagination' => has_pagination($total, $perpage, $page)
|
||||
));
|
||||
|
|
@ -364,7 +365,7 @@ get('/:static', function($static){
|
|||
'title' => 'Admin - ' . config('blog.title'),
|
||||
'canonical' => config('site.url') . '/admin',
|
||||
'description' => 'Admin page from ' . config('blog.title') . '.',
|
||||
'bodyclass' => 'inadmin',
|
||||
'bodyclass' => 'adminfront',
|
||||
'breadcrumb' => '<a href="' . config('site.url') . '">' .config('breadcrumb.home'). '</a> » Admin'
|
||||
));
|
||||
}
|
||||
|
|
@ -441,7 +442,7 @@ get('/:static/edit', function($static){
|
|||
'title' => $post->title .' - ' . config('blog.title'),
|
||||
'canonical' => $post->url,
|
||||
'description' => $description = get_description($post->body),
|
||||
'bodyclass' => 'inpage',
|
||||
'bodyclass' => 'editpage',
|
||||
'breadcrumb' => '<a href="' . config('site.url') . '">' .config('breadcrumb.home'). '</a> » ' . $post->title,
|
||||
'p' => $post,
|
||||
'type' => 'staticpage',
|
||||
|
|
@ -460,8 +461,9 @@ post('/:static/edit', function() {
|
|||
$url = from($_REQUEST, 'url');
|
||||
$content = from($_REQUEST, 'content');
|
||||
$oldfile = from($_REQUEST, 'oldfile');
|
||||
$destination = from($_GET, 'destination');
|
||||
|
||||
edit_page($title, $url, $content, $oldfile);
|
||||
edit_page($title, $url, $content, $oldfile, $destination);
|
||||
|
||||
});
|
||||
|
||||
|
|
@ -483,7 +485,7 @@ get('/:static/delete', function($static){
|
|||
'title' => $post->title .' - ' . config('blog.title'),
|
||||
'canonical' => $post->url,
|
||||
'description' => $description = get_description($post->body),
|
||||
'bodyclass' => 'inpage',
|
||||
'bodyclass' => 'deletepage',
|
||||
'breadcrumb' => '<a href="' . config('site.url') . '">' .config('breadcrumb.home'). '</a> » ' . $post->title,
|
||||
'p' => $post,
|
||||
'type' => 'staticpage',
|
||||
|
|
|
|||
1
system/includes/.htaccess
Normal file
1
system/includes/.htaccess
Normal file
|
|
@ -0,0 +1 @@
|
|||
deny from all
|
||||
|
|
@ -163,6 +163,27 @@ h6{
|
|||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.tab {
|
||||
width:100%;
|
||||
margin: 0.5em 0 0.5em 0;
|
||||
line-height:1;
|
||||
border-bottom: 1px solid #E4E7EE;
|
||||
}
|
||||
|
||||
.tab a {
|
||||
background: #E4E7EE;
|
||||
border-radius: 6px 6px 0px 0;
|
||||
color: #555555;
|
||||
text-align: center;
|
||||
padding: 8px 14px;
|
||||
display:inline-block;
|
||||
margin: 0 5px;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
font-family: 'Open Sans',sans-serif;
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------
|
||||
Content & Posts
|
||||
-----------------------------*/
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<?php if (!empty($breadcrumb)):?><div class="breadcrumb" xmlns:v="http://rdf.data-vocabulary.org/#"><?php echo $breadcrumb ?></div><?php endif;?>
|
||||
<? if(login()): ?><div class="tab"><a href="<?php echo $p->url ?>">View</a><a href="<?php echo $p->url ?>/edit?destination=post">Edit</a></div><?php endif;?>
|
||||
<div class="post" itemprop="blogPost" itemscope="itemscope" itemtype="http://schema.org/BlogPosting">
|
||||
<div class="main">
|
||||
<?php if ($type == 'blogpost'):?>
|
||||
|
|
|
|||
|
|
@ -136,11 +136,20 @@ h6 {
|
|||
padding: 3em 0;
|
||||
}
|
||||
|
||||
.admin #content-wrapper {
|
||||
background-color: #FAFAFA;
|
||||
}
|
||||
|
||||
#menu, #header, #content, #footer {
|
||||
width: 700px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.admin #menu, .admin #header, .admin #content, .admin #footer {
|
||||
width: 980px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#header {
|
||||
text-align:center;
|
||||
}
|
||||
|
|
@ -163,6 +172,26 @@ a:hover{
|
|||
text-decoration:underline;
|
||||
}
|
||||
|
||||
.tab {
|
||||
width:100%;
|
||||
margin: 1.5em 0 0 0;
|
||||
line-height:1;
|
||||
border-bottom: 1px solid #E4E7EE;
|
||||
}
|
||||
|
||||
.tab a {
|
||||
background: #E4E7EE;
|
||||
border-radius: 6px 6px 0px 0;
|
||||
color: #555555;
|
||||
text-align: center;
|
||||
padding: 8px 14px;
|
||||
display:inline-block;
|
||||
margin: 0 5px;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
font-family: 'Open Sans',sans-serif;
|
||||
}
|
||||
|
||||
/*-------------------------
|
||||
Text element
|
||||
--------------------------*/
|
||||
|
|
@ -758,6 +787,11 @@ h1.title-post a:hover, h2.title-index a:hover {
|
|||
width: 100%;
|
||||
}
|
||||
|
||||
.admin #menu, .admin #header, .admin #content, .admin #footer {
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#menu-wrapper {
|
||||
text-align:center;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<?php if (!empty($breadcrumb)):?><div class="breadcrumb" xmlns:v="http://rdf.data-vocabulary.org/#"><?php echo $breadcrumb ?></div><?php endif;?>
|
||||
<? if(login()): ?><div class="tab"><a href="<?php echo $p->url ?>">View</a><a href="<?php echo $p->url ?>/edit?destination=post">Edit</a></div><?php endif;?>
|
||||
<div class="post" itemprop="blogPost" itemscope="itemscope" itemtype="http://schema.org/BlogPosting">
|
||||
<div class="main">
|
||||
<?php if ($type == 'blogpost'):?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue