diff --git a/contrib/frontends/django/nntpchan/nntpchan/frontend/static/desktop.css b/contrib/frontends/django/nntpchan/nntpchan/frontend/static/desktop.css new file mode 100644 index 0000000..49f23ff --- /dev/null +++ b/contrib/frontends/django/nntpchan/nntpchan/frontend/static/desktop.css @@ -0,0 +1,5 @@ +/** desktop stylesheet */ + +body, html { + background: #EEF2FF url('/static/bg.png') repeat-x 50% 0%; +} diff --git a/contrib/frontends/django/nntpchan/nntpchan/frontend/static/narrow.css b/contrib/frontends/django/nntpchan/nntpchan/frontend/static/narrow.css new file mode 100644 index 0000000..b7cf16b --- /dev/null +++ b/contrib/frontends/django/nntpchan/nntpchan/frontend/static/narrow.css @@ -0,0 +1,13 @@ +/** narrow.css -- for narrow screens */ + +html, body { + background: red; +} + +#navbar { + min-height: 100px; +} + +.postbody { + +} \ No newline at end of file diff --git a/contrib/frontends/django/nntpchan/nntpchan/frontend/static/style.css b/contrib/frontends/django/nntpchan/nntpchan/frontend/static/style.css index 5843ed8..00e6789 100644 --- a/contrib/frontends/django/nntpchan/nntpchan/frontend/static/style.css +++ b/contrib/frontends/django/nntpchan/nntpchan/frontend/static/style.css @@ -1,18 +1,20 @@ + body, html { background: #EEF2FF url('/static/bg.png') repeat-x 50% 0%; } + #logo { height: 500px; } .frontpage { - align-self: center; + /* align-self: center; */ } div { display: flex; - font-size: 12px; + font-size: 12pt; font-family: sans; } @@ -91,8 +93,18 @@ form { width: 100px; } -.postform { - width: 75%; +.postform_outer { + +} + +#postform { + +} + + +#postform_message { + width: 100%; + height: 100px; } .pf-left { @@ -108,6 +120,7 @@ form { } .postbody { + display: inline-block; font-family: serif; font-size: 10pt; white-space: pre-wrap; @@ -132,6 +145,7 @@ form { font-style: italic; margin-left: 1%; margin-right: 1%; + max-width: 200px; } .posts { @@ -158,10 +172,12 @@ footer { .post-info { flex-basis: 100%; + overflow: auto; + display: inline-block; } .post-cite { - align-self: flex-end; + /** align-self: flex-end; */ } .redtext { diff --git a/contrib/frontends/django/nntpchan/nntpchan/templates/frontend/base.html b/contrib/frontends/django/nntpchan/nntpchan/templates/frontend/base.html index 4cb17a9..9631e7e 100644 --- a/contrib/frontends/django/nntpchan/nntpchan/templates/frontend/base.html +++ b/contrib/frontends/django/nntpchan/nntpchan/templates/frontend/base.html @@ -3,7 +3,11 @@ {% block title %} nntpchan {% endblock %} + + + + diff --git a/contrib/frontends/django/nntpchan/nntpchan/templates/frontend/postform.html b/contrib/frontends/django/nntpchan/nntpchan/templates/frontend/postform.html index 51e3e48..7e9c834 100644 --- a/contrib/frontends/django/nntpchan/nntpchan/templates/frontend/postform.html +++ b/contrib/frontends/django/nntpchan/nntpchan/templates/frontend/postform.html @@ -1,5 +1,5 @@ {% load captcha %} -
+
{% csrf_token %} @@ -29,7 +29,7 @@ Message diff --git a/contrib/frontends/django/readme.md b/contrib/frontends/django/readme.md index 8a9a493..c2a53b7 100644 --- a/contrib/frontends/django/readme.md +++ b/contrib/frontends/django/readme.md @@ -8,7 +8,7 @@ suggested setup is with pyvenv for a dev server, run: - cd nntpchan + cd nntpchan python3 -m venv v v/bin/pip install -r requirements.txt v/bin/python manage.py migrate diff --git a/contrib/js/nntpchan/img-hide.js b/contrib/js/nntpchan/img-hide.js new file mode 100644 index 0000000..3f80367 --- /dev/null +++ b/contrib/js/nntpchan/img-hide.js @@ -0,0 +1,16 @@ + +function inject_imghide(elem) { + elem.onerror = function() { + $(elem).fadeOut(200, function() { + elem.remove(); + }); + } +} + +onready(function(){ + var imgs = document.getElementsByClassName("thumbnail"); + for (var idx = 0; idx < imgs.length; idx ++) { + var elem = imgs[idx]; + inject_imghide(elem); + } +}); diff --git a/contrib/static/search.js b/contrib/static/search.js index 8c9fb12..ea3d8ac 100644 --- a/contrib/static/search.js +++ b/contrib/static/search.js @@ -42,6 +42,8 @@ function inject_search(elem) { } else { status.innerHTML = "HTTP "+ajax.status; } + } else { + status.innerHTML = "searching... "; } } ajax.open("GET", "/api/find?text="+text); diff --git a/contrib/templates/default/navbar.mustache b/contrib/templates/default/navbar.mustache index 5bba8d6..b005877 100644 --- a/contrib/templates/default/navbar.mustache +++ b/contrib/templates/default/navbar.mustache @@ -23,8 +23,9 @@ Pages: + Search {{# links }} - {{Text}} + {{Text}} {{/ links }}
- +