Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

first few pages working with snap

  • Loading branch information...
commit 43693491a1fb68f965095970afb4ecc862da98e1 1 parent 569f9fa
@obcode authored
View
4 .gitignore
@@ -4,3 +4,7 @@ pdf/
presentation/
loesungen/
webimg/
+dist
+site_key.txt
+log/access.log
+log/error.log
View
126 impressum.html
@@ -1,126 +0,0 @@
-<!DOCTYPE html>
-<html lang="de">
- <head>
- <meta charset="utf-8">
- <title>Oliver Braun | Impressum</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="description" content="">
- <meta name="author" content="Oliver Braun">
- <link href="css/bootstrap.min.css" rel="stylesheet">
- <link href="css/bootstrap-responsive.min.css" rel="stylesheet">
- <link href="css/font-awesome.css" rel="stylesheet">
- <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
- <!--[if lt IE 8]>
- <link href="css/font-awesome-ie7.css" rel="stylesheet">
- <![endif]-->
- <link href="css/base.css" rel="stylesheet">
- <link href="css/blue.css" rel="stylesheet">
- <!--[if lt IE 9]>
- <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
- <![endif]-->
- <link rel="shortcut icon" href="img/ico/favicon.ico">
- <link rel="apple-touch-icon-precomposed" sizes="144x144" href="img/ico/favicon.ico">
- <link rel="apple-touch-icon-precomposed" sizes="114x114" href="img/ico/favicon.ico">
- <link rel="apple-touch-icon-precomposed" sizes="72x72" href="img/ico/favicon.ico">
- <link rel="apple-touch-icon-precomposed" href="img/ico/favicon.ico">
- </head>
-
- <body>
-
- <div class="navbar navbar-fixed-top">
- <div class="navbar-inner">
- <div class="container">
- <a class="btn btn-primary btn-dropnav" data-toggle="collapse" data-target=".nav-collapse">
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </a>
- <a class="brand" href="index.html">ob.cs.hm.edu</a>
- <div class="nav-collapse collapse">
- <ul class="nav pull-right">
- <li><a href="index.html">Home</a></li>
- <li><a href="lectures/index.html">Vorlesungen</a></li>
- <li><a href="about.html">Oliver Braun</a></li>
- </ul>
- </div>
- </div>
- </div>
- </div>
-
- <div id="content">
- <div class="container">
- <div class="row">
- <div class="span12">
- <h3>Herausgeber dieser Website:</h3>
- <p>Prof. Dr. Oliver Braun<br>
- Fakultät für Informatik und Mathematik<br>
- Hochschule München / Munich University of Applied Sciences<br>
- Lothstr. 64, 80335 München
- </p>
-
- <h3>Kontakt:</h3>
- <p> Tel. +49 89 1265-3790, Fax -3780<br>
- E-Mail: ob@cs.hm.edu</p>
-
- <h3>Haftungsausschluß:</h3>
- <p>Die Angaben auf dieser Website erfolgen ausschließlich zu allgemeinen
- Informationszwecken. Sie sind weder eine Beratung noch ein konkretes
- Vertragsangebot. Die Informationen werden regelmäßig überprüft und
- aktualisiert. Dennoch kann keine Gewähr für die Richtigkeit, Aktualität und
- Vollständigkeit der zur Verfügung gestellten Informationen übernommen
- werden. Trotz sorgfältiger Kontrolle übernehme ich keine Haftung für die
- Inhalte externer Links. Für den Inhalt verlinkter Seiten sind
- ausschließlich deren Betreiber verantwortlich. Die Website des
- Herausgebers kann zudem von anderen Websites ohne sein Wissen verlinkt
- sein. Der Herausgeber übernimmt keine Verantwortung dafür in Websites
- Dritter.</p>
-
- <h3>Copyright:</h3>
- <p>Kopien oder Reproduktion des Inhalts der Website sind zur privaten
- Verwendung zulässig. Ich bin bestrebt, die geltenden
- Urheberrechte zu beachten. Sollte es dennoch zu einer Verletzung des
- Urheberrechtes kommen, werde ich das entsprechende Objekt nach
- Benachrichtigung unverzüglich von der Website entfernen bzw. mit dem
- entsprechenden Urheberrecht kennzeichnen. Das Theme der Website stammt von
- <a href="http://wrapbootstrap.com">{wrap}bootstrap</a> und darf nicht ohne
- Genehmigung des <a href="https://wrapbootstrap.com/user/EvanC93">Autors</a>
- verwendet werden.
- </p>
- </div>
- </div>
- </div>
- </div>
-
- <div id="copywrite">
- <div class="container">
- <div class="row">
- <div class="span12">
- <p>&copy; 2012 Oliver Braun | <a href="impressum.html">Impressum</a>
- <span class="pull-right">
- <a href="http://nginx.org/">nginx</a>
- on
- <a href="http://www.freebsd.org/">FreeBSD</a>
- |
- <a href="https://github.com/obcode/ob.cs.hm.edu">Fork me on GitHub</a>
- </span></p>
- </div>
- </div>
- </div>
- </div>
-
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
- <script>window.jQuery || document.write('<script src="js/jquery-1.8.2.min.js"><\/script>')</script>
- <script src="js/bootstrap.min.js"></script>
- <script>
- $(document).ready(function(){
- $("#totop").click(function () {
- $("body, html").animate({
- scrollTop: 0
- }, 300);
- return false;
- });
- });
- </script>
-
- </body>
-</html>
View
118 index.html
@@ -1,118 +0,0 @@
-<!DOCTYPE html>
-<html lang="de">
- <head>
- <meta charset="utf-8">
- <title>Oliver Braun | Home</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="description" content="">
- <meta name="author" content="Oliver Braun">
- <link href="css/bootstrap.min.css" rel="stylesheet">
- <link href="css/bootstrap-responsive.min.css" rel="stylesheet">
- <link href="css/font-awesome.css" rel="stylesheet">
- <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
- <!--[if lt IE 8]>
- <link href="css/font-awesome-ie7.css" rel="stylesheet">
- <![endif]-->
- <link href="css/base.css" rel="stylesheet">
- <link href="css/blue.css" rel="stylesheet">
- <!--[if lt IE 9]>
- <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
- <![endif]-->
- <link rel="shortcut icon" href="img/ico/favicon.ico">
- <link rel="apple-touch-icon-precomposed" sizes="144x144" href="img/ico/favicon.ico">
- <link rel="apple-touch-icon-precomposed" sizes="114x114" href="img/ico/favicon.ico">
- <link rel="apple-touch-icon-precomposed" sizes="72x72" href="img/ico/favicon.ico">
- <link rel="apple-touch-icon-precomposed" href="img/ico/favicon.ico">
- </head>
-
- <body>
-
- <div class="navbar navbar-fixed-top">
- <div class="navbar-inner">
- <div class="container">
- <a class="btn btn-primary btn-dropnav" data-toggle="collapse" data-target=".nav-collapse">
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </a>
- <a class="brand" href="index.html">ob.cs.hm.edu</a>
- <div class="nav-collapse collapse">
- <ul class="nav pull-right">
- <li class="active"><a href="index.html">Home</a></li>
- <li><a href="lectures/index.html">Vorlesungen</a></li>
- <li><a href="about.html">Oliver Braun</a></li>
- </ul>
- </div>
- </div>
- </div>
- </div>
-
- <div id="landing">
- <div class="container">
- <div class="row">
- <div class="span7">
- <h1>Prof. Dr. Oliver Braun</h1>
- <p>Professor für Softwaretechnik</p>
- <p>Fakultät für Informatik und Mathematik</p>
- <p>Hochschule München</p>
- </div>
- <div class="span5">
- <img src="img/home.png" alt="Home" width="500" height="216" />
- </div>
- </div>
- </div>
- </div>
-
- <div id="content" class="txt-middle">
- <div class="container">
- <div class="row">
- <div class="span12">
- <a href="lectures/index.html">
- <h2>Aktuelle Veranstaltungen</h2>
- </a>
- <p><a href="lectures/softwareentwicklungiib/indexb.html">Softwareentwicklung I (IB), IB 1 B</a>
- |
- <a
- href="lectures/softwareentwicklungiib/indexc.html">Softwareentwicklung
- I (IB), IB 1 C</a><br />
- <a href="lectures/softwareentwicklungi/index.html">Softwareentwicklung I, IF 1
- A, Praktikum 4 &amp; 5</a></p>
- <hr class="dashed">
- </div>
- </div>
- </div>
- </div>
-
- <div id="copywrite">
- <div class="container">
- <div class="row">
- <div class="span12">
- <p>&copy; 2012 Oliver Braun | <a href="impressum.html">Impressum</a>
- <span class="pull-right">
- <a href="http://nginx.org/">nginx</a>
- on
- <a href="http://www.freebsd.org/">FreeBSD</a>
- |
- <a href="https://github.com/obcode/ob.cs.hm.edu">Fork me on GitHub</a>
- </span></p>
- </div>
- </div>
- </div>
- </div>
-
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
- <script>window.jQuery || document.write('<script src="js/jquery-1.8.2.min.js"><\/script>')</script>
- <script src="js/bootstrap.min.js"></script>
- <script>
- $(document).ready(function(){
- $("#totop").click(function () {
- $("body, html").animate({
- scrollTop: 0
- }, 300);
- return false;
- });
- });
- </script>
-
- </body>
-</html>
View
123 lectures/index.html
@@ -1,123 +0,0 @@
-<!DOCTYPE html>
-<html lang="de">
- <head>
- <meta charset="utf-8">
- <title>Vorlesungen</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="description" content="">
- <meta name="author" content="Oliver Braun">
- <link href="../css/bootstrap.min.css" rel="stylesheet">
- <link href="../css/bootstrap-responsive.min.css" rel="stylesheet">
- <link href="../css/font-awesome.css" rel="stylesheet">
- <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
- <!--[if lt IE 8]>
- <link href="css/font-awesome-ie7.css" rel="stylesheet">
- <![endif]-->
- <link href="../css/base.css" rel="stylesheet">
- <link href="../css/blue.css" rel="stylesheet">
- <!--[if lt IE 9]>
- <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
- <![endif]-->
- <link rel="shortcut icon" href="../img/ico/favicon.ico">
- <link rel="apple-touch-icon-precomposed" sizes="144x144" href="../img/ico/favicon.ico">
- <link rel="apple-touch-icon-precomposed" sizes="114x114" href="../img/ico/favicon.ico">
- <link rel="apple-touch-icon-precomposed" sizes="72x72" href="../img/ico/favicon.ico">
- <link rel="apple-touch-icon-precomposed" href="../img/ico/favicon.ico">
- </head>
-
- <body>
-
- <div class="navbar navbar-fixed-top">
- <div class="navbar-inner">
- <div class="container">
- <a class="btn btn-primary btn-dropnav" data-toggle="collapse" data-target=".nav-collapse">
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </a>
- <a class="brand" href="../index.html">ob.cs.hm.edu</a>
- <div class="nav-collapse collapse">
- <ul class="nav pull-right">
- <li><a href="../index.html">Home</a></li>
- <li class="active"><a href="../lectures/index.html">Vorlesungen</a></li>
- <li><a href="../about.html">Oliver Braun</a></li>
- </ul>
- </div>
- </div>
- </div>
- </div>
-
- <div id="header">
- <div class="container">
- <div class="row">
- <div class="span12">
- <h1>Vorlesungen Wintersemester 2012/13</h1>
- </div>
- </div>
- </div>
- </div>
-
- <div id="content">
- <div class="container">
- <div class="row">
- <div class="span4">
- <a class="thumbnail"
- href="softwareentwicklungiib/indexb.html">
- <img alt="image" src="img/gardaseeB.png">
- </a>
- <h2 class="sub">Softwareentwicklung I (IB)<br> IB 1 B</h2>
- <p>Riva del Garda vom Colodri aus gesehen</p>
- </div>
- <div class="span4">
- <a class="thumbnail"
- href="softwareentwicklungiib/indexc.html">
- <img alt="image" src="img/gardaseeC.png">
- </a>
- <h2 class="sub">Softwareentwicklung I (IB)<br> IB 1 C</h2>
- <p>Riva del Garda vom Cima Capi aus gesehen</p>
- </div>
- <div class="span4">
- <a class="thumbnail"
- href="softwareentwicklungi/index.html">
- <img alt="image" src="img/gardaseeA.png">
- </a>
- <h2 class="sub">Softwareentwicklung I<br> IF 1 A, Praktikum 4 &amp; 5</h2>
- <p>Lago di Garda vom Cima Capi aus gesehen</p>
- </div>
- </div>
- </div>
- </div>
-
- <div id="copywrite">
- <div class="container">
- <div class="row">
- <div class="span12">
- <p>&copy; 2012 Oliver Braun | <a href="../impressum.html">Impressum</a>
- <span class="pull-right">
- <a href="http://nginx.org/">nginx</a>
- on
- <a href="http://www.freebsd.org/">FreeBSD</a>
- |
- <a href="https://github.com/obcode/ob.cs.hm.edu">Fork me on GitHub</a>
- </span></p>
- </div>
- </div>
- </div>
- </div>
-
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
- <script>window.jQuery || document.write('<script src="../js/jquery-1.8.2.min.js"><\/script>')</script>
- <script src="../js/bootstrap.min.js"></script>
- <script>
- $(document).ready(function(){
- $("#totop").click(function () {
- $("body, html").animate({
- scrollTop: 0
- }, 300);
- return false;
- });
- });
- </script>
-
- </body>
-</html>
View
0  log/.keepme
No changes.
View
52 ob.cs.hm.edu.cabal
@@ -0,0 +1,52 @@
+Name: obcshmedu
+Version: 0.1
+Synopsis: Website ob.cs.hm.edu
+Description: Website ob.cs.hm.edu
+License: BSD3
+Author: Oliver Braun
+Maintainer: ob.cs.hm.edu
+Stability: Experimental
+Category: Web
+Build-type: Simple
+Cabal-version: >=1.2
+
+Flag development
+ Description: Whether to build the server in development (interpreted) mode
+ Default: False
+
+Executable obcshmedu
+ hs-source-dirs: src
+ main-is: Main.hs
+
+ Build-depends:
+ base >= 4 && < 5,
+ bytestring >= 0.9.1 && < 0.11,
+ heist >= 0.10 && < 0.11,
+ lens >= 3.7.0.1 && < 3.8,
+ MonadCatchIO-transformers >= 0.2.1 && < 0.4,
+ mtl >= 2 && < 3,
+ snap >= 0.10 && < 0.11,
+ snap-core >= 0.9 && < 0.11,
+ snap-server >= 0.9 && < 0.11,
+ snap-loader-static >= 0.9 && < 0.10,
+ text >= 0.11 && < 0.12,
+ time >= 1.1 && < 1.5,
+ xmlhtml >= 0.1
+
+ if flag(development)
+ build-depends:
+ snap-loader-dynamic == 0.10.*
+ cpp-options: -DDEVELOPMENT
+ -- In development mode, speed is already going to suffer, so skip
+ -- the fancy optimization flags. Additionally, disable all
+ -- warnings. The hint library doesn't give an option to execute
+ -- compiled code when there were also warnings, so disabling
+ -- warnings allows quicker workflow.
+ ghc-options: -threaded -w
+ else
+ if impl(ghc >= 6.12.0)
+ ghc-options: -threaded -Wall -fwarn-tabs -funbox-strict-fields -O2
+ -fno-warn-orphans -fno-warn-unused-do-bind
+ else
+ ghc-options: -threaded -Wall -fwarn-tabs -funbox-strict-fields -O2
+ -fno-warn-orphans
View
100 about.html → snaplets/heist/templates/about.tpl
@@ -1,52 +1,5 @@
-<!DOCTYPE html>
-<html lang="de">
- <head>
- <meta charset="utf-8">
- <title>Oliver Braun | About</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="description" content="">
- <meta name="author" content="Oliver Braun">
- <link href="css/bootstrap.min.css" rel="stylesheet">
- <link href="css/bootstrap-responsive.min.css" rel="stylesheet">
- <link href="css/font-awesome.css" rel="stylesheet">
- <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
- <!--[if lt IE 8]>
- <link href="css/font-awesome-ie7.css" rel="stylesheet">
- <![endif]-->
- <link href="css/base.css" rel="stylesheet">
- <link href="css/blue.css" rel="stylesheet">
- <!--[if lt IE 9]>
- <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
- <![endif]-->
- <link rel="shortcut icon" href="img/ico/favicon.ico">
- <link rel="apple-touch-icon-precomposed" sizes="144x144" href="img/ico/favicon.ico">
- <link rel="apple-touch-icon-precomposed" sizes="114x114" href="img/ico/favicon.ico">
- <link rel="apple-touch-icon-precomposed" sizes="72x72" href="img/ico/favicon.ico">
- <link rel="apple-touch-icon-precomposed" href="img/ico/favicon.ico">
- </head>
-
- <body>
-
- <div class="navbar navbar-fixed-top">
- <div class="navbar-inner">
- <div class="container">
- <a class="btn btn-primary btn-dropnav" data-toggle="collapse" data-target=".nav-collapse">
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </a>
- <a class="brand" href="index.html">ob.cs.hm.edu</a>
- <div class="nav-collapse collapse">
- <ul class="nav pull-right">
- <li><a href="index.html">Home</a></li>
- <li><a href="lectures/index.html">Vorlesungen</a></li>
- <li class="active"><a href="about.html">Oliver Braun</a></li>
- </ul>
- </div>
- </div>
- </div>
- </div>
-
+<apply template="base">
+<bind tag="subtitle">: About</bind>
<div id="landing">
<div class="container">
<div class="row">
@@ -95,16 +48,16 @@
<div class="span12">
<div class="txt-middle">
<a href="http://twitter.com/obcode"><img
- src="img/Twitter.png" alt="Twitter" /></a> •
+ src="/img/Twitter.png" alt="Twitter" /></a> •
<a
href="https://plus.google.com/u/0/109653059067016945022"><img
- src="img/Google+.png" alt="Google+" /></a> •
+ src="/img/Google.png" alt="Google+" /></a> •
<a href="https://github.com/obcode"><img
- src="img/Github.png" alt="Github" /></a> •
+ src="/img/Github.png" alt="Github" /></a> •
<a href="http://www.linkedin.com/in/obcode"><img
- src="img/LinkedIn.png" alt="LinkedIn" /></a> •
+ src="/img/LinkedIn.png" alt="LinkedIn" /></a> •
<a href="http://webchat.freenode.net?channels=%23%23terraform">IRC</a> •
- <a href="skype:obcode"><img src="img/Skype.png"
+ <a href="skype:obcode"><img src="/img/Skype.png"
alt="Skype" /></a>
</div>
</div>
@@ -124,12 +77,12 @@
<div class="span12">
<div class="txt-middle">
<a href="http://scala.obraun.net/">
- <img src="img/Scala.jpg"
+ <img src="/img/Scala.jpg"
alt="Scala" />
</a>
&nbsp; &nbsp; &nbsp;
<a href="http://www.osgi-buch.com/">
- <img src="img/OSGi_fuer_Praktiker.jpg"
+ <img src="/img/OSGi_fuer_Praktiker.jpg"
alt="OSGi f&uuml;r Praktiker" />
</a>
</div>
@@ -173,37 +126,4 @@
</div>
</div>
</div>
-
- <div id="copywrite">
- <div class="container">
- <div class="row">
- <div class="span12">
- <p>&copy; 2012 Oliver Braun | <a href="impressum.html">Impressum</a>
- <span class="pull-right">
- <a href="http://nginx.org/">nginx</a>
- on
- <a href="http://www.freebsd.org/">FreeBSD</a>
- |
- <a href="https://github.com/obcode/ob.cs.hm.edu">Fork me on GitHub</a>
- </span></p>
- </div>
- </div>
- </div>
- </div>
-
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
- <script>window.jQuery || document.write('<script src="js/jquery-1.8.2.min.js"><\/script>')</script>
- <script src="js/bootstrap.min.js"></script>
- <script>
- $(document).ready(function(){
- $("#totop").click(function () {
- $("body, html").animate({
- scrollTop: 0
- }, 300);
- return false;
- });
- });
- </script>
-
- </body>
-</html>
+</apply>
View
30 snaplets/heist/templates/base.tpl
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html lang="de">
+ <apply template="page-head"/>
+ <body>
+
+ <apply template="nav"/>
+ <apply-content />
+ <apply template="footer"/>
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
+ <script>window.jQuery || document.write('<script src="js/jquery-1.8.2.min.js"><\/script>')</script>
+ <script src="js/bootstrap.min.js"></script>
+ <script>
+ $(document).ready(function(){
+ $("#totop").click(function () {
+ $("body, html").animate({
+ scrollTop: 0
+ }, 300);
+ return false;
+ });
+ });
+ if ($.url.segment(0)) {
+ $('.navbar li.'+$.url.segment(0)).addClass('active');
+ } else {
+ $('.navbar .home').addClass('active');
+ }
+ </script>
+
+ </body>
+</html>
View
16 snaplets/heist/templates/footer.tpl
@@ -0,0 +1,16 @@
+ <div id="copywrite">
+ <div class="container">
+ <div class="row">
+ <div class="span12">
+ <p>&copy; 2012 Oliver Braun | <a href="impressum">Impressum</a>
+ <span class="pull-right">
+ <a href="http://snapframework.com/">Snap</a>
+ on
+ <a href="http://www.freebsd.org/">FreeBSD</a>
+ |
+ <a href="https://github.com/obcode/ob.cs.hm.edu">Fork me on GitHub</a>
+ </span></p>
+ </div>
+ </div>
+ </div>
+ </div>
View
46 snaplets/heist/templates/impressum.tpl
@@ -0,0 +1,46 @@
+<apply template="base">
+<bind tag="subtitle">: Home</bind>
+ <div id="content">
+ <div class="container">
+ <div class="row">
+ <div class="span12">
+ <h3>Herausgeber dieser Website:</h3>
+ <p>Prof. Dr. Oliver Braun<br>
+ Fakultät für Informatik und Mathematik<br>
+ Hochschule München / Munich University of Applied Sciences<br>
+ Lothstr. 64, 80335 München
+ </p>
+
+ <h3>Kontakt:</h3>
+ <p> Tel. +49 89 1265-3790, Fax -3780<br>
+ E-Mail: ob@cs.hm.edu</p>
+
+ <h3>Haftungsausschluß:</h3>
+ <p>Die Angaben auf dieser Website erfolgen ausschließlich zu allgemeinen
+ Informationszwecken. Sie sind weder eine Beratung noch ein konkretes
+ Vertragsangebot. Die Informationen werden regelmäßig überprüft und
+ aktualisiert. Dennoch kann keine Gewähr für die Richtigkeit, Aktualität und
+ Vollständigkeit der zur Verfügung gestellten Informationen übernommen
+ werden. Trotz sorgfältiger Kontrolle übernehme ich keine Haftung für die
+ Inhalte externer Links. Für den Inhalt verlinkter Seiten sind
+ ausschließlich deren Betreiber verantwortlich. Die Website des
+ Herausgebers kann zudem von anderen Websites ohne sein Wissen verlinkt
+ sein. Der Herausgeber übernimmt keine Verantwortung dafür in Websites
+ Dritter.</p>
+
+ <h3>Copyright:</h3>
+ <p>Kopien oder Reproduktion des Inhalts der Website sind zur privaten
+ Verwendung zulässig. Ich bin bestrebt, die geltenden
+ Urheberrechte zu beachten. Sollte es dennoch zu einer Verletzung des
+ Urheberrechtes kommen, werde ich das entsprechende Objekt nach
+ Benachrichtigung unverzüglich von der Website entfernen bzw. mit dem
+ entsprechenden Urheberrecht kennzeichnen. Das Theme der Website stammt von
+ <a href="http://wrapbootstrap.com">{wrap}bootstrap</a> und darf nicht ohne
+ Genehmigung des <a href="https://wrapbootstrap.com/user/EvanC93">Autors</a>
+ verwendet werden.
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+</apply>
View
38 snaplets/heist/templates/index.tpl
@@ -0,0 +1,38 @@
+<apply template="base">
+<bind tag="subtitle">: Home</bind>
+ <div id="landing">
+ <div class="container">
+ <div class="row">
+ <div class="span7">
+ <h1>Prof. Dr. Oliver Braun</h1>
+ <p>Professor für Softwaretechnik</p>
+ <p>Fakultät für Informatik und Mathematik</p>
+ <p>Hochschule München</p>
+ </div>
+ <div class="span5">
+ <img src="img/home.png" alt="Home" width="500" height="216" />
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div id="content" class="txt-middle">
+ <div class="container">
+ <div class="row">
+ <div class="span12">
+ <a href="lectures/index.html">
+ <h2>Aktuelle Veranstaltungen</h2>
+ </a>
+ <p><a href="lectures/softwareentwicklungiib/indexb.html">Softwareentwicklung I (IB), IB 1 B</a>
+ |
+ <a
+ href="lectures/softwareentwicklungiib/indexc.html">Softwareentwicklung
+ I (IB), IB 1 C</a><br />
+ <a href="lectures/softwareentwicklungi/index.html">Softwareentwicklung I, IF 1
+ A, Praktikum 4 &amp; 5</a></p>
+ <hr class="dashed">
+ </div>
+ </div>
+ </div>
+ </div>
+</apply>
View
49 snaplets/heist/templates/lectures.tpl
@@ -0,0 +1,49 @@
+<apply template="base">
+<bind tag="subtitle">: Vorlesungen</bind>
+
+ <div id="header">
+ <div class="container">
+ <div class="row">
+ <div class="span12">
+ <h1>Vorlesungen</h1>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div id="content">
+ <div class="container">
+ <div class="row">
+ <div class="span12">
+ <h1>Vorlesungen Wintersemester 2012/13</h1>
+ </div>
+ </div>
+ <div class="row">
+ <div class="span4">
+ <a class="thumbnail"
+ href="/lectures/WS2012seiibb">
+ <img alt="image" src="/img/gardaseeB.png">
+ </a>
+ <h2 class="sub">Softwareentwicklung I (IB)<br> IB 1 B</h2>
+ <p>Riva del Garda vom Colodri aus gesehen</p>
+ </div>
+ <div class="span4">
+ <a class="thumbnail"
+ href="lectures/WS2012seiibc">
+ <img alt="image" src="/img/gardaseeC.png">
+ </a>
+ <h2 class="sub">Softwareentwicklung I (IB)<br> IB 1 C</h2>
+ <p>Riva del Garda vom Cima Capi aus gesehen</p>
+ </div>
+ <div class="span4">
+ <a class="thumbnail"
+ href="lectures/WS2012sei">
+ <img alt="image" src="/img/gardaseeA.png">
+ </a>
+ <h2 class="sub">Softwareentwicklung I<br> IF 1 A, Praktikum 4 &amp; 5</h2>
+ <p>Lago di Garda vom Cima Capi aus gesehen</p>
+ </div>
+ </div>
+ </div>
+ </div>
+</apply>
View
19 snaplets/heist/templates/nav.tpl
@@ -0,0 +1,19 @@
+ <div class="navbar navbar-fixed-top">
+ <div class="navbar-inner">
+ <div class="container">
+ <a class="btn btn-primary btn-dropnav" data-toggle="collapse" data-target=".nav-collapse">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </a>
+ <a class="brand" href="/">ob.cs.hm.edu</a>
+ <div class="nav-collapse collapse">
+ <ul class="nav pull-right">
+ <li class="home"><a href="/">Home</a></li>
+ <li><a href="/lectures">Vorlesungen</a></li>
+ <li><a href="/about">Oliver Braun</a></li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
View
24 snaplets/heist/templates/page-head.tpl
@@ -0,0 +1,24 @@
+ <head>
+ <meta charset="utf-8">
+ <title>Oliver Braun<subtitle/></title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="Website Prof. Dr. Oliver Braun">
+ <meta name="author" content="Oliver Braun">
+ <link href="css/bootstrap.min.css" rel="stylesheet">
+ <link href="css/bootstrap-responsive.min.css" rel="stylesheet">
+ <link href="css/font-awesome.css" rel="stylesheet">
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
+ <!--[if lt IE 8]>
+ <link href="css/font-awesome-ie7.css" rel="stylesheet">
+ <![endif]-->
+ <link href="css/base.css" rel="stylesheet">
+ <link href="css/blue.css" rel="stylesheet">
+ <!--[if lt IE 9]>
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+ <link rel="shortcut icon" href="img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="144x144" href="img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" href="img/ico/favicon.ico">
+ </head>
View
31 src/Application.hs
@@ -0,0 +1,31 @@
+{-# LANGUAGE TemplateHaskell #-}
+
+------------------------------------------------------------------------------
+-- | This module defines our application's state type and an alias for its
+-- handler monad.
+module Application where
+
+------------------------------------------------------------------------------
+import Control.Lens
+import Snap.Snaplet
+import Snap.Snaplet.Heist
+import Snap.Snaplet.Auth
+import Snap.Snaplet.Session
+
+------------------------------------------------------------------------------
+data App = App
+ { _heist :: Snaplet (Heist App)
+ , _sess :: Snaplet SessionManager
+ , _auth :: Snaplet (AuthManager App)
+ }
+
+makeLenses ''App
+
+instance HasHeist App where
+ heistLens = subSnaplet heist
+
+
+------------------------------------------------------------------------------
+type AppHandler = Handler App App
+
+
View
114 src/Main.hs
@@ -0,0 +1,114 @@
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE TemplateHaskell #-}
+
+{-
+
+NOTE: Don't modify this file unless you know what you are doing. If you are
+new to snap, start with Site.hs and Application.hs. This file contains
+boilerplate needed for dynamic reloading and is not meant for general
+consumption.
+
+Occasionally if we modify the way the dynamic reloader works and you want to
+upgrade, you might have to swap out this file for a newer version. But in
+most cases you'll never need to modify this code.
+
+-}
+module Main where
+
+------------------------------------------------------------------------------
+import Control.Exception (SomeException, try)
+import qualified Data.Text as T
+import Snap.Http.Server
+import Snap.Snaplet
+import Snap.Snaplet.Config
+import Snap.Core
+import System.IO
+import Site
+
+#ifdef DEVELOPMENT
+import Snap.Loader.Dynamic
+#else
+import Snap.Loader.Static
+#endif
+
+
+------------------------------------------------------------------------------
+-- | This is the entry point for this web server application. It supports
+-- easily switching between interpreting source and running statically compiled
+-- code.
+--
+-- In either mode, the generated program should be run from the root of the
+-- project tree. When it is run, it locates its templates, static content, and
+-- source files in development mode, relative to the current working directory.
+--
+-- When compiled with the development flag, only changes to the libraries, your
+-- cabal file, or this file should require a recompile to be picked up.
+-- Everything else is interpreted at runtime. There are a few consequences of
+-- this.
+--
+-- First, this is much slower. Running the interpreter takes a significant
+-- chunk of time (a couple tenths of a second on the author's machine, at this
+-- time), regardless of the simplicity of the loaded code. In order to
+-- recompile and re-load server state as infrequently as possible, the source
+-- directories are watched for updates, as are any extra directories specified
+-- below.
+--
+-- Second, the generated server binary is MUCH larger, since it links in the
+-- GHC API (via the hint library).
+--
+-- Third, and the reason you would ever want to actually compile with
+-- development mode, is that it enables a faster development cycle. You can
+-- simply edit a file, save your changes, and hit reload to see your changes
+-- reflected immediately.
+--
+-- When this is compiled without the development flag, all the actions are
+-- statically compiled in. This results in faster execution, a smaller binary
+-- size, and having to recompile the server for any code change.
+--
+main :: IO ()
+main = do
+ -- Depending on the version of loadSnapTH in scope, this either enables
+ -- dynamic reloading, or compiles it without. The last argument to
+ -- loadSnapTH is a list of additional directories to watch for changes to
+ -- trigger reloads in development mode. It doesn't need to include source
+ -- directories, those are picked up automatically by the splice.
+ (conf, site, cleanup) <- $(loadSnapTH [| getConf |]
+ 'getActions
+ ["snaplets/heist/templates"])
+
+ _ <- try $ httpServe conf site :: IO (Either SomeException ())
+ cleanup
+
+
+------------------------------------------------------------------------------
+-- | This action loads the config used by this application. The loaded config
+-- is returned as the first element of the tuple produced by the loadSnapTH
+-- Splice. The type is not solidly fixed, though it must be an IO action that
+-- produces the same type as 'getActions' takes. It also must be an instance of
+-- Typeable. If the type of this is changed, a full recompile will be needed to
+-- pick up the change, even in development mode.
+--
+-- This action is only run once, regardless of whether development or
+-- production mode is in use.
+getConf :: IO (Config Snap AppConfig)
+getConf = commandLineAppConfig defaultConfig
+
+
+------------------------------------------------------------------------------
+-- | This function generates the the site handler and cleanup action from the
+-- configuration. In production mode, this action is only run once. In
+-- development mode, this action is run whenever the application is reloaded.
+--
+-- Development mode also makes sure that the cleanup actions are run
+-- appropriately before shutdown. The cleanup action returned from loadSnapTH
+-- should still be used after the server has stopped handling requests, as the
+-- cleanup actions are only automatically run when a reload is triggered.
+--
+-- This sample doesn't actually use the config passed in, but more
+-- sophisticated code might.
+getActions :: Config Snap AppConfig -> IO (Snap (), IO ())
+getActions conf = do
+ (msgs, site, cleanup) <- runSnaplet
+ (appEnvironment =<< getOther conf) app
+ hPutStrLn stderr $ T.unpack msgs
+ return (site, cleanup)
View
88 src/Site.hs
@@ -0,0 +1,88 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+------------------------------------------------------------------------------
+-- | This module is where all the routes and handlers are defined for your
+-- site. The 'app' function is the initializer that combines everything
+-- together and is exported by this module.
+module Site
+ ( app
+ ) where
+
+------------------------------------------------------------------------------
+import Control.Applicative
+import Data.ByteString (ByteString)
+import Data.Maybe
+import qualified Data.Text as T
+import Snap.Core
+import Snap.Snaplet
+import Snap.Snaplet.Auth
+import Snap.Snaplet.Auth.Backends.JsonFile
+import Snap.Snaplet.Heist
+import Snap.Snaplet.Session.Backends.CookieSession
+import Snap.Util.FileServe
+import Heist
+import qualified Heist.Interpreted as I
+------------------------------------------------------------------------------
+import Application
+
+
+------------------------------------------------------------------------------
+-- | Render login form
+handleLogin :: Maybe T.Text -> Handler App (AuthManager App) ()
+handleLogin authError = heistLocal (I.bindSplices errs) $ render "login"
+ where
+ errs = [("loginError", I.textSplice c) | c <- maybeToList authError]
+
+
+------------------------------------------------------------------------------
+-- | Handle login submit
+handleLoginSubmit :: Handler App (AuthManager App) ()
+handleLoginSubmit =
+ loginUser "login" "password" Nothing
+ (\_ -> handleLogin err) (redirect "/")
+ where
+ err = Just "Unknown user or password"
+
+
+------------------------------------------------------------------------------
+-- | Logs out and redirects the user to the site index.
+handleLogout :: Handler App (AuthManager App) ()
+handleLogout = logout >> redirect "/"
+
+
+------------------------------------------------------------------------------
+-- | Handle new user form submit
+handleNewUser :: Handler App (AuthManager App) ()
+handleNewUser = method GET handleForm <|> method POST handleFormSubmit
+ where
+ handleForm = render "new_user"
+ handleFormSubmit = registerUser "login" "password" >> redirect "/"
+
+
+------------------------------------------------------------------------------
+-- | The application's routes.
+routes :: [(ByteString, Handler App App ())]
+routes = [ ("", heistServe)
+ , ("/img", serveDirectory "static/img")
+ , ("/css", serveDirectory "static/css")
+ , ("/js", serveDirectory "static/js")
+ ]
+
+
+------------------------------------------------------------------------------
+-- | The application initializer.
+app :: SnapletInit App App
+app = makeSnaplet "app" "The ob.cs.hm.edu website." Nothing $ do
+ h <- nestSnaplet "" heist $ heistInit "templates"
+ s <- nestSnaplet "sess" sess $
+ initCookieSessionManager "site_key.txt" "sess" (Just 3600)
+
+ -- NOTE: We're using initJsonFileAuthManager here because it's easy and
+ -- doesn't require any kind of database server to run. In practice,
+ -- you'll probably want to change this to a more robust auth backend.
+ a <- nestSnaplet "auth" auth $
+ initJsonFileAuthManager defAuthSettings sess "users.json"
+ addRoutes routes
+ addAuthSplices auth
+ return $ App h s a
+
View
0  static/img/Google+.png → static/img/Google.png
File renamed without changes
View
0  lectures/img/gardaseeA.png → static/img/gardaseeA.png
File renamed without changes
View
0  lectures/img/gardaseeB.png → static/img/gardaseeB.png
File renamed without changes
View
0  lectures/img/gardaseeC.png → static/img/gardaseeC.png
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.