]> Frank Brehm's Git Trees - books.git/commitdiff
Impressum aufgehübscht
authorFrank Brehm <frank@brehm-online.com>
Sun, 28 Feb 2010 16:44:42 +0000 (16:44 +0000)
committerFrank Brehm <frank@brehm-online.com>
Sun, 28 Feb 2010 16:44:42 +0000 (16:44 +0000)
lib/FrBr/Books.pm
lib/FrBr/Books/Controller/Impressum.pm
root/src/impressum.css
root/src/impressum.tt2
root/static/pic/search.png [new file with mode: 0644]

index 9be0f0ecc7a25b3b5b30a4870db6b54059da2b71..c40e2aef1ad0252a05d046bb401fa76b3b37015a 100644 (file)
@@ -135,6 +135,11 @@ __PACKAGE__->config(
         'telephone'  => '+49-(0)30-55870038',
         'mobile'     => '+49-(0)171-6439884',
         'email'      => 'frank@brehm-online.com',
+        'foto'       => {
+            'src'    => 'pic/FrankBrehm.jpg',
+            'width'  => 112,
+            'height' => 120,
+        },
     },
 );
 
index 14d73340ece7e120e243580b7cfd36b53f83090f..b7537ab3157071685128ab91d8bd2a3c1dcc218f 100644 (file)
@@ -46,6 +46,24 @@ sub index :Path :Args(0) {
     $c->stash->{'cssfiles'} = [] unless $c->stash->{'cssfiles'};
     push @{$c->stash->{'cssfiles'}}, 'impressum.css';
 
+    my $imp = {};
+    $imp->{'name'}       = $c->config->{'impressum'}{'name'}     || 'Frank Brehm';
+    $imp->{'google_map'} = $c->config->{'impressum'}{'google-map'};
+    $imp->{'country'}    = $c->config->{'impressum'}{'country'}  || 'Deutschland';
+    $imp->{'location'}   = $c->config->{'impressum'}{'location'} || '12621 Berlin';
+    $imp->{'address'}    = $c->config->{'impressum'}{'address'}  || 'Ingolstädter Str. 1';
+    $imp->{'telephone'}  = $c->config->{'impressum'}{'telephone'};
+    $imp->{'mobile'}     = $c->config->{'impressum'}{'mobile'};
+    $imp->{'email'}      = $c->config->{'impressum'}{'email'}    || 'frank@brehm-online.com';
+
+    $imp->{'foto'}           = {};
+    $imp->{'foto'}{'src'}    = $c->config->{'impressum'}{'foto'}{'src'}    || 'pic/FrankBrehm.jpg';
+    $imp->{'foto'}{'width'}  = $c->config->{'impressum'}{'foto'}{'width'}  || 112;
+    $imp->{'foto'}{'height'} = $c->config->{'impressum'}{'foto'}{'height'} || 120;
+
+    $c->stash->{'impressum'} = $imp;
+    
+
     $c->stash->{'template'} = 'impressum.tt2';
 
 }
index 6f7e361f081737f1cdae5905bea67a05a607246d..f6da32a92c1325e4547dc83d188799d1332e2c10 100644 (file)
@@ -15,9 +15,15 @@ DIV#impressum {
     width:          550px;
 }
 
+DIV#address {
+    margin:         0;
+    padding:        0;
+    width:          200px;
+}
+
 IMG#foto {
-    width:          112px;
-    height:         120px;
+    width:          [% impressum.foto.width %]px;
+    height:         [% impressum.foto.height %]px;
     border:         0;
     vertical-align: text-top;
     float:          right;
@@ -25,6 +31,15 @@ IMG#foto {
     margin-bottom:  10px;
 }
 
+IMG#search {
+    width:          32px;
+    height:         32px;
+    border:         0;
+    vertical-align: text-top;
+    float:          right;
+    margin:         1px;
+}
+
 H3 {
     text-align:     left;
 }
index 3c19e4b7c70e29a4ac1c8780a64aaa2db910a48e..2a191691a9f7533ebae77ebf1afde3b80a50037a 100644 (file)
 Impressum -->
 [%- META title = 'Impressum' %]
 <div id="impressum">
-<img src="[% path( '/static/pic/FrankBrehm.jpg' ) %]" id="foto" alt="Frank Brehm" />
-<h3>Frank Brehm</h3>
+<img src="[% path( '/static/' _ impressum.foto.src ) %]" id="foto" alt="[% impressum.name %]" />
+<h3>[% impressum.name %]</h3>
 
-<h4>Adresse:</h4>
-Ingolstädter Str. 1<br />
-12621 Berlin<br />
-Deutschland
+<div id="address">[% IF impressum.google_map %]<a href="[% impressum.google_map %]" target="_new"><img src="[% path( '/static/pic/search.png' ) %]" id="search" alt="Google Map Suche" title="Google Map Suche" /></a>
+[% END %]<h4>Adresse:</h4>
+[% impressum.address %]<br />
+[% impressum.location %]<br />
+[% impressum.country %]</div>
 
 <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>
+    [% IF impressum.telephone %]<dt>Telefon:</dt>
+        <dd>[% impressum.telephone %]</dd>
+    [% END %][% IF impressum.mobile %]<dt>Mobil:</dt>
+        <dd>[% impressum.mobile %]</dd>
+    [% END %]<dt>E-Mail:</dt>
+        <dd><a href="mailto:[% impressum.email %]">[% impressum.email %]</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>Verwendete Subsysteme:
+    <dl>
+        <dt>SQL to OO mapper:</dt>
+            <dd><a href="http://search.cpan.org/search?query=DBIx%3A%3AClass&mode=module">DBIx::Class</a> - Extensible and flexible object &lt;-&gt; relational mapper.</dd>
+        <dt>Template-Engine:</dt>
+            <dd><a href="http://search.cpan.org/~abw/Template-Toolkit-2.22/">Template Toolkit</a></dd>
+        <dt>Datenbank-Backend:</dt>
+            <dd><a href="http://www.mysql.com">MySQL</a></dd>
+    </dl>
+</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"
diff --git a/root/static/pic/search.png b/root/static/pic/search.png
new file mode 100644 (file)
index 0000000..036bd3e
Binary files /dev/null and b/root/static/pic/search.png differ