From f565eba1c71154ad09938d29a8defe874244770a Mon Sep 17 00:00:00 2001 From: Andrej Karpathy Date: Thu, 25 Nov 2021 14:45:08 -0800 Subject: [PATCH] use jinja templates so there's no copy paste code all over the place --- templates/base.html | 36 ++++++++++++++++++++++++++++++++++++ templates/index.html | 35 +++++++---------------------------- templates/inspect.html | 36 +++++++----------------------------- 3 files changed, 50 insertions(+), 57 deletions(-) create mode 100644 templates/base.html diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..fd8d19c --- /dev/null +++ b/templates/base.html @@ -0,0 +1,36 @@ + + + + + + +arxiv-sanity + + + + + +{% block variables %} +{% endblock %} + + + + + + +{% block content %} +{% endblock %} + + + + + + + +{% block elements %} +{% endblock %} + + + diff --git a/templates/index.html b/templates/index.html index f81410a..88a1fa2 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,29 +1,14 @@ - - - - - - -arxiv-sanity - - - - +{% extends "base.html" %} +{% block variables %} +{% endblock %} - - - - - - +{% block content %}
@@ -91,14 +76,8 @@ var gvars = {{ gvars | tojson }};
+{% endblock %} - - - - - - +{% block elements %} - - - +{% endblock %} diff --git a/templates/inspect.html b/templates/inspect.html index 553ffed..38b9da4 100644 --- a/templates/inspect.html +++ b/templates/inspect.html @@ -1,41 +1,19 @@ - - - - - - -arxiv-sanity - - - - +{% extends "base.html" %} +{% block variables %} +{% endblock %} - - - - - - +{% block content %}
-
+{% endblock %} - - - - - - +{% block elements %} - - - +{% endblock %}