| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 1 | use Mojo::ByteStream 'b'; |
| Akron | 85559f0 | 2023-09-04 11:42:45 +0200 | [diff] [blame] | 2 | |
| Marc Kupietz | a167502 | 2026-01-19 18:52:47 +0100 | [diff] [blame^] | 3 | # $main::ENV{MOJO_MAX_LINE_SIZE} = 65536; |
| Akron | 85559f0 | 2023-09-04 11:42:45 +0200 | [diff] [blame] | 4 | |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 5 | { |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 6 | 'Kalamar-Auth' => { |
| Marc Kupietz | a167502 | 2026-01-19 18:52:47 +0100 | [diff] [blame^] | 7 | # client_id => b($app->home->child('.client_id')->slurp)->trim, |
| 8 | # client_secret => b($app->home->child('.client_secret')->slurp)->trim, |
| 9 | # Optimized for docker usage: |
| 10 | client_file => '/kalamar/super_client_info', |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 11 | oauth2 => 1, |
| 12 | experimental_client_registration => 1 |
| 13 | }, |
| 14 | Kalamar => { |
| Marc Kupietz | a167502 | 2026-01-19 18:52:47 +0100 | [diff] [blame^] | 15 | # Removed for docker compliance |
| 16 | # api_path => 'http://10.0.10.51:9000/api/', |
| Akron | 4a11874 | 2023-09-04 11:41:46 +0200 | [diff] [blame] | 17 | log_path => $app->home . '/log', |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 18 | secure_cookie => 1, |
| 19 | https_only => 1, |
| 20 | plugins => ['Auth', 'Piwik','Plugins'], |
| 21 | experimental_proxy => 1, |
| 22 | proxy_inactivity_timeout => 120, |
| 23 | proxy_connect_timeout => 120, |
| Akron | 8ceba02 | 2024-04-18 09:18:53 +0200 | [diff] [blame] | 24 | openapi => 'openapi', |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 25 | Piwik => { |
| 26 | ping_requests => 1, |
| 27 | ping_site_id => 13 |
| 28 | }, |
| 29 | navi_ext => [ |
| 30 | { |
| Akron | 5664405 | 2026-01-19 15:27:48 +0100 | [diff] [blame] | 31 | "title" => "corpus", |
| 32 | "id" => "corpus", |
| 33 | "class" => "folded", |
| 34 | "items" => [ |
| 35 | { |
| 36 | "title" => "composition", |
| 37 | "id" => "composition" |
| 38 | }, |
| 39 | { |
| 40 | "title" => "useful_subcorpora", |
| 41 | "id" => "useful_subcorpora" |
| 42 | }, |
| 43 | { |
| 44 | "title" => "named_vc", |
| 45 | "id" => "named_vc" |
| 46 | } |
| 47 | ] |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 48 | }, |
| 49 | { |
| 50 | "title" => "Privacy", |
| 51 | "id" => "privacy" |
| 52 | }, |
| Akron | 8dbf9c6 | 2024-03-20 17:24:15 +0100 | [diff] [blame] | 53 | { |
| 54 | "title" => "News", |
| 55 | "id" => "news" |
| 56 | }, |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 57 | ], |
| Marc Kupietz | a167502 | 2026-01-19 18:52:47 +0100 | [diff] [blame^] | 58 | defaults => { |
| 59 | alignment => 'center' # or 'right' or 'center' |
| 60 | }, |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 61 | }, |
| 62 | CSP => { |
| 63 | 'frame-src' => 'self', |
| 64 | 'frame-ancestors' => ['self','http://*.ids-mannheim.de/','https://*.ids-mannheim.de/','http://klinux10/'] |
| 65 | }, |
| 66 | 'Kalamar-Plugins' => { |
| Marc Kupietz | a167502 | 2026-01-19 18:52:47 +0100 | [diff] [blame^] | 67 | # Optimized for docker usage: |
| 68 | default_plugins => '/kalamar/default.plugins.json' |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 69 | }, |
| 70 | Piwik => { |
| 71 | url => 'https://stats.ids-mannheim.de', |
| 72 | token_auth => '8515ea786127a63a2974de25a0808b00', |
| 73 | site_id => 8, |
| 74 | embed => 1 |
| 75 | }, |
| 76 | hypnotoad => { |
| 77 | listen => ['http://*:4348'], |
| 78 | workers => 5, |
| 79 | inactivity_timeout => 120, |
| 80 | proxy => 1 |
| 81 | }, |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 82 | Localize => { |
| Marc Kupietz | a167502 | 2026-01-19 18:52:47 +0100 | [diff] [blame^] | 83 | override => 1, |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 84 | dict => { |
| 85 | de_loginExplanation => 'Anmeldung mit einem registrierten <%= link_to "Cosmas-II" => "https://perso.ids-mannheim.de/registration/", style => "white-space: nowrap" %>-Konto', |
| 86 | en_loginExplanation => 'Login with a registered <%= link_to "Cosmas-II" => "https://perso.ids-mannheim.de/registration/", style => "white-space: nowrap" %> account', |
| 87 | en_Nav_privacy => 'Privacy', |
| 88 | de_Nav_privacy => 'Datenschutz', |
| 89 | de_Nav_corpora => 'Korpora', |
| 90 | en_Nav_corpora => 'Corpora', |
| Marc Kupietz | a167502 | 2026-01-19 18:52:47 +0100 | [diff] [blame^] | 91 | de_Nav_corpus => 'Korpus', |
| 92 | en_Nav_corpus => 'Corpus', |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 93 | en_howToCite => 'Citation Help', |
| 94 | de_howToCite => 'Zitierhilfe', |
| 95 | en_recentCorpusPub => 'Recent publications to refer to DeReKo as linguistic research data', |
| 96 | de_recentCorpusPub => 'Neuere Publikationen zu DeReKo als linguistische Forschungsdatengrundlage', |
| Akron | bd2b957 | 2023-09-04 11:26:19 +0200 | [diff] [blame] | 97 | en_recentToolPub => 'Recent publications to refer to KorAP as a research tool', |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 98 | de_recentToolPub => 'Neuere Publikationen zu KorAP als Forschungswerkzeug', |
| Marc Kupietz | 152dfc9 | 2025-04-11 10:02:27 +0200 | [diff] [blame] | 99 | de_usefulvcs => 'Nützliche virtuelle Sub-Korpora', |
| 100 | en_usefulvcs => 'Useful virtual sub-corpora', |
| 101 | de_currentdb => 'Aktuelle Datengrundlage: virtuelles Korpus <%= t code => stash("vc") %>', |
| 102 | en_currentdb => 'Current data set: Virtual corpus <%= t code => stash("vc") %>', |
| 103 | de_compositionbysource => 'Zusammensetzung nach Quelle', |
| 104 | en_compositionbysource => 'Composition by source', |
| Marc Kupietz | a167502 | 2026-01-19 18:52:47 +0100 | [diff] [blame^] | 105 | #de_Title_composition => 'Korpus-Zusammensetzung', |
| 106 | #en_Title_composition => 'Corpus Composition', |
| Akron | 5664405 | 2026-01-19 15:27:48 +0100 | [diff] [blame] | 107 | en_Nav_composition => 'Composition', |
| 108 | de_Nav_composition => 'Zusammensetzung', |
| 109 | en_Nav_useful_subcorpora => 'Useful subcorpora', |
| 110 | de_Nav_useful_subcorpora => 'Nützliche Subkorpora', |
| 111 | en_Nav_named_vc => 'Named VC', |
| 112 | de_Nav_named_vc => 'Benamte VC', |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 113 | } |
| 114 | }, |
| 115 | 'TagHelpers-ContentBlock' => { |
| 116 | footer => [ |
| 117 | { |
| 118 | inline => '<%= link_to loc("about") => "https://www.ids-mannheim.de/digspra/kl/projekte/korap/" %>', |
| 119 | position => 70 |
| 120 | }, |
| 121 | { |
| Marc Kupietz | a167502 | 2026-01-19 18:52:47 +0100 | [diff] [blame^] | 122 | inline => '<%= link_to loc("news") => url_for(doc => {page => "news" }) %>', |
| 123 | position => 72 |
| 124 | }, |
| 125 | { |
| Akron | dc1b9bb | 2025-07-21 14:34:05 +0200 | [diff] [blame] | 126 | inline => '<%= link_to loc("howToCite") => url_for(doc => { page => "faq", scope => undef })->fragment("howToCite") %>', |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 127 | position => 75 |
| 128 | }, |
| 129 | { |
| Akron | dc1b9bb | 2025-07-21 14:34:05 +0200 | [diff] [blame] | 130 | inline => '<%= link_to loc("privacy") => url_for(doc => { page => "privacy", scope => undef }) %>', |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 131 | position => 90 |
| 132 | }, |
| 133 | { |
| 134 | inline => '<%= link_to loc("imprint") => "https://www.ids-mannheim.de/allgemein/impressum/" %>', |
| 135 | position => 80 |
| 136 | }, |
| 137 | ], |
| 138 | faq => [ |
| 139 | { |
| 140 | position => 50, |
| 141 | inline => <<'HOWTOCITE' |
| 142 | <section> |
| 143 | <h3 id="howToCite"><%= loc 'howToCite' %></h3> |
| 144 | %= include 'custom/partial/citation' |
| 145 | </section> |
| 146 | HOWTOCITE |
| 147 | } |
| 148 | ], |
| 149 | loginInfo => [ |
| 150 | { |
| 151 | inline => '<p><%== loc "loginExplanation" %></p>', |
| 152 | position => 50 |
| 153 | }#, |
| 154 | # { |
| 155 | # 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>', |
| 156 | # position => 100 |
| 157 | # } |
| Akron | 743c2d6 | 2025-03-05 14:37:59 +0100 | [diff] [blame] | 158 | ], |
| 159 | headerButtonGroup => [ |
| 160 | { |
| Akron | dc1b9bb | 2025-07-21 14:34:05 +0200 | [diff] [blame] | 161 | inline => '<h3 class="nav-link"><%= link_to loc("news") => url_for(doc => {page => "news", scope => undef }) %></h3>', |
| Akron | 743c2d6 | 2025-03-05 14:37:59 +0100 | [diff] [blame] | 162 | position => 30 |
| 163 | } |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 164 | ] |
| 165 | }, |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 166 | # See Mojolicious::Plugin::CHI |
| Marc Kupietz | a167502 | 2026-01-19 18:52:47 +0100 | [diff] [blame^] | 167 | # Could be optimized to use the data folder in docker scenarios: |
| 168 | # CHI => { |
| 169 | # default => { |
| 170 | # driver => 'FastMmap', |
| 171 | # root_dir => app->home . '/cache/data', |
| 172 | # cache_size => '500m', |
| 173 | # max_size => '500m' |
| 174 | # }, |
| 175 | # user => { |
| 176 | # l1_cache => { |
| 177 | # driver => 'FastMmap', |
| 178 | # root_dir => app->home . '/cache/usermap', |
| 179 | # cache_size => '50m', |
| 180 | # max_size => '50m' |
| 181 | # }, |
| 182 | # driver => 'File', |
| 183 | # root_dir => app->home . '/cache/userfile', |
| 184 | # max_key_length => 64, |
| 185 | # max_size => '500m' |
| 186 | # } |
| 187 | # } |
| Akron | c71176d | 2022-03-14 11:15:07 +0100 | [diff] [blame] | 188 | }; |