diff options
Diffstat (limited to 'snippets/header.snippet.php')
-rw-r--r-- | snippets/header.snippet.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/snippets/header.snippet.php b/snippets/header.snippet.php new file mode 100644 index 0000000..d3270d8 --- /dev/null +++ b/snippets/header.snippet.php @@ -0,0 +1,27 @@ +<?php + + $title_suffix = isset($title_suffix) ? ' - ' . $title_suffix : ''; + $css = 'microblog'; // the default + if(!empty($config['theme']) && file_exists(ROOT.DS.'css'.DS.$config['theme'].'.css')) { + $css = $config['theme']; + } + + header('Content-Type: text/html; charset=utf-8'); + +?><!DOCTYPE html> +<html lang="<?= $config['language'] ?>" class="<?= $template ?>"> +<head> + <meta charset="utf-8" /> + + <title><?= empty($config['microblog_account']) ? "" : $config['microblog_account'] . "'s "; ?>micro.blog<?= $title_suffix ?></title> + + <meta name="viewport" content="width=device-width, initial-scale=1" /> + + <link rel="alternate" type="application/json" title="JSON Feed" href="<?= $config['url'] ?>/feed/json" /> + <link rel="alternate" type="application/atom+xml" title="Atom Feed" href="<?= $config['url'] ?>/feed/atom" /> + <?php if($config['xmlrpc']): ?><link rel="EditURI" type="application/rsd+xml" title="RSD" href="<?= $config['url'] ?>/rsd" /><?php endif; ?> + + <link rel="stylesheet" href="<?= $config['url'] ?>/css/<?= $css ?>.css" /> + + <script src="<?= $config['url'] ?>/microblog.js" type="module" defer></script> +</head> |