summaryrefslogtreecommitdiffstats
path: root/myapp/templates
diff options
context:
space:
mode:
authorKyle K <kylek389@gmail.com>2017-03-27 03:14:49 -0500
committerKyle K <kylek389@gmail.com>2017-03-27 03:14:49 -0500
commit6c4a69c8fc0635140ed2cf589cb87397cd9e8e87 (patch)
treeb22c1abd08159b8f8e5b89e88c6eca1615214f6d /myapp/templates
parentb407981d418943f737a9eb76d3566dc6f913ad37 (diff)
downloadCLscrap-6c4a69c8fc0635140ed2cf589cb87397cd9e8e87.tar.gz
CLscrap-6c4a69c8fc0635140ed2cf589cb87397cd9e8e87.tar.bz2
CLscrap-6c4a69c8fc0635140ed2cf589cb87397cd9e8e87.zip
use templating to render HTML page on /app
Diffstat (limited to 'myapp/templates')
-rw-r--r--myapp/templates/index.html37
1 files changed, 37 insertions, 0 deletions
diff --git a/myapp/templates/index.html b/myapp/templates/index.html
new file mode 100644
index 0000000..1a1f618
--- /dev/null
+++ b/myapp/templates/index.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>Craigslist Scraper</title>
+ <style type="text/css">
+ #item-list { position: relative; }
+ .item { margin-bottom: 10px; width: 340px; height: 380px; float: left; margin-left: 10px; }
+ .item-title { display: block; font-size: 1.3em }
+ .item-price { font-weight: bold; padding-left: 20px;}
+ .item img { display: block; }
+ </style>
+</head>
+<body>
+<h2>Craigslist Scrapper</h2>
+<span>get list of current WRX STi parts for sale in Chicago area</span>
+<pre>
+ url: {{ baseurl }}
+ query: {{ keyword }}
+
+ author: fatalhalt
+ https://github.com/fatalhalt/CLscrap
+
+</pre>
+<div id="item-list">
+{% for i in data %}
+ <div class="item">
+ <a href="{{ baseurl }}{{ i.link }}" class="item-title">{{ i.title }}</a>
+ <span class="item-date">{{ i.date }}</span>
+ <span class="item-price">{{ i.price }}</span>
+ <span class="item-hood">{{ i.hood }}</span>
+ <img src="{{ i.img }}" alt="img" />
+ </div>
+{% endfor %}
+</div>
+</body>
+</html> \ No newline at end of file