Introduced content blocks for flexible footer entries
Change-Id: I737e0b01cbcbd20fe10a920b9644662f3b1629f0
diff --git a/Changes b/Changes
index dad131a..4811a5f 100755
--- a/Changes
+++ b/Changes
@@ -1,3 +1,7 @@
+0.27 2018-05-23
+ - Introduced content blocks to create
+ flexible entry lists in the footer
+
0.26 2018-04-06
- Added meta data view.
- Attach reference line to match bottom.
diff --git a/Makefile.PL b/Makefile.PL
index f85a1bd..4e0c0d6 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -20,6 +20,7 @@
PREREQ_PM => {
'Mojolicious' => '7.66',
'Mojolicious::Plugin::TagHelpers::Pagination' => 0.06,
+ 'Mojolicious::Plugin::TagHelpers::ContentBlock' => 0.05,
'Mojolicious::Plugin::TagHelpers::MailToChiffre' => 0.09,
'Mojolicious::Plugin::ClosedRedirect' => 0.13,
'Mojolicious::Plugin::Notifications' => 1.01,
diff --git a/README.md b/README.md
index 6fe7c2b..479f12c 100644
--- a/README.md
+++ b/README.md
@@ -5,8 +5,6 @@
![Kalamar Screenshots](https://raw.githubusercontent.com/KorAP/Kalamar/master/dev/demo/img/screenshots.png)
-**! This software is in its early stages and not stable yet! Use it on your own risk!**
-
## INSTALLATION
### Setup
@@ -60,6 +58,7 @@
```
$ cpanm git://github.com/Akron/Mojolicious-Plugin-Search.git
$ cpanm git://github.com/Akron/Mojolicious-Plugin-Localize.git
+$ cpanm git://github.com/Akron/Mojolicious-Plugin-TagHelpers-ContentBlock.git
```
Then install the dependencies using
diff --git a/dev/scss/footer/footer.scss b/dev/scss/footer/footer.scss
index 21d79a9..663510c 100644
--- a/dev/scss/footer/footer.scss
+++ b/dev/scss/footer/footer.scss
@@ -11,14 +11,20 @@
font-size: 70%;
width: 100%;
text-align: right;
- a:link {
- margin: 0 .5em;
- color: $light-grey;
- }
- a:visited {
- color: $light-grey;
- }
- a:hover {
- color: $nearly-white;
+ a {
+ &:link {
+ margin: 0 .5em;
+ color: $light-grey;
+ }
+ &:visited {
+ color: $light-grey;
+ }
+ &:hover {
+ color: $nearly-white;
+ }
+ &[href^="http://"]::after,
+ &[href^="https://"]::after {
+ content: none
+ }
}
}
diff --git a/kalamar.conf b/kalamar.conf
index e6531fc..ada47bb 100644
--- a/kalamar.conf
+++ b/kalamar.conf
@@ -22,6 +22,8 @@
# See Mojolicious::Plugin::Search
# - Localize
# See Mojolicious::Plugin::Localize
+# - TagHelpers-ContentBlock
+# See Mojolicious::Plugin::TagHelpers::ContentBlock
# The default Kustvakt api endpoint
my $api = 'http://localhost:9999/api/';
diff --git a/kalamar.dict b/kalamar.dict
index 9ad8b48..8229566 100644
--- a/kalamar.dict
+++ b/kalamar.dict
@@ -54,6 +54,8 @@
desc => 'KorAP - Korpusanalyseplattform der nächsten Generation',
overview => 'KorAP - Übersicht',
},
+ privacy => 'Datenschutz',
+ imprint => 'Impressum',
Auth => {
loginSuccess => 'Anmeldung erfolgreich',
loginFail => 'Anmeldung fehlgeschlagen',
@@ -149,6 +151,8 @@
cql => 'CQL v1.2',
fcsql => 'FCSQL'
},
+ privacy => 'Privacy',
+ imprint => 'Imprint',
Auth => {
loginSuccess => 'Login successful',
loginFail => 'Access denied',
diff --git a/lib/Kalamar.pm b/lib/Kalamar.pm
index f5dd76e..8b920b7 100644
--- a/lib/Kalamar.pm
+++ b/lib/Kalamar.pm
@@ -6,7 +6,7 @@
use Mojo::Util qw/url_escape/;
# Minor version - may be patched from package.json
-our $VERSION = '0.26';
+our $VERSION = '0.27';
# TODO: The FAQ-Page has a contact form for new questions
# TODO: Embed query serialization
@@ -130,6 +130,7 @@
'KalamarUser', # Specific Helpers for Kalamar
'ClientIP', # Get client IP from X-Forwarded-For
'ClosedRedirect', # Redirect with OpenRedirect protection
+ 'TagHelpers::ContentBlock', # Flexible content blocks
'Piwik' # Integrate Piwik/Matomo Analytics
) {
$self->plugin($_);
@@ -170,6 +171,12 @@
);
};
+ # Set footer value
+ $self->content_block(footer => (
+ inline => '<%= doc_link_to "V ' . $Kalamar::VERSION . '", "korap", "kalamar" %>',
+ position => 100
+ ));
+
# Base query route
$r->get('/')->to('search#query')->name('index');
diff --git a/package.json b/package.json
index 0d599c2..ad8b8b0 100755
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "Kalamar",
"description": "Mojolicious-based Frontend for KorAP",
"license" : "BSD-2-Clause",
- "version": "0.26.4",
+ "version": "0.27.0",
"repository" : {
"type": "git",
"url": "https://github.com/KorAP/Kalamar.git"
diff --git a/templates/partial/footer.html.ep b/templates/partial/footer.html.ep
index 8a93be4..f1c8d76 100644
--- a/templates/partial/footer.html.ep
+++ b/templates/partial/footer.html.ep
@@ -1,4 +1,3 @@
<footer>
- <a href="http://www1.ids-mannheim.de/kl/projekte/korap/"><%= loc 'about' %></a>
- <%= doc_link_to 'V '. $Kalamar::VERSION, 'korap', 'kalamar' %>
+ %= content_block 'footer'
</footer>