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 { body, html {
background: #EEF2FF url('/static/bg.png') repeat-x 50% 0%; background: #EEF2FF url('/static/bg.png') repeat-x 50% 0%;
} }
#logo { #logo {
height: 500px; height: 500px;
} }
.frontpage { .frontpage {
align-self: center; /* align-self: center; */
} }
div { div {
display: flex; display: flex;
font-size: 12px; font-size: 12pt;
font-family: sans; font-family: sans;
} }
@ -91,8 +93,18 @@ form {
width: 100px; width: 100px;
} }
.postform { .postform_outer {
width: 75%;
}
#postform {
}
#postform_message {
width: 100%;
height: 100px;
} }
.pf-left { .pf-left {
@ -108,6 +120,7 @@ form {
} }
.postbody { .postbody {
display: inline-block;
font-family: serif; font-family: serif;
font-size: 10pt; font-size: 10pt;
white-space: pre-wrap; white-space: pre-wrap;
@ -132,6 +145,7 @@ form {
font-style: italic; font-style: italic;
margin-left: 1%; margin-left: 1%;
margin-right: 1%; margin-right: 1%;
max-width: 200px;
} }
.posts { .posts {
@ -158,10 +172,12 @@ footer {
.post-info { .post-info {
flex-basis: 100%; flex-basis: 100%;
overflow: auto;
display: inline-block;
} }
.post-cite { .post-cite {
align-self: flex-end; /** align-self: flex-end; */
} }
.redtext { .redtext {

View File

@ -3,7 +3,11 @@
<html lang="en"> <html lang="en">
<head> <head>
<title>{% block title %} nntpchan {% endblock %}</title> <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" 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 'hooks.js' %}"></script>
<script type="text/javascript" src="{% static 'postform.js' %}"></script> <script type="text/javascript" src="{% static 'postform.js' %}"></script>
<script type="text/javascript" src="{% static 'banners.js' %}"></script> <script type="text/javascript" src="{% static 'banners.js' %}"></script>

View File

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

View File

@ -8,7 +8,7 @@ suggested setup is with pyvenv
for a dev server, run: for a dev server, run:
cd nntpchan cd nntpchan
python3 -m venv v python3 -m venv v
v/bin/pip install -r requirements.txt v/bin/pip install -r requirements.txt
v/bin/python manage.py migrate 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 { } else {
status.innerHTML = "HTTP "+ajax.status; status.innerHTML = "HTTP "+ajax.status;
} }
} else {
status.innerHTML = "searching... ";
} }
} }
ajax.open("GET", "/api/find?text="+text); ajax.open("GET", "/api/find?text="+text);

View File

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