Skip to content

Commit

Permalink
Merge pull request #14 from f3l/08_webtexts
Browse files Browse the repository at this point in the history
Modified Homepage texts
Closes #8
  • Loading branch information
pheerai committed Mar 26, 2016
2 parents 1921f0c + 1b92aec commit 17aac1f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
6 changes: 3 additions & 3 deletions source/app.d
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,21 @@ public:
}

void getRandom() {
string title = "Random Quote";
string title = "Zufälliges Zitat";
string quote = this.chooseCite();
render!("random.dt", title, quote);
}

void getAll() {
string title ="All quotes";
string title ="Alle Zitate";
// Sort with descending key, e.g. newest quote in front
auto cites = db.zrevRange(dbKey, 0, -1);
long llen = db.zcard(dbKey);
render!("all.dt", title, cites, llen);
}

void getAdd() const {
string title="Add new Quote";
string title="Zitat hinzufügen";
render!("add.dt", title);
}

Expand Down
3 changes: 2 additions & 1 deletion views/add.dt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
extends ./layout

block content
p#desc Add a quote to the DB.
p#desc Neue Zitate hinzufügen.
p Visuelle Trennungen bitte durch einen Zeilenumbruch kennzeichnen (wird ersetzt durch „ – “).
form(action="added", method="POST")
textarea#inputField(type="text", name="cite", autofocus=true)
button(id="submit_add", type="submit") Zitat hinzufügen
2 changes: 1 addition & 1 deletion views/all.dt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
extends ./layout

block content
p#desc All #{llen} cites known:
p#desc Alle #{llen} bekannten Zitate.
div(id="citebody")
- foreach(string cite; cites)
p(class="cite") #{cite}
8 changes: 4 additions & 4 deletions views/basemenu.dt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
div(class="menu", id="menu")
a(class="menuitem", href="/") Home
a(class="menuitem", href="/add") Add new
a(class="menuitem", href="/all") All quotes
a(class="menuitem", href="/random") Get random quote
a(class="menuitem", href="/") Startseite
a(class="menuitem", href="/add") Hinzufügen
a(class="menuitem", href="/all") Alle
a(class="menuitem", href="/random") Zufällig
3 changes: 2 additions & 1 deletion views/index.dt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
extends ./layout

block content
p You may be able to add, view and edit F3Lcites quite soon!
p#desc Willkommen auf der internen Zitat-Datenbank des F3L-Teams!
p Hier können Zitat hinzugefügt sowie die bereits eingepflegten betrachtet werden.

0 comments on commit 17aac1f

Please sign in to comment.