Permalink
Browse files

Merge remote-tracking branch 'origin/Site'

  • Loading branch information...
kberov committed Oct 12, 2018
2 parents da2a767 + b810f08 commit 7a76e5b176fa494e0606ed0d37f6a0978f5524ba
Showing with 17 additions and 3 deletions.
  1. +5 −0 Changes
  2. +10 −2 lib/Slovo.pm
  3. +1 −1 lib/Slovo/resources/public/css/fonts.css
  4. +1 −0 t/005_site.t
@@ -1,5 +1,10 @@
Revision history for Mojolicious application Slovo

2018.10.12
- Features
(Hopefully temporarily) added new media types for woff and woff2 font
file formats.

2018.10.11
- Changes
Replaced 'Menaion Unicode TT' with 'Bukyvede' as the latter has the
@@ -17,7 +17,7 @@ use Slovo::Controller;
use Slovo::Validator;

our $AUTHORITY = 'cpan:BEROV';
our $VERSION = '2018.10.11';
our $VERSION = '2018.10.12';
our $CODENAME = 'U+2C10 GLAGOLITIC CAPITAL LETTER NASHI (Ⱀ)';
my $CLASS = __PACKAGE__;

@@ -33,7 +33,8 @@ sub startup($app) {
## no critic qw(Subroutines::ProtectPrivateSubs)
$app->hook(before_dispatch => \&_before_dispatch);
$app->hook(around_dispatch => \&_around_dispatch);
$app->_set_routes_attrs->_load_config->_load_pugins->_default_paths();
$app->_set_routes_attrs->_load_config->_load_pugins->_default_paths
->_add_media_types();
return $app;
}

@@ -164,6 +165,13 @@ sub _set_routes_attrs ($app) {
return $app;
}

# Add more media types
sub _add_media_types($app) {
$app->types->type(woff => ['application/font-woff', 'font/woff']);
$app->types->type(woff2 => ['application/font-woff2', 'font/woff2']);
return $app;
}

sub load_class ($app, $class) {
state $log = $app->log;
$log->debug("Loading $class");
@@ -49,7 +49,7 @@ header.mui-appbar .mui--text-title, footer.mui-appbar, #sidedrawer {
}

main, main section, article {
font-family: Veleka, FreeSerif serif;
font-family: Veleka, FreeSerif, BukyvedeRegular, serif;
}

.блъгарьскъ {
@@ -12,6 +12,7 @@ my $t = Test::Mojo->with_roles('+Slovo')->install(
#'.' => '/tmp/slovo'
)->new('Slovo');
my $app = $t->app;

# like in production
$app->config->{cache_pages} = 1;
my $not_found = sub {

0 comments on commit 7a76e5b

Please sign in to comment.