mirror of
https://github.com/danpros/htmly.git
synced 2026-04-19 12:06:22 +05:30
Change config folder
Change config folder for later developments. A few style improvements.
This commit is contained in:
parent
29fea933b0
commit
5358f21d50
23 changed files with 208 additions and 28 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
// Change this to your timezone
|
// Change this to your timezone
|
||||||
date_default_timezone_set('Asia/Jakarta');
|
date_default_timezone_set('Asia/Jakarta');
|
||||||
require '../../system/includes/dispatch.php';
|
require '../../system/includes/dispatch.php';
|
||||||
config('source', '../../admin/config.ini');
|
config('source', '../../config/config.ini');
|
||||||
include '../includes/session.php';
|
include '../includes/session.php';
|
||||||
|
|
||||||
if(isset($_POST['submit'])) {
|
if(isset($_POST['submit'])) {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
// Change this to your timezone
|
// Change this to your timezone
|
||||||
date_default_timezone_set('Asia/Jakarta');
|
date_default_timezone_set('Asia/Jakarta');
|
||||||
require '../../system/includes/dispatch.php';
|
require '../../system/includes/dispatch.php';
|
||||||
config('source', '../../admin/config.ini');
|
config('source', '../../config/config.ini');
|
||||||
include '../includes/session.php';
|
include '../includes/session.php';
|
||||||
|
|
||||||
if(isset($_POST['submit'])) {
|
if(isset($_POST['submit'])) {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
// Change this to your timezone
|
// Change this to your timezone
|
||||||
date_default_timezone_set('Asia/Jakarta');
|
date_default_timezone_set('Asia/Jakarta');
|
||||||
require '../../system/includes/dispatch.php';
|
require '../../system/includes/dispatch.php';
|
||||||
config('source', '../../admin/config.ini');
|
config('source', '../../config/config.ini');
|
||||||
include '../includes/session.php';
|
include '../includes/session.php';
|
||||||
|
|
||||||
if(isset($_GET['url'])) {
|
if(isset($_GET['url'])) {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
// Change this to your timezone
|
// Change this to your timezone
|
||||||
date_default_timezone_set('Asia/Jakarta');
|
date_default_timezone_set('Asia/Jakarta');
|
||||||
require '../../system/includes/dispatch.php';
|
require '../../system/includes/dispatch.php';
|
||||||
config('source', '../../admin/config.ini');
|
config('source', '../../config/config.ini');
|
||||||
include '../includes/session.php';
|
include '../includes/session.php';
|
||||||
|
|
||||||
if(isset($_GET['url'])) {
|
if(isset($_GET['url'])) {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
// Change this to your timezone
|
// Change this to your timezone
|
||||||
date_default_timezone_set('Asia/Jakarta');
|
date_default_timezone_set('Asia/Jakarta');
|
||||||
require '../../system/includes/dispatch.php';
|
require '../../system/includes/dispatch.php';
|
||||||
config('source', '../../admin/config.ini');
|
config('source', '../../config/config.ini');
|
||||||
include '../includes/session.php';
|
include '../includes/session.php';
|
||||||
|
|
||||||
if(isset($_SESSION['user'])) {
|
if(isset($_SESSION['user'])) {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
// Change this to your timezone
|
// Change this to your timezone
|
||||||
date_default_timezone_set('Asia/Jakarta');
|
date_default_timezone_set('Asia/Jakarta');
|
||||||
require '../../system/includes/dispatch.php';
|
require '../../system/includes/dispatch.php';
|
||||||
config('source', '../../admin/config.ini');
|
config('source', '../../config/config.ini');
|
||||||
include '../includes/session.php';
|
include '../includes/session.php';
|
||||||
|
|
||||||
if(isset($_GET['url'])) {
|
if(isset($_GET['url'])) {
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
$post_url = rtrim($post_url, ',\.\-');
|
$post_url = rtrim($post_url, ',\.\-');
|
||||||
$post_content = $_POST['content'];
|
$post_content = $_POST['content'];
|
||||||
}
|
}
|
||||||
if(!empty($post_content)) {
|
if(!empty($post_url) && !empty($post_content)) {
|
||||||
if(get_magic_quotes_gpc()) {
|
if(get_magic_quotes_gpc()) {
|
||||||
$post_content = stripslashes($post_content);
|
$post_content = stripslashes($post_content);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
// Change this to your timezone
|
// Change this to your timezone
|
||||||
date_default_timezone_set('Asia/Jakarta');
|
date_default_timezone_set('Asia/Jakarta');
|
||||||
require '../../system/includes/dispatch.php';
|
require '../../system/includes/dispatch.php';
|
||||||
config('source', '../../admin/config.ini');
|
config('source', '../../config/config.ini');
|
||||||
include '../includes/session.php';
|
include '../includes/session.php';
|
||||||
|
|
||||||
if(isset($_GET['url'])) {
|
if(isset($_GET['url'])) {
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
$post_url = rtrim($post_url, ',\.\-');
|
$post_url = rtrim($post_url, ',\.\-');
|
||||||
$post_content = $_POST['content'];
|
$post_content = $_POST['content'];
|
||||||
}
|
}
|
||||||
if(!empty($post_content)) {
|
if(!empty($post_tag) && !empty($post_url) && !empty($post_content)) {
|
||||||
if(get_magic_quotes_gpc()) {
|
if(get_magic_quotes_gpc()) {
|
||||||
$post_content = stripslashes($post_content);
|
$post_content = stripslashes($post_content);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
$user = $_REQUEST['user'];
|
$user = $_REQUEST['user'];
|
||||||
$pass = $_REQUEST['password'];
|
$pass = $_REQUEST['password'];
|
||||||
|
|
||||||
$user_file = '../../admin/users/' . $user . '.ini';
|
$user_file = '../../config/users/' . $user . '.ini';
|
||||||
$user_pass = user('password', $user);
|
$user_pass = user('password', $user);
|
||||||
|
|
||||||
if(file_exists($user_file)) {
|
if(file_exists($user_file)) {
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,9 @@ blockquote {
|
||||||
}
|
}
|
||||||
|
|
||||||
.wmd-panel{
|
.wmd-panel{
|
||||||
width: 46%;
|
width: 44%;
|
||||||
float:left;
|
float:left;
|
||||||
padding:2%;
|
padding-right:20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wmd-button-bar {
|
.wmd-button-bar {
|
||||||
|
|
@ -127,6 +127,11 @@ pre code {
|
||||||
|
|
||||||
@media all and (max-width: 980px) {
|
@media all and (max-width: 980px) {
|
||||||
|
|
||||||
|
.nav {
|
||||||
|
width: 100%;
|
||||||
|
padding: 2%;
|
||||||
|
}
|
||||||
|
|
||||||
.wmd-panel, .wmd-preview {
|
.wmd-panel, .wmd-preview {
|
||||||
width: 96%;
|
width: 96%;
|
||||||
float:left;
|
float:left;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
date_default_timezone_set('Asia/Jakarta');
|
date_default_timezone_set('Asia/Jakarta');
|
||||||
config('source', '../../admin/config.ini');
|
config('source', '../../config/config.ini');
|
||||||
|
|
||||||
// Get static page path. Unsorted.
|
// Get static page path. Unsorted.
|
||||||
function admin_get_static(){
|
function admin_get_static(){
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
date_default_timezone_set('Asia/Jakarta');
|
date_default_timezone_set('Asia/Jakarta');
|
||||||
config('source', '../../admin/config.ini');
|
config('source', '../../config/config.ini');
|
||||||
|
|
||||||
// Get blog post with more info about the path. Sorted by filename.
|
// Get blog post with more info about the path. Sorted by filename.
|
||||||
function admin_get_post(){
|
function admin_get_post(){
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
function user($key, $user=null) {
|
function user($key, $user=null) {
|
||||||
$value = '../../admin/users/' . $user . '.ini';
|
$value = '../../config/users/' . $user . '.ini';
|
||||||
static $_config = array();
|
static $_config = array();
|
||||||
if (file_exists($value)) {
|
if (file_exists($value)) {
|
||||||
$_config = parse_ini_file($value, true);
|
$_config = parse_ini_file($value, true);
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
date_default_timezone_set('Asia/Jakarta');
|
date_default_timezone_set('Asia/Jakarta');
|
||||||
require '../system/includes/dispatch.php';
|
require '../system/includes/dispatch.php';
|
||||||
config('source', '../admin/config.ini');
|
config('source', '../config/config.ini');
|
||||||
include 'includes/session.php';
|
include 'includes/session.php';
|
||||||
include 'includes/post_list.php';
|
include 'includes/post_list.php';
|
||||||
include 'includes/page_list.php';
|
include 'includes/page_list.php';
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ body {
|
||||||
float:left;
|
float:left;
|
||||||
position:relative;
|
position:relative;
|
||||||
width:100%;
|
width:100%;
|
||||||
|
padding-bottom: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wrapper-inner {
|
.wrapper-inner {
|
||||||
|
|
@ -20,16 +21,71 @@ body {
|
||||||
|
|
||||||
.nav {
|
.nav {
|
||||||
width: 96%;
|
width: 96%;
|
||||||
padding:2%;
|
padding:2% 0;
|
||||||
|
border-bottom: 4px solid #cccccc;
|
||||||
|
margin-bottom: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*-------------------------
|
||||||
|
Link
|
||||||
|
--------------------------*/
|
||||||
|
|
||||||
|
a, a:visited {
|
||||||
|
outline:none;
|
||||||
|
text-decoration:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover{
|
||||||
|
text-decoration:underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*-------------------------
|
||||||
|
Table
|
||||||
|
--------------------------*/
|
||||||
|
|
||||||
table {
|
table {
|
||||||
border: 1px solid #ccc;
|
font-size:14px;
|
||||||
|
border: none;
|
||||||
|
color:#333333;
|
||||||
|
border: 1px solid #E3E3E3;
|
||||||
|
margin: 1em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table td {
|
table h2.title {
|
||||||
border: 1px solid #ccc;
|
margin:5px 0;
|
||||||
background: #ddd;
|
}
|
||||||
|
|
||||||
|
th, td {
|
||||||
|
padding: 5px 10px;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
th.title {
|
||||||
|
margin:5px 0;
|
||||||
|
font-family: Arial,sans-serif;
|
||||||
|
font-size:18px;
|
||||||
|
font-weight:normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.title {
|
||||||
|
font-weight:normal;
|
||||||
|
background-color: #eeeeee;
|
||||||
|
font-family: Arial,sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
background-color: #eeeeee;
|
||||||
|
border-bottom: 1px solid #E3E3E3;
|
||||||
|
border-right: 1px solid #E3E3E3;
|
||||||
|
font-family: Arial,sans-serif;
|
||||||
|
font-size:18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
background-color: #eeeeee;
|
||||||
|
border: 1px solid #E3E3E3;
|
||||||
|
border-top: none;
|
||||||
|
border-left:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (max-width: 980px) {
|
@media all and (max-width: 980px) {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ require 'system/includes/functions.php';
|
||||||
require 'system/includes/opml.php';
|
require 'system/includes/opml.php';
|
||||||
|
|
||||||
// Load the configuration file
|
// Load the configuration file
|
||||||
config('source', 'admin/config.ini');
|
config('source', 'config/config.ini');
|
||||||
|
|
||||||
// The front page of the blog.
|
// The front page of the blog.
|
||||||
// This will match the root url
|
// This will match the root url
|
||||||
|
|
|
||||||
|
|
@ -1135,7 +1135,7 @@ function welcome_page() {
|
||||||
echo <<<EOF
|
echo <<<EOF
|
||||||
<div style="font-size:20px;text-align:center;padding:50px 20px;">
|
<div style="font-size:20px;text-align:center;padding:50px 20px;">
|
||||||
<h1>Welcome to your new HTMLy-powered blog.</h1>
|
<h1>Welcome to your new HTMLy-powered blog.</h1>
|
||||||
<p>The next thing you will need to do is creating the first account. Please create <strong><em>YourUsername.ini</em></strong> inside <strong><em>admin/users</em></strong> folder and write down your password there:</p>
|
<p>The next thing you will need to do is creating the first account. Please create <strong><em>YourUsername.ini</em></strong> inside <strong><em>config/users</em></strong> folder and write down your password there:</p>
|
||||||
<pre><code>password = YourPassword</code></pre>
|
<pre><code>password = YourPassword</code></pre>
|
||||||
<p>Login to your blog admin panel at <strong><em>www.example.com/admin</em></strong> to creating your first post.</p>
|
<p>Login to your blog admin panel at <strong><em>www.example.com/admin</em></strong> to creating your first post.</p>
|
||||||
<p>This welcome message will disappear after your first post published.</p>
|
<p>This welcome message will disappear after your first post published.</p>
|
||||||
|
|
|
||||||
|
|
@ -208,6 +208,14 @@ pre {
|
||||||
background: #F1F1FF;
|
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 {
|
pre code {
|
||||||
color: #333333;
|
color: #333333;
|
||||||
display: block;
|
display: block;
|
||||||
|
|
@ -276,9 +284,8 @@ blockquote:after {
|
||||||
vertical-align: -0.45em;
|
vertical-align: -0.45em;
|
||||||
}
|
}
|
||||||
|
|
||||||
blockquote {
|
blockquote p {
|
||||||
font-style: italic;
|
display:inline;
|
||||||
margin: 1em 0 1em 1em;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.credit {
|
.credit {
|
||||||
|
|
@ -287,6 +294,56 @@ blockquote {
|
||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*-------------------------
|
||||||
|
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 Condensed', sans-serif;
|
||||||
|
font-size:18px;
|
||||||
|
font-weight:normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.title {
|
||||||
|
font-weight:normal;
|
||||||
|
background-color: #f6f6f6;
|
||||||
|
font-family: 'Open Sans Condensed', sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
background-color: #f6f6f6;
|
||||||
|
border-bottom: 1px solid #E3E3E3;
|
||||||
|
border-right: 1px solid #E3E3E3;
|
||||||
|
font-family: 'Open Sans Condensed', sans-serif;
|
||||||
|
font-size:18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
background-color: #fafafa;
|
||||||
|
border: 1px solid #E3E3E3;
|
||||||
|
border-top: none;
|
||||||
|
border-left:none;
|
||||||
|
}
|
||||||
|
|
||||||
/*----------------------------
|
/*----------------------------
|
||||||
The left bar
|
The left bar
|
||||||
-----------------------------*/
|
-----------------------------*/
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
$i++;
|
$i++;
|
||||||
?>
|
?>
|
||||||
<li>
|
<li>
|
||||||
<span><a href="<?php echo $p->url?>"><?php echo $p->title ?></a></span> on <span><?php echo date('d F Y', $p->date)?></span> - Posted in <span><a href="<?php echo $p->tagurl ?>"><?php echo $p->tag ?></a></span>
|
<span><a href="<?php echo $p->url?>"><?php echo $p->title ?></a></span> on <span><?php echo date('d F Y', $p->date)?></span> - Posted in <span><?php echo $p->tag ?></span>
|
||||||
</li>
|
</li>
|
||||||
<?php endforeach;?>
|
<?php endforeach;?>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
|
|
@ -151,12 +151,24 @@ blockquote {
|
||||||
margin: 1em 0 1em 1em;
|
margin: 1em 0 1em 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
blockquote p {
|
||||||
|
display:inline;
|
||||||
|
}
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
margin: 1em 0;
|
margin: 1em 0;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
background: #F1F1FF;
|
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 {
|
pre code {
|
||||||
color: #333333;
|
color: #333333;
|
||||||
display: block;
|
display: block;
|
||||||
|
|
@ -186,6 +198,56 @@ ul li, ol li{
|
||||||
margin: 0.25em 0;
|
margin: 0.25em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*-------------------------
|
||||||
|
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:18px;
|
||||||
|
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:18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
background-color: #fafafa;
|
||||||
|
border: 1px solid #E3E3E3;
|
||||||
|
border-top: none;
|
||||||
|
border-left:none;
|
||||||
|
}
|
||||||
|
|
||||||
/*-------------------------
|
/*-------------------------
|
||||||
Menu
|
Menu
|
||||||
--------------------------*/
|
--------------------------*/
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
$i++;
|
$i++;
|
||||||
?>
|
?>
|
||||||
<li>
|
<li>
|
||||||
<span><a href="<?php echo $p->url?>"><?php echo $p->title ?></a></span> on <span><?php echo date('d F Y', $p->date)?></span> - Posted in <span><a href="<?php echo $p->tagurl ?>"><?php echo $p->tag ?></a></span>
|
<span><a href="<?php echo $p->url?>"><?php echo $p->title ?></a></span> on <span><?php echo date('d F Y', $p->date)?></span> - Posted in <span><?php echo $p->tag ?></span>
|
||||||
</li>
|
</li>
|
||||||
<?php endforeach;?>
|
<?php endforeach;?>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue