Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ported various improvements from Beelden aaan Zee implementation

  • Loading branch information...
commit 7c8b9da78359f11ac5ffb65efc8c2502f111d741 1 parent 00cff0d
@fmw authored
Showing with 3,288 additions and 649 deletions.
  1. +1 −0  project.clj
  2. +5 −0 resources/database-views/map_events_by_feed.js
  3. +5 −0 resources/database-views/map_newsletter_subscribers.js
  4. +145 −0 resources/public/css/datepicker.css
  5. +266 −0 resources/public/style.css
  6. 0  src/templates/{ → en}/admin.html
  7. 0  src/templates/{ → en}/blog-article.html
  8. +21 −0 src/templates/en/content-page.html
  9. +84 −0 src/templates/en/frontpage.html
  10. +78 −0 src/templates/en/layout.html
  11. 0  src/templates/{ → en}/login.html
  12. +68 −0 src/templates/en/newsletter-already-subscribed.html
  13. +68 −0 src/templates/en/newsletter-confirmation-failed.html
  14. +18 −0 src/templates/en/newsletter-confirmation-message.html
  15. +68 −0 src/templates/en/newsletter-confirmed.html
  16. +69 −0 src/templates/en/newsletter-subscribed.html
  17. +29 −0 src/templates/en/search-results.html
  18. 0  src/templates/{ → en}/search.html
  19. +0 −46 src/templates/layout.html
  20. +68 −0 src/templates/nl/admin.html
  21. +22 −0 src/templates/nl/blog-article.html
  22. +21 −0 src/templates/nl/content-page.html
  23. +84 −0 src/templates/nl/frontpage.html
  24. +78 −0 src/templates/nl/layout.html
  25. +50 −0 src/templates/nl/login.html
  26. +68 −0 src/templates/nl/newsletter-already-confirmed.html
  27. +68 −0 src/templates/nl/newsletter-already-subscribed.html
  28. +68 −0 src/templates/nl/newsletter-confirmation-failed.html
  29. +19 −0 src/templates/nl/newsletter-confirmation-message.html
  30. +68 −0 src/templates/nl/newsletter-confirmed.html
  31. +70 −0 src/templates/nl/newsletter-subscribed.html
  32. +29 −0 src/templates/nl/search-results.html
  33. +47 −0 src/templates/nl/search.html
  34. +0 −25 src/templates/search-results.html
  35. +64 −1 src/vix/config.clj
  36. +25 −3 src/vix/db.clj
  37. +2 −3 src/vix/lucene.clj
  38. +272 −48 src/vix/routes.clj
  39. +272 −68 src/vix/views.clj
  40. +105 −11 test/vix/test/db.clj
  41. +630 −37 test/vix/test/routes.clj
  42. +233 −407 test/vix/test/views.clj
View
1  project.clj
@@ -15,6 +15,7 @@
[org.apache.lucene/lucene-queries "3.5.0"]
[com.draines/postal "1.7.1"]
[ring/ring-servlet "1.0.1"]]
+ :dev-dependencies [[radagast "1.1.0"]]
:plugins [[lein-ring "0.6.1"]
[lein-swank "1.4.3"]]
:ring {:handler vix.routes/app})
View
5 resources/database-views/map_events_by_feed.js
@@ -0,0 +1,5 @@
+function(doc) {
+ if(doc.type === "document" && doc["end-time-rfc3339"]) {
+ emit([[doc.language, doc.feed], doc["end-time-rfc3339"]], doc);
+ }
+}
View
5 resources/database-views/map_newsletter_subscribers.js
@@ -0,0 +1,5 @@
+function(doc) {
+ if(doc.type === "newsletter-subscriber") {
+ emit([doc.language, doc.email], doc);
+ }
+}
View
145 resources/public/css/datepicker.css
@@ -0,0 +1,145 @@
+/*
+Use of this source code is governed by an Apache 2.0 License.
+See the COPYING file for details.
+*/
+
+/* Copyright 2008 Google Inc. All Rights Reserved. */
+/**/
+
+/* goog.ui.DatePicker */
+
+.goog-date-picker,
+.goog-date-picker th,
+.goog-date-picker td {
+ font: 13px Arial, sans-serif;
+}
+
+.goog-date-picker {
+ -moz-user-focus: normal;
+ -moz-user-select: none;
+ position: relative;
+ border: 1px solid #000;
+ float: left;
+ padding: 2px;
+ color: #000;
+ background: #c3d9ff;
+ cursor: default;
+}
+
+.goog-date-picker th {
+ text-align: center;
+}
+
+.goog-date-picker td {
+ text-align: center;
+ vertical-align: middle;
+ padding: 1px 3px;
+}
+
+
+.goog-date-picker-menu {
+ position: absolute;
+ background: threedface;
+ border: 1px solid gray;
+ -moz-user-focus: normal;
+ z-index: 1;
+ outline: none;
+}
+
+.goog-date-picker-menu ul {
+ list-style: none;
+ margin: 0px;
+ padding: 0px;
+}
+
+.goog-date-picker-menu ul li {
+ cursor: default;
+}
+
+.goog-date-picker-menu-selected {
+ background: #ccf;
+}
+
+.goog-date-picker th {
+ font-size: .9em;
+}
+
+.goog-date-picker td div {
+ float: left;
+}
+
+.goog-date-picker button {
+ padding: 0px;
+ margin: 1px 0;
+ border: 0;
+ color: #20c;
+ font-weight: bold;
+ background: transparent;
+}
+
+.goog-date-picker-date {
+ background: #fff;
+}
+
+.goog-date-picker-week,
+.goog-date-picker-wday {
+ padding: 1px 3px;
+ border: 0;
+ border-color: #a2bbdd;
+ border-style: solid;
+}
+
+.goog-date-picker-week {
+ border-right-width: 1px;
+}
+
+.goog-date-picker-wday {
+ border-bottom-width: 1px;
+}
+
+.goog-date-picker-head td {
+ text-align: center;
+}
+
+/** Use td.className instead of !important */
+td.goog-date-picker-today-cont {
+ text-align: center;
+}
+
+/** Use td.className instead of !important */
+td.goog-date-picker-none-cont {
+ text-align: center;
+}
+
+.goog-date-picker-month {
+ width: 12ex;
+}
+
+.goog-date-picker-year {
+ width: 6ex;
+}
+
+.goog-date-picker table {
+ border-collapse: collapse;
+}
+
+.goog-date-picker-other-month {
+ color: #888;
+}
+
+.goog-date-picker-wkend-start,
+.goog-date-picker-wkend-end {
+ background: #eee;
+}
+
+/** Use td.className instead of !important */
+td.goog-date-picker-selected {
+ background: #c3d9ff;
+}
+
+.goog-date-picker-today {
+ background: #9ab;
+ font-weight: bold !important;
+ border-color: #246 #9bd #9bd #246;
+ color: #fff;
+}
View
266 resources/public/style.css
@@ -0,0 +1,266 @@
+* {
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+ border: 0;
+ margin: 0;
+ padding: 0;
+}
+
+body {
+ font-family: Verdana, Helvetica, sans-serif;
+ font-size: 18px;
+ color: #000;
+ background-color: #e8e8e8;
+}
+
+#wrapper {
+ width: 900px;
+ margin: 0 auto;
+}
+
+a, a:visited {
+ color: #000;
+ text-decoration: none;
+}
+
+a:hover {
+ color: #969696;
+}
+
+strong {
+ font-weight: bold;
+}
+
+header {
+ margin-bottom: 7px;
+ color: #fff;
+ font-size: 18px;
+ clear: both;
+}
+
+#header-top-bar, #header-menu-bar {
+ padding-left: 20px;
+}
+
+#header-top-bar {
+ clear: both;
+ background-color: #3f3f3f;
+ height: 100px;
+}
+
+#logo-container {
+ float: left;
+ width: 390px;
+ padding: 18px 0 0 0;
+}
+
+#logo a {
+ font-size: 55px;
+ color: #fff;
+ letter-spacing: -1px;
+}
+
+#logo span {
+ letter-spacing: -3px;
+ color: #dfdfdf;
+}
+
+#search-form-container {
+ float: left;
+ margin-top: 50px;
+}
+
+#search-form {
+ border: 0;
+ position: absolute;
+}
+
+#search-field {
+ position: relative;
+ top: -2px;
+ left: 0;
+ -webkit-appearance: textfield;
+ width: 220px;
+ height: 23px;
+ padding: 3px 40px 3px 15px;
+ margin: 0 0 0 7px;
+ border: 1px solid black;
+ -moz-border-radius: 25px;
+ -webkit-border-radius: 25px;
+ -o-border-radius: 25px;
+ border-radius: 25px;
+ z-index: 1;
+ font-size: 12px;
+}
+
+#search-field:focus {
+ outline: none;
+}
+
+#search-button {
+ background: #fff
+ url('http://cdn1.vixu.com/static/images/icons.png')
+ no-repeat
+ -65px -39px;
+ z-index: 1;
+ position: absolute;
+ border: 0 none;
+ width: 13px;
+ height: 13px;
+ top: 3px;
+ right: 8px;
+ cursor: pointer;
+}
+
+#language-options {
+ float: left;
+ margin: 50px 0 0 330px;
+}
+
+#language-options a {
+ color: #fff;
+}
+
+#header-menu-bar {
+ clear: both;
+ height: 40px;
+ background-color: #303030;
+ color: #fff;
+ border-radius: 0 0 15px 15px;
+}
+
+#menu a {
+ color: #fff;
+ font-size: 16px;
+}
+
+#menu a:hover {
+ color: #d3d3d3;
+}
+
+#menu li {
+ float: left;
+ display: block;
+ text-align: center;
+ padding: 9px 25px 15px 10px;
+}
+
+#content-bar {
+ background-color: #fff;
+ border-radius: 15px 15px 0 0;
+ padding-left: 20px;
+ clear: both;
+ overflow: auto;
+}
+
+#content {
+ padding-right: 250px;
+ padding-bottom: 50px;
+}
+
+#content ul {
+ padding-left: 20px;
+}
+
+#content p {
+ margin-bottom: 16px;
+}
+
+#page-title {
+ font-size: 22px;
+ margin: 15px 0 15px 0;
+}
+
+#content-bar h3, #content-bar h4, #content-bar h5 {
+ font-size: 18px;
+ margin: 10px 0 0 0;
+}
+
+#main-bar {
+ font-size: 16px;
+ clear: both;
+ padding: 30px 0 50px 0;
+}
+
+#content-bar a {
+ text-decoration: underline;
+ color: #3f3f3f;
+}
+
+#leader-text {
+ clear: both;
+ padding: 10px 250px 0 0;
+ margin: 0 0 20px 0;
+}
+
+#advantages-container {
+ float: left;
+ width: 420px;
+ padding: 0 5px 0 0;
+}
+
+#advantages-container p {
+ margin-bottom: 25px;
+}
+
+.screenshot-container {
+ border: 3px #d3d3d3 dashed;
+ border-radius: 15px;
+ padding: 10px;
+ margin-bottom: 15px;
+}
+
+#teaser-image-container {
+ float: right;
+ margin-right: 10px;
+}
+
+#teaser-image-container img {
+ margin: 0 0 3px 0;
+ border-radius: 3px 3px 0 0;
+}
+
+#teaser-image-container h5 {
+ font-weight: normal;
+ font-size: 14px;
+}
+
+footer {
+ clear: both;
+ font-size: 14px;
+ height: 40px;
+ background-color: #3f3f3f;
+ color: #fff;
+ border-radius: 8px 8px 0 0;
+ padding: 10px 0 0 10px;
+}
+
+.positive {
+ color: green;
+}
+
+table {
+ margin-bottom: 15px;
+ width: 757px;
+}
+
+th, td {
+ padding-right: 30px;
+ text-align: left;
+}
+
+#search-results {
+ margin: 30px 0 30px 25px;
+}
+
+#search-results-navigate {
+ list-style-type: none;
+ margin: 20px 0 0 0;
+ padding: 0;
+}
+
+#search-results-navigate li {
+ float: left;
+ padding: 0 10px 0 0;
+}
View
0  src/templates/admin.html → src/templates/en/admin.html
File renamed without changes
View
0  src/templates/blog-article.html → src/templates/en/blog-article.html
File renamed without changes
View
21 src/templates/en/content-page.html
@@ -0,0 +1,21 @@
+<h1 id="page-title">Website-management software</h1>
+
+<div id="leader-text">
+ All subscriptions include full access to
+ the <strong>website-management software</strong> and
+ the <strong>integrated newsletter application</strong>.
+ They also include the infrastructure required to host your
+ website, managed and supported by the company that developed
+ the software.
+</div>
+
+<div id="content">
+ <p>
+ All prices are in euros and excluding VAT. The minimum contract
+ period is just 30 days, but customers that pay for 12 months in
+ advance receive a 10% discount. The limits are per server. You
+ can add multiple servers to your subscription to support large
+ sites or for additional speed and redundancy. There is no
+ initial setup fee.
+ </p>
+</div>
View
84 src/templates/en/frontpage.html
@@ -0,0 +1,84 @@
+<div id="leader-text">
+ Vixu.com offers <strong>website-management software</strong>
+ and is currently developing a <strong>webshop
+ application</strong>. The service is available under a
+ subscription model that includes first-class support and
+ hosting infrastructure.
+</div>
+
+<div id="main-bar">
+ <div id="advantages-container">
+
+ <h4>SEO-ready</h4>
+ <p>
+ Google rankings are primarily based on the relevance of the
+ content and the amount of incoming links. Vixu.com also
+ provides a solid technical foundation that makes it easier
+ for search engines to index your website and helps you to
+ optimize your Google ranking.
+ </p>
+
+ <h4>Dedicated support</h4>
+ <p>
+ Vixu.com is a small company and fanatical about customer
+ service. The website-management software is designed to be
+ straight-forward and easy to use, but in those rare cases
+ when you need help Vixu.com is there for you.
+ </p>
+
+ <h4>Flexible</h4>
+ <p>
+ Vixu.com takes pride in retaining customers through
+ excellent service instead of administrative trickery. The
+ minimum contract period is just 30 days and the service is
+ based on <a href="open-source.html">open source technology</a>,
+ so there is no vendor lock-in.
+ </p>
+
+ <h4>High-performance</h4>
+ <p>
+ Having a faster website results in a higher
+ conversion. Vixu.com uses a combination
+ of <a href="infrastructure.html">solid infrastructure</a>,
+ a
+ high-performance <a href="technology-stack.html">technology
+ stack</a> and
+ various <a href="performance.html">performance
+ enhancements</a> to make your website stand out from the
+ competition.
+ </p>
+
+ <h4>Reliable</h4>
+ <p>
+ Vixu.com offers <a href="flexible-servers.html">flexible
+ servers</a> that are spun up when your website experiences
+ a sudden traffic surge. Customers that require a high
+ level of reliability can also deploy extra servers on
+ different continents, making a complete outage an
+ extremely unlikely event.
+ </p>
+ </div>
+
+ <div id="teaser-image-container">
+ <div class="screenshot-container">
+ <img src="images/screenshot-beelden-aan-zee-homepage.png"
+ alt="Screenshot Museum Beelden aan Zee homepage"
+ title="Museum Beelden aan Zee homepage screenshot"
+ width="400"
+ height="322"
+ id="baz-screenshot" />
+ <h5>Website Museum Beelden aan Zee powered by Vixu.com.</h5>
+ </div>
+
+ <div class="screenshot-container">
+ <img src="images/screenshot-vix-webpage-editor.png"
+ alt="Screenshot Vixu.com webpage editor"
+ title="Vixu.com website-management software screenshot"
+ width="400"
+ height="322"
+ id="vix-screenshot" />
+ <h5>Vixu.com website-management software.</h5>
+ </div>
+
+ </div>
+</div>
View
78 src/templates/en/layout.html
@@ -0,0 +1,78 @@
+<!DOCTYPE html>
+<html lang="nl">
+ <head>
+ <title>Vixu.com: reliable website-management software</title>
+ <link rel="stylesheet" href="http://cdn1.vixu.com/static/style.css" type="text/css" />
+ <!--[if lt IE 9]>
+ <script
+ src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+
+ <script type="text/javascript">
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-31172010-1']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+ </script>
+ </head>
+ <body>
+
+ <div id="wrapper">
+
+ <header>
+
+ <div id="header-top-bar">
+ <div id="logo-container">
+ <h1 id="logo">
+ <a href="/">vixu<span>.com</span></a>
+ </h1>
+ </div>
+
+ <div id="search-form-container">
+ <form method="get" action="/nl/search">
+ <fieldset id="search-form">
+ <label for="search-field">Search</label>
+ <input id="search-field" name="q" type="text" />
+ <button id="search-button">
+ </button>
+ </fieldset>
+ </form>
+ </div>
+
+ <div id="language-options">
+ <a href="/nl">Nederlands</a>
+ </div>
+
+ </div>
+
+ <div id="header-menu-bar">
+
+ <ul id="menu">
+ <li><a href="index.html">Home</a></li>
+ <li><a href="pricing.html">Pricing</a></li>
+ <li><a href="features.html">Features</a></li>
+ <li><a href="about.html">About</a></li>
+ <li><a href="contact.html">Contact</a></li>
+ </ul>
+
+ </div>
+
+ </header>
+
+ <div id="content-bar">
+
+ </div>
+
+ <footer>
+ &copy; 2012, Vixu.com. All rights reserved. Vixu.com is a
+ trademark of Net Collective.
+ </footer>
+
+ </div>
+ </body>
+</html>
View
0  src/templates/login.html → src/templates/en/login.html
File renamed without changes
View
68 src/templates/en/newsletter-already-subscribed.html
@@ -0,0 +1,68 @@
+<div id="content-middle-bar">
+
+ <div id="content-image-bar">
+ <div id="image-bar-first-image-container">
+ <span class="circle"></span>
+ <img src="/static/images/rozenman-1.jpg"
+ alt="Beeld Rozenman"
+ title="Beeld Rozenman"
+ class="image-bar-image" />
+ </div>
+
+ <div id="image-bar-second-image-container">
+ <span class="circle"></span>
+ <img src="/static/images/rozenman-2.jpg"
+ alt="Beeld Rozenman"
+ title="Beeld Rozenman"
+ class="image-bar-image" />
+ </div>
+ </div>
+
+ <div id="content-bar" class="block">
+ This address is already subscribed to our newsletter.
+ </div>
+
+ <div id="right-bar">
+
+ <div id="news-block-first" class="block">
+ <span class="circle"></span>
+
+ <img src="images/rozenman-news-caption-image.jpg"
+ alt="Tentoonstelling Rozenman"
+ title="Tentoonstelling Rozenman"
+ class="news-block-main-image" />
+
+ <div class="news-text">
+ <strong>Interview Jehoshua Rozenman</strong>
+ </div>
+ </div>
+
+ <div id="news-block-second" class="block">
+ <span class="circle"></span>
+
+ <img src="images/museumkaart.jpg"
+ alt="Museumkaart"
+ title="Museumkaart"
+ class="news-block-main-image" />
+
+ <div class="news-text">
+ <strong>Museumkaart</strong> vanaf 1 juli 2011
+ ook in Beelden aan Zee!
+ </div>
+ </div>
+
+ <div id="opening-times-block" class="block">
+ <h5>Admission</h5>
+ <ul>
+ <li>Museumcard: free</li>
+ <li>Adults: &euro; 9,50</li>
+ <li>Children 13-18: &euro; 4,75</li>
+ <li>Children < 13: free</li>
+ </ul>
+
+ <h5>Opening times</h5>
+ <p>Tuesday to Sunday <br />11.00-17.00 hrs</p>
+ </div>
+
+ </div>
+</div>
View
68 src/templates/en/newsletter-confirmation-failed.html
@@ -0,0 +1,68 @@
+<div id="content-middle-bar">
+
+ <div id="content-image-bar">
+ <div id="image-bar-first-image-container">
+ <span class="circle"></span>
+ <img src="/static/images/rozenman-1.jpg"
+ alt="Beeld Rozenman"
+ title="Beeld Rozenman"
+ class="image-bar-image" />
+ </div>
+
+ <div id="image-bar-second-image-container">
+ <span class="circle"></span>
+ <img src="/static/images/rozenman-2.jpg"
+ alt="Beeld Rozenman"
+ title="Beeld Rozenman"
+ class="image-bar-image" />
+ </div>
+ </div>
+
+ <div id="content-bar" class="block">
+ This activation link is invalid.
+ </div>
+
+ <div id="right-bar">
+
+ <div id="news-block-first" class="block">
+ <span class="circle"></span>
+
+ <img src="images/rozenman-news-caption-image.jpg"
+ alt="Tentoonstelling Rozenman"
+ title="Tentoonstelling Rozenman"
+ class="news-block-main-image" />
+
+ <div class="news-text">
+ <strong>Interview Jehoshua Rozenman</strong>
+ </div>
+ </div>
+
+ <div id="news-block-second" class="block">
+ <span class="circle"></span>
+
+ <img src="images/museumkaart.jpg"
+ alt="Museumkaart"
+ title="Museumkaart"
+ class="news-block-main-image" />
+
+ <div class="news-text">
+ <strong>Museumkaart</strong> vanaf 1 juli 2011
+ ook in Beelden aan Zee!
+ </div>
+ </div>
+
+ <div id="opening-times-block" class="block">
+ <h5>Admission</h5>
+ <ul>
+ <li>Museumcard: free</li>
+ <li>Adults: &euro; 9,50</li>
+ <li>Children 13-18: &euro; 4,75</li>
+ <li>Children < 13: free</li>
+ </ul>
+
+ <h5>Opening times</h5>
+ <p>Tuesday to Sunday <br />11.00-17.00 hrs</p>
+ </div>
+
+ </div>
+</div>
View
18 src/templates/en/newsletter-confirmation-message.html
@@ -0,0 +1,18 @@
+<html>
+<body>
+<p>
+ Dear Sir/Madam,<br/>
+ Thank you for subscribing to our newsletter. Please click the
+ following link to confirm your subscription:</p>
+
+ <p>
+ <a href="http://www.beeldenaanzee.nl/newsletter/confirm?address=fmw@vix.io&code=dca1a2737e00691e1e3e442cb786f685"
+ >http://www.beeldenaanzee.nl/newsletter/confirm?address=fmw@vix.io&code=dca1a2737e00691e1e3e442cb786f685</a>
+ .
+ </p>
+ <p>
+ With kind regards,<br/>
+ Museum Beelden aan Zee
+ </p>
+</body>
+</html>
View
68 src/templates/en/newsletter-confirmed.html
@@ -0,0 +1,68 @@
+<div id="content-middle-bar">
+
+ <div id="content-image-bar">
+ <div id="image-bar-first-image-container">
+ <span class="circle"></span>
+ <img src="/static/images/rozenman-1.jpg"
+ alt="Beeld Rozenman"
+ title="Beeld Rozenman"
+ class="image-bar-image" />
+ </div>
+
+ <div id="image-bar-second-image-container">
+ <span class="circle"></span>
+ <img src="/static/images/rozenman-2.jpg"
+ alt="Beeld Rozenman"
+ title="Beeld Rozenman"
+ class="image-bar-image" />
+ </div>
+ </div>
+
+ <div id="content-bar" class="block">
+ Thank you for activating your subscription to our newsletter!
+ </div>
+
+ <div id="right-bar">
+
+ <div id="news-block-first" class="block">
+ <span class="circle"></span>
+
+ <img src="images/rozenman-news-caption-image.jpg"
+ alt="Tentoonstelling Rozenman"
+ title="Tentoonstelling Rozenman"
+ class="news-block-main-image" />
+
+ <div class="news-text">
+ <strong>Interview Jehoshua Rozenman</strong>
+ </div>
+ </div>
+
+ <div id="news-block-second" class="block">
+ <span class="circle"></span>
+
+ <img src="images/museumkaart.jpg"
+ alt="Museumkaart"
+ title="Museumkaart"
+ class="news-block-main-image" />
+
+ <div class="news-text">
+ <strong>Museumkaart</strong> vanaf 1 juli 2011
+ ook in Beelden aan Zee!
+ </div>
+ </div>
+
+ <div id="opening-times-block" class="block">
+ <h5>Admission</h5>
+ <ul>
+ <li>Museumcard: free</li>
+ <li>Adults: &euro; 9,50</li>
+ <li>Children 13-18: &euro; 4,75</li>
+ <li>Children < 13: free</li>
+ </ul>
+
+ <h5>Opening times</h5>
+ <p>Tuesday to Sunday <br />11.00-17.00 hrs</p>
+ </div>
+
+ </div>
+</div>
View
69 src/templates/en/newsletter-subscribed.html
@@ -0,0 +1,69 @@
+<div id="content-middle-bar">
+
+ <div id="content-image-bar">
+ <div id="image-bar-first-image-container">
+ <span class="circle"></span>
+ <img src="/static/images/rozenman-1.jpg"
+ alt="Beeld Rozenman"
+ title="Beeld Rozenman"
+ class="image-bar-image" />
+ </div>
+
+ <div id="image-bar-second-image-container">
+ <span class="circle"></span>
+ <img src="/static/images/rozenman-2.jpg"
+ alt="Beeld Rozenman"
+ title="Beeld Rozenman"
+ class="image-bar-image" />
+ </div>
+ </div>
+
+ <div id="content-bar" class="block">
+ Thank you for your subscription to the newsletter. You will
+ receive a message with an activation link within a few minutes.
+ </div>
+
+ <div id="right-bar">
+
+ <div id="news-block-first" class="block">
+ <span class="circle"></span>
+
+ <img src="images/rozenman-news-caption-image.jpg"
+ alt="Tentoonstelling Rozenman"
+ title="Tentoonstelling Rozenman"
+ class="news-block-main-image" />
+
+ <div class="news-text">
+ <strong>Interview Jehoshua Rozenman</strong>
+ </div>
+ </div>
+
+ <div id="news-block-second" class="block">
+ <span class="circle"></span>
+
+ <img src="images/museumkaart.jpg"
+ alt="Museumkaart"
+ title="Museumkaart"
+ class="news-block-main-image" />
+
+ <div class="news-text">
+ <strong>Museumkaart</strong> vanaf 1 juli 2011
+ ook in Beelden aan Zee!
+ </div>
+ </div>
+
+ <div id="opening-times-block" class="block">
+ <h5>Admission</h5>
+ <ul>
+ <li>Museumcard: free</li>
+ <li>Adults: &euro; 9,50</li>
+ <li>Children 13-18: &euro; 4,75</li>
+ <li>Children < 13: free</li>
+ </ul>
+
+ <h5>Opening times</h5>
+ <p>Tuesday to Sunday <br />11.00-17.00 hrs</p>
+ </div>
+
+ </div>
+</div>
View
29 src/templates/en/search-results.html
@@ -0,0 +1,29 @@
+<div id="content">
+
+ <h3>Search results</h3>
+
+ <p id="search-stats">
+ <span id="search-stats">42 results for query</span>
+ <strong id="search-stats-query">
+ What is the ultimate answer to the question of life,
+ the universe and everything?
+ </strong>.
+ <ol id="search-results">
+ <li><a href="/en/blog/Brora">Brora</a></li>
+ </ol>
+ </p>
+
+ <nav>
+ <ul id="search-results-navigate">
+ <li>
+ <a href="/en/search?q=whisky&after-doc-id=0&after-score=0.12"
+ id="previous-search-results-page">Previous</a>
+ </li>
+ <li>
+ <a href="/en/search?q=whisky&after-doc-id=5&after-score=0.09"
+ id="next-search-results-page">Next</a>
+ </li>
+ </ul>
+ </nav>
+ </div>
+</div>
View
0  src/templates/search.html → src/templates/en/search.html
File renamed without changes
View
46 src/templates/layout.html
@@ -1,46 +0,0 @@
-<!doctype html>
-<html lang=en>
- <head>
- <title>Vix Demo</title>
- <link rel="stylesheet" href="/static/blog.css" type="text/css" />
-
- <!--[if lt IE 9]>
- <script
- src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
- <![endif]-->
- </head>
-<body>
- <div id="wrapper">
-
- <header id="header">
- <h1 id="logo">Vix Demo</h1>
- </header>
-
- <div id="search-bar">
- <form action="/en/search" method="GET">
- <label for="q">Search:</label>
- <input type="text" name="q" id="q" />
- <input type="submit" value="Go" />
- </form>
- </div>
-
- <nav>
- <ul id="menu">
- <li><a href="/" title="Home">Home</a></li>
- </ul>
- </nav>
-
- <div id="main-page">
- <h3 id="page-title">Page title</h3>
- <div id="main-content">
- This is where the content goes.
- </div>
- </div>
- </div>
- <footer id="footer">
- <p>
- Powered by <a href="http://vix.io">vix.io</a>.
- </p>
- </footer>
-</body>
-</html>
View
68 src/templates/nl/admin.html
@@ -0,0 +1,68 @@
+<!doctype html>
+<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
+<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
+<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
+<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
+<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
+<head>
+ <meta charset="UTF-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+
+ <title>Vix Editor</title>
+
+ <link rel="stylesheet" href="/static/css/style.css">
+
+ <link rel="stylesheet" href="/static/css/button.css" />
+ <link rel="stylesheet" href="/static/css/dialog.css" />
+ <link rel="stylesheet" href="/static/css/linkbutton.css" />
+ <link rel="stylesheet" href="/static/css/menu.css">
+ <link rel="stylesheet" href="/static/css/menuitem.css">
+ <link rel="stylesheet" href="/static/css/menuseparator.css">
+ <link rel="stylesheet" href="/static/css/tab.css" />
+ <link rel="stylesheet" href="/static/css/tabbar.css" />
+ <link rel="stylesheet" href="/static/css/toolbar.css" />
+ <link rel="stylesheet" href="/static/css/colormenubutton.css" />
+ <link rel="stylesheet" href="/static/css/palette.css" />
+ <link rel="stylesheet" href="/static/css/colorpalette.css" />
+ <link rel="stylesheet" href="/static/css/datepicker.css" />
+
+ <link rel="stylesheet" href="/static/css/editor/bubble.css" />
+ <link rel="stylesheet" href="/static/css/editor/dialog.css" />
+ <link rel="stylesheet" href="/static/css/editor/linkdialog.css" />
+ <link rel="stylesheet" href="/static/css/editortoolbar.css" />
+
+ <!--[if lt IE 9]>
+ <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+</head>
+
+<body>
+ <div id="wrapper">
+ <header id="header">
+ <div id="logo-bar">
+ <h1 id="logo">vix</h1>
+ </div>
+ <nav>
+ <ul id="menu">
+ <li><a href="/admin/">Feeds</a></li>
+ <li><a href="/logout">Logout</a></li>
+ </ul>
+ </nav>
+ </header>
+
+ <div id="main-page">
+ </div>
+
+ <!-- In unoptimized mode, additional script tags are required -->
+ <script type="text/javascript" src="/static/js/out/goog/base.js"></script>
+ <script type="text/javascript" src="/static/js/vix/vix.js"></script>
+ <script type="text/javascript">
+ goog.require('vix.core');
+ </script>
+ <script type="text/javascript">
+ vix.core.start_app(location.pathname);
+ </script>
+
+ </div>
+</body>
+</html>
View
22 src/templates/nl/blog-article.html
@@ -0,0 +1,22 @@
+<article>
+ <h4>
+ <a href="/blog/first">First post!</a>
+ </h4>
+
+ <div class="published">
+ Posted at
+ <span class="date">
+ <span class="day">04</span>-<span
+ class="month">08</span>-<span class="year">1985</span>,
+ </span>
+
+ <span class="time">
+ <span class="hour">14</span>:<span
+ class="minute">34</span>.
+ </span>
+ </div>
+
+ <div class="content">
+ This is my first post!
+ </div>
+</article>
View
21 src/templates/nl/content-page.html
@@ -0,0 +1,21 @@
+<h1 id="page-title">Website-management software</h1>
+
+<div id="leader-text">
+ All subscriptions include full access to
+ the <strong>website-management software</strong> and
+ the <strong>integrated newsletter application</strong>.
+ They also include the infrastructure required to host your
+ website, managed and supported by the company that developed
+ the software.
+</div>
+
+<div id="content">
+ <p>
+ All prices are in euros and excluding VAT. The minimum contract
+ period is just 30 days, but customers that pay for 12 months in
+ advance receive a 10% discount. The limits are per server. You
+ can add multiple servers to your subscription to support large
+ sites or for additional speed and redundancy. There is no
+ initial setup fee.
+ </p>
+</div>
View
84 src/templates/nl/frontpage.html
@@ -0,0 +1,84 @@
+<div id="leader-text">
+ Vixu.com offers <strong>website-management software</strong>
+ and is currently developing a <strong>webshop
+ application</strong>. The service is available under a
+ subscription model that includes first-class support and
+ hosting infrastructure.
+</div>
+
+<div id="main-bar">
+ <div id="advantages-container">
+
+ <h4>SEO-ready</h4>
+ <p>
+ Google rankings are primarily based on the relevance of the
+ content and the amount of incoming links. Vixu.com also
+ provides a solid technical foundation that makes it easier
+ for search engines to index your website and helps you to
+ optimize your Google ranking.
+ </p>
+
+ <h4>Dedicated support</h4>
+ <p>
+ Vixu.com is a small company and fanatical about customer
+ service. The website-management software is designed to be
+ straight-forward and easy to use, but in those rare cases
+ when you need help Vixu.com is there for you.
+ </p>
+
+ <h4>Flexible</h4>
+ <p>
+ Vixu.com takes pride in retaining customers through
+ excellent service instead of administrative trickery. The
+ minimum contract period is just 30 days and the service is
+ based on <a href="open-source.html">open source technology</a>,
+ so there is no vendor lock-in.
+ </p>
+
+ <h4>High-performance</h4>
+ <p>
+ Having a faster website results in a higher
+ conversion. Vixu.com uses a combination
+ of <a href="infrastructure.html">solid infrastructure</a>,
+ a
+ high-performance <a href="technology-stack.html">technology
+ stack</a> and
+ various <a href="performance.html">performance
+ enhancements</a> to make your website stand out from the
+ competition.
+ </p>
+
+ <h4>Reliable</h4>
+ <p>
+ Vixu.com offers <a href="flexible-servers.html">flexible
+ servers</a> that are spun up when your website experiences
+ a sudden traffic surge. Customers that require a high
+ level of reliability can also deploy extra servers on
+ different continents, making a complete outage an
+ extremely unlikely event.
+ </p>
+ </div>
+
+ <div id="teaser-image-container">
+ <div class="screenshot-container">
+ <img src="images/screenshot-beelden-aan-zee-homepage.png"
+ alt="Screenshot Museum Beelden aan Zee homepage"
+ title="Museum Beelden aan Zee homepage screenshot"
+ width="400"
+ height="322"
+ id="baz-screenshot" />
+ <h5>Website Museum Beelden aan Zee powered by Vixu.com.</h5>
+ </div>
+
+ <div class="screenshot-container">
+ <img src="images/screenshot-vix-webpage-editor.png"
+ alt="Screenshot Vixu.com webpage editor"
+ title="Vixu.com website-management software screenshot"
+ width="400"
+ height="322"
+ id="vix-screenshot" />
+ <h5>Vixu.com website-management software.</h5>
+ </div>
+
+ </div>
+</div>
View
78 src/templates/nl/layout.html
@@ -0,0 +1,78 @@
+<!DOCTYPE html>
+<html lang="nl">
+ <head>
+ <title>Vixu.com: reliable website-management software</title>
+ <link rel="stylesheet" href="http://cdn1.vixu.com/static/style.css" type="text/css" />
+ <!--[if lt IE 9]>
+ <script
+ src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+
+ <script type="text/javascript">
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-31172010-1']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+ </script>
+ </head>
+ <body>
+
+ <div id="wrapper">
+
+ <header>
+
+ <div id="header-top-bar">
+ <div id="logo-container">
+ <h1 id="logo">
+ <a href="/">vixu<span>.com</span></a>
+ </h1>
+ </div>
+
+ <div id="search-form-container">
+ <form method="get" action="/nl/search">
+ <fieldset id="search-form">
+ <label for="search-field">Zoek</label>
+ <input id="search-field" name="q" type="text" />
+ <button id="search-button">
+ </button>
+ </fieldset>
+ </form>
+ </div>
+
+ <div id="language-options">
+ <a href="/">English</a>
+ </div>
+
+ </div>
+
+ <div id="header-menu-bar">
+
+ <ul id="menu">
+ <li><a href="index.html">Home</a></li>
+ <li><a href="pricing.html">Pricing</a></li>
+ <li><a href="features.html">Features</a></li>
+ <li><a href="about.html">About</a></li>
+ <li><a href="contact.html">Contact</a></li>
+ </ul>
+
+ </div>
+
+ </header>
+
+ <div id="content-bar">
+
+ </div>
+
+ <footer>
+ &copy; 2012, Vixu.com. Alle rechten voorbehouden. Vixu.com is
+ een handelsnaam van Net Collective.
+ </footer>
+
+ </div>
+ </body>
+</html>
View
50 src/templates/nl/login.html
@@ -0,0 +1,50 @@
+<!doctype html>
+<html lang=en>
+ <head>
+ <meta charset="UTF-8" />
+ <title>Login</title>
+ <link rel="stylesheet" href="/static/css/style.css" type="text/css" />
+ <!--[if lt IE 9]>
+ <script
+ src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+ </head>
+
+ <body>
+ <div id="wrapper">
+ <header id="header">
+ <div id="logo-bar">
+ <h1 id="logo">vix</h1>
+ </div>
+ <nav>
+ <ul id="menu">
+ </ul>
+ </nav>
+ </header>
+ <div id="status-message"></div>
+ <div id="main-page">
+ <div id="login-form">
+
+ <form action="/login" method="POST">
+ <div>
+ <label for="username">Username:</label>
+ <input type="text" name="username" id="username" />
+ </div>
+ <div>
+ <label for="password">Password:</label>
+ <input type="password" name="password"
+ id="password" />
+ </div>
+ <p>
+ <input type="submit" value="Login" />
+ </p>
+ </form>
+
+ </div>
+ </div>
+ </div>
+ <footer id="footer">
+ Powered by <a href="http://vix.io">Vix.io</a>.
+ </footer>
+ </body>
+</html>
View
68 src/templates/nl/newsletter-already-confirmed.html
@@ -0,0 +1,68 @@
+<div id="content-middle-bar">
+
+ <div id="content-image-bar">
+ <div id="image-bar-first-image-container">
+ <span class="circle"></span>
+ <img src="/static/images/rozenman-1.jpg"
+ alt="Beeld Rozenman"
+ title="Beeld Rozenman"
+ class="image-bar-image" />
+ </div>
+
+ <div id="image-bar-second-image-container">
+ <span class="circle"></span>
+ <img src="/static/images/rozenman-2.jpg"
+ alt="Beeld Rozenman"
+ title="Beeld Rozenman"
+ class="image-bar-image" />
+ </div>
+ </div>
+
+ <div id="content-bar" class="block">
+ Deze activatielink voor de nieuwsbrief is niet geldig.
+ </div>
+
+ <div id="right-bar">
+
+ <div id="news-block-first" class="block">
+ <span class="circle"></span>
+
+ <img src="images/rozenman-news-caption-image.jpg"
+ alt="Tentoonstelling Rozenman"
+ title="Tentoonstelling Rozenman"
+ class="news-block-main-image" />
+
+ <div class="news-text">
+ <strong>Interview Jehoshua Rozenman</strong>
+ </div>
+ </div>
+
+ <div id="news-block-second" class="block">
+ <span class="circle"></span>
+
+ <img src="images/museumkaart.jpg"
+ alt="Museumkaart"
+ title="Museumkaart"
+ class="news-block-main-image" />
+
+ <div class="news-text">
+ <strong>Museumkaart</strong> vanaf 1 juli 2011
+ ook in Beelden aan Zee!
+ </div>
+ </div>
+
+ <div id="opening-times-block" class="block">
+ <h5>Toegang</h5>
+ <ul>
+ <li>Museumkaart: gratis</li>
+ <li>Volwassenen: &euro; 9,50</li>
+ <li>Kinderen 13-18: &euro; 4,75</li>
+ <li>Kinderen < 13: gratis</li>
+ </ul>
+
+ <h5>Openstelling</h5>
+ <p>Dinsdag t/m zondag<br />11.00-17.00 uur</p>
+ </div>
+
+ </div>
+</div>
View
68 src/templates/nl/newsletter-already-subscribed.html
@@ -0,0 +1,68 @@
+<div id="content-middle-bar">
+
+ <div id="content-image-bar">
+ <div id="image-bar-first-image-container">
+ <span class="circle"></span>
+ <img src="/static/images/rozenman-1.jpg"
+ alt="Beeld Rozenman"
+ title="Beeld Rozenman"
+ class="image-bar-image" />
+ </div>
+
+ <div id="image-bar-second-image-container">
+ <span class="circle"></span>
+ <img src="/static/images/rozenman-2.jpg"
+ alt="Beeld Rozenman"
+ title="Beeld Rozenman"
+ class="image-bar-image" />
+ </div>
+ </div>
+
+ <div id="content-bar" class="block">
+ Dit adres is al aangemeld op de nieuwsbrief.
+ </div>
+
+ <div id="right-bar">
+
+ <div id="news-block-first" class="block">
+ <span class="circle"></span>
+
+ <img src="images/rozenman-news-caption-image.jpg"
+ alt="Tentoonstelling Rozenman"
+ title="Tentoonstelling Rozenman"
+ class="news-block-main-image" />
+
+ <div class="news-text">
+ <strong>Interview Jehoshua Rozenman</strong>
+ </div>
+ </div>
+
+ <div id="news-block-second" class="block">
+ <span class="circle"></span>
+
+ <img src="images/museumkaart.jpg"
+ alt="Museumkaart"
+ title="Museumkaart"
+ class="news-block-main-image" />
+
+ <div class="news-text">
+ <strong>Museumkaart</strong> vanaf 1 juli 2011
+ ook in Beelden aan Zee!
+ </div>
+ </div>
+
+ <div id="opening-times-block" class="block">
+ <h5>Toegang</h5>
+ <ul>
+ <li>Museumkaart: gratis</li>
+ <li>Volwassenen: &euro; 9,50</li>
+ <li>Kinderen 13-18: &euro; 4,75</li>
+ <li>Kinderen < 13: gratis</li>
+ </ul>
+
+ <h5>Openstelling</h5>
+ <p>Dinsdag t/m zondag<br />11.00-17.00 uur</p>
+ </div>
+
+ </div>
+</div>
View
68 src/templates/nl/newsletter-confirmation-failed.html
@@ -0,0 +1,68 @@
+<div id="content-middle-bar">
+
+ <div id="content-image-bar">
+ <div id="image-bar-first-image-container">
+ <span class="circle"></span>
+ <img src="/static/images/rozenman-1.jpg"
+ alt="Beeld Rozenman"
+ title="Beeld Rozenman"
+ class="image-bar-image" />
+ </div>
+
+ <div id="image-bar-second-image-container">
+ <span class="circle"></span>
+ <img src="/static/images/rozenman-2.jpg"
+ alt="Beeld Rozenman"
+ title="Beeld Rozenman"
+ class="image-bar-image" />
+ </div>
+ </div>
+
+ <div id="content-bar" class="block">
+ Deze activatielink voor de nieuwsbrief is niet geldig.
+ </div>
+
+ <div id="right-bar">
+
+ <div id="news-block-first" class="block">
+ <span class="circle"></span>
+
+ <img src="images/rozenman-news-caption-image.jpg"
+ alt="Tentoonstelling Rozenman"
+ title="Tentoonstelling Rozenman"
+ class="news-block-main-image" />
+
+ <div class="news-text">
+ <strong>Interview Jehoshua Rozenman</strong>
+ </div>
+ </div>
+
+ <div id="news-block-second" class="block">
+ <span class="circle"></span>
+
+ <img src="images/museumkaart.jpg"
+ alt="Museumkaart"
+ title="Museumkaart"
+ class="news-block-main-image" />
+
+ <div class="news-text">
+ <strong>Museumkaart</strong> vanaf 1 juli 2011
+ ook in Beelden aan Zee!
+ </div>
+ </div>
+
+ <div id="opening-times-block" class="block">
+ <h5>Toegang</h5>
+ <ul>
+ <li>Museumkaart: gratis</li>
+ <li>Volwassenen: &euro; 9,50</li>
+ <li>Kinderen 13-18: &euro; 4,75</li>
+ <li>Kinderen < 13: gratis</li>
+ </ul>
+
+ <h5>Openstelling</h5>
+ <p>Dinsdag t/m zondag<br />11.00-17.00 uur</p>
+ </div>
+
+ </div>
+</div>
View
19 src/templates/nl/newsletter-confirmation-message.html
@@ -0,0 +1,19 @@
+<html>
+<body>
+<p>
+ Geachte heer, mevrouw,<br/>
+ Bedankt voor uw aanmelding op onze nieuwsbrief. Klik alstublieft op
+ de volgende link om uw aanmelding te bevestigen:
+</p>
+
+ <p>
+ <a href="http://www.beeldenaanzee.nl/newsletter/confirm?address=fmw@vix.io&code=dca1a2737e00691e1e3e442cb786f685"
+ >http://www.beeldenaanzee.nl/newsletter/confirm?address=fmw@vix.io&code=dca1a2737e00691e1e3e442cb786f685</a>
+ .
+ </p>
+ <p>
+ Met vriendelijke groet,<br/>
+ Museum Beelden aan Zee
+ </p>
+</body>
+</html>
View
68 src/templates/nl/newsletter-confirmed.html
@@ -0,0 +1,68 @@
+<div id="content-middle-bar">
+
+ <div id="content-image-bar">
+ <div id="image-bar-first-image-container">
+ <span class="circle"></span>
+ <img src="/static/images/rozenman-1.jpg"
+ alt="Beeld Rozenman"
+ title="Beeld Rozenman"
+ class="image-bar-image" />
+ </div>
+
+ <div id="image-bar-second-image-container">
+ <span class="circle"></span>
+ <img src="/static/images/rozenman-2.jpg"
+ alt="Beeld Rozenman"
+ title="Beeld Rozenman"
+ class="image-bar-image" />
+ </div>
+ </div>
+
+ <div id="content-bar" class="block">
+ Bedankt voor het bevestigen van uw aanmelding op onze nieuwsbrief!
+ </div>
+
+ <div id="right-bar">
+
+ <div id="news-block-first" class="block">
+ <span class="circle"></span>
+
+ <img src="images/rozenman-news-caption-image.jpg"
+ alt="Tentoonstelling Rozenman"
+ title="Tentoonstelling Rozenman"
+ class="news-block-main-image" />
+
+ <div class="news-text">
+ <strong>Interview Jehoshua Rozenman</strong>
+ </div>
+ </div>
+
+ <div id="news-block-second" class="block">
+ <span class="circle"></span>
+
+ <img src="images/museumkaart.jpg"
+ alt="Museumkaart"
+ title="Museumkaart"
+ class="news-block-main-image" />
+
+ <div class="news-text">
+ <strong>Museumkaart</strong> vanaf 1 juli 2011
+ ook in Beelden aan Zee!
+ </div>
+ </div>
+
+ <div id="opening-times-block" class="block">
+ <h5>Toegang</h5>
+ <ul>
+ <li>Museumkaart: gratis</li>
+ <li>Volwassenen: &euro; 9,50</li>
+ <li>Kinderen 13-18: &euro; 4,75</li>
+ <li>Kinderen < 13: gratis</li>
+ </ul>
+
+ <h5>Openstelling</h5>
+ <p>Dinsdag t/m zondag<br />11.00-17.00 uur</p>
+ </div>
+
+ </div>
+</div>
View
70 src/templates/nl/newsletter-subscribed.html
@@ -0,0 +1,70 @@
+<div id="content-middle-bar">
+
+ <div id="content-image-bar">
+ <div id="image-bar-first-image-container">
+ <span class="circle"></span>
+ <img src="/static/images/rozenman-1.jpg"
+ alt="Beeld Rozenman"
+ title="Beeld Rozenman"
+ class="image-bar-image" />
+ </div>
+
+ <div id="image-bar-second-image-container">
+ <span class="circle"></span>
+ <img src="/static/images/rozenman-2.jpg"
+ alt="Beeld Rozenman"
+ title="Beeld Rozenman"
+ class="image-bar-image" />
+ </div>
+ </div>
+
+ <div id="content-bar" class="block">
+ Bedankt voor uw aanmelding op de nieuwsbrief. U ontvangt
+ binnen enkele minuten een bericht waarmee u uw aanmelding
+ kunt bevestigen.
+ </div>
+
+ <div id="right-bar">
+
+ <div id="news-block-first" class="block">
+ <span class="circle"></span>
+
+ <img src="images/rozenman-news-caption-image.jpg"
+ alt="Tentoonstelling Rozenman"
+ title="Tentoonstelling Rozenman"
+ class="news-block-main-image" />
+
+ <div class="news-text">
+ <strong>Interview Jehoshua Rozenman</strong>
+ </div>
+ </div>
+
+ <div id="news-block-second" class="block">
+ <span class="circle"></span>
+
+ <img src="images/museumkaart.jpg"
+ alt="Museumkaart"
+ title="Museumkaart"
+ class="news-block-main-image" />
+
+ <div class="news-text">
+ <strong>Museumkaart</strong> vanaf 1 juli 2011
+ ook in Beelden aan Zee!
+ </div>
+ </div>
+
+ <div id="opening-times-block" class="block">
+ <h5>Toegang</h5>
+ <ul>
+ <li>Museumkaart: gratis</li>
+ <li>Volwassenen: &euro; 9,50</li>
+ <li>Kinderen 13-18: &euro; 4,75</li>
+ <li>Kinderen < 13: gratis</li>
+ </ul>
+
+ <h5>Openstelling</h5>
+ <p>Dinsdag t/m zondag<br />11.00-17.00 uur</p>
+ </div>
+
+ </div>
+</div>
View
29 src/templates/nl/search-results.html
@@ -0,0 +1,29 @@
+<div id="content">
+
+ <h3>Search results</h3>
+
+ <p id="search-stats">
+ <span id="search-stats">42 results for query</span>
+ <strong id="search-stats-query">
+ What is the ultimate answer to the question of life,
+ the universe and everything?
+ </strong>.
+ <ol id="search-results">
+ <li><a href="/en/blog/Brora">Brora</a></li>
+ </ol>
+ </p>
+
+ <nav>
+ <ul id="search-results-navigate">
+ <li>
+ <a href="/en/search?q=whisky&after-doc-id=0&after-score=0.12"
+ id="previous-search-results-page">Previous</a>
+ </li>
+ <li>
+ <a href="/en/search?q=whisky&after-doc-id=5&after-score=0.09"
+ id="next-search-results-page">Next</a>
+ </li>
+ </ul>
+ </nav>
+ </div>
+</div>
View
47 src/templates/nl/search.html
@@ -0,0 +1,47 @@
+<!doctype html>
+<html lang=en>
+ <head>
+ <title>Vix Search</title>
+ <link rel="stylesheet" href="/static/blog.css" type="text/css" />
+
+ <!--[if lt IE 9]>
+ <script
+ src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+ </head>
+<body>
+ <div id="wrapper">
+
+ <header id="header">
+ <h1 id="logo">Vix Demo</h1>
+ </header>
+
+ <nav>
+ <ul id="menu">
+ <li><a href="/" title="Home">Home</a></li>
+ </ul>
+ </nav>
+
+ <div id="main-page">
+ <h3>Search results</h3>
+ <p id="search-stats">
+ <span id="search-stats-hits">42</span>
+ results for query
+ <strong id="search-stats-query">
+ What is the ultimate answer to the question of life,
+ the universe and everything?
+ </strong>.
+ <ol id="search-results">
+ <li><a href="/en/blog/Brora">Brora</a></li>
+ </ol>
+ </div>
+
+ <footer id="footer">
+ <p>
+ Powered by <a href="http://vix.io">vix.io</a>.
+ </p>
+ </footer>
+
+ </div>
+</body>
+</html>
View
25 src/templates/search-results.html
@@ -1,25 +0,0 @@
-<div id="main-content">
- <p id="search-stats">
- <span id="search-stats">42 results for query</span>
- <strong id="search-stats-query">
- What is the ultimate answer to the question of life,
- the universe and everything?
- </strong>.
- <ol id="search-results">
- <li><a href="/en/blog/Brora">Brora</a></li>
- </ol>
- </p>
-
- <nav>
- <ul id="search-results-navigate">
- <li>
- <a href="/en/search?q=whisky&after-doc-id=0&after-score=0.12"
- id="previous-search-results-page">Previous</a>
- </li>
- <li>
- <a href="/en/search?q=whisky&after-doc-id=5&after-score=0.09"
- id="next-search-results-page">Next</a>
- </li>
- </ul>
- </nav>
-</div>
View
65 src/vix/config.clj
@@ -1,8 +1,71 @@
+;; src/vix/config.clj: configuraton namespace for Vix
+;;
+;; Copyright 2011-2012, F.M. (Filip) de Waard <fmw@vix.io>.
+;;
+;; Licensed under the Apache License, Version 2.0 (the "License");
+;; you may not use this file except in compliance with the License.
+;; You may obtain a copy of the License at
+;;
+;; http://www.apache.org/licenses/LICENSE-2.0
+;;
+;; Unless required by applicable law or agreed to in writing, software
+;; distributed under the License is distributed on an "AS IS" BASIS,
+;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;; See the License for the specific language governing permissions and
+;; limitations under the License.
+
(ns vix.config)
+;; database
(def db-server "http://localhost:5984/")
(def database "vix")
+(def lucene-index-path "/var/lucene/vix")
+
+;; host
+(def default-host "localhost:3000")
+(def base-uri "http://localhost:3000/")
+(def cdn-hostname "http://localhost:3000")
+
+;; redirects, e.g. {"/vixu" "http://www.vixu.com"}
+(def redirects {})
+
+;; i18n
(def default-timezone "Europe/Amsterdam")
+(def default-language "en")
+
+;; search
+(def search-results-per-page 10)
+
+;; newsletter
+(def from-email-address "fmw@vixu.com")
+
+;; presentation
+(def title-prefix "")
+
+(defn get-menu-slug [language]
+ (str "/" language "/menu/menu"))
+
+(defn get-frontpage-slug [language]
+ (str "/" language "/frontpage"))
-(def search-results-per-page 10)
+(def page-segments
+ {:frontpage
+ {:menu
+ {:type :document
+ :nodes :#menu
+ :slug get-menu-slug}
+ :frontpage
+ {:type :document
+ :nodes :#content
+ :slug get-frontpage-slug}}
+ :search-page
+ {:menu
+ {:type :document
+ :nodes :#menu
+ :slug get-menu-slug}}
+ :default-page
+ {:menu
+ {:type :document
+ :nodes :#menu
+ :slug get-menu-slug}}})
View
28 src/vix/db.clj
@@ -37,9 +37,13 @@
:feeds
{:map (load-view "database-views/map_feeds.js")}
:feeds_by_default_document_type
- {:map (load-view (str
- "database-views/"
- "map_feeds_by_default_document_type.js"))}})
+ {:map (load-view
+ "database-views/map_feeds_by_default_document_type.js")}
+ :events_by_feed
+ {:map (load-view "database-views/map_events_by_feed.js")}
+ :subscribers
+ {:map (load-view
+ "database-views/map_newsletter_subscribers.js")}})
(defn #^{:rebind true} view-sync
[server db design-doc view-name view-functions]
@@ -176,6 +180,24 @@
(kit/handle couchdb/ResourceConflict []
nil)))
+(defn get-most-recent-event-documents
+ [db-server db-name language feed-name limit]
+ (let [feed [language feed-name]
+ options {:include_docs true
+ :startkey [feed {}]
+ :endkey [feed nil]
+ :descending true}
+ options (if (nil? limit)
+ options
+ (assoc options :limit limit))
+ result (view-get db-server
+ db-name
+ "views"
+ "events_by_feed"
+ options)]
+ (if-let [entries (:rows result)]
+ (map #(:value %) entries))))
+
(defn get-documents-for-feed
([db-server db-name language feed-name]
(get-documents-for-feed db-server
View
5 src/vix/lucene.clj
@@ -22,6 +22,7 @@
[net.cgrand.enlive-html :as html]
[clj-time.coerce :as time-coerce]
[clojure.contrib.math :as math]
+ [vix.config :as config]
[vix.util :as util])
(:import [org.apache.lucene.document
Document Field Field$Store Field$Index NumericField]
@@ -37,8 +38,6 @@
[org.jsoup Jsoup]
[java.io File]))
-(def index-path "/var/lucene/vix")
-
(defn #^StandardAnalyzer create-analyzer []
"Creates a StandardAnalyzer that tokenizes fulltext fields."
(StandardAnalyzer. (. Version LUCENE_35)))
@@ -49,7 +48,7 @@
(RAMDirectory.)
(NIOFSDirectory. (File. path))))
-(def directory (create-directory index-path))
+(def directory (create-directory config/lucene-index-path))
(def analyzer (create-analyzer))
(defn #^IndexReader create-index-reader [#^Directory directory]
View
320 src/vix/routes.clj
@@ -1,6 +1,6 @@
;; src/vix/routes.clj core routes for the application.
;;
-;; Copyright 2011, F.M. (Filip) de Waard <fmw@vix.io>.
+;; Copyright 2011-2012, F.M. (Filip) de Waard <fmw@vix.io>.
;;
;; Licensed under the Apache License, Version 2.0 (the "License");
;; you may not use this file except in compliance with the License.
@@ -25,40 +25,184 @@
[vix.lucene :as lucene]
[vix.views :as views]
[vix.util :as util]
+ [clj-time.format :as time-format]
+ [clj-time.core :as time-core]
[clojure.contrib [error-kit :as kit]]
[couchdb [client :as couchdb]]
[compojure.route :as route]
[compojure.handler :as handler]))
(def search-allowed-feeds
- (atom (db/get-searchable-feeds (db/list-feeds config/db-server
- config/database))))
+ (atom (try
+ (db/get-searchable-feeds (db/list-feeds config/db-server
+ config/database))
+ (catch Exception e
+ nil))))
-; FIXME: test character encoding issues
(defn response [body & {:keys [status content-type]}]
{:status (or status (if (nil? body) 404 200))
:headers {"Content-Type" (or content-type "text/html; charset=UTF-8")}
:body body})
-; FIXME: test character encoding issues
(defn json-response [body & {:keys [status]}]
(response (when-not (nil? body) (json-str body))
:status (or status (if (nil? body) 404 200))
:content-type "application/json; charset=UTF-8"))
-; FIXME: add a nice 404 page
-; FIXME: add authorization
-(defn catch-all [db-server database slug]
- (if-let [document (db/get-document db-server database slug)]
- (if-let [original (:original (:_attachments document))]
- (response (new java.io.ByteArrayInputStream
- (:body (couchdb/attachment-get db-server
+;; FIXME: add a nice 404 page
+(defn page-not-found-response []
+ (response "<h1>Page not found</h1>" :status 404))
+
+(defn image-response [db-server database document]
+ (try
+ (let [resp (response (new java.io.ByteArrayInputStream
+ (:body (couchdb/attachment-get db-server
+ database
+ document
+ "original")))
+ :content-type (:content_type
+ (:original
+ (:_attachments
+ document))))]
+ (assoc resp :headers
+ (assoc (:headers resp)
+ "ETag"
+ (:_rev document))
+ "Last-Modified"
+ (time-format/unparse (time-format/formatters :rfc822)
+ (util/rfc3339-to-jodatime
+ (or (:updated document)
+ (:published document))
+ "UTC"))))
+ (catch java.io.FileNotFoundException e
+ (page-not-found-response))))
+
+(defmulti get-segment
+ "Multimethod that retrieves the data associated with a page segment
+ based on the segment :type (e.g. :document, :string).
+
+ Segments are used for coupling external entities with documents
+ (e.g. recent news items, but not the related-pages that are already
+ stored in a document attribute).
+
+ They are stored in config/page-segments."
+ (fn [segment-details db-server database language timezone]
+ (:type segment-details)))
+
+(defmethod get-segment :document
+ [segment-details db-server database language timezone]
+ (assoc segment-details
+ :data
+ (db/get-document
+ db-server
+ database
+ ((:slug segment-details) language))))
+
+(defmethod get-segment :most-recent-events
+ [segment-details db-server database language timezone]
+ (let [docs (db/get-most-recent-event-documents db-server
+ database
+ language
+ (:feed segment-details)
+ (:limit segment-details))]
+ (assoc segment-details
+ :data
+ (if (= (count docs) 1)
+ (first docs)
+ docs))))
+
+(defmethod get-segment :feed
+ [segment-details db-server database language timezone]
+ (let [docs (db/get-documents-for-feed db-server
+ database
+ language
+ (:feed segment-details)
+ (:limit segment-details))]
+ (assoc segment-details
+ :data
+ (if (= (count docs) 1)
+ (first docs)
+ docs))))
+
+(defmethod get-segment :string
+ [segment-details db-server database language timezone]
+ segment-details)
+
+(defn get-segments [page-segments db-server database language timezone]
+ (into {}
+ (for [[k v] page-segments]
+ [k (get-segment v
+ db-server
+ database
+ language
+ timezone)])))
+
+(defn get-frontpage-for-language! [db-server database language timezone]
+ (views/frontpage-view
+ language
+ timezone
+ (get-segments (:frontpage config/page-segments)
+ db-server
+ database
+ language
+ timezone)))
+
+(def *frontpage-cache* (atom {}))
+
+(defn get-cached-frontpage! [db-server database language timezone]
+ (if-let [fp (get @*frontpage-cache* language)]
+ fp
+ (do
+ (swap! *frontpage-cache*
+ assoc
+ language
+ (response (get-frontpage-for-language! db-server
database
- (:_id document)
- "original")))
- :content-type (:content_type original))
- (response (views/blog-article-view document config/default-timezone)))
- (response "<h1>Page not found</h1>" :status 404)))
+ language
+ timezone)))
+ (get-cached-frontpage! db-server database language timezone))))
+
+(defn reset-frontpage-cache! [language]
+ (swap! *frontpage-cache* dissoc language))
+
+(def *page-cache* (atom {}))
+
+(defn get-cached-page! [db-server database slug timezone]
+ (if-let [p (get @*page-cache* slug)]
+ p
+ (if-let [document (db/get-document db-server database slug)]
+ (cond
+ ;; files always skip the cache
+ (:original (:_attachments document))
+ (image-response db-server database document)
+ ;; for event-like documents
+ ;;(not (nil? (:end-time-rfc3339 document)))
+ ;; for all other documents
+ :default
+ (do
+ (swap! *page-cache*
+ assoc
+ slug
+ (response
+ (views/page-view (:language document)
+ timezone
+ document
+ (get-segments (:default-page
+ config/page-segments)
+ db-server
+ database
+ (:language document)
+ timezone))))
+ (get-cached-page! db-server database slug timezone)))
+
+ (page-not-found-response))))
+
+(defn reset-page-cache! []
+ (compare-and-set! *page-cache* @*page-cache* {}))
+
+;; FIXME: add authorization
+(defn catch-all [db-server database slug timezone]
+ (get-cached-page! db-server database slug timezone))
(defn logout [session]
{:session (dissoc session :username)
@@ -87,18 +231,34 @@
;; consider escaping json calls (e.g. /json/document/_new
;; instead of just /new)
(defroutes main-routes
- (GET "/test"
- {{a :a} :params}
- (json-str a))
(GET "/"
[]
- (response (views/blog-frontpage-view
- (db/get-documents-for-feed config/db-server
- config/database
- ;; FIXME: make configurable
- "en"
- "blog")
- config/default-timezone)))
+ (get-cached-frontpage! config/db-server
+ config/database
+ config/default-language
+ config/default-timezone))
+ (GET "/admin*"
+ {session :session {feed "feed"} :params}
+ (when (authorize session nil :* :DELETE)
+ (response (views/admin-template {}))))
+ (GET "/login"
+ []
+ (response (views/login-page-template "")))
+ (POST "/login"
+ {session :session
+ {username "username" password "password"} :form-params}
+ (login session username password))