Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Style cleanup #25

Merged
merged 3 commits into from
Oct 28, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/fixtures/flatpages.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"model": "flatpages.flatpage", "pk": 1, "fields": {"url": "/about/terms/", "title": "Terms of Service", "content": "<p>Here is where you should include your terms of service. This should generally work as follows, according to wikipedia:</p>\r\n\r\n<ul>\r\n<li>Disambiguation/definition of key words and phrases</li>\r\n<li>User rights and responsibilities\r\n<ul>\r\n<li>Proper or expected usage; potential misuse</li>\r\n<li>Accountability for online actions, behavior, and conduct</li>\r\n<li>Privacy policy outlining the use of personal data</li>\r\n<li>Payment details such as membership or subscription fees, etc.</li>\r\n<li>Opt-out policy describing procedure for account termination, if available</li>\r\n</ul>\r\n</li>\r\n<li>Disclaimer/Limitation of Liability clarifying the site's legal liability for damages incurred by users</li>\r\n<li>Any warrant canaries</li>\r\n<li>User notification upon modification of terms, if offered</li>\r\n</ul>", "enable_comments": false, "template_name": "", "registration_required": false, "sites": [1]}}, {"model": "flatpages.flatpage", "pk": 2, "fields": {"url": "/about/aup/", "title": "Acceptable Upload Policy", "content": "<p>Here is where you would set your acceptable upload policy. Consider informing users about:</p>\r\n<ul>\r\n<li>Who may upload whose works (own, commissions, other)</li>\r\n<li>Restricted subject matter</li>\r\n<li>Content writing</li>\r\n</ul>", "enable_comments": false, "template_name": "", "registration_required": false, "sites": [1]}}, {"model": "flatpages.flatpage", "pk": 3, "fields": {"url": "/about/help/", "title": "Honeycomb Help", "content": "Help for Honeycomb", "enable_comments": false, "template_name": "", "registration_required": false, "sites": [1]}}, {"model": "flatpages.flatpage", "pk": 4, "fields": {"url": "/about/markdown/", "title": "Markdown help", "content": "Help for markdown", "enable_comments": false, "template_name": "", "registration_required": false, "sites": [1]}}, {"model": "flatpages.flatpage", "pk": 5, "fields": {"url": "/about/credits/", "title": "Credits", "content": "<!--\r\nDear site staff,\r\n\r\nThe creators of Honeycomb respectfully request that this page be left intact, or at least without any subtractions. If you need to add anything, feel free, but it's important that the labor that goes into a project like this be recognized.\r\n\r\nCheers,\r\n\r\nHoneycomb\r\n-->\r\n\r\n<p>Credit where credit is due! The inspiration for Honeycomb came from a discussion among members of <a href=\"https://furrywritersguild.com\" target=\"_blank\">The Furry Writers' Guild</a> on what an ideal writing site should be. It should be:</p>\r\n\r\n<ul>\r\n<li>easy to post one's work</li>\r\n<li>easy to interact socially with other users</li>\r\n<li>easy to promote works to others through promotions or editor highlights</li>\r\n<li>easy to organize work through tags and folders</li>\r\n<li>easy to discover new authors and their work</li>\r\n<li>easy for publishers to maintain a presence through pages and advertising</li>\r\n</ul>\r\n\r\n<p>From out of the FWGs discussions came a specification, which was picked up by <a href=\"http://openfurry.org\">OpenFurry</a> as a project. The intent was to provide an implementation and website for use by the furry subculture. The project was open-sourced to allow other communities of writers and readers to use it and contribute as well!</p>\r\n\r\n<p>Additionally, the following resources contributed to make the Honeycomb project what it is:</p>\r\n\r\n<dl class=\"dl-horizontal\">\r\n<dt><a href=\"https://djangoproject.com\" target=\"_blank\">Django</a></dt>\r\n<dd>Django is the framework upon which Honeycomb is built</dd>\r\n<dt><a href=\"https://getbootstrap.com\" target=\"_blank\">Bootstrap</a></dt>\r\n<dd>Bootstrap provides the stylistic framework for the site</dd>\r\n<dt><a href=\"https://glyphicons.com\" target=\"_blank\">Glyphicons</a></dt>\r\n<dd>The Glyphicons icon font provides most of the icons you see throughout the site</dd>\r\n<dt><a href=\"django-nose.readthedocs.io/en/latest/\" target=\"_blank\">django-nose</a></dt>\r\n<dd><code>django-nose</code> provides additional testing framework for Honeycomb</dd>\r\n<dt><a href=\"https://github.com/alex/django-taggit\" target=\"_blank\">django-taggit</a></dt>\r\n<dd><code>django-taggit</code> provides the mechanism used for tagging submissions</dd>", "enable_comments": false, "template_name": "", "registration_required": false, "sites": [1]}}]
[{"model": "flatpages.flatpage", "pk": 1, "fields": {"url": "/about/terms/", "title": "Terms of Service", "content": "<p>Here is where you should include your terms of service. This should generally work as follows, according to wikipedia:</p>\r\n\r\n<ul>\r\n<li>Disambiguation/definition of key words and phrases</li>\r\n<li>User rights and responsibilities\r\n<ul>\r\n<li>Proper or expected usage; potential misuse</li>\r\n<li>Accountability for online actions, behavior, and conduct</li>\r\n<li>Privacy policy outlining the use of personal data</li>\r\n<li>Payment details such as membership or subscription fees, etc.</li>\r\n<li>Opt-out policy describing procedure for account termination, if available</li>\r\n</ul>\r\n</li>\r\n<li>Disclaimer/Limitation of Liability clarifying the site's legal liability for damages incurred by users</li>\r\n<li>Any warrant canaries</li>\r\n<li>User notification upon modification of terms, if offered</li>\r\n</ul>", "enable_comments": false, "template_name": "", "registration_required": false, "sites": [1]}}, {"model": "flatpages.flatpage", "pk": 2, "fields": {"url": "/about/aup/", "title": "Acceptable Upload Policy", "content": "<p>Here is where you would set your acceptable upload policy. Consider informing users about:</p>\r\n<ul>\r\n<li>Who may upload whose works (own, commissions, other)</li>\r\n<li>Restricted subject matter</li>\r\n<li>Content writing</li>\r\n</ul>", "enable_comments": false, "template_name": "", "registration_required": false, "sites": [1]}}, {"model": "flatpages.flatpage", "pk": 3, "fields": {"url": "/about/help/", "title": "Honeycomb Help", "content": "Help for Honeycomb", "enable_comments": false, "template_name": "", "registration_required": false, "sites": [1]}}, {"model": "flatpages.flatpage", "pk": 4, "fields": {"url": "/about/markdown/", "title": "Markdown help", "content": "Help for markdown", "enable_comments": false, "template_name": "", "registration_required": false, "sites": [1]}}, {"model": "flatpages.flatpage", "pk": 5, "fields": {"url": "/about/credits/", "title": "Credits", "content": "<!--\r\nDear site staff,\r\n\r\nThe creators of Honeycomb respectfully request that this page be left intact, or at least without any subtractions. If you need to add anything, feel free, but it's important that the labor that goes into a project like this be recognized.\r\n\r\nCheers,\r\n\r\nHoneycomb\r\n-->\r\n\r\n<p>Credit where credit is due! The inspiration for Honeycomb came from a discussion among members of <a href=\"https://furrywritersguild.com\" target=\"_blank\">The Furry Writers' Guild</a> on what an ideal writing site should be. It should be:</p>\r\n\r\n<ul>\r\n<li>easy to post one's work</li>\r\n<li>easy to interact socially with other users</li>\r\n<li>easy to promote works to others through promotions or editor highlights</li>\r\n<li>easy to organize work through tags and folders</li>\r\n<li>easy to discover new authors and their work</li>\r\n<li>easy for publishers to maintain a presence through pages and advertising</li>\r\n</ul>\r\n\r\n<p>From out of the FWGs discussions came a specification, which was picked up by <a href=\"http://openfurry.org\">OpenFurry</a> as a project. The intent was to provide an implementation and website for use by the furry subculture. The project was open-sourced to allow other communities of writers and readers to use it and contribute as well!</p>\r\n\r\n<p>Additionally, the following resources contributed to make the Honeycomb project what it is:</p>\r\n\r\n<dl class=\"dl-horizontal\">\r\n<dt><a href=\"https://djangoproject.com\" target=\"_blank\">Django</a></dt>\r\n<dd>Django is the framework upon which Honeycomb is built</dd>\r\n<dt><a href=\"https://getbootstrap.com\" target=\"_blank\">Bootstrap</a></dt>\r\n<dd>Bootstrap provides the stylistic framework for the site</dd>\r\n<dt><a href=\"https://glyphicons.com\" target=\"_blank\">Glyphicons</a></dt>\r\n<dd>The Glyphicons icon font provides most of the icons you see throughout the site</dd>\r\n<dt><a href=\"django-nose.readthedocs.io/en/latest/\" target=\"_blank\">django-nose</a></dt>\r\n<dd><code>django-nose</code> provides additional testing framework for Honeycomb</dd>\r\n<dt><a href=\"https://github.com/alex/django-taggit\" target=\"_blank\">django-taggit</a></dt>\r\n<dd><code>django-taggit</code> provides the mechanism used for tagging submissions</dd>\r\n<dt><a href=\"https://coveralls.io/\" target=\"_blank\">Coveralls.io</a></dt>\r\n<dd>Coveralls ensures that test coverage remains above a certain level. Current coverage of the master branch of Honeycomb is <a target=\"_blank\" href='https://coveralls.io/github/OpenFurry/honeycomb?branch=master'><img src='https://coveralls.io/repos/github/OpenFurry/honeycomb/badge.svg?branch=master' alt='Coverage Status' /></a></dd>\r\n<dt><a href=\"https://travis-ci.org/\" target=\"_blank\">Coveralls.io</a></dt>\r\n<dd>Travis CI ensures that all tests pass whenever a change is made to the source code of Honeycomb. The current build status of the master branch of Honeycomb is <a target=\"_blank\" href=\"https://travis-ci.org/OpenFurry/honeycomb\"><img src=\"https://travis-ci.org/OpenFurry/honeycomb.svg?branch=master\" /></a></dd>\r\n</dl>", "enable_comments": false, "template_name": "", "registration_required": false, "sites": [1]}}]
23 changes: 23 additions & 0 deletions core/static/app/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,23 @@ body {
/* background: url('lightpaperfibers.png'); */
}

.accessibility-aid {
position: absolute;
width: 1px;
height: 1px;
margin: 0;
overflow: hidden;
clip: rect(1px, 1px, 1px, 1px);
}

.accessability-aid:focus {
width: auto;
height: auto;
margin: auto;
overflow: visible;
clip: none;
}

.navbar-static-top {
margin-bottom: 19px;
}
Expand Down Expand Up @@ -80,3 +97,9 @@ footer img {
height: 14px;
vertical-align: text-top;
}

@media (max-width: 992px) {
footer div {
text-align: right;
}
}
6 changes: 6 additions & 0 deletions core/static/app/base.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
$(function () {
$('[data-toggle="tooltip"]').tooltip()
$(document).on("click", ".js-skip-to-content", function() {
return $("#start-of-content")
.next()
.attr("tabindex","-1")
.focus()
});
})
16 changes: 12 additions & 4 deletions core/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@
</div><!--/.nav-collapse -->
</div>
</nav>
<section class="main container-fluid">
<a href="#start-of-content" tabindex="1" class="accessibility-aid js-skip-to-content">Skip to content</a>
<section class="main container-fluid" id="start-of-content">
{% if title or flatpage.title %}
<header class="page-header">
<h1>{% if flatpage %}{{ flatpage.title }}{% else %}{{ title|safe }}{% endif %}{% if subtitle %} <small>{{ subtitle|safe }}</small>{% endif %}</h1>
Expand All @@ -152,7 +153,14 @@ <h1>{% if flatpage %}{{ flatpage.title }}{% else %}{{ title|safe }}{% endif %}{%
{% block content %}{% endblock %}
</section>
<footer class="row">
<div class="col-md-3 col-md-offset-2">
<a href="https://github.com/OpenFurry/honeycomb" target="_blank">
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 250 250" fill="#FFF" style="position: absolute; top: -1; left: 0">
<path fill="#333" d="M250 0L135 115h-15l-12 27L0 250V0z"/>
<path class="octo-arm" d="M122 109c15-9 9-19 9-19-3-7-2-11-2-11 1-7-3-2-3-2-4 5-2 11-2 11 3 10-5 15-9 16" style="-webkit-transform-origin: 120px 144px; transform-origin: 120px 144px"/>
<path class="octo-body" d="M135 115s-4 2-5 0l-14-14c-3-2-6-3-8-3 8-11 15-24-2-41-5-5-10-7-16-7-1-2-3-7-12-11 0 0-5 3-7 16-4 2-8 5-12 9s-7 8-9 12c-14 4-17 9-17 9 4 8 9 11 11 11 0 6 2 11 7 16 16 16 30 10 41 2 0 3 1 7 5 11l12 11c1 2-1 6-1 6z"/>
</svg>
</a>
<div class="col-md-4 col-md-offset-1">
<p>
Powered by <a href="https://github.com/OpenFurry/honeycomb" target="_blank">&#x2394; Honeycomb</a> <span class="text-muted">(<a href="https://github.com/OpenFurry/honeycomb/commit/{{ git_revno.full }}" class="text-muted">{{ git_revno.short }}</a>)</span>
</p>
Expand All @@ -163,12 +171,12 @@ <h1>{% if flatpage %}{{ flatpage.title }}{% else %}{{ title|safe }}{% endif %}{%
Source released under the <a href="https://opensource.org/licenses/MIT" target="_blank">MIT License</a>.
</p>
</div>
<div class="col-md-3">
<div class="col-md-4">
<p>
All posted content is &copy; the creators.
</p>
</div>
<div class="col-md-2">
<div class="col-md-3">
<ul class="list-unstyled">
<li><a href="{% url 'core:flatpage_list' %}help/">Help</a></li>
<li><a href="{% url 'core:flatpage_list' %}markdown/">Markdown</a></li>
Expand Down
Binary file modified db.sqlite3
Binary file not shown.
1 change: 1 addition & 0 deletions submissions/folder_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ def delete_folder(request, username=None, folder_id=None, folder_slug=None):
messages.success(request, 'Folder deleted successfully.')
return redirect(next_url)
return render(request, 'confirm_delete_folder.html', {
'title': 'Deleting folder "{}"'.format(folder.name),
'folder': folder,
})

Expand Down
20 changes: 20 additions & 0 deletions submissions/migrations/0003_auto_20161028_2238.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-28 22:38
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('submissions', '0002_auto_20161028_0540'),
]

operations = [
migrations.AlterField(
model_name='submission',
name='mtime',
field=models.DateTimeField(blank=True),
),
]
20 changes: 20 additions & 0 deletions submissions/migrations/0004_auto_20161028_2240.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-28 22:40
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('submissions', '0003_auto_20161028_2238'),
]

operations = [
migrations.AlterField(
model_name='submission',
name='mtime',
field=models.DateTimeField(blank=True, null=True),
),
]
2 changes: 1 addition & 1 deletion submissions/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Submission(models.Model):

# Additional metadata
ctime = models.DateTimeField(auto_now_add=True)
mtime = models.DateTimeField(auto_now=True)
mtime = models.DateTimeField(blank=True, null=True)
views = models.PositiveIntegerField(default=0)
enjoy_votes = models.PositiveIntegerField(default=0)
rating_stars = models.CharField(max_length=40, default='&#x2606;' * 5)
Expand Down
17 changes: 15 additions & 2 deletions submissions/templates/confirm_delete_folder.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
{% extends "base.html" %}

{% block content %}
{% include 'profile-tabs-snippet.html' with author=user %}
<div class="alert alert-info">
<p>You are about to delete your folder {{ folder.name }}. Are you sure that you want to do this? All submissions in the folder are safe; this folder will simply be removed from their list of folders.</p>
<form method="post">
{% csrf_token %}
<input type="submit" value="I'm sure" />
<a href="{% url 'submissions:view_folder' username=user.username folder_id=folder.id folder_slug=folder.slug %}">No, take me back</a>
<p><button class="btn btn-danger" type="submit"><span class="glyphicon glyphicon-remove"></span> Delete folder</button></p>
<p><a href="{% url 'submissions:view_folder' username=user.username folder_id=folder.id folder_slug=folder.slug %}">No, take me back</a></p>
</form>
</div>
<div class="row">
<div class="col-md-8 col-md-offset-2">
<h2>Folder contents</h2>
{% for submission in folder.submissions.all %}
<div class="row striped-item">
<div class="col-md-12">
{% include 'submission-list-snippet.html' with submission=submission author=submission.owner %}
</div>
</div>
{% endfor %}
</div>
</div>
{% endblock %}
22 changes: 20 additions & 2 deletions submissions/templates/confirm_delete_submission.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,26 @@
<p>You are about to delete your submission {{ submission.title }}. Are you sure that you want to do this?</p>
<form method="post">
{% csrf_token %}
<input type="submit" value="I'm sure" />
<a href="{% url 'submissions:view_submission' username=user.username submission_id=submission.id submission_slug=submission.slug %}">No, take me back</a>
<p><button class="btn btn-danger" type="submit"><span class="glyphicon glyphicon-remove"></span> Delete submission</button></p>
<p><a href="{% url 'submissions:view_submission' username=user.username submission_id=submission.id submission_slug=submission.slug %}">No, take me back</a></p>
</form>
</div>
<div class="row">
<div class="col-md-8 col-md-offset-2">
<h2>Submission description</h2>
{% if submission.description_rendered %}
{{ submission.description_rendered|safe }}
{% else %}
<em>No description provided</em>
{% endif %}
</div>
</div>
<div class="row">
<div class="col-md-8 col-md-offset-2">
<h2>Submission text</h2>
<div class="text-block">
{{ submission.content_rendered|safe }}
</div>
</div>
</div>
{% endblock %}
11 changes: 9 additions & 2 deletions submissions/templates/edit_folder.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
{% extends "base.html" %}

{% block content %}
{% include 'profile-tabs-snippet.html' with author=user %}
<form method="post">
{% csrf_token %}
{% include 'registration/form-snippet.html' with form=form %}
<button type="submit" class="btn btn-primary">{{ title }}</button>
<div class="row">
<div class="col-md-8 col-md-offset-2">
{% include 'registration/form-snippet.html' with form=form %}
</div>
</div>
<div class="text-center">
<button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-floppy-disk"></span> {{ title }}</button>
</div>
</form>
{% endblock %}
Loading