?> <h1 class="name"><a href="<?php echo site_url(); ?> "><?php echo blog_title(); ?> </a></h1> <?php } else { ?> <h2 class="name"><a href="<?php echo site_url(); ?> "><?php echo blog_title(); ?> </a></h2> <?php } ?> <p class="desc"><?php echo blog_tagline(); ?> </p> <ul class="social list-inline"> <li><a href="<?php echo config('social.twitter'); ?> "><i class="fa fa-twitter"></i></a></li> <li><a href="<?php
function head_contents() { $output = ''; $wmt_id = config('google.wmt.id'); $favicon = '<link rel="icon" type="image/x-icon" href="' . site_url() . 'favicon.ico" />'; $charset = '<meta charset="utf-8" />'; $generator = '<meta name="generator" content="htmly" />'; $xua = '<meta http-equiv="X-UA-Compatible" content="IE=edge" />'; $viewport = '<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />'; $sitemap = '<link rel="sitemap" href="' . site_url() . 'sitemap.xml" />'; $feed = '<link rel="alternate" type="application/rss+xml" title="' . blog_title() . ' Feed" href="' . site_url() . 'feed/rss" />'; $webmasterTools = ''; if (!empty($wmt_id)) { $webmasterTools = '<meta name="google-site-verification" content="' . $wmt_id . '" />'; } $output .= $charset . "\n" . $xua . "\n" . $viewport . "\n" . $generator . "\n" . $favicon . "\n" . $sitemap . "\n" . $feed . "\n" . $webmasterTools . "\n"; return $output; }
blog_url(); ?> includes/img/main.png"> <!-- Twitter --> <meta property="twitter:card" content="summary_large_image"> <meta property="twitter:site" content="@D0P3F15H"> <meta property="twitter:title" content="<?php if (is_archive()) { echo 'Archiv - '; } elseif (is_post()) { post_title('', ' - '); } elseif (is_page()) { post_title('', ' - '); } blog_title(); ?> "> <meta property="twitter:description" content="<?php blog_description(); ?> "> <meta property="twitter:image" content="<?php blog_url(); ?> includes/img/main.png"> <!-- Favicon --> <link rel="icon" href="<?php blog_url(); ?>
if (login()) { $user = $_SESSION[config("site.url")]['user']; $role = user('role', $user); config('views.root', 'system/admin/views'); $post = find_post($year, $month, $name); if (!$post) { $post = find_draft($year, $month, $name); if (!$post) { not_found(); } } $current = $post['current']; if ($user === $current->author || $role === 'admin') { render('delete-post', array('title' => 'Delete post - ' . blog_title(), 'description' => blog_description(), 'canonical' => site_url(), 'p' => $current, 'bodyclass' => 'deletepost', 'breadcrumb' => '<span typeof="v:Breadcrumb"><a property="v:title" rel="v:url" href="' . site_url() . '">' . config('breadcrumb.home') . '</a></span> » ' . $current->tagb . ' » ' . $current->title)); } else { render('denied', array('title' => 'Delete post - ' . blog_title(), 'description' => blog_description(), 'canonical' => site_url(), 'p' => $current, 'bodyclass' => 'deletepost', 'breadcrumb' => '<span typeof="v:Breadcrumb"><a property="v:title" rel="v:url" href="' . site_url() . '">' . config('breadcrumb.home') . '</a></span> » ' . $current->tagb . ' » ' . $current->title)); } } else { $login = site_url() . 'login'; header("location: {$login}"); } }); // Get deleted data from blog post post('/:year/:month/:name/delete', function () { $proper = is_csrf_proper(from($_REQUEST, 'csrf_token')); if ($proper && login()) { $file = from($_REQUEST, 'file'); $destination = from($_GET, 'destination'); delete_post($file, $destination); } });
$message['error'] .= '<li>CSRF Token not correct.</li>'; } config('views.root', 'system/admin/views'); render('add-page', array('head_contents' => head_contents('Add page - ' . blog_title(), blog_description(), site_url()), 'error' => '<ul>' . $message['error'] . '</ul>', 'postTitle' => $title, 'postUrl' => $url, 'postContent' => $content, 'bodyclass' => 'addpage', 'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> » <a href="' . $post->url . '">' . $post->title . '</a> Add page')); } }); get('/:static/:sub', function ($static, $sub) { $father_post = get_static_post($static); if (!$father_post) { not_found(); } $post = get_static_sub_post($static, $sub); if (!$post) { not_found(); } $post = $post[0]; if (config("views.counter") == "true") { add_view($post->file); } if (!login()) { file_cache($_SERVER['REQUEST_URI']); } render('static', array('head_contents' => head_contents($post->title . ' - ' . blog_title(), $post->description, $post->url), 'bodyclass' => 'inpage', 'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> » <a href="' . $father_post[0]->url . '">' . $father_post[0]->title . '</a> » ' . $post->title, 'p' => $post, 'type' => 'staticpage')); }); // If we get here, it means that // nothing has been matched above get('.*', function () { not_found(); }); // Serve the blog dispatch();
function head_contents() { $styleImage = config('lightbox'); $jq = config('jquery'); $output = ''; $wmt_id = config('google.wmt.id'); $favicon = '<link rel="icon" type="image/x-icon" href="' . site_url() . 'favicon.ico" />'; $charset = '<meta charset="utf-8" />'; $generator = '<meta name="generator" content="htmly" />'; $xua = '<meta http-equiv="X-UA-Compatible" content="IE=edge" />'; $viewport = '<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />'; $sitemap = '<link rel="sitemap" href="' . site_url() . 'sitemap.xml" />'; $feed = '<link rel="alternate" type="application/rss+xml" title="' . blog_title() . ' Feed" href="' . site_url() . 'feed/rss" />'; $lightboxcss = '<link href="' . site_url() . 'system/plugins/lightbox/css/lightbox.css" rel="stylesheet" />'; $jquery = '<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>'; $lightbox = '<script src="' . site_url() . 'system/plugins/lightbox/js/lightbox-2.6.min.js"></script>'; $corejs = '<script src="' . site_url() . 'system/resources/htmly.js"></script>'; $webmasterTools = ''; if (!empty($wmt_id)) { $webmasterTools = '<meta name="google-site-verification" content="' . $wmt_id . '" />'; } if ($styleImage == 'on') { $output .= $charset . "\n" . $xua . "\n" . $viewport . "\n" . $generator . "\n" . $favicon . $sitemap . "\n" . $feed . "\n" . $lightboxcss . "\n" . $jquery . "\n" . $lightbox . "\n" . $corejs . "\n" . $webmasterTools . "\n"; } else { if ($jq == 'enable') { $output .= $charset . "\n" . $xua . "\n" . $viewport . "\n" . $generator . "\n" . $favicon . "\n" . $sitemap . "\n" . $feed . "\n" . $jquery . "\n" . $webmasterTools . "\n"; } else { $output .= $charset . "\n" . $xua . "\n" . $viewport . "\n" . $generator . "\n" . $favicon . "\n" . $sitemap . "\n" . $feed . "\n" . $webmasterTools . "\n"; } } return $output; }