Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The djet.xyz site itself. Powered by Djet of course.
- Loading branch information
Showing
38 changed files
with
19,674 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env perl | ||
use 5.010; | ||
use strict; | ||
use warnings; | ||
|
||
use Plack::Builder; | ||
|
||
use Djet::Starter; | ||
|
||
my $djet = Djet::Starter->new; | ||
my $session_handler = $djet->session_handler; | ||
|
||
builder { | ||
enable 'Session', store => $session_handler; | ||
enable 'ConditionalGET'; | ||
enable 'Plack::Middleware::AccessLog::Timed', format => '%v %h %l %u %t \"%r\" %>s %b %D'; | ||
enable 'Image::Scale', path => qr{^/(img)/}, flags => { fit => 1 }; | ||
enable 'Static', path => qr{^/css|fonts|images|js/}, root => './public/', pass_through => 1; | ||
enable 'Static', path => qr{^/css|fonts|images|js/}, root => '../../public/'; | ||
enable 'Static', path => qr{^/img/}, root => './public/', pass_through => 1; | ||
enable 'Static', path => qr{^/img/}, root => '../Djet/public/'; | ||
mount "/favicon.ico" => Plack::App::File->new(file => 'public/favicon.ico'); | ||
mount "/" => $djet->app; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
model_name Djet::Model | ||
connect_info dbi:Pg:dbname=djet.xyz | ||
connect_info | ||
connect_info | ||
<connect_info> | ||
AutoCommit 1 | ||
RaiseError 1 | ||
</connect_info> | ||
template_path templates/ | ||
template_suffix .tx | ||
<paths> | ||
<image> | ||
url images | ||
file public/images/ | ||
</image> | ||
</paths> | ||
<mail> | ||
transport [ SMTP ] | ||
<transport> | ||
host smtp.djet.xyz | ||
</transport> | ||
</mail> | ||
<djet_config> | ||
payload_class Djetsite::Payload | ||
</djet_config> | ||
fts_config english | ||
environment live | ||
language en |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
environment dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package Djetsite::Engine::Pod; | ||
|
||
use 5.010; | ||
use Moose; | ||
|
||
use Pod::Simple::XHTML; | ||
use Pod::Simple::Search; | ||
|
||
extends 'Djet::Engine::Default'; | ||
with qw/Djet::Part::List/; | ||
|
||
=head1 NAME | ||
Djetsite::Engine::Pod | ||
=head1 DESCRIPTION | ||
Renders pod as web pages for the Djet.xyz site | ||
=head1 METHODS | ||
=head2 to_html | ||
=cut | ||
|
||
before to_html => sub { | ||
my $self = shift; | ||
my $stash = $self->stash; | ||
my $search = Pod::Simple::Search->new; | ||
|
||
my $module = $self->rest_path || 'Djet::Manual'; | ||
return unless my $path = $search->find($module); | ||
|
||
my $p = Pod::Simple::XHTML->new; | ||
$p->$_('') for qw(html_header html_footer); | ||
$p->output_string(\my $html); | ||
$p->html_encode_chars('&<>">'); | ||
$p->perldoc_url_prefix("./"); | ||
$p->index(1); | ||
$p->backlink(1); | ||
$p->parse_file($path); | ||
$stash->{title} = $module; | ||
$stash->{pod} = $html; | ||
}; | ||
|
||
__PACKAGE__->meta->make_immutable; | ||
|
||
# COPYRIGHT | ||
|
||
__END__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package Djetsite::Payload; | ||
|
||
use 5.010; | ||
use Moose; | ||
|
||
extends 'Djet::Payload'; | ||
|
||
with qw/ | ||
Djet::Part::Topmenu | ||
/; | ||
|
||
=head1 NAME | ||
Jasonic::Payload. | ||
=head1 DESCRIPTION | ||
The payload of Djetsite. | ||
=cut | ||
|
||
__PACKAGE__->meta->make_immutable; | ||
|
||
# COPYRIGHT | ||
|
||
__END__ |
Oops, something went wrong.