@ -0,0 +1,80 @@
|
||||
--- |
||||
# apps section |
||||
articles_app: |
||||
args: |
||||
store: articles |
||||
url_root: /articles |
||||
class: Statocles::App::Blog |
||||
events_app: |
||||
args: |
||||
store: events |
||||
url_root: /events |
||||
class: Statocles::App::Basic |
||||
pages_app: |
||||
args: |
||||
store: pages |
||||
url_root: /pages |
||||
class: Statocles::App::Basic |
||||
projects_app: |
||||
args: |
||||
store: projects |
||||
url_root: /projects |
||||
class: Statocles::App::Basic |
||||
topdir_app: |
||||
args: |
||||
store: topdir |
||||
url_root: / |
||||
class: Statocles::App::Basic |
||||
# deploy section |
||||
deploy: |
||||
args: |
||||
path: html |
||||
class: Statocles::Deploy::File |
||||
# site section |
||||
site: |
||||
args: |
||||
apps: |
||||
articles: |
||||
$ref: articles_app |
||||
events: |
||||
$ref: events_app |
||||
pages: |
||||
$ref: pages_app |
||||
projects: |
||||
$ref: projects_app |
||||
topdir: |
||||
$ref: topdir_app |
||||
base_url: https://linuxdv.org |
||||
deploy: |
||||
$ref: deploy |
||||
nav: |
||||
main: |
||||
- href: / |
||||
title: Главная |
||||
- href: /articles/ |
||||
title: Статьи |
||||
- href: /events/ |
||||
title: События |
||||
- href: /projects/ |
||||
title: Проекты |
||||
- href: /pages/services/ |
||||
title: Сервисы |
||||
- href: /pages/links/ |
||||
title: Ссылки |
||||
- href: /forum/ |
||||
title: Форум |
||||
theme: |
||||
$ref: theme |
||||
title: Linux во Владивостоке |
||||
markdown: |
||||
$class: Text::MultiMarkdown |
||||
class: Statocles::Site |
||||
on: |
||||
- build: |
||||
$class: Statocles::Plugin::LinkCheck |
||||
$sub: check_pages |
||||
# theme section |
||||
theme: |
||||
args: |
||||
store: theme |
||||
class: Statocles::Theme |
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0"?> |
||||
<feed xmlns="http://www.w3.org/2005/Atom"> |
||||
<id><%= $site->url($self->links('alternate')->href) %></id> |
||||
<title><%= $site->title %></title> |
||||
<updated><%= Time::Piece->new->strftime('%Y-%m-%dT%H:%M:%SZ') %></updated> |
||||
<link rel="self" href="<%= $site->url($self->path) %>"/> |
||||
<link rel="alternate" href="<%= $site->url($self->links('alternate')->href) %>"/> |
||||
<generator version="<%= $Statocles::VERSION %>">Statocles</generator> |
||||
% for my $p (@{ $pages }) { |
||||
<entry> |
||||
<id><%= $site->url($p->path) %></id> |
||||
<title><%= $p->title %></title> |
||||
% if ($p->author) { |
||||
<author><name><%= $p->author %></name></author> |
||||
% } |
||||
<link rel="alternate" href="<%= $site->url($p->path) %>" /> |
||||
<content type="html"><![CDATA[ |
||||
% my @sections = $p->sections; |
||||
<%= $sections[0] %> |
||||
<p><a href="<%= $site->url($p->path) %>#section-2">Далее...</a></p> |
||||
<p>Теги: |
||||
% for my $tag ($p->tags) { |
||||
<a href="<%= $tag->href %>"><%= $tag->text %></a> |
||||
% } |
||||
</p> |
||||
]]></content> |
||||
<updated><%= $p->date->strftime('%Y-%m-%dT%H:%M:%SZ') %></updated> |
||||
% for my $t ($p->tags) { |
||||
<category term="<%= $t->text %>" /> |
||||
% } |
||||
</entry> |
||||
% } |
||||
</feed> |
@ -0,0 +1,44 @@
|
||||
% if (my $tag_text = $self->data->{tag_text}) { |
||||
<p><%= $tag_text %></p> |
||||
% } |
||||
% for my $page (@$pages) { |
||||
<div class="article"> |
||||
<h2><a class="header" href="<%= $app->page_url($page) %>"><%= $page->title %></a></h2> |
||||
|
||||
% my @sections = $page->sections; |
||||
<%= $sections[0] %> |
||||
% if (@sections > 1) { |
||||
<p><a href="<%= $app->page_url($page) %>#section-2">→ Читать дальше...</a></p> |
||||
% } |
||||
|
||||
<div class="bottom_bar"> |
||||
<span class="date"><%= $page->date->strftime('%Y-%m-%d') %></span> |
||||
% if ($page->author) { |
||||
<span class="user"><%= $page->author %></span> |
||||
% } |
||||
<span class="tags"> |
||||
% for my $tag ($page->tags) { |
||||
<a href="<%= $tag->href %>" rel="tag"><%= $tag->text %></a> |
||||
% } |
||||
</span> |
||||
</div> |
||||
</div> |
||||
% } |
||||
|
||||
<div class="pager"> |
||||
<a class="button next <%= $self->prev ? 'button-primary' : 'disabled' %>" |
||||
rel="prev" href="<%= $self->prev // '' %>">← Следующие |
||||
</a> |
||||
| |
||||
<a class="button prev <%= $self->next ? 'button-primary' : 'disabled' %>" |
||||
rel="next" href="<%= $self->next // '' %>">Предыдущие → |
||||
</a> |
||||
</div> |
||||
|
||||
% if (my @links = $self->links('feed')) { |
||||
<div class="feeds"> |
||||
% for my $link (@links) { |
||||
<a href="<%= $link->href %>" rel="alternate" type="<%= $link->type %>"><%= $link->text %></a> |
||||
% } |
||||
</div> |
||||
% } |
@ -0,0 +1,34 @@
|
||||
%# RSS requires date/time in the 'C' locale as per RFC822. strftime() is one of |
||||
%# the few things that actually cares about locale. |
||||
% use POSIX qw(locale_h); |
||||
% my $current_locale = setlocale(LC_TIME); |
||||
% setlocale(LC_TIME, 'C'); |
||||
<?xml version="1.0"?> |
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> |
||||
<channel> |
||||
<title><%= $site->title %></title> |
||||
<link><%= $site->url($self->links('alternate')->href) %></link> |
||||
<atom:link href="<%= $site->url($self->path) %>" rel="self" type="application/rss+xml" /> |
||||
<description>Записи из <%= $site->title %></description> |
||||
<generator>Statocles <%= $Statocles::VERSION %></generator> |
||||
% for my $p (@$pages) { |
||||
<item> |
||||
<title><%= $p->title %></title> |
||||
<link><%= $site->url($p->path) %></link> |
||||
<guid><%= $site->url($p->path) %></guid> |
||||
<description><![CDATA[ |
||||
% my @sections = $p->sections; |
||||
<%= $sections[0] %> |
||||
<p><a href="<%= $site->url($p->path) %>#section-2">Далее...</a></p> |
||||
<p>Теги: |
||||
% for my $tag ($p->tags) { |
||||
<a href="<%= $tag->href %>"><%= $tag->text %></a> |
||||
% } |
||||
</p> |
||||
]]></description> |
||||
<pubDate><%= $p->date->strftime('%a, %d %b %Y %H:%M:%S ') . sprintf q{%+05d}, $p->date->tzoffset / 36 %></pubDate> |
||||
</item> |
||||
% } |
||||
</channel> |
||||
</rss> |
||||
% setlocale(LC_TIME, $current_locale); |
@ -0,0 +1,20 @@
|
||||
<div class="article"> |
||||
% my @sections = $self->sections; |
||||
% for my $i ( 0..$#sections ) { |
||||
<%= $sections[$i] %> |
||||
% } |
||||
|
||||
<div class="bottom_bar"> |
||||
% if ($self->author) { |
||||
<span class="user"><%= $self->author %></span> |
||||
% } |
||||
% if (my @tags = $self->tags) { |
||||
<span class="tags"> |
||||
% for my $tag (@tags) { |
||||
<a href="<%= $tag->href %>"><%= $tag->text %></a> |
||||
% } |
||||
</span> |
||||
% } |
||||
</div> |
||||
<div id="comments"><!-- loaded with ajax --></div> |
||||
</div> |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 7.7 KiB |
After Width: | Height: | Size: 661 B |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 512 B |
After Width: | Height: | Size: 523 B |
After Width: | Height: | Size: 530 B |
After Width: | Height: | Size: 613 B |
After Width: | Height: | Size: 793 B |
After Width: | Height: | Size: 516 B |
After Width: | Height: | Size: 722 B |
@ -0,0 +1,43 @@
|
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
||||
<meta name="generator" content="statocles" /> |
||||
<link rel="shortcut icon" href="/theme/img/favicon.ico" /> |
||||
<link rel="stylesheet" href="/theme/css/default.css" type="text/css" /> |
||||
<title><%= $self->title ? $self->title . ' - ' : '' %><%= $site->title %></title> |
||||
% for my $link ($self->links('feed')) { |
||||
<link rel="alternate" href="<%= $link->href %>" type="<%= $link->type %>" /> |
||||
% } |
||||
</head> |
||||
<body> |
||||
<div id="main"> |
||||
|
||||
<div id="sidebar"> |
||||
<a href="/" id="home"> |
||||
<img src="/theme/img/logo.png" style="border: 0px; margin: 2px 10px;"> |
||||
</a> |
||||
<h5>Навигация:</h5> |
||||
<ul id="sidenav" class="ui-block"> |
||||
% my @nav_links = $site->nav('main'); |
||||
% for my $nav (@nav_links) { |
||||
<li><a href="<%= $nav->href %>"><%= $nav->text %></a></li> |
||||
% } |
||||
</ul> |
||||
</div> |
||||
|
||||
<div id="content" class="ui-block"> |
||||
% if ($self->title) { |
||||
<h1><%= $self->title %></h1> |
||||
% } |
||||
%= $content |
||||
</div> |
||||
|
||||
</div> |
||||
|
||||
<div id="footer" class="ui-block"> |
||||
</div> |
||||
<script type="text/javascript" src="/theme/js/jquery.js"></script> |
||||
<script type="text/javascript" src="/theme/js/main.js"></script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,4 @@
|
||||
Sitemap: <%= $site->url('sitemap.xml') %> |
||||
User-Agent: * |
||||
Disallow: |
||||
|
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?> |
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> |
||||
% for my $page (@$pages) { |
||||
<url> |
||||
<loc><%= $site->url($page->path) %></loc> |
||||
<changefreq><%= $page->search_change_frequency %></changefreq> |
||||
<priority><%= $page->search_priority %></priority> |
||||
<lastmod><%= $page->date->strftime('%Y-%m-%d') %></lastmod> |
||||
</url> |
||||
% } |
||||
</urlset> |