commit ca58413bdaddad172d03ab1f34e7869471183d99 Author: Alex 'AdUser' Z Date: Sun Jan 3 14:47:30 2016 +1000 + add Statocles-specific files diff --git a/site.yml b/site.yml new file mode 100644 index 0000000..2101a34 --- /dev/null +++ b/site.yml @@ -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 diff --git a/theme/blog/index.atom.ep b/theme/blog/index.atom.ep new file mode 100644 index 0000000..9420e82 --- /dev/null +++ b/theme/blog/index.atom.ep @@ -0,0 +1,33 @@ + + + <%= $site->url($self->links('alternate')->href) %> + <%= $site->title %> + <%= Time::Piece->new->strftime('%Y-%m-%dT%H:%M:%SZ') %> + + + Statocles + % for my $p (@{ $pages }) { + + <%= $site->url($p->path) %> + <%= $p->title %> + % if ($p->author) { + <%= $p->author %> + % } + + sections; + <%= $sections[0] %> +

Далее...

+

Теги: + % for my $tag ($p->tags) { + <%= $tag->text %> + % } +

+ ]]>
+ <%= $p->date->strftime('%Y-%m-%dT%H:%M:%SZ') %> + % for my $t ($p->tags) { + + % } +
+ % } +
diff --git a/theme/blog/index.html.ep b/theme/blog/index.html.ep new file mode 100644 index 0000000..a5916b2 --- /dev/null +++ b/theme/blog/index.html.ep @@ -0,0 +1,44 @@ +% if (my $tag_text = $self->data->{tag_text}) { +

<%= $tag_text %>

+% } +% for my $page (@$pages) { +
+

<%= $page->title %>

+ + % my @sections = $page->sections; + <%= $sections[0] %> + % if (@sections > 1) { +

→ Читать дальше...

+ % } + +
+ <%= $page->date->strftime('%Y-%m-%d') %> + % if ($page->author) { + <%= $page->author %> + % } + + % for my $tag ($page->tags) { + + % } + +
+
+% } + +
+ + | + +
+ +% if (my @links = $self->links('feed')) { +
+% for my $link (@links) { + <%= $link->text %> +% } +
+% } diff --git a/theme/blog/index.rss.ep b/theme/blog/index.rss.ep new file mode 100644 index 0000000..e02928b --- /dev/null +++ b/theme/blog/index.rss.ep @@ -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'); + + + + <%= $site->title %> + <%= $site->url($self->links('alternate')->href) %> + + Записи из <%= $site->title %> + Statocles <%= $Statocles::VERSION %> + % for my $p (@$pages) { + + <%= $p->title %> + <%= $site->url($p->path) %> + <%= $site->url($p->path) %> + sections; + <%= $sections[0] %> +

Далее...

+

Теги: + % for my $tag ($p->tags) { + <%= $tag->text %> + % } +

+ ]]>
+ <%= $p->date->strftime('%a, %d %b %Y %H:%M:%S ') . sprintf q{%+05d}, $p->date->tzoffset / 36 %> +
+ % } +
+
+% setlocale(LC_TIME, $current_locale); diff --git a/theme/blog/post.html.ep b/theme/blog/post.html.ep new file mode 100644 index 0000000..beb16e6 --- /dev/null +++ b/theme/blog/post.html.ep @@ -0,0 +1,20 @@ +
+% my @sections = $self->sections; +% for my $i ( 0..$#sections ) { + <%= $sections[$i] %> +% } + +
+% if ($self->author) { + <%= $self->author %> +% } +% if (my @tags = $self->tags) { + + % for my $tag (@tags) { + <%= $tag->text %> + % } + +% } +
+
+
diff --git a/theme/img/favicon.ico b/theme/img/favicon.ico new file mode 100644 index 0000000..8a9a120 Binary files /dev/null and b/theme/img/favicon.ico differ diff --git a/theme/img/favicon.png b/theme/img/favicon.png new file mode 100644 index 0000000..54b5284 Binary files /dev/null and b/theme/img/favicon.png differ diff --git a/theme/img/headbg.jpg b/theme/img/headbg.jpg new file mode 100644 index 0000000..5491c6e Binary files /dev/null and b/theme/img/headbg.jpg differ diff --git a/theme/img/images.png b/theme/img/images.png new file mode 100644 index 0000000..184860d Binary files /dev/null and b/theme/img/images.png differ diff --git a/theme/img/logo.png b/theme/img/logo.png new file mode 100644 index 0000000..3621801 Binary files /dev/null and b/theme/img/logo.png differ diff --git a/theme/img/pcreate.png b/theme/img/pcreate.png new file mode 100644 index 0000000..aa23dde Binary files /dev/null and b/theme/img/pcreate.png differ diff --git a/theme/img/pdownload.png b/theme/img/pdownload.png new file mode 100644 index 0000000..884ffd6 Binary files /dev/null and b/theme/img/pdownload.png differ diff --git a/theme/img/rss.png b/theme/img/rss.png new file mode 100644 index 0000000..1dc6ff3 Binary files /dev/null and b/theme/img/rss.png differ diff --git a/theme/img/tag.png b/theme/img/tag.png new file mode 100644 index 0000000..83ec984 Binary files /dev/null and b/theme/img/tag.png differ diff --git a/theme/img/time.png b/theme/img/time.png new file mode 100644 index 0000000..911da3f Binary files /dev/null and b/theme/img/time.png differ diff --git a/theme/img/upload.png b/theme/img/upload.png new file mode 100644 index 0000000..e4a1ecb Binary files /dev/null and b/theme/img/upload.png differ diff --git a/theme/img/user.png b/theme/img/user.png new file mode 100644 index 0000000..30383c2 Binary files /dev/null and b/theme/img/user.png differ diff --git a/theme/site/layout.html.ep b/theme/site/layout.html.ep new file mode 100644 index 0000000..e0c62c1 --- /dev/null +++ b/theme/site/layout.html.ep @@ -0,0 +1,43 @@ + + + + + + + + <%= $self->title ? $self->title . ' - ' : '' %><%= $site->title %> +% for my $link ($self->links('feed')) { + +% } + + +
+ + + +
+% if ($self->title) { +

<%= $self->title %>

+% } +%= $content +
+ +
+ + + + + + diff --git a/theme/site/robots.txt.ep b/theme/site/robots.txt.ep new file mode 100644 index 0000000..ddf4fba --- /dev/null +++ b/theme/site/robots.txt.ep @@ -0,0 +1,4 @@ +Sitemap: <%= $site->url('sitemap.xml') %> +User-Agent: * +Disallow: + diff --git a/theme/site/sitemap.xml.ep b/theme/site/sitemap.xml.ep new file mode 100644 index 0000000..13e9ef2 --- /dev/null +++ b/theme/site/sitemap.xml.ep @@ -0,0 +1,11 @@ + + +% for my $page (@$pages) { + + <%= $site->url($page->path) %> + <%= $page->search_change_frequency %> + <%= $page->search_priority %> + <%= $page->date->strftime('%Y-%m-%d') %> + +% } +