Archived
1
0
This commit is contained in:
Jeff Becker 2016-12-26 10:11:29 -05:00
parent 000fb43159
commit 579970c079
9 changed files with 66 additions and 9 deletions

View File

@ -0,0 +1,5 @@
/** desktop stylesheet */
body, html {
background: #EEF2FF url('/static/bg.png') repeat-x 50% 0%;
}

View File

@ -0,0 +1,13 @@
/** narrow.css -- for narrow screens */
html, body {
background: red;
}
#navbar {
min-height: 100px;
}
.postbody {
}

View File

@ -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 {

View File

@ -3,7 +3,11 @@
<html lang="en">
<head>
<title>{% block title %} nntpchan {% endblock %}</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" type="text/css" href="{% static 'style.css' %}" />
<link rel="stylesheet" type="text/css" media="(max-width: 699px) and (min-width: 520px)" href="{% static 'narrow.css' %}" />
<!-- <link rel="stylesheet" type="text/css" media="screen and not (max-width: 420px)" href="{% static 'desktop.css'%}" /> -->
<script type="text/javascript" src="{% static 'hooks.js' %}"></script>
<script type="text/javascript" src="{% static 'postform.js' %}"></script>
<script type="text/javascript" src="{% static 'banners.js' %}"></script>

View File

@ -1,5 +1,5 @@
{% load captcha %}
<div class="postform">
<div class="postform_outer">
<form id="postform" method="post" action="" enctype="multipart/form-data">
{% csrf_token %}
<table class="postform">
@ -29,7 +29,7 @@
Message
</th>
<td>
<textarea cols=100 rows=10 id="postform_message" name="message"></textarea>
<textarea id="postform_message" name="message"></textarea>
</td>
</tr>
<tr>

View File

@ -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

View File

@ -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);
}
});

View File

@ -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);

View File

@ -23,8 +23,9 @@
<span class="navbar-links-title">
Pages:
</span>
<span class="navbar-link"><a href="{{prefix}}static/search.html">Search</a></span>
{{# links }}
<span class="navbar-link"><a href="{{LinkURL}}">{{Text}}</a></span>
<span class="navbar-link"><a href="{{LinkURL}}">{{Text}}</a></span>
{{/ links }}
</span>
<span class="navbar-sep">