]> Frank Brehm's Git Trees - books.git/commitdiff
Impressum dazu
authorFrank Brehm <frank@brehm-online.com>
Sat, 27 Feb 2010 09:08:01 +0000 (09:08 +0000)
committerFrank Brehm <frank@brehm-online.com>
Sat, 27 Feb 2010 09:08:01 +0000 (09:08 +0000)
lib/FrBr/Books.pm
lib/FrBr/Books/Controller/Impressum.pm [new file with mode: 0644]
root/lib/site/layout.tt2
root/src/impressum.css [new file with mode: 0644]
root/src/impressum.tt2 [new file with mode: 0644]
root/src/index.tt2
root/static/pic/FrankBrehm.jpg [new file with mode: 0644]
t/controller_Impressum.t [new file with mode: 0644]

index c19576591f87984243feaf6d6b52c84e1604904c..9be0f0ecc7a25b3b5b30a4870db6b54059da2b71 100644 (file)
@@ -126,6 +126,16 @@ __PACKAGE__->config(
         'POST_CHOMP'         => 0,
         'TEMPLATE_EXTENSION' => '.tt2',
     },
+    'impressum' => {
+        'name'       => 'Frank Brehm',
+        'google-map' => 'http://maps.google.de/maps/ms?ie=UTF8&hl=de&msa=2&ll=52.526891,13.611825&spn=0.000902,0.002722&t=h&z=19',
+        'country'    => 'Deutschland',
+        'location'   => '12621 Berlin',
+        'address'    => 'Ingolstädter Str. 1',
+        'telephone'  => '+49-(0)30-55870038',
+        'mobile'     => '+49-(0)171-6439884',
+        'email'      => 'frank@brehm-online.com',
+    },
 );
 
 warn sprintf( "%s: Beginne mit Log::Log4perl-Konfiguration!\n",  __PACKAGE__ ) if $ENV{'CATALYST_DEBUG'} or $ENV{'FRBR_BOOKS_DEBUG'};
diff --git a/lib/FrBr/Books/Controller/Impressum.pm b/lib/FrBr/Books/Controller/Impressum.pm
new file mode 100644 (file)
index 0000000..14d7334
--- /dev/null
@@ -0,0 +1,70 @@
+package FrBr::Books::Controller::Impressum;
+
+# $Id$
+# $URL$
+
+use Moose;
+use namespace::autoclean;
+use FrBr::Common;
+
+BEGIN {extends 'Catalyst::Controller'; }
+
+our $VERSION = '0.01';
+
+#---------------------------------------------------------------------------
+
+=head1 NAME
+
+FrBr::Books::Controller::Impressum - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+#---------------------------------------------------------------------------
+
+=head2 index
+
+=cut
+
+sub index :Path :Args(0) {
+
+    my ( $self, $c ) = @_;
+    my $K = ( caller(0) )[3] . "(): ";
+
+    $c->stash->{'menu_path'} = [] unless $c->stash->{'menu_path'};
+    push @{ $c->stash->{'menu_path'} }, {
+        'path' => $c->web_path("/impressum"),
+        'name' => "Impressum"
+    };
+
+    $c->stash->{'cssfiles'} = [] unless $c->stash->{'cssfiles'};
+    push @{$c->stash->{'cssfiles'}}, 'impressum.css';
+
+    $c->stash->{'template'} = 'impressum.tt2';
+
+}
+
+#---------------------------------------------------------------------------
+
+=head1 AUTHOR
+
+Frank Brehm
+
+=head1 LICENSE
+
+This library is free software. You can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+__PACKAGE__->meta->make_immutable;
+
+__END__
+
+# vim: noai : ts=4 fenc=utf-8 filetype=perl expandtab :
index 7fe3e6b3baaba40a4283e2356b985954b2fad22a..5eb1135211e305643f35e5c6f5f5c8c3ed0372ec 100644 (file)
 [% content %]
 </div>
 
-<div style="text-align: center; margin-top: 10px;">
-<a href="http://validator.w3.org/check?uri=referer"><img
-        style="border: 0;" src="http://www.w3.org/Icons/valid-html401-blue"
-        alt="Valid HTML 4.01 Transitional" height="31" width="88"></a>&nbsp;&nbsp;<a
-   href="http://jigsaw.w3.org/css-validator/check/referer"><img
-        style="border:0;width:88px;height:31px"
-        src="http://jigsaw.w3.org/css-validator/images/vcss-blue"
-        alt="CSS ist valide!" /></a>
-</div>
-
 <div id="footer">[% PROCESS site/footer.tt2 %]</div>
diff --git a/root/src/impressum.css b/root/src/impressum.css
new file mode 100644 (file)
index 0000000..6f7e361
--- /dev/null
@@ -0,0 +1,30 @@
+/* [%#
+   # Template fuer Stylesheets Ipressum
+   #
+   # vim: noai : ts=4 fenc=utf-8 filetype=css expandtab :
+   #
+   # $Id$
+   # $URL$
+   #
+-%]
+
+Stylesheets Impressum */
+
+DIV#impressum {
+    margin:         auto;
+    width:          550px;
+}
+
+IMG#foto {
+    width:          112px;
+    height:         120px;
+    border:         0;
+    vertical-align: text-top;
+    float:          right;
+    margin-left:    20px;
+    margin-bottom:  10px;
+}
+
+H3 {
+    text-align:     left;
+}
diff --git a/root/src/impressum.tt2 b/root/src/impressum.tt2
new file mode 100644 (file)
index 0000000..3c19e4b
--- /dev/null
@@ -0,0 +1,44 @@
+<!-- [%#
+
+    impreesum.tt2 - Impressum
+
+    vim: noai : ts=4 fenc=utf-8 filetype=html expandtab :
+
+    $Id$
+    $URL$
+
+-%]
+Impressum -->
+[%- META title = 'Impressum' %]
+<div id="impressum">
+<img src="[% path( '/static/pic/FrankBrehm.jpg' ) %]" id="foto" alt="Frank Brehm" />
+<h3>Frank Brehm</h3>
+
+<h4>Adresse:</h4>
+Ingolstädter Str. 1<br />
+12621 Berlin<br />
+Deutschland
+
+<h4>Kontakt:</h4>
+<dl>
+    <dt>Telefon:</dt>
+        <dd>+49-(0)30-55870038</dd>
+    <dt>Mobil:</dt>
+        <dd>+49-(0)171-6439884</dd>
+    <dt>Telefon:</dt>
+        <dd><a href="mailto:frank@brehm-online.com">frank@brehm-online.com</a></dd>
+</dl>
+
+<h4>Technische Details:</h4>
+
+<p>Diese Anwendung wurde mit Hilfe von <a href="http://www.catalystframework.org/"><b>Perl Catalyst</b></a> erstellt.</p>
+<p>Die Anwendung entspricht den Standards <i>HTML 4.01 Transitional</i> und <i>CSS 2.1</i>.</p>
+<p><a href="http://validator.w3.org/check?uri=referer"><img
+        style="border: 0;" src="http://www.w3.org/Icons/valid-html401-blue"
+        alt="Valid HTML 4.01 Transitional" height="31" width="88"></a>&nbsp;&nbsp;<a
+   href="http://jigsaw.w3.org/css-validator/check/referer"><img
+        style="border:0;width:88px;height:31px"
+        src="http://jigsaw.w3.org/css-validator/images/vcss-blue"
+        alt="CSS ist valide!" /></a></p>
+</div>
+
index b194b886c88cfc0ef32c15dda731dca061fb136a..bfca0fc24ac33479dbe7f34305b63cb3d875d9e9 100644 (file)
@@ -48,7 +48,10 @@ Hauptmenü
     <td class="item">
       <a href="[% path('/autor') %]">Autoren</a></td>
     <td class="empty"></td>
-    <td colspan="3" class="empty"></td>
+    <td class="empty"></td>
+    <td class="empty_button"></td>
+    <td class="item">
+      <a href="[% path('/impressum') %]">Impressum</a></td>
   </tr><tr>
     <td colspan="3" class="empty_row"></td>
     <td colspan="3" class="empty_row"></td>
diff --git a/root/static/pic/FrankBrehm.jpg b/root/static/pic/FrankBrehm.jpg
new file mode 100644 (file)
index 0000000..7980db4
Binary files /dev/null and b/root/static/pic/FrankBrehm.jpg differ
diff --git a/t/controller_Impressum.t b/t/controller_Impressum.t
new file mode 100644 (file)
index 0000000..3ed78de
--- /dev/null
@@ -0,0 +1,9 @@
+use strict;
+use warnings;
+use Test::More;
+
+BEGIN { use_ok 'Catalyst::Test', 'FrBr::Books' }
+BEGIN { use_ok 'FrBr::Books::Controller::Impressum' }
+
+ok( request('/impressum')->is_success, 'Request should succeed' );
+done_testing();