some style sheet and misc. changes

This commit is contained in:
iou1name 2018-10-03 12:17:57 -04:00
parent 7874151f32
commit ed97ce41fd
12 changed files with 101 additions and 18 deletions

View File

@ -1,5 +1,8 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}Index{% endblock %} {% block title %}Index{% endblock %}
{% block head %}
<link rel="stylesheet" type="text/css" href="{{ static('homepage.css') }}">
{% endblock %}
{% block content %} {% block content %}
<h1>Quests 'n Shiet</h1> <h1>Quests 'n Shiet</h1>
<form method="get" action="{{ url('search:index') }}"> <form method="get" action="{{ url('search:index') }}">

View File

@ -0,0 +1,3 @@
#content {
padding-left: 5%;
}

View File

@ -1,6 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}Edit {{ quest.title }}{% endblock %} {% block title %}Edit {{ quest.title }}{% endblock %}
{% block head %} {% block head %}
<link rel="stylesheet" type="text/css" href="{{ static('edit_quest.css') }}">
<script> <script>
window.onload = function() { document.getElementById('timezone').value = new Date().getTimezoneOffset(); }; window.onload = function() { document.getElementById('timezone').value = new Date().getTimezoneOffset(); };
</script> </script>

View File

@ -47,12 +47,13 @@
{% block content %} {% block content %}
<div id="questPane" style="width:{% if request.session.get("hide_chat") == True %}100%{% else %}70%{% endif %};"> <div id="questPane" style="width:{% if request.session.get("hide_chat") == True %}100%{% else %}70%{% endif %};">
<center><h1>{{ quest.title }}</h1></center> <center><h1>{{ quest.title }}</h1></center>
<div id="tags">
Tags: {% for tag in quest.tags.names() %}<a href="{{ url('search:index') + '?tags=' + tag }}">{{ tag }}</a>{% if not loop.last %}, {% endif %}{% endfor %} Tags: {% for tag in quest.tags.names() %}<a href="{{ url('search:index') + '?tags=' + tag }}">{{ tag }}</a>{% if not loop.last %}, {% endif %}{% endfor %}
</div>
{% if request.user == quest.owner %} {% if request.user == quest.owner %}
<form method="post" action="{{ url('quest:new_tag', kwargs={'quest_id': quest_id}) }}"> <form method="post" action="{{ url('quest:new_tag', kwargs={'quest_id': quest_id}) }}">
{{ csrf_input }} {{ csrf_input }}
<input type="text" name="tag"> <input type="text" name="tag">
<input type="hidden" name="quest_id" value="{{ quest.id }}">
<input type="submit"> <input type="submit">
</form> </form>
{% endif %} {% endif %}

View File

@ -0,0 +1,18 @@
# Generated by Django 2.1.1 on 2018-10-03 16:17
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('quest', '0004_quest_tags'),
]
operations = [
migrations.AlterField(
model_name='quest',
name='title',
field=models.CharField(max_length=100),
),
]

View File

@ -11,7 +11,7 @@ class Quest(models.Model):
""" """
The meta quest object. Contains general information about the quest. The meta quest object. Contains general information about the quest.
""" """
title = models.CharField(max_length=200) title = models.CharField(max_length=100)
owner = models.ForeignKey( owner = models.ForeignKey(
settings.AUTH_USER_MODEL, settings.AUTH_USER_MODEL,
on_delete=models.CASCADE) on_delete=models.CASCADE)

View File

@ -0,0 +1,3 @@
form {
padding-left: 10%;
}

View File

@ -26,6 +26,10 @@ h3 {
width: 70%; width: 70%;
} }
#tags {
padding-bottom: 0.25em;
}
.questPost { .questPost {
display: flex; display: flex;
} }
@ -36,7 +40,6 @@ h3 {
} }
.questPostData { .questPostData {
word-wrap: break-word;
min-width: 0; min-width: 0;
width: 100%; width: 100%;
} }
@ -64,7 +67,6 @@ h3 {
.poll td { .poll td {
padding: 0.5em; padding: 0.5em;
word-wrap: break-word;
border-bottom: 1px solid #ddd; border-bottom: 1px solid #ddd;
} }
@ -138,7 +140,6 @@ h3 {
.messageContent { .messageContent {
width: 100%; width: 100%;
word-wrap: break-word;
} }
.msgSrvHr { .msgSrvHr {
@ -167,7 +168,6 @@ h3 {
display: block; display: block;
position: fixed; position: fixed;
background: white; background: white;
word-wrap: break-word;
border: 1px solid #ccc; border: 1px solid #ccc;
padding: 0.25em; padding: 0.25em;
} }
@ -178,4 +178,9 @@ h3 {
.quotelink { .quotelink {
color: red; color: red;
text-decoration: underline;;
}
.quotelink:hover {
color: red;
} }

View File

@ -1,5 +1,8 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}Search{% endblock %} {% block title %}Search{% endblock %}
{% block head %}
<link rel="stylesheet" type="text/css" href="{{ static('search.css') }}">
{% endblock %}
{% block content %} {% block content %}
<form method="get" action="{{ url('search:index') }}"> <form method="get" action="{{ url('search:index') }}">
Author: <input type="text" name="author"><br> Author: <input type="text" name="author"><br>
@ -8,10 +11,12 @@
<input type="submit"> <input type="submit">
</form> </form>
{% if results %} {% if results %}
<table> <table id="results">
{% for quest in results %} {% for quest in results %}
<tr> <tr>
<td><a href="{{ url('quest:quest', args=[quest.id, '0']) }}">{{ quest.title }}</a></td> <td class="title"><a href="{{ url('quest:quest', args=[quest.id, '0']) }}">{{ quest.title }}</a></td>
<td class="summary"></td>
<td class="author"><a href="{{ url('user:profile', args=[quest.owner.id]) }}">{{ quest.owner.username }}</a></td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>

23
search/static/search.css Normal file
View File

@ -0,0 +1,23 @@
#content {
padding-left: 5%;
padding-right: 5%;
}
#results {
width: 100%;
table-layout: fixed;
border-collapse: collapse;
border: 1px solid #ccc;
}
tr:nth-child(even) {
background-color: #DDDDDD;
}
.title {
width: 20%;
}
.author {
width: 20%;
}

View File

@ -1,5 +1,31 @@
body { body {
margin: 0; margin: 0;
background-color: #FAFAFA;
color: #111111;
font-family: Tahoma, Helvetica, sans-serif;
}
input {
font-family: Tahoma, Helvetica, sans-serif;
}
select {
font-family: Tahoma, Helvetica, sans-serif;
background-color: #FAFAFA;
}
textarea {
background-color: #FAFAFA;
border-bottom: 1px solid #ccc;
}
a {
text-decoration: none;
color: #004070;
}
a:hover {
color: #B44444;
} }
#globalWrapper { #globalWrapper {
@ -11,14 +37,12 @@ body {
.header { .header {
position: sticky; position: sticky;
top: 0; top: 0;
margin: 0;
padding: 0;
width: 100%; width: 100%;
height: 2em; height: 2em;
list-style-type: none; background-color: #FAFAFA;
background-color: #dddddd;
display: flex; display: flex;
align-items: center; align-items: center;
border-bottom: 1px solid #ccc;
} }
.header span { .header span {
@ -31,12 +55,9 @@ body {
padding-left: 0; padding-left: 0;
} }
.header a {
text-decoration: none;
}
#headerHidden { #headerHidden {
width: 1em; width: 1em;
border-right: 1px solid #ccc;
} }
#alerts { #alerts {
@ -46,4 +67,5 @@ body {
#content { #content {
flex: auto; flex: auto;
overflow: auto; overflow: auto;
overflow-wrap: break-word;
} }

1
todo
View File

@ -6,7 +6,6 @@ Webm posting
(you) counter (you) counter
Account managament Account managament
Display profile link in header bar Display profile link in header bar
Tagging system
Quote backlinks Quote backlinks
Improvements: Improvements: