| use Mojo::ByteStream 'b'; |
| |
| # $main::ENV{MOJO_MAX_LINE_SIZE} = 65536; |
| |
| { |
| 'Kalamar-Auth' => { |
| # client_id => b($app->home->child('.client_id')->slurp)->trim, |
| # client_secret => b($app->home->child('.client_secret')->slurp)->trim, |
| # Optimized for docker usage: |
| client_file => '/kalamar/super_client_info', |
| oauth2 => 1, |
| experimental_client_registration => 1 |
| }, |
| Kalamar => { |
| # Removed for docker compliance |
| # api_path => 'http://10.0.10.51:9000/api/', |
| log_path => $app->home . '/log', |
| secure_cookie => 1, |
| https_only => 1, |
| plugins => ['Auth', 'Piwik','Plugins'], |
| experimental_proxy => 1, |
| proxy_inactivity_timeout => 120, |
| proxy_connect_timeout => 120, |
| openapi => 'openapi', |
| Piwik => { |
| ping_requests => 1, |
| ping_site_id => 13 |
| }, |
| navi_ext => [ |
| { |
| "title" => "corpus", |
| "id" => "corpus", |
| "class" => "folded", |
| "items" => [ |
| { |
| "title" => "composition", |
| "id" => "composition" |
| }, |
| { |
| "title" => "useful_subcorpora", |
| "id" => "useful_subcorpora" |
| }, |
| { |
| "title" => "named_vc", |
| "id" => "named_vc" |
| } |
| ] |
| }, |
| { |
| "title" => "Privacy", |
| "id" => "privacy" |
| }, |
| { |
| "title" => "News", |
| "id" => "news" |
| }, |
| ], |
| defaults => { |
| alignment => 'center' # or 'right' or 'center' |
| }, |
| }, |
| CSP => { |
| 'frame-src' => 'self', |
| 'frame-ancestors' => ['self','http://*.ids-mannheim.de/','https://*.ids-mannheim.de/','http://klinux10/'] |
| }, |
| 'Kalamar-Plugins' => { |
| # Optimized for docker usage: |
| default_plugins => '/kalamar/default.plugins.json' |
| }, |
| Piwik => { |
| url => 'https://stats.ids-mannheim.de', |
| token_auth => '8515ea786127a63a2974de25a0808b00', |
| site_id => 8, |
| embed => 1 |
| }, |
| hypnotoad => { |
| listen => ['http://*:4348'], |
| workers => 5, |
| inactivity_timeout => 120, |
| proxy => 1 |
| }, |
| Localize => { |
| override => 1, |
| dict => { |
| de_loginExplanation => 'Anmeldung mit einem registrierten <%= link_to "Cosmas-II" => "https://perso.ids-mannheim.de/registration/", style => "white-space: nowrap" %>-Konto', |
| en_loginExplanation => 'Login with a registered <%= link_to "Cosmas-II" => "https://perso.ids-mannheim.de/registration/", style => "white-space: nowrap" %> account', |
| en_Nav_privacy => 'Privacy', |
| de_Nav_privacy => 'Datenschutz', |
| de_Nav_corpora => 'Korpora', |
| en_Nav_corpora => 'Corpora', |
| de_Nav_corpus => 'Korpus', |
| en_Nav_corpus => 'Corpus', |
| en_howToCite => 'Citation Help', |
| de_howToCite => 'Zitierhilfe', |
| en_recentCorpusPub => 'Recent publications to refer to DeReKo as linguistic research data', |
| de_recentCorpusPub => 'Neuere Publikationen zu DeReKo als linguistische Forschungsdatengrundlage', |
| en_recentToolPub => 'Recent publications to refer to KorAP as a research tool', |
| de_recentToolPub => 'Neuere Publikationen zu KorAP als Forschungswerkzeug', |
| de_usefulvcs => 'Nützliche virtuelle Sub-Korpora', |
| en_usefulvcs => 'Useful virtual sub-corpora', |
| de_currentdb => 'Aktuelle Datengrundlage: virtuelles Korpus <%= t code => stash("vc") %>', |
| en_currentdb => 'Current data set: Virtual corpus <%= t code => stash("vc") %>', |
| de_compositionbysource => 'Zusammensetzung nach Quelle', |
| en_compositionbysource => 'Composition by source', |
| #de_Title_composition => 'Korpus-Zusammensetzung', |
| #en_Title_composition => 'Corpus Composition', |
| en_Nav_composition => 'Composition', |
| de_Nav_composition => 'Zusammensetzung', |
| en_Nav_useful_subcorpora => 'Useful subcorpora', |
| de_Nav_useful_subcorpora => 'Nützliche Subkorpora', |
| en_Nav_named_vc => 'Named VC', |
| de_Nav_named_vc => 'Benamte VC', |
| } |
| }, |
| 'TagHelpers-ContentBlock' => { |
| footer => [ |
| { |
| inline => '<%= link_to loc("about") => "https://www.ids-mannheim.de/digspra/kl/projekte/korap/" %>', |
| position => 70 |
| }, |
| { |
| inline => '<%= link_to loc("news") => url_for(doc => {page => "news" }) %>', |
| position => 72 |
| }, |
| { |
| inline => '<%= link_to loc("howToCite") => url_for(doc => { page => "faq", scope => undef })->fragment("howToCite") %>', |
| position => 75 |
| }, |
| { |
| inline => '<%= link_to loc("privacy") => url_for(doc => { page => "privacy", scope => undef }) %>', |
| position => 90 |
| }, |
| { |
| inline => '<%= link_to loc("imprint") => "https://www.ids-mannheim.de/allgemein/impressum/" %>', |
| position => 80 |
| }, |
| ], |
| faq => [ |
| { |
| position => 50, |
| inline => <<'HOWTOCITE' |
| <section> |
| <h3 id="howToCite"><%= loc 'howToCite' %></h3> |
| %= include 'custom/partial/citation' |
| </section> |
| HOWTOCITE |
| } |
| ], |
| loginInfo => [ |
| { |
| inline => '<p><%== loc "loginExplanation" %></p>', |
| position => 50 |
| }#, |
| # { |
| # inline => '<p class="announcement"><time datetime="2018-05-24">24.05.2018</time> Um weitere Anwendungen für die Nutzung von DeReKo anbieten zu können, haben wir die <%= link_to "Nutzungsvereinbarung", "https://www.ids-mannheim.de/cosmas2/projekt/registrierung/Nutzungsvereinbarung.html" %> angepasst!</p>', |
| # position => 100 |
| # } |
| ], |
| headerButtonGroup => [ |
| { |
| inline => '<h3 class="nav-link"><%= link_to loc("news") => url_for(doc => {page => "news", scope => undef }) %></h3>', |
| position => 30 |
| } |
| ] |
| }, |
| # See Mojolicious::Plugin::CHI |
| # Could be optimized to use the data folder in docker scenarios: |
| # CHI => { |
| # default => { |
| # driver => 'FastMmap', |
| # root_dir => app->home . '/cache/data', |
| # cache_size => '500m', |
| # max_size => '500m' |
| # }, |
| # user => { |
| # l1_cache => { |
| # driver => 'FastMmap', |
| # root_dir => app->home . '/cache/usermap', |
| # cache_size => '50m', |
| # max_size => '50m' |
| # }, |
| # driver => 'File', |
| # root_dir => app->home . '/cache/userfile', |
| # max_key_length => 64, |
| # max_size => '500m' |
| # } |
| # } |
| }; |