Browse Source

Added missing html files, updated Makefile.

David Moreno 12 years ago
parent
commit
db4977045c
3 changed files with 26 additions and 1 deletions
  1. 1 1
      onion/Makefile
  2. 9 0
      onion/base.html
  3. 16 0
      onion/fortunes.html

+ 1 - 1
onion/Makefile

@@ -6,7 +6,7 @@ LDFLAGS=-lonion -ljson -lmysqlclient -lpthread -L/usr/lib64/mysql/ -L.
 hello.o: onion hello.c 
 
 hello: hello.o libonion_static.a base_html.o fortunes_html.o
-	cc hello.o base_html.o fortunes_html.o libonion_static.a -o hello -lpthread -lmysqlclient -ljson -lgnutls -lrt `mysql_config --libs` -lgcrypt
+	cc hello.o base_html.o fortunes_html.o libonion_static.a -o hello -lpthread -lmysqlclient -ljson -lgnutls -lrt
 
 clean:
 	rm -f *.o hello base_html.c fortunes_html.c

+ 9 - 0
onion/base.html

@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>{{title}}</title>
+  </head>
+  <body>
+{% block content %}No content{% endblock %}  
+  </body>
+</html>

+ 16 - 0
onion/fortunes.html

@@ -0,0 +1,16 @@
+{% extends "base.html" %}
+{% block content %}
+<table>
+<tr>
+<th>id</th>
+<th>message</th>
+</tr>
+{% for f in fortunes %}
+<tr>
+<td>{{f.id}}</td>
+<td>{{f.message}}</td>
+</tr>
+{% endfor %}
+</table>
+{% endblock %}
+