aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorbryan newbold <bnewbold@robocracy.org>2013-05-12 11:02:04 -0400
committerbryan newbold <bnewbold@robocracy.org>2013-05-12 11:02:04 -0400
commit31907e58394484c2447402f630c0a5c93c5b37e7 (patch)
treed48dd77113b865347f073f1c2a5948f631ecf8be /templates
parentc31cfe661cc46a645ac7f8ad74abe03edb93f04a (diff)
downloadpartmom-31907e58394484c2447402f630c0a5c93c5b37e7.tar.gz
partmom-31907e58394484c2447402f630c0a5c93c5b37e7.zip
minimum viable demonstration
Diffstat (limited to 'templates')
-rw-r--r--templates/base.html14
-rw-r--r--templates/grid.html53
-rw-r--r--templates/index.html8
3 files changed, 75 insertions, 0 deletions
diff --git a/templates/base.html b/templates/base.html
new file mode 100644
index 0000000..779181a
--- /dev/null
+++ b/templates/base.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <title>{% block title %}partmom{% endblock %}</title>
+ <link rel="stylesheet" type="text/css" href="/static/style.css" />
+ {% block head %}{% endblock %}
+</head>
+<body>
+<div class="content">
+{% block content %}{% endblock %}
+</div>
+</body>
+</html>
diff --git a/templates/grid.html b/templates/grid.html
new file mode 100644
index 0000000..3a4c71e
--- /dev/null
+++ b/templates/grid.html
@@ -0,0 +1,53 @@
+{% extends "base.html" %}
+{% block title %}partmom: {{ grid.vendor }} {{ grid.familyname }}{% endblock %}
+{% block content %}
+<h1>{{ grid.vendor }} {{ grid.familyname }}</h1>
+
+{% for spec in grid.shared_specs %}
+ <b>{{ spec }}:</b> {{ grid.shared_specs[spec] }}<br>
+{% endfor %}
+<br>
+
+<table>
+{% for row in grid.data_table %}
+<tr>
+ {% for cell in row %}
+ <td colspan="{{ cell[0] }}">{{ cell[1] }}</td>
+ {% endfor %}
+</tr>
+{% endfor %}
+
+<tr>
+<td>Price: </td>
+{% for cell in grid.price_row %}
+ <td class="{{ cell.css }}">
+ {% if cell.url %}<a href="{{ cell.url }}">{% endif %}
+ {{ cell.price }}
+ {% if cell.url %}</a>{% endif %}
+ </td>
+{% endfor %}
+</tr>
+
+{% for row in grid.package_table %}
+<tr>
+ {% for cell in row %}
+ <td>{{ cell }}</td>
+ {% endfor %}
+</tr>
+{% endfor %}
+
+<tr>
+<td>All Parts: </td>
+{% for cell in grid.suffix_row %}
+<td>
+ {% for part in cell %}
+ {% if part.url %}<a href="{{ part.url }}">{{ part.suffix }}</a>
+ {% else %}{{ part.suffix }}
+ {% endif %}<br>
+ {% endfor %}
+</td>
+{% endfor %}
+</tr>
+
+</table>
+{% endblock %}
diff --git a/templates/index.html b/templates/index.html
new file mode 100644
index 0000000..cc04491
--- /dev/null
+++ b/templates/index.html
@@ -0,0 +1,8 @@
+{% extends "base.html" %}
+{% block content %}
+Part families:
+<ul>
+ <li><a href="xilinx/spartan6">xilinx/spartan6</a>
+ <li><a href="xilinx/zynq7000">xilinx/zynq7000</a>
+</ul>
+{% endblock %}