Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8" />
- <!--[if lt IE 9]><script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script><![endif]-->
- <?php
- require 'vendor/autoload.php';
- use GrapheneNodeClient\Commands\CommandQueryData;
- use GrapheneNodeClient\Commands\DataBase\GetContentCommand;
- use GrapheneNodeClient\Connectors\WebSocket\GolosWSConnector;
- $commandQuery = new CommandQueryData();
- if (isset ($_GET['page'])) {
- $data = ['golos-site',$_GET['page']]; // Делаем так, чтобы подгружались данные страницы, содержащей permlink из ?page=
- $commandQuery->setParams($data);
- $connector = new GolosWSConnector();
- $command = new GetContentCommand($connector);
- $res = $command->execute($commandQuery);
- ?>
- <title><?php echo $res['result']['title']; ?></title>
- <meta name="keywords" content="<?php echo $res['result']['title']; ?>" />
- <meta name="description" content="<?php echo $res['result']['title']; ?>" />
- <?php
- } else { // Главная
- $data = ['golos-site','glavnayaglavnaya']; // Делаем так, чтобы подгружались данные главной страницы
- $commandQuery->setParams($data);
- $connector = new GolosWSConnector();
- $command = new GetContentCommand($connector);
- $res = $command->execute($commandQuery);
- ?>
- <title><?php echo $res['result']['title']; ?></title>
- <meta name="keywords" content="<?php echo $res['result']['title']; ?>" />
- <meta name="description" content="<?php echo $res['result']['title']; ?>" />
- <?php } ?>
- <link href="style.css" rel="stylesheet">
- <style>
- /* Eric Meyer's CSS Reset */
- html, body, div, span, applet, object, iframe,
- h1, h2, h3, h4, h5, h6, p, blockquote, pre,
- a, abbr, acronym, address, big, cite, code,
- del, dfn, em, img, ins, kbd, q, s, samp,
- small, strike, strong, sub, sup, tt, var,
- b, u, i, center,
- dl, dt, dd, ol, ul, li,
- fieldset, form, label, legend,
- table, caption, tbody, tfoot, thead, tr, th, td,
- article, aside, canvas, details, embed,
- figure, figcaption, footer, header, hgroup,
- menu, nav, output, ruby, section, summary,
- time, mark, audio, video {
- margin: 0;
- padding: 0;
- border: 0;
- font-size: 100%;
- font: inherit;
- vertical-align: baseline;
- }
- /* HTML5 display-role reset for older browsers */
- article, aside, details, figcaption, figure,
- footer, header, hgroup, menu, nav, section {
- display: block;
- }
- body {
- line-height: 1;
- }
- ol, ul {
- list-style: none;
- }
- blockquote, q {
- quotes: none;
- }
- blockquote:before, blockquote:after,
- q:before, q:after {
- content: '';
- content: none;
- }
- table {
- border-collapse: collapse;
- border-spacing: 0;
- }
- /* End of Eric Meyer's CSS Reset */
- article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary {
- display: block;
- }
- body {
- font: 12px/18px Arial, sans-serif;
- }
- /* Begin of styles for the demo (you can remove them) */
- a.expand {
- width: 90px;
- display: block;
- margin: 10px 0 0;
- }
- a.expand:hover {
- height: 500px;
- }
- /* End of of styles for the demo */
- .wrapper {
- min-width: 400px;
- max-width: 1920px;
- margin: 0 auto;
- }
- /* Header
- -----------------------------------------------------------------------------*/
- .header {
- height: 150px;
- background: #FFE680;
- }
- /* Middle
- -----------------------------------------------------------------------------*/
- .middle {
- border-right: 250px solid #FFACAA;
- position: relative;
- }
- .middle:after {
- display: table;
- clear: both;
- content: '';
- }
- .container {
- width: 100%;
- float: left;
- overflow: hidden;
- margin-right: -100%;
- }
- .content {
- padding: 0 20px;
- }
- /* Right Sidebar
- -----------------------------------------------------------------------------*/
- .right-sidebar {
- float: right;
- margin-right: -250px;
- width: 250px;
- position: relative;
- background: #FFACAA;
- }
- /* Footer
- -----------------------------------------------------------------------------*/
- .footer {
- height: 100px;
- background: #BFF08E;
- }
- </style>
- </head>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement