diff options
-rw-r--r-- | project/assets/css/default.css | 2 | ||||
-rw-r--r-- | project/assets/css/index.css | 12 | ||||
-rw-r--r-- | project/assets/css/tags.css | 21 | ||||
-rw-r--r-- | project/complexity.yml | 12 | ||||
-rw-r--r-- | project/context/articles.json | 67 | ||||
-rw-r--r-- | project/context/tags.json | 14 | ||||
-rw-r--r-- | project/templates/base.html | 1 | ||||
-rw-r--r-- | project/templates/index.html | 36 | ||||
-rw-r--r-- | project/templates/tags.html | 34 | ||||
-rw-r--r-- | project/templates/tags/application.html | 34 | ||||
-rw-r--r-- | project/templates/tags/binding.html | 34 | ||||
-rw-r--r-- | project/templates/tags/copyright.html | 34 | ||||
-rw-r--r-- | project/templates/tags/esoteric.html | 34 | ||||
-rw-r--r-- | project/templates/tags/gaming.html | 34 | ||||
-rw-r--r-- | project/templates/tags/languages.html | 34 | ||||
-rw-r--r-- | project/templates/tags/legal.html | 34 | ||||
-rw-r--r-- | project/templates/tags/library.html | 34 | ||||
-rw-r--r-- | project/templates/tags/mathematics.html | 34 | ||||
-rw-r--r-- | project/templates/tags/politics.html | 34 | ||||
-rw-r--r-- | project/templates/tags/programming.html | 34 | ||||
-rw-r--r-- | project/templates/tags/videogames.html | 34 |
21 files changed, 576 insertions, 31 deletions
diff --git a/project/assets/css/default.css b/project/assets/css/default.css index dae4af1..827c218 100644 --- a/project/assets/css/default.css +++ b/project/assets/css/default.css @@ -126,7 +126,7 @@ nav ul li { text-align: center; margin: 0; padding: 0; - width: 25%; + width: 20%; } /* diff --git a/project/assets/css/index.css b/project/assets/css/index.css index e5dfd5d..e5f38ca 100644 --- a/project/assets/css/index.css +++ b/project/assets/css/index.css @@ -1,12 +1,17 @@ +h4 { + text-align: center; +} + + /* Formatting the index list differently from regular lists. */ ul.index { text-align: center; list-style-type: none; - margin: 3em 0em 0em 0em; + margin: 3em 0em 2em 0em; padding: 0; } @@ -17,6 +22,11 @@ ul.index li { } +.taglist { + font-size: .83em; +} + + .post { font-size: .83em; } diff --git a/project/assets/css/tags.css b/project/assets/css/tags.css new file mode 100644 index 0000000..91f20e1 --- /dev/null +++ b/project/assets/css/tags.css @@ -0,0 +1,21 @@ + + +h4 { + text-align: center; +} + + +ul { + text-align: center; + list-style-type: none; + margin: 3em 0em 3em 0em; + padding: 0; +} + + +ul li { + margin: 0.5em 0em 0.5em 0em; + padding: 0; +} + + diff --git a/project/complexity.yml b/project/complexity.yml index 6537139..22f8667 100644 --- a/project/complexity.yml +++ b/project/complexity.yml @@ -22,4 +22,16 @@ unexpanded_templates: - "steelman.html" - "integral.html" - "packrat.html" + - "tags.html" + - "tags/application.html" + - "tags/binding.html" + - "tags/copyright.html" + - "tags/esoteric.html" + - "tags/languages.html" + - "tags/legal.html" + - "tags/library.html" + - "tags/mathematics.html" + - "tags/politics.html" + - "tags/programming.html" + - "tags/videogames.html" diff --git a/project/context/articles.json b/project/context/articles.json new file mode 100644 index 0000000..feb5d44 --- /dev/null +++ b/project/context/articles.json @@ -0,0 +1,67 @@ + +[ + { + "title": "Packrat Parser Combinator Library", + "anchor": "/packrat.html", + "taglist": ["library", "programming"], + "postdate": "2/2/2021" + }, + { + "title": "Area Under the Curve of a Complex Integral", + "anchor": "/integral.html", + "taglist": ["mathematics"], + "postdate": "29/12/2018" + }, + { + "title": "D, Parasail, Pascal, and Rust vs The Steelman", + "anchor": "/steelman.html", + "taglist": ["languages"], + "postdate": "29/10/2017" + }, + { + "title": "Sokoban Clone", + "anchor": "/sokoban.html", + "taglist": ["programming", "videogames"], + "postdate": "8/8/2017" + }, + { + "title": "Sunset License", + "anchor": "/sunset.html", + "taglist": ["copyright", "legal"], + "postdate": "29/6/2017" + }, + { + "title": "FLTK Ada Binding", + "anchor": "/fltkada.html", + "taglist": ["binding", "library", "programming"], + "postdate": "21/5/2018", + "updated": "yes" + }, + { + "title": "Single Transferable Vote Counter", + "anchor": "/stvcount.html", + "taglist": ["application", "politics", "programming"], + "postdate": "19/2/2017" + }, + { + "title": "Adapad", + "anchor": "/adapad.html", + "taglist": ["application", "programming"], + "postdate": "8/5/2017", + "updated": "yes" + }, + { + "title": "Grasp Interpreter", + "anchor": "/grasp.html", + "taglist": ["esoteric", "programming"], + "postdate": "1/1/2017" + }, + { + "title": "Thue Version 2a", + "anchor": "/thue2a.html", + "taglist": ["esoteric", "programming"], + "postdate": "1/1/2017" + } +] + + diff --git a/project/context/tags.json b/project/context/tags.json new file mode 100644 index 0000000..14e22a1 --- /dev/null +++ b/project/context/tags.json @@ -0,0 +1,14 @@ + +[ "application", + "binding", + "copyright", + "esoteric", + "languages", + "legal", + "library", + "mathematics", + "politics", + "programming", + "videogames" ] + + diff --git a/project/templates/base.html b/project/templates/base.html index 979305c..8b117d1 100644 --- a/project/templates/base.html +++ b/project/templates/base.html @@ -16,6 +16,7 @@ <ul> <li><a href="/">Index</a></li> <li><a href="/about.html">About</a></li> + <li><a href="/tags.html">Tags</a></li> <li><a href="/cgit">Git</a></li> <li><a href="/links.html">Links</a></li> </ul> diff --git a/project/templates/index.html b/project/templates/index.html index 3a66532..ba5e849 100644 --- a/project/templates/index.html +++ b/project/templates/index.html @@ -16,35 +16,13 @@ {% block content %} <ul class="index"> - <li><a href="/packrat.html">Packrat Parser Combinator Library</a><br> - <span class="post">(Posted 2/2/2021)</span></li> - - <li><a href="/integral.html">Area Under the Curve of a Complex Integral</a><br> - <span class="post">(Posted 29/12/2018)</span></li> - - <li><a href="/steelman.html">D, Parasail, Pascal, and Rust vs The Steelman</a><br> - <span class="post">(Posted 29/10/2017)</span></li> - - <li><a href="/sokoban.html">Sokoban Clone</a><br> - <span class="post">(Posted 8/8/2017)</span></li> - - <li><a href="/sunset.html">Sunset License</a><br> - <span class="post">(Posted 29/6/2017)</span></li> - - <li><a href="/fltkada.html">FLTK Ada Binding</a><br> - <span class="update">(Updated 21/5/2018)</span></li> - - <li><a href="/stvcount.html">Single Transferable Vote Counter</a><br> - <span class="post">(Posted 19/2/2017)</span></li> - - <li><a href="/adapad.html">Adapad</a><br> - <span class="update">(Updated 8/5/2017)</span></li> - - <li><a href="/grasp.html">Grasp Interpreter</a><br> - <span class="post">(Posted 1/1/2017)</span></li> - - <li><a href="/thue2a.html">Thue Version 2a</a><br> - <span class="post">(Posted 1/1/2017)</span></li> + {%- for item in articles -%} + {%- if item.updated -%}{%- set postclass = "update" -%}{%- else -%}{%- set postclass = "post" -%}{%- endif -%} + {%- if item.updated -%}{%- set postverb = "Updated" -%}{%- else -%}{%- set postverb = "Posted" -%}{%- endif %} + <li><a href="{{ item.anchor }}">{{ item.title }}</a><br> + <span class="taglist">{{ item.taglist | join(", ") }}</span><br> + <span class="{{ postclass }}">({{ postverb }} {{ item.postdate }})</span></li> + {%- endfor %} </ul> {% endblock %} diff --git a/project/templates/tags.html b/project/templates/tags.html new file mode 100644 index 0000000..a3edfcc --- /dev/null +++ b/project/templates/tags.html @@ -0,0 +1,34 @@ + +{% extends "base.html" %} + + + +{% block title %}Tags{% endblock %} + + + +{% block style %} + <link href="/css/tags.css" rel="stylesheet"> +{% endblock %} + + + +{% block content %} + +<h4>Tags</h4> + +<ul> + {%- for tag in tags -%} + {%- set total = 0 -%} + {%- for item in articles -%} + {%- if tag in item.taglist -%}{%- set total = total + 1 -%}{%- endif -%} + {%- if item == articles | last %} + <li><a href="/tags/{{ tag }}.html">{{ tag }} ({{ total }})</a></li> + {%- endif -%} + {%- endfor -%} + {%- endfor %} +</ul> + +{% endblock %} + + diff --git a/project/templates/tags/application.html b/project/templates/tags/application.html new file mode 100644 index 0000000..489ff13 --- /dev/null +++ b/project/templates/tags/application.html @@ -0,0 +1,34 @@ + +{% extends "base.html" %} + + + +{% block title %}Application Tag{% endblock %} + + + +{% block style %} + <link href="/css/index.css" rel="stylesheet"> +{% endblock %} + + + +{% block content %} + +<h4>Tag: Application</h4> + +<ul class="index"> + {%- for item in articles -%} + {%- if 'application' in item.taglist -%} + {%- if item.updated -%}{%- set postclass = "update" -%}{%- else -%}{%- set postclass = "post" -%}{%- endif -%} + {%- if item.updated -%}{%- set postverb = "Updated" -%}{%- else -%}{%- set postverb = "Posted" -%}{%- endif %} + <li><a href="{{ item.anchor }}">{{ item.title }}</a><br> + <span class="taglist">{{ item.taglist | join(", ") }}</span><br> + <span class="{{ postclass }}">({{ postverb }} {{ item.postdate }})</span></li> + {%- endif -%} + {%- endfor %} +</ul> + +{% endblock %} + + diff --git a/project/templates/tags/binding.html b/project/templates/tags/binding.html new file mode 100644 index 0000000..92a63b0 --- /dev/null +++ b/project/templates/tags/binding.html @@ -0,0 +1,34 @@ + +{% extends "base.html" %} + + + +{% block title %}Binding Tag{% endblock %} + + + +{% block style %} + <link href="/css/index.css" rel="stylesheet"> +{% endblock %} + + + +{% block content %} + +<h4>Tag: Binding</h4> + +<ul class="index"> + {%- for item in articles -%} + {%- if 'binding' in item.taglist -%} + {%- if item.updated -%}{%- set postclass = "update" -%}{%- else -%}{%- set postclass = "post" -%}{%- endif -%} + {%- if item.updated -%}{%- set postverb = "Updated" -%}{%- else -%}{%- set postverb = "Posted" -%}{%- endif %} + <li><a href="{{ item.anchor }}">{{ item.title }}</a><br> + <span class="taglist">{{ item.taglist | join(", ") }}</span><br> + <span class="{{ postclass }}">({{ postverb }} {{ item.postdate }})</span></li> + {%- endif -%} + {%- endfor %} +</ul> + +{% endblock %} + + diff --git a/project/templates/tags/copyright.html b/project/templates/tags/copyright.html new file mode 100644 index 0000000..1296aae --- /dev/null +++ b/project/templates/tags/copyright.html @@ -0,0 +1,34 @@ + +{% extends "base.html" %} + + + +{% block title %}Copyright Tag{% endblock %} + + + +{% block style %} + <link href="/css/index.css" rel="stylesheet"> +{% endblock %} + + + +{% block content %} + +<h4>Tag: Copyright</h4> + +<ul class="index"> + {%- for item in articles -%} + {%- if 'copyright' in item.taglist -%} + {%- if item.updated -%}{%- set postclass = "update" -%}{%- else -%}{%- set postclass = "post" -%}{%- endif -%} + {%- if item.updated -%}{%- set postverb = "Updated" -%}{%- else -%}{%- set postverb = "Posted" -%}{%- endif %} + <li><a href="{{ item.anchor }}">{{ item.title }}</a><br> + <span class="taglist">{{ item.taglist | join(", ") }}</span><br> + <span class="{{ postclass }}">({{ postverb }} {{ item.postdate }})</span></li> + {%- endif -%} + {%- endfor %} +</ul> + +{% endblock %} + + diff --git a/project/templates/tags/esoteric.html b/project/templates/tags/esoteric.html new file mode 100644 index 0000000..253f7cc --- /dev/null +++ b/project/templates/tags/esoteric.html @@ -0,0 +1,34 @@ + +{% extends "base.html" %} + + + +{% block title %}Esoteric Tag{% endblock %} + + + +{% block style %} + <link href="/css/index.css" rel="stylesheet"> +{% endblock %} + + + +{% block content %} + +<h4>Tag: Esoteric</h4> + +<ul class="index"> + {%- for item in articles -%} + {%- if 'esoteric' in item.taglist -%} + {%- if item.updated -%}{%- set postclass = "update" -%}{%- else -%}{%- set postclass = "post" -%}{%- endif -%} + {%- if item.updated -%}{%- set postverb = "Updated" -%}{%- else -%}{%- set postverb = "Posted" -%}{%- endif %} + <li><a href="{{ item.anchor }}">{{ item.title }}</a><br> + <span class="taglist">{{ item.taglist | join(", ") }}</span><br> + <span class="{{ postclass }}">({{ postverb }} {{ item.postdate }})</span></li> + {%- endif -%} + {%- endfor %} +</ul> + +{% endblock %} + + diff --git a/project/templates/tags/gaming.html b/project/templates/tags/gaming.html new file mode 100644 index 0000000..4520655 --- /dev/null +++ b/project/templates/tags/gaming.html @@ -0,0 +1,34 @@ + +{% extends "base.html" %} + + + +{% block title %}Gaming Tag{% endblock %} + + + +{% block style %} + <link href="/css/index.css" rel="stylesheet"> +{% endblock %} + + + +{% block content %} + +<h4>Tag: Gaming</h4> + +<ul class="index"> + {%- for item in articles -%} + {%- if 'gaming' in item.taglist -%} + {%- if item.updated -%}{%- set postclass = "update" -%}{%- else -%}{%- set postclass = "post" -%}{%- endif -%} + {%- if item.updated -%}{%- set postverb = "Updated" -%}{%- else -%}{%- set postverb = "Posted" -%}{%- endif %} + <li><a href="{{ item.anchor }}">{{ item.title }}</a><br> + <span class="taglist">{{ item.taglist | join(", ") }}</span><br> + <span class="{{ postclass }}">({{ postverb }} {{ item.postdate }})</span></li> + {%- endif -%} + {%- endfor %} +</ul> + +{% endblock %} + + diff --git a/project/templates/tags/languages.html b/project/templates/tags/languages.html new file mode 100644 index 0000000..3c101b9 --- /dev/null +++ b/project/templates/tags/languages.html @@ -0,0 +1,34 @@ + +{% extends "base.html" %} + + + +{% block title %}Languages Tag{% endblock %} + + + +{% block style %} + <link href="/css/index.css" rel="stylesheet"> +{% endblock %} + + + +{% block content %} + +<h4>Tag: Languages</h4> + +<ul class="index"> + {%- for item in articles -%} + {%- if 'languages' in item.taglist -%} + {%- if item.updated -%}{%- set postclass = "update" -%}{%- else -%}{%- set postclass = "post" -%}{%- endif -%} + {%- if item.updated -%}{%- set postverb = "Updated" -%}{%- else -%}{%- set postverb = "Posted" -%}{%- endif %} + <li><a href="{{ item.anchor }}">{{ item.title }}</a><br> + <span class="taglist">{{ item.taglist | join(", ") }}</span><br> + <span class="{{ postclass }}">({{ postverb }} {{ item.postdate }})</span></li> + {%- endif -%} + {%- endfor %} +</ul> + +{% endblock %} + + diff --git a/project/templates/tags/legal.html b/project/templates/tags/legal.html new file mode 100644 index 0000000..14143aa --- /dev/null +++ b/project/templates/tags/legal.html @@ -0,0 +1,34 @@ + +{% extends "base.html" %} + + + +{% block title %}Legal Tag{% endblock %} + + + +{% block style %} + <link href="/css/index.css" rel="stylesheet"> +{% endblock %} + + + +{% block content %} + +<h4>Tag: Legal</h4> + +<ul class="index"> + {%- for item in articles -%} + {%- if 'legal' in item.taglist -%} + {%- if item.updated -%}{%- set postclass = "update" -%}{%- else -%}{%- set postclass = "post" -%}{%- endif -%} + {%- if item.updated -%}{%- set postverb = "Updated" -%}{%- else -%}{%- set postverb = "Posted" -%}{%- endif %} + <li><a href="{{ item.anchor }}">{{ item.title }}</a><br> + <span class="taglist">{{ item.taglist | join(", ") }}</span><br> + <span class="{{ postclass }}">({{ postverb }} {{ item.postdate }})</span></li> + {%- endif -%} + {%- endfor %} +</ul> + +{% endblock %} + + diff --git a/project/templates/tags/library.html b/project/templates/tags/library.html new file mode 100644 index 0000000..86fd920 --- /dev/null +++ b/project/templates/tags/library.html @@ -0,0 +1,34 @@ + +{% extends "base.html" %} + + + +{% block title %}Library Tag{% endblock %} + + + +{% block style %} + <link href="/css/index.css" rel="stylesheet"> +{% endblock %} + + + +{% block content %} + +<h4>Tag: Library</h4> + +<ul class="index"> + {%- for item in articles -%} + {%- if 'library' in item.taglist -%} + {%- if item.updated -%}{%- set postclass = "update" -%}{%- else -%}{%- set postclass = "post" -%}{%- endif -%} + {%- if item.updated -%}{%- set postverb = "Updated" -%}{%- else -%}{%- set postverb = "Posted" -%}{%- endif %} + <li><a href="{{ item.anchor }}">{{ item.title }}</a><br> + <span class="taglist">{{ item.taglist | join(", ") }}</span><br> + <span class="{{ postclass }}">({{ postverb }} {{ item.postdate }})</span></li> + {%- endif -%} + {%- endfor %} +</ul> + +{% endblock %} + + diff --git a/project/templates/tags/mathematics.html b/project/templates/tags/mathematics.html new file mode 100644 index 0000000..d99af34 --- /dev/null +++ b/project/templates/tags/mathematics.html @@ -0,0 +1,34 @@ + +{% extends "base.html" %} + + + +{% block title %}Mathematics Tag{% endblock %} + + + +{% block style %} + <link href="/css/index.css" rel="stylesheet"> +{% endblock %} + + + +{% block content %} + +<h4>Tag: Mathematics</h4> + +<ul class="index"> + {%- for item in articles -%} + {%- if 'mathematics' in item.taglist -%} + {%- if item.updated -%}{%- set postclass = "update" -%}{%- else -%}{%- set postclass = "post" -%}{%- endif -%} + {%- if item.updated -%}{%- set postverb = "Updated" -%}{%- else -%}{%- set postverb = "Posted" -%}{%- endif %} + <li><a href="{{ item.anchor }}">{{ item.title }}</a><br> + <span class="taglist">{{ item.taglist | join(", ") }}</span><br> + <span class="{{ postclass }}">({{ postverb }} {{ item.postdate }})</span></li> + {%- endif -%} + {%- endfor %} +</ul> + +{% endblock %} + + diff --git a/project/templates/tags/politics.html b/project/templates/tags/politics.html new file mode 100644 index 0000000..e7d0790 --- /dev/null +++ b/project/templates/tags/politics.html @@ -0,0 +1,34 @@ + +{% extends "base.html" %} + + + +{% block title %}Politics Tag{% endblock %} + + + +{% block style %} + <link href="/css/index.css" rel="stylesheet"> +{% endblock %} + + + +{% block content %} + +<h4>Tag: Politics</h4> + +<ul class="index"> + {%- for item in articles -%} + {%- if 'politics' in item.taglist -%} + {%- if item.updated -%}{%- set postclass = "update" -%}{%- else -%}{%- set postclass = "post" -%}{%- endif -%} + {%- if item.updated -%}{%- set postverb = "Updated" -%}{%- else -%}{%- set postverb = "Posted" -%}{%- endif %} + <li><a href="{{ item.anchor }}">{{ item.title }}</a><br> + <span class="taglist">{{ item.taglist | join(", ") }}</span><br> + <span class="{{ postclass }}">({{ postverb }} {{ item.postdate }})</span></li> + {%- endif -%} + {%- endfor %} +</ul> + +{% endblock %} + + diff --git a/project/templates/tags/programming.html b/project/templates/tags/programming.html new file mode 100644 index 0000000..cfd79df --- /dev/null +++ b/project/templates/tags/programming.html @@ -0,0 +1,34 @@ + +{% extends "base.html" %} + + + +{% block title %}Programming Tag{% endblock %} + + + +{% block style %} + <link href="/css/index.css" rel="stylesheet"> +{% endblock %} + + + +{% block content %} + +<h4>Tag: Programming</h4> + +<ul class="index"> + {%- for item in articles -%} + {%- if 'programming' in item.taglist -%} + {%- if item.updated -%}{%- set postclass = "update" -%}{%- else -%}{%- set postclass = "post" -%}{%- endif -%} + {%- if item.updated -%}{%- set postverb = "Updated" -%}{%- else -%}{%- set postverb = "Posted" -%}{%- endif %} + <li><a href="{{ item.anchor }}">{{ item.title }}</a><br> + <span class="taglist">{{ item.taglist | join(", ") }}</span><br> + <span class="{{ postclass }}">({{ postverb }} {{ item.postdate }})</span></li> + {%- endif -%} + {%- endfor %} +</ul> + +{% endblock %} + + diff --git a/project/templates/tags/videogames.html b/project/templates/tags/videogames.html new file mode 100644 index 0000000..898e1fb --- /dev/null +++ b/project/templates/tags/videogames.html @@ -0,0 +1,34 @@ + +{% extends "base.html" %} + + + +{% block title %}Videogames Tag{% endblock %} + + + +{% block style %} + <link href="/css/index.css" rel="stylesheet"> +{% endblock %} + + + +{% block content %} + +<h4>Tag: Videogames</h4> + +<ul class="index"> + {%- for item in articles -%} + {%- if 'videogames' in item.taglist -%} + {%- if item.updated -%}{%- set postclass = "update" -%}{%- else -%}{%- set postclass = "post" -%}{%- endif -%} + {%- if item.updated -%}{%- set postverb = "Updated" -%}{%- else -%}{%- set postverb = "Posted" -%}{%- endif %} + <li><a href="{{ item.anchor }}">{{ item.title }}</a><br> + <span class="taglist">{{ item.taglist | join(", ") }}</span><br> + <span class="{{ postclass }}">({{ postverb }} {{ item.postdate }})</span></li> + {%- endif -%} + {%- endfor %} +</ul> + +{% endblock %} + + |