way too many changes for one commit oops
This commit is contained in:
parent
2445fadf63
commit
8cc4bda231
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,2 @@
|
||||||
data
|
data
|
||||||
static
|
|
||||||
fixtures
|
fixtures
|
|
@ -32,7 +32,7 @@ SECRET_KEY = env("SECRET_KEY")
|
||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = env("DEBUG")
|
DEBUG = env("DEBUG")
|
||||||
ALLOWED_HOSTS = ['.localhost', '127.0.0.1', '[::1]', env("DOMAIN")]
|
ALLOWED_HOSTS = [".localhost", "127.0.0.1", "[::1]", env("DOMAIN")]
|
||||||
CSRF_COOKIE_SECURE = True
|
CSRF_COOKIE_SECURE = True
|
||||||
SESSION_COOKIE_SECURE = True
|
SESSION_COOKIE_SECURE = True
|
||||||
CSRF_TRUSTED_ORIGINS = [f'https://{env("DOMAIN")}']
|
CSRF_TRUSTED_ORIGINS = [f'https://{env("DOMAIN")}']
|
||||||
|
|
|
@ -16,13 +16,19 @@ urlpatterns = [
|
||||||
path("contact", views.Contact.as_view(), name="contact"),
|
path("contact", views.Contact.as_view(), name="contact"),
|
||||||
path("blogs", views.Blogs.as_view(), name="blogs"),
|
path("blogs", views.Blogs.as_view(), name="blogs"),
|
||||||
path("blogs/<category>", views.Blogs.as_view(), name="blog-category "),
|
path("blogs/<category>", views.Blogs.as_view(), name="blog-category "),
|
||||||
|
path("blog-articles", views.Articles.as_view(), name="blog-articles"),
|
||||||
path("events", views.Conferences.as_view(), name="events"),
|
path("events", views.Conferences.as_view(), name="events"),
|
||||||
path("events/<category>", views.Conferences.as_view(), name="events-category"),
|
path("events/<category>", views.Conferences.as_view(), name="events-category"),
|
||||||
re_path(r"^cfps/?$", views.CallsForPapers.as_view(), name="cfps"),
|
re_path(r"^cfps/?$", views.CallsForPapers.as_view(), name="cfps"),
|
||||||
path("groups", views.Groups.as_view(), name="groups"),
|
path("groups", views.Groups.as_view(), name="groups"),
|
||||||
path("groups/<category>", views.Groups.as_view(), name="group-category"),
|
path("groups/<category>", views.Groups.as_view(), name="group-category"),
|
||||||
path("newsletters", views.Newsletters.as_view(), name="newsletters"),
|
path("newsletters", views.Newsletters.as_view(), name="newsletters"),
|
||||||
path("newsletters/<category>", views.Newsletters.as_view(), name="newsletters-category"),
|
path(
|
||||||
|
"newsletters/<category>",
|
||||||
|
views.Newsletters.as_view(),
|
||||||
|
name="newsletters-category",
|
||||||
|
),
|
||||||
|
path("newsletter-editions", views.Editions.as_view(), name="newsletter-editions"),
|
||||||
path("register-blog", views.RegisterBlog.as_view(), name="register-blog"),
|
path("register-blog", views.RegisterBlog.as_view(), name="register-blog"),
|
||||||
path(
|
path(
|
||||||
"submit-blog-registration",
|
"submit-blog-registration",
|
||||||
|
|
|
@ -192,9 +192,27 @@ class Group(admin.ModelAdmin):
|
||||||
class Newsletter(admin.ModelAdmin):
|
class Newsletter(admin.ModelAdmin):
|
||||||
"""display settings for newsletters"""
|
"""display settings for newsletters"""
|
||||||
|
|
||||||
list_display = ("name", "approved", "category", "description")
|
list_display = (
|
||||||
ordering = ["approved", "name"]
|
"name",
|
||||||
actions = [approve, unapprove]
|
"approved",
|
||||||
|
"announced",
|
||||||
|
"failing",
|
||||||
|
"active",
|
||||||
|
)
|
||||||
|
ordering = ["approved", "-failing"]
|
||||||
|
actions = [approve, unapprove, suspend, activate, disable]
|
||||||
|
|
||||||
|
|
||||||
|
@admin.register(models.Edition)
|
||||||
|
class Edition(admin.ModelAdmin):
|
||||||
|
"""display settings for editions"""
|
||||||
|
|
||||||
|
date_hierarchy = "pubdate"
|
||||||
|
list_display = ("title", "newsletter_name", "pubdate")
|
||||||
|
|
||||||
|
def newsletter_name(self, obj): # pylint: disable=no-self-use
|
||||||
|
"""get the title of the parent newsletter"""
|
||||||
|
return obj.newsletter.name
|
||||||
|
|
||||||
|
|
||||||
@admin.register(models.ContentWarning)
|
@admin.register(models.ContentWarning)
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from .models import Blog, CallForPapers, Event, Group, Newsletter, Subscriber
|
from .models import Blog, CallForPapers, Event, Group, Newsletter, Subscriber
|
||||||
|
|
||||||
|
@ -82,6 +83,10 @@ class RegisterCallForPapersForm(forms.ModelForm):
|
||||||
"closing_date": DateInput(),
|
"closing_date": DateInput(),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
help_texts = {
|
||||||
|
"name": _("'Call for papers', 'Call for participation' etc"),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class RegisterGroupForm(forms.ModelForm):
|
class RegisterGroupForm(forms.ModelForm):
|
||||||
"""form for registering a group"""
|
"""form for registering a group"""
|
||||||
|
@ -113,11 +118,18 @@ class RegisterNewsletterForm(forms.ModelForm):
|
||||||
"author",
|
"author",
|
||||||
"category",
|
"category",
|
||||||
"url",
|
"url",
|
||||||
|
"feed",
|
||||||
"description",
|
"description",
|
||||||
"activitypub_account_name",
|
"activitypub_account_name",
|
||||||
"contact_email",
|
"contact_email",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
help_texts = {
|
||||||
|
"feed": _(
|
||||||
|
"The Atom/RSS feed of your newsletter. If you include this, issues will be shown in AusGLAMR"
|
||||||
|
),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class ContactForm(forms.Form):
|
class ContactForm(forms.Form):
|
||||||
"""form for contacting site admin"""
|
"""form for contacting site admin"""
|
||||||
|
|
|
@ -9,10 +9,13 @@ import feedparser
|
||||||
|
|
||||||
from django.core.management.base import BaseCommand
|
from django.core.management.base import BaseCommand
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
|
from django.utils import html
|
||||||
from django.utils import timezone as django_timezone
|
from django.utils import timezone as django_timezone
|
||||||
|
|
||||||
from blogs import models
|
from blogs import models
|
||||||
|
|
||||||
|
agent = "AusGLAMR/1.0 +https://ausglamr.newcardigan.org"
|
||||||
|
|
||||||
|
|
||||||
def date_to_tz_aware(date_tuple):
|
def date_to_tz_aware(date_tuple):
|
||||||
"""turn a 9-tuple into something usable"""
|
"""turn a 9-tuple into something usable"""
|
||||||
|
@ -58,11 +61,11 @@ class Command(BaseCommand):
|
||||||
).all()
|
).all()
|
||||||
for blog in blogs:
|
for blog in blogs:
|
||||||
try:
|
try:
|
||||||
data = feedparser.parse(blog.feed)
|
data = feedparser.parse(blog.feed, agent=agent)
|
||||||
|
|
||||||
for article in data.entries:
|
for article in data.entries:
|
||||||
if not models.Article.objects.filter(
|
if not models.Article.objects.filter(
|
||||||
Q(url=article.link) | Q(guid=article.id)
|
Q(url=article.link) | Q(guid=getattr(article, "id", article.link))
|
||||||
).exists():
|
).exists():
|
||||||
if blog.suspension_lifted and (
|
if blog.suspension_lifted and (
|
||||||
blog.suspension_lifted
|
blog.suspension_lifted
|
||||||
|
@ -102,15 +105,30 @@ class Command(BaseCommand):
|
||||||
blog, "author", None
|
blog, "author", None
|
||||||
)
|
)
|
||||||
|
|
||||||
|
description = (
|
||||||
|
html.strip_tags(article.summary)
|
||||||
|
if (
|
||||||
|
hasattr(article, "summary")
|
||||||
|
and len(article.summary) > 0
|
||||||
|
)
|
||||||
|
else html.strip_tags(article.description)
|
||||||
|
if (
|
||||||
|
hasattr(article, "description")
|
||||||
|
and len(article.summary)
|
||||||
|
)
|
||||||
|
else html.strip_tags(article.content[0].value)[:200]
|
||||||
|
)
|
||||||
|
description += "..."
|
||||||
|
|
||||||
instance = models.Article.objects.create(
|
instance = models.Article.objects.create(
|
||||||
title=article.title,
|
title=article.title,
|
||||||
author_name=author_name,
|
author_name=author_name,
|
||||||
url=article.link,
|
url=article.link,
|
||||||
description=article.summary,
|
description=description,
|
||||||
updateddate=date_to_tz_aware(article.updated_parsed),
|
updateddate=date_to_tz_aware(article.updated_parsed),
|
||||||
blog=blog,
|
blog=blog,
|
||||||
pubdate=date_to_tz_aware(article.published_parsed),
|
pubdate=date_to_tz_aware(article.published_parsed),
|
||||||
guid=article.id,
|
guid=getattr(article, "id", article.link),
|
||||||
)
|
)
|
||||||
|
|
||||||
tags_to_add = get_tags(
|
tags_to_add = get_tags(
|
||||||
|
@ -135,6 +153,64 @@ class Command(BaseCommand):
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
blog.set_failing()
|
blog.set_failing()
|
||||||
logging.error(f"ERROR WITH BLOG {blog.title} - {blog.url}")
|
logging.error(f"ERROR WITH BLOG {blog.title} - {blog.url}")
|
||||||
|
logging.info(article)
|
||||||
|
logging.error(e)
|
||||||
|
|
||||||
|
newsletters = models.Newsletter.objects.filter(
|
||||||
|
approved=True, active=True, feed__isnull=False
|
||||||
|
).all()
|
||||||
|
for newsletter in newsletters:
|
||||||
|
try:
|
||||||
|
data = feedparser.parse(newsletter.feed, agent=agent)
|
||||||
|
|
||||||
|
for edition in data.entries:
|
||||||
|
if not models.Edition.objects.filter(
|
||||||
|
Q(url=edition.link) | Q(guid=getattr(edition, "id", edition.link))
|
||||||
|
).exists():
|
||||||
|
author_name = getattr(edition, "author", None) or getattr(
|
||||||
|
blog, "author", None
|
||||||
|
)
|
||||||
|
|
||||||
|
description = (
|
||||||
|
html.strip_tags(edition.summary)
|
||||||
|
if (
|
||||||
|
hasattr(edition, "summary") and len(edition.summary)
|
||||||
|
)
|
||||||
|
else html.strip_tags(edition.description)
|
||||||
|
if (
|
||||||
|
hasattr(edition, "description") and len(edition.summary)
|
||||||
|
)
|
||||||
|
else html.strip_tags(edition.content[0].value)[:200] + "..."
|
||||||
|
)
|
||||||
|
description += "..."
|
||||||
|
|
||||||
|
instance = models.Edition.objects.create(
|
||||||
|
title=edition.title,
|
||||||
|
author_name=author_name,
|
||||||
|
url=edition.link,
|
||||||
|
description=description,
|
||||||
|
updateddate=date_to_tz_aware(edition.updated_parsed),
|
||||||
|
newsletter=newsletter,
|
||||||
|
pubdate=date_to_tz_aware(edition.published_parsed),
|
||||||
|
guid=getattr(edition, "id", edition.link),
|
||||||
|
)
|
||||||
|
|
||||||
|
instance.save()
|
||||||
|
|
||||||
|
cutoff = django_timezone.now() - timedelta(days=3)
|
||||||
|
newish = instance.pubdate > cutoff
|
||||||
|
if newish:
|
||||||
|
instance.announce()
|
||||||
|
|
||||||
|
newsletter.set_success(
|
||||||
|
updateddate=date_to_tz_aware(edition.updated_parsed)
|
||||||
|
)
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
newsletter.set_failing()
|
||||||
|
logging.error(
|
||||||
|
f"ERROR WITH NEWSLETTER {newsletter.name} - {newsletter.url}"
|
||||||
|
)
|
||||||
logging.error(e)
|
logging.error(e)
|
||||||
|
|
||||||
if not options["q"]:
|
if not options["q"]:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Generated by Django 4.2.7 on 2024-01-07 04:55
|
# Generated by Django 4.2.7 on 2024-01-21 04:31
|
||||||
|
|
||||||
import blogs.models.blog
|
import blogs.models.blog
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
@ -43,7 +43,10 @@ class Migration(migrations.Migration):
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
("title", models.CharField(max_length=2000)),
|
("title", models.CharField(max_length=2000)),
|
||||||
("author_name", models.CharField(max_length=1000, null=True)),
|
(
|
||||||
|
"author_name",
|
||||||
|
models.CharField(blank=True, max_length=1000, null=True),
|
||||||
|
),
|
||||||
("url", models.URLField(max_length=2000, unique=True)),
|
("url", models.URLField(max_length=2000, unique=True)),
|
||||||
("description", models.TextField(blank=True, null=True)),
|
("description", models.TextField(blank=True, null=True)),
|
||||||
("updateddate", models.DateTimeField()),
|
("updateddate", models.DateTimeField()),
|
||||||
|
@ -63,6 +66,7 @@ class Migration(migrations.Migration):
|
||||||
max_length=4,
|
max_length=4,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
("added", models.DateTimeField(default=django.utils.timezone.now)),
|
||||||
("approved", models.BooleanField(default=False)),
|
("approved", models.BooleanField(default=False)),
|
||||||
("announced", models.BooleanField(default=False)),
|
("announced", models.BooleanField(default=False)),
|
||||||
("failing", models.BooleanField(blank=True, default=False, null=True)),
|
("failing", models.BooleanField(blank=True, default=False, null=True)),
|
||||||
|
@ -118,7 +122,7 @@ class Migration(migrations.Migration):
|
||||||
verbose_name="ID",
|
verbose_name="ID",
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
("name", models.CharField(max_length=999)),
|
("name", models.CharField(max_length=100)),
|
||||||
(
|
(
|
||||||
"category",
|
"category",
|
||||||
models.CharField(
|
models.CharField(
|
||||||
|
@ -135,7 +139,10 @@ class Migration(migrations.Migration):
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
("url", models.URLField(max_length=400, unique=True)),
|
("url", models.URLField(max_length=400, unique=True)),
|
||||||
("description", models.TextField(blank=True, null=True)),
|
(
|
||||||
|
"description",
|
||||||
|
models.TextField(blank=True, max_length=250, null=True),
|
||||||
|
),
|
||||||
("pub_date", models.DateTimeField()),
|
("pub_date", models.DateTimeField()),
|
||||||
("start_date", models.DateField()),
|
("start_date", models.DateField()),
|
||||||
(
|
(
|
||||||
|
@ -165,7 +172,7 @@ class Migration(migrations.Migration):
|
||||||
verbose_name="ID",
|
verbose_name="ID",
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
("name", models.CharField(max_length=999)),
|
("name", models.CharField(max_length=100)),
|
||||||
(
|
(
|
||||||
"category",
|
"category",
|
||||||
models.CharField(
|
models.CharField(
|
||||||
|
@ -202,7 +209,10 @@ class Migration(migrations.Migration):
|
||||||
),
|
),
|
||||||
("url", models.URLField(max_length=400, unique=True)),
|
("url", models.URLField(max_length=400, unique=True)),
|
||||||
("registration_url", models.URLField(max_length=400, unique=True)),
|
("registration_url", models.URLField(max_length=400, unique=True)),
|
||||||
("description", models.TextField(blank=True, null=True)),
|
(
|
||||||
|
"description",
|
||||||
|
models.TextField(blank=True, max_length=250, null=True),
|
||||||
|
),
|
||||||
(
|
(
|
||||||
"contact_email",
|
"contact_email",
|
||||||
models.EmailField(blank=True, max_length=254, null=True),
|
models.EmailField(blank=True, max_length=254, null=True),
|
||||||
|
@ -224,8 +234,8 @@ class Migration(migrations.Migration):
|
||||||
verbose_name="ID",
|
verbose_name="ID",
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
("name", models.CharField(max_length=999)),
|
("name", models.CharField(max_length=100)),
|
||||||
("author", models.CharField(max_length=999)),
|
("author", models.CharField(max_length=100)),
|
||||||
(
|
(
|
||||||
"category",
|
"category",
|
||||||
models.CharField(
|
models.CharField(
|
||||||
|
@ -242,7 +252,16 @@ class Migration(migrations.Migration):
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
("url", models.URLField(max_length=400, unique=True)),
|
("url", models.URLField(max_length=400, unique=True)),
|
||||||
("description", models.TextField(blank=True, null=True)),
|
(
|
||||||
|
"feed",
|
||||||
|
models.URLField(
|
||||||
|
blank=True, max_length=1000, null=True, unique=True
|
||||||
|
),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"description",
|
||||||
|
models.TextField(blank=True, max_length=250, null=True),
|
||||||
|
),
|
||||||
(
|
(
|
||||||
"activitypub_account_name",
|
"activitypub_account_name",
|
||||||
models.CharField(blank=True, max_length=200, null=True),
|
models.CharField(blank=True, max_length=200, null=True),
|
||||||
|
@ -253,6 +272,9 @@ class Migration(migrations.Migration):
|
||||||
),
|
),
|
||||||
("announced", models.BooleanField(default=False)),
|
("announced", models.BooleanField(default=False)),
|
||||||
("approved", models.BooleanField(default=False)),
|
("approved", models.BooleanField(default=False)),
|
||||||
|
("active", models.BooleanField(default=True, null=True)),
|
||||||
|
("failing", models.BooleanField(blank=True, default=False, null=True)),
|
||||||
|
("updateddate", models.DateTimeField()),
|
||||||
("pub_date", models.DateTimeField(default=None, null=True)),
|
("pub_date", models.DateTimeField(default=None, null=True)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -308,6 +330,38 @@ class Migration(migrations.Migration):
|
||||||
("name", models.CharField(max_length=100, unique=True)),
|
("name", models.CharField(max_length=100, unique=True)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name="Edition",
|
||||||
|
fields=[
|
||||||
|
(
|
||||||
|
"id",
|
||||||
|
models.BigAutoField(
|
||||||
|
auto_created=True,
|
||||||
|
primary_key=True,
|
||||||
|
serialize=False,
|
||||||
|
verbose_name="ID",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
("title", models.CharField(max_length=2000)),
|
||||||
|
(
|
||||||
|
"author_name",
|
||||||
|
models.CharField(blank=True, max_length=1000, null=True),
|
||||||
|
),
|
||||||
|
("url", models.URLField(max_length=2000, unique=True)),
|
||||||
|
("description", models.TextField(blank=True, null=True)),
|
||||||
|
("updateddate", models.DateTimeField()),
|
||||||
|
("pubdate", models.DateTimeField()),
|
||||||
|
("guid", models.CharField(max_length=2000)),
|
||||||
|
(
|
||||||
|
"newsletter",
|
||||||
|
models.ForeignKey(
|
||||||
|
on_delete=django.db.models.deletion.CASCADE,
|
||||||
|
related_name="editions",
|
||||||
|
to="blogs.newsletter",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name="CallForPapers",
|
name="CallForPapers",
|
||||||
fields=[
|
fields=[
|
||||||
|
@ -320,8 +374,8 @@ class Migration(migrations.Migration):
|
||||||
verbose_name="ID",
|
verbose_name="ID",
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
("name", models.CharField(max_length=999)),
|
("name", models.CharField(max_length=100)),
|
||||||
("details", models.TextField(blank=True, null=True)),
|
("details", models.TextField(blank=True, max_length=250, null=True)),
|
||||||
("pub_date", models.DateTimeField(default=None, null=True)),
|
("pub_date", models.DateTimeField(default=None, null=True)),
|
||||||
("opening_date", models.DateField()),
|
("opening_date", models.DateField()),
|
||||||
("closing_date", models.DateField()),
|
("closing_date", models.DateField()),
|
||||||
|
@ -350,7 +404,10 @@ class Migration(migrations.Migration):
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
("title", models.CharField(max_length=2000)),
|
("title", models.CharField(max_length=2000)),
|
||||||
("author_name", models.CharField(max_length=1000, null=True)),
|
(
|
||||||
|
"author_name",
|
||||||
|
models.CharField(blank=True, max_length=1000, null=True),
|
||||||
|
),
|
||||||
("url", models.URLField(max_length=2000, unique=True)),
|
("url", models.URLField(max_length=2000, unique=True)),
|
||||||
("description", models.TextField(blank=True, null=True)),
|
("description", models.TextField(blank=True, null=True)),
|
||||||
("updateddate", models.DateTimeField()),
|
("updateddate", models.DateTimeField()),
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
from .blog import Article, Blog, Tag
|
from .blog import Article, Blog, Tag
|
||||||
from .event import Event, CallForPapers
|
from .event import Event, CallForPapers
|
||||||
from .group import Group
|
from .group import Group
|
||||||
from .newsletter import Newsletter
|
from .newsletter import Newsletter, Edition
|
||||||
from .utils import Announcement, Category, ContentWarning, SiteMessage
|
from .utils import Announcement, Category, ContentWarning, SiteMessage
|
||||||
from .subscriber import Subscriber
|
from .subscriber import Subscriber
|
||||||
|
|
|
@ -55,7 +55,7 @@ class Blog(BlogData):
|
||||||
|
|
||||||
feed = models.URLField(max_length=2000)
|
feed = models.URLField(max_length=2000)
|
||||||
category = models.CharField(choices=Category.choices, max_length=4)
|
category = models.CharField(choices=Category.choices, max_length=4)
|
||||||
added = models.DateTimeField()
|
added = models.DateTimeField(default=timezone.now)
|
||||||
approved = models.BooleanField(default=False)
|
approved = models.BooleanField(default=False)
|
||||||
announced = models.BooleanField(default=False)
|
announced = models.BooleanField(default=False)
|
||||||
failing = models.BooleanField(default=False, blank=True, null=True)
|
failing = models.BooleanField(default=False, blank=True, null=True)
|
||||||
|
@ -67,11 +67,6 @@ class Blog(BlogData):
|
||||||
)
|
)
|
||||||
contact_email = models.EmailField(blank=True, null=True)
|
contact_email = models.EmailField(blank=True, null=True)
|
||||||
|
|
||||||
def save(self, *args, **kwargs):
|
|
||||||
if not self.added:
|
|
||||||
self.added = timezone.now()
|
|
||||||
super().save(*args, **kwargs)
|
|
||||||
|
|
||||||
def announce(self):
|
def announce(self):
|
||||||
"""queue announcement"""
|
"""queue announcement"""
|
||||||
|
|
||||||
|
@ -114,7 +109,7 @@ class Article(BlogData):
|
||||||
blog = models.ForeignKey(Blog, on_delete=models.CASCADE, related_name="articles")
|
blog = models.ForeignKey(Blog, on_delete=models.CASCADE, related_name="articles")
|
||||||
pubdate = models.DateTimeField()
|
pubdate = models.DateTimeField()
|
||||||
guid = models.CharField(max_length=2000)
|
guid = models.CharField(max_length=2000)
|
||||||
tags = models.ManyToManyField("Tag", related_name="articles", null=True, blank=True)
|
tags = models.ManyToManyField("Tag", related_name="articles")
|
||||||
|
|
||||||
# pylint: disable=undefined-variable
|
# pylint: disable=undefined-variable
|
||||||
def announce(self):
|
def announce(self):
|
||||||
|
|
|
@ -13,12 +13,17 @@ class Newsletter(models.Model):
|
||||||
author = models.CharField(max_length=100)
|
author = models.CharField(max_length=100)
|
||||||
category = models.CharField(choices=Category.choices, max_length=4)
|
category = models.CharField(choices=Category.choices, max_length=4)
|
||||||
url = models.URLField(max_length=400, unique=True)
|
url = models.URLField(max_length=400, unique=True)
|
||||||
|
feed = models.URLField(max_length=1000, unique=True, blank=True, null=True)
|
||||||
description = models.TextField(null=True, blank=True, max_length=250)
|
description = models.TextField(null=True, blank=True, max_length=250)
|
||||||
activitypub_account_name = models.CharField(max_length=200, blank=True, null=True)
|
activitypub_account_name = models.CharField(max_length=200, blank=True, null=True)
|
||||||
contact_email = models.EmailField(blank=True, null=True)
|
contact_email = models.EmailField(blank=True, null=True)
|
||||||
|
|
||||||
announced = models.BooleanField(default=False)
|
announced = models.BooleanField(default=False)
|
||||||
approved = models.BooleanField(default=False)
|
approved = models.BooleanField(default=False)
|
||||||
|
active = models.BooleanField(null=True, default=True)
|
||||||
|
failing = models.BooleanField(default=False, blank=True, null=True)
|
||||||
|
|
||||||
|
updateddate = models.DateTimeField()
|
||||||
pub_date = models.DateTimeField(null=True, default=None)
|
pub_date = models.DateTimeField(null=True, default=None)
|
||||||
|
|
||||||
def announce(self):
|
def announce(self):
|
||||||
|
@ -36,6 +41,38 @@ class Newsletter(models.Model):
|
||||||
super().save()
|
super().save()
|
||||||
|
|
||||||
def save(self, *args, **kwargs):
|
def save(self, *args, **kwargs):
|
||||||
if not self.pub_date:
|
if not self.updateddate:
|
||||||
self.pub_date = timezone.now()
|
self.updateddate = timezone.now()
|
||||||
super().save(*args, **kwargs)
|
super().save(*args, **kwargs)
|
||||||
|
|
||||||
|
def set_failing(self):
|
||||||
|
"""set the newsletter feed as failing"""
|
||||||
|
|
||||||
|
self.failing = True
|
||||||
|
super().save()
|
||||||
|
|
||||||
|
def set_success(self, updateddate):
|
||||||
|
"""
|
||||||
|
set failing to false
|
||||||
|
set the updateddate to a datetime
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
self.failing = False
|
||||||
|
self.updateddate = updateddate
|
||||||
|
super().save()
|
||||||
|
|
||||||
|
|
||||||
|
class Edition(models.Model):
|
||||||
|
"""A newsletter edition"""
|
||||||
|
|
||||||
|
title = models.CharField(max_length=2000)
|
||||||
|
author_name = models.CharField(max_length=1000, null=True, blank=True)
|
||||||
|
url = models.URLField(max_length=2000, unique=True)
|
||||||
|
description = models.TextField(null=True, blank=True)
|
||||||
|
updateddate = models.DateTimeField()
|
||||||
|
newsletter = models.ForeignKey(
|
||||||
|
Newsletter, on_delete=models.CASCADE, related_name="editions"
|
||||||
|
)
|
||||||
|
pubdate = models.DateTimeField()
|
||||||
|
guid = models.CharField(max_length=2000)
|
||||||
|
|
857
blogs/static/css/custom.css
Normal file
857
blogs/static/css/custom.css
Normal file
|
@ -0,0 +1,857 @@
|
||||||
|
/* Fonts
|
||||||
|
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: "Source Sans Pro";
|
||||||
|
src: url("../fonts/source-sans-pro/SourceSansPro-Regular.otf") format("opentype");
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: "Helsinki";
|
||||||
|
src: url("../fonts/helsinki/helsinki.ttf") format("opentype");
|
||||||
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
font-size: 62.5%; }
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-size: 2em;
|
||||||
|
line-height: 1.6;
|
||||||
|
font-family: "Source Sans Pro", Helvetica, Arial, sans-serif;
|
||||||
|
color: #222; }
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #ff748c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-title {
|
||||||
|
color: #000;
|
||||||
|
text-shadow: -2px -2px #eee;
|
||||||
|
font-variant-caps: small-caps;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
body {
|
||||||
|
color: #ccc;
|
||||||
|
background-color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration-line:underline;
|
||||||
|
text-decoration-color: hsla(349.6,100%,72.7%, 0.5);
|
||||||
|
text-decoration-style: solid;
|
||||||
|
text-decoration-thickness: 2px;
|
||||||
|
color: #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
color: hsla(349.6,100%,72.7%, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-title {
|
||||||
|
color: #ccc;
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
background-color: transparent;
|
||||||
|
font-family: monospace;
|
||||||
|
border: none;
|
||||||
|
font-size: large;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Sections
|
||||||
|
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||||
|
|
||||||
|
body {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
height: 100%;
|
||||||
|
min-height: 10vh;
|
||||||
|
background-color: lightpink;
|
||||||
|
font-family: "Helsinki", Helvetica, Arial, sans-serif;
|
||||||
|
padding-top: 3rem;
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
header,
|
||||||
|
header a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: black;
|
||||||
|
text-shadow: 1px 1px #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
header a:hover {
|
||||||
|
color: #fff;
|
||||||
|
text-shadow: 1px 1px black;
|
||||||
|
}
|
||||||
|
|
||||||
|
header a h1 {
|
||||||
|
text-shadow: 2px 2px #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
header a:hover h1 {
|
||||||
|
text-shadow: 2px 2px black;
|
||||||
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
flex: auto;
|
||||||
|
min-height: 80vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
margin-top: 4em;
|
||||||
|
padding: 3rem;
|
||||||
|
font-size: 1.75rem;
|
||||||
|
min-height: 4.5rem;
|
||||||
|
background-color: #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer a {
|
||||||
|
color: #ff748c;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer p {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer .left p {
|
||||||
|
text-align: left;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 80rem) {
|
||||||
|
footer .left p {
|
||||||
|
text-align: right;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.trending {
|
||||||
|
margin-top: 4em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.help h4 {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.help h4 + a {
|
||||||
|
font-size: 14px;
|
||||||
|
text-decoration: none;
|
||||||
|
margin-left: 1rem;
|
||||||
|
position: relative;
|
||||||
|
top: -1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
header {
|
||||||
|
background-color: hsla(349.6,100%,72.7%, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
header,
|
||||||
|
header a {
|
||||||
|
color: #ccc;
|
||||||
|
text-shadow: 1px 1px #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
header a:hover {
|
||||||
|
color: #000;
|
||||||
|
text-shadow: 1px 1px #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
header a h1 {
|
||||||
|
text-shadow: 2px 2px #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
header a:hover h1 {
|
||||||
|
text-shadow: 2px 2px #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
color: #ccc;
|
||||||
|
background-color: #111;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer a {
|
||||||
|
color: hsla(349.6,100%,72.7%, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
/* Subscribe and contribute
|
||||||
|
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||||
|
|
||||||
|
.pop-boxes {
|
||||||
|
max-width: 1200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subscribe {
|
||||||
|
display: grid;
|
||||||
|
align-items: start;
|
||||||
|
column-gap: 2rem;
|
||||||
|
grid-template-columns: 33% 33% 33%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subscribe .pop,
|
||||||
|
.contribute .pop {
|
||||||
|
min-height: 48rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contribute {
|
||||||
|
display: grid;
|
||||||
|
align-items: start;
|
||||||
|
column-gap: 2rem;
|
||||||
|
grid-template-columns: 33% 33% 33%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* .contribute .pop {
|
||||||
|
min-height: 28rem;
|
||||||
|
} */
|
||||||
|
|
||||||
|
.pop {
|
||||||
|
margin-top: 2em;
|
||||||
|
border: 1px solid #999;
|
||||||
|
padding: 2em;
|
||||||
|
border-radius: 5px;
|
||||||
|
box-shadow: 10px 10px 10px #bbb;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 90rem) {
|
||||||
|
|
||||||
|
.subscribe,
|
||||||
|
.contribute {
|
||||||
|
grid-template-columns: 50% 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subscribe .pop {
|
||||||
|
min-height: 34rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contribute .pop {
|
||||||
|
min-height: 30rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 75rem) {
|
||||||
|
|
||||||
|
.subscribe,
|
||||||
|
.contribute {
|
||||||
|
grid-template-columns: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contribute .pop,
|
||||||
|
.subscribe .pop {
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
.pop {
|
||||||
|
border: 1px solid #bbb;
|
||||||
|
box-shadow: 5px 5px 5px #999;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Card
|
||||||
|
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||||
|
|
||||||
|
.card {
|
||||||
|
background-color: transparent;
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 1px solid #000;
|
||||||
|
box-shadow: 10px 10px 10px #bbb;
|
||||||
|
margin: 3rem auto;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-body {
|
||||||
|
margin: 1em auto;
|
||||||
|
font-size: small;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card a,
|
||||||
|
.card a h3 {
|
||||||
|
text-decoration-color: lightpink;
|
||||||
|
text-decoration-thickness: 3px;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card .blog_title,
|
||||||
|
.card .author_name {
|
||||||
|
font-style: italic;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card .author_name {
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.meta div {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
.card {
|
||||||
|
background-color: transparent;
|
||||||
|
border: 1px solid #bbb;
|
||||||
|
box-shadow: 5px 5px 5px #999;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.card a,
|
||||||
|
.card a h3 {
|
||||||
|
text-decoration-color: hsla(349.6,100%,72.7%, 0.5);
|
||||||
|
color: #bbb;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card .blog_title,
|
||||||
|
.card .author_name {
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Badge
|
||||||
|
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||||
|
|
||||||
|
.badge {
|
||||||
|
display: inline-block;
|
||||||
|
height: 24px;
|
||||||
|
padding: 2px 5px;
|
||||||
|
color: #3a3a3a;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 1.25rem;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: 20px;
|
||||||
|
letter-spacing: .1rem;
|
||||||
|
text-transform: uppercase;
|
||||||
|
text-decoration: none;
|
||||||
|
white-space: nowrap;
|
||||||
|
background-color: transparent;
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 1px solid #aaa;
|
||||||
|
cursor: pointer;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: #3a3a3a;
|
||||||
|
}
|
||||||
|
|
||||||
|
.trending .badge {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
padding: 0 10px;
|
||||||
|
margin: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge_GAL {
|
||||||
|
color: #fff;
|
||||||
|
border-color: #0d799b;
|
||||||
|
background-color: #0d799b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge_LIB {
|
||||||
|
color: #fff;
|
||||||
|
border-color: #8e0574;
|
||||||
|
background-color: #8e0574;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge_ARC{
|
||||||
|
color: #fff;
|
||||||
|
border-color: #32761b;
|
||||||
|
background-color: #32761b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge_MUS {
|
||||||
|
color: #fff;
|
||||||
|
border-color: #9b4d5f;
|
||||||
|
background-color: #9b4d5f;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge_REC {
|
||||||
|
color: #fff;
|
||||||
|
border-color: #7252a0;
|
||||||
|
background-color: #7252a0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge_DH {
|
||||||
|
color: #fff;
|
||||||
|
border-color: #685ef5;
|
||||||
|
background-color: #685ef5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge_GLAM {
|
||||||
|
color: #fff;
|
||||||
|
border-color: #db2096;
|
||||||
|
background-color: #db2096;
|
||||||
|
}
|
||||||
|
|
||||||
|
[class*="badge_"] a {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
|
||||||
|
.badge {
|
||||||
|
color: #ccc
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge_LIB {
|
||||||
|
border-color: #b9712d;
|
||||||
|
background-color: #b9712d;
|
||||||
|
}
|
||||||
|
|
||||||
|
[class*="badge_"],
|
||||||
|
[class*="badge_"] a {
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* Menu
|
||||||
|
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||||
|
.menu-item {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 10px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
letter-spacing: .1rem;
|
||||||
|
text-transform: uppercase;
|
||||||
|
text-decoration: none;
|
||||||
|
white-space: nowrap;
|
||||||
|
cursor: pointer;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.core-menu {
|
||||||
|
background-color: #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.core-menu a:hover {
|
||||||
|
color: black;
|
||||||
|
text-shadow: 1px 1px lightpink;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
.core-menu {
|
||||||
|
background-color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.core-menu a {
|
||||||
|
/* color: #333; */
|
||||||
|
color: #000;
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.core-menu a:hover {
|
||||||
|
color: #ccc;
|
||||||
|
text-shadow: 1px 1px #333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Button
|
||||||
|
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||||
|
|
||||||
|
.buttons {
|
||||||
|
margin-bottom: 4rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button.button,
|
||||||
|
button.button,
|
||||||
|
input[type="submit"].button,
|
||||||
|
input[type="reset"].button,
|
||||||
|
input[type="button"].button {
|
||||||
|
color: #000;
|
||||||
|
border-color: #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button.button-primary,
|
||||||
|
button.button-primary,
|
||||||
|
input[type="submit"].button-primary,
|
||||||
|
input[type="reset"].button-primary,
|
||||||
|
input[type="button"].button-primary {
|
||||||
|
color: #FFF;
|
||||||
|
background-color: #222;
|
||||||
|
border-color: #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button.button-primary:hover,
|
||||||
|
button.button-primary:hover,
|
||||||
|
input[type="submit"].button-primary:hover,
|
||||||
|
input[type="reset"].button-primary:hover,
|
||||||
|
input[type="button"].button-primary:hover,
|
||||||
|
.button.button-primary:focus,
|
||||||
|
button.button-primary:focus,
|
||||||
|
input[type="submit"].button-primary:focus,
|
||||||
|
input[type="reset"].button-primary:focus,
|
||||||
|
input[type="button"].button-primary:focus {
|
||||||
|
color: #000;
|
||||||
|
background-color: lightpink;
|
||||||
|
border-color: #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button.button:hover,
|
||||||
|
button.button:hover,
|
||||||
|
input[type="submit"].button:hover,
|
||||||
|
input[type="reset"].button:hover,
|
||||||
|
input[type="button"].button:hover,
|
||||||
|
.button.button:focus,
|
||||||
|
button.button:focus,
|
||||||
|
input[type="submit"].button:focus,
|
||||||
|
input[type="reset"].button:focus,
|
||||||
|
input[type="button"].button:focus {
|
||||||
|
color: #FFF;
|
||||||
|
background-color: #222;
|
||||||
|
border-color: #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-first {
|
||||||
|
margin-right: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
|
||||||
|
.button.button,
|
||||||
|
button.button,
|
||||||
|
input[type="submit"].button,
|
||||||
|
input[type="reset"].button,
|
||||||
|
input[type="button"].button {
|
||||||
|
color: #ddd;
|
||||||
|
border-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button.button-primary,
|
||||||
|
button.button-primary,
|
||||||
|
input[type="submit"].button-primary,
|
||||||
|
input[type="reset"].button-primary,
|
||||||
|
input[type="button"].button-primary {
|
||||||
|
color: #333;
|
||||||
|
background-color: #ddd;
|
||||||
|
border-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button.button-primary:hover,
|
||||||
|
button.button-primary:hover,
|
||||||
|
input[type="submit"].button-primary:hover,
|
||||||
|
input[type="reset"].button-primary:hover,
|
||||||
|
input[type="button"].button-primary:hover,
|
||||||
|
.button.button-primary:focus,
|
||||||
|
button.button-primary:focus,
|
||||||
|
input[type="submit"].button-primary:focus,
|
||||||
|
input[type="reset"].button-primary:focus,
|
||||||
|
input[type="button"].button-primary:focus {
|
||||||
|
color: #333;
|
||||||
|
background-color: hsla(349.6,100%,72.7%, 0.5);
|
||||||
|
border-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button.button:hover,
|
||||||
|
button.button:hover,
|
||||||
|
input[type="submit"].button:hover,
|
||||||
|
input[type="reset"].button:hover,
|
||||||
|
input[type="button"].button:hover,
|
||||||
|
.button.button:focus,
|
||||||
|
button.button:focus,
|
||||||
|
input[type="submit"].button:focus,
|
||||||
|
input[type="reset"].button:focus,
|
||||||
|
input[type="button"].button:focus {
|
||||||
|
color: #333;
|
||||||
|
background-color: #ddd;
|
||||||
|
border-color: #ddd;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Forms
|
||||||
|
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||||
|
|
||||||
|
input[type="text"],
|
||||||
|
input[type="url"],
|
||||||
|
input[type="email"] {
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
label:has(+ input[required=""])::after,
|
||||||
|
label:has(+ select[required=""])::after {
|
||||||
|
content: "*";
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hint {
|
||||||
|
color: #999;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
input[type="email"],
|
||||||
|
input[type="number"],
|
||||||
|
input[type="search"],
|
||||||
|
input[type="text"],
|
||||||
|
input[type="tel"],
|
||||||
|
input[type="url"],
|
||||||
|
input[type="date"],
|
||||||
|
input[type="password"],
|
||||||
|
textarea,
|
||||||
|
select {
|
||||||
|
background-color: transparent;
|
||||||
|
color: #bbb;
|
||||||
|
}
|
||||||
|
|
||||||
|
input::placeholder {
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Alerts
|
||||||
|
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||||
|
|
||||||
|
.alert {
|
||||||
|
border: 2px solid #000;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 0.5em;
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert p {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.success {
|
||||||
|
border-color: green;
|
||||||
|
background-color: rgb(175, 228, 175);
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.failure {
|
||||||
|
border-color: red;
|
||||||
|
background-color: rgb(238, 199, 200);
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
border-color: orange;
|
||||||
|
background-color: lightgoldenrodyellow;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.errorlist {
|
||||||
|
list-style: none;
|
||||||
|
color: red;
|
||||||
|
margin-left: 1rem;
|
||||||
|
margin-bottom: -1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
.success {
|
||||||
|
border-color: green;
|
||||||
|
background-color: rgb(117, 157, 117);
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.failure {
|
||||||
|
border-color: rgb(58, 31, 31);
|
||||||
|
background-color: rgb(134, 105, 106);
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
border-color: darkorange;
|
||||||
|
background-color: orange;
|
||||||
|
}
|
||||||
|
|
||||||
|
.errorlist {
|
||||||
|
color: rgb(134, 105, 106);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tables
|
||||||
|
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||||
|
|
||||||
|
.table-description {
|
||||||
|
min-width: 33%;
|
||||||
|
max-width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-date {
|
||||||
|
width:8em;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Grids
|
||||||
|
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||||
|
|
||||||
|
.listing {
|
||||||
|
display: grid;
|
||||||
|
align-items: start;
|
||||||
|
column-gap: 4rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.listing.header {
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.l-two {
|
||||||
|
grid-template-columns: 80% 20%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.l-three {
|
||||||
|
grid-template-columns: 60% 15% 25%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.l-four {
|
||||||
|
grid-template-columns: 40% 20% 20% 20%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.listing + hr {
|
||||||
|
margin-top: 1rem;
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 60rem) {
|
||||||
|
|
||||||
|
.listing.header {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.start-date::before {
|
||||||
|
content: "Starts: ";
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.closing-date::before {
|
||||||
|
content: "Closes: ";
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.l-two,
|
||||||
|
.l-three,
|
||||||
|
.l-four {
|
||||||
|
grid-template-columns: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Pagination
|
||||||
|
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||||
|
|
||||||
|
.pagination {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inactive {
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* utils
|
||||||
|
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||||
|
|
||||||
|
.svg * {
|
||||||
|
max-width: 20px;
|
||||||
|
max-height: 20px;
|
||||||
|
fill: #222;
|
||||||
|
margin-left: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
svg *:hover {
|
||||||
|
fill: lightpink;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
.svg * {
|
||||||
|
fill: hsla(349.6,100%,72.7%, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
svg *:hover {
|
||||||
|
fill: #ddd;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.helptext {
|
||||||
|
margin-left: 2rem;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.helptext + label {
|
||||||
|
margin-top: 2.5rem;
|
||||||
|
}
|
||||||
|
/* Loading spinner
|
||||||
|
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||||
|
|
||||||
|
.lds-text {
|
||||||
|
margin: auto;
|
||||||
|
padding-top: 80px;
|
||||||
|
text-align: center;
|
||||||
|
color: #999;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lds-heart {
|
||||||
|
display: inline-block;
|
||||||
|
position: fixed;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
margin-bottom: calc(50vh - 40px);
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
text-align: center;
|
||||||
|
width: 80px;
|
||||||
|
height: 80px;
|
||||||
|
transform: rotate(45deg);
|
||||||
|
transform-origin: 40px 40px;
|
||||||
|
}
|
||||||
|
.lds-heart div {
|
||||||
|
top: 32px;
|
||||||
|
left: 32px;
|
||||||
|
position: absolute;
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
background: lightpink;
|
||||||
|
animation: lds-heart 1.2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
|
||||||
|
}
|
||||||
|
.lds-heart div:after,
|
||||||
|
.lds-heart div:before {
|
||||||
|
content: " ";
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
background: lightpink;
|
||||||
|
}
|
||||||
|
.lds-heart div:before {
|
||||||
|
left: -24px;
|
||||||
|
border-radius: 50% 0 0 50%;
|
||||||
|
}
|
||||||
|
.lds-heart div:after {
|
||||||
|
top: -24px;
|
||||||
|
border-radius: 50% 50% 0 0;
|
||||||
|
}
|
||||||
|
@keyframes lds-heart {
|
||||||
|
0% {
|
||||||
|
transform: scale(0.95);
|
||||||
|
}
|
||||||
|
5% {
|
||||||
|
transform: scale(1.1);
|
||||||
|
}
|
||||||
|
39% {
|
||||||
|
transform: scale(0.85);
|
||||||
|
}
|
||||||
|
45% {
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
60% {
|
||||||
|
transform: scale(0.95);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: scale(0.9);
|
||||||
|
}
|
||||||
|
}
|
427
blogs/static/css/normalize.css
vendored
Normal file
427
blogs/static/css/normalize.css
vendored
Normal file
|
@ -0,0 +1,427 @@
|
||||||
|
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Set default font family to sans-serif.
|
||||||
|
* 2. Prevent iOS text size adjust after orientation change, without disabling
|
||||||
|
* user zoom.
|
||||||
|
*/
|
||||||
|
|
||||||
|
html {
|
||||||
|
font-family: sans-serif; /* 1 */
|
||||||
|
-ms-text-size-adjust: 100%; /* 2 */
|
||||||
|
-webkit-text-size-adjust: 100%; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove default margin.
|
||||||
|
*/
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* HTML5 display definitions
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Correct `block` display not defined for any HTML5 element in IE 8/9.
|
||||||
|
* Correct `block` display not defined for `details` or `summary` in IE 10/11
|
||||||
|
* and Firefox.
|
||||||
|
* Correct `block` display not defined for `main` in IE 11.
|
||||||
|
*/
|
||||||
|
|
||||||
|
article,
|
||||||
|
aside,
|
||||||
|
details,
|
||||||
|
figcaption,
|
||||||
|
figure,
|
||||||
|
footer,
|
||||||
|
header,
|
||||||
|
hgroup,
|
||||||
|
main,
|
||||||
|
menu,
|
||||||
|
nav,
|
||||||
|
section,
|
||||||
|
summary {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Correct `inline-block` display not defined in IE 8/9.
|
||||||
|
* 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
|
||||||
|
*/
|
||||||
|
|
||||||
|
audio,
|
||||||
|
canvas,
|
||||||
|
progress,
|
||||||
|
video {
|
||||||
|
display: inline-block; /* 1 */
|
||||||
|
vertical-align: baseline; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prevent modern browsers from displaying `audio` without controls.
|
||||||
|
* Remove excess height in iOS 5 devices.
|
||||||
|
*/
|
||||||
|
|
||||||
|
audio:not([controls]) {
|
||||||
|
display: none;
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address `[hidden]` styling not present in IE 8/9/10.
|
||||||
|
* Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
|
||||||
|
*/
|
||||||
|
|
||||||
|
[hidden],
|
||||||
|
template {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Links
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the gray background color from active links in IE 10.
|
||||||
|
*/
|
||||||
|
|
||||||
|
a {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Improve readability when focused and also mouse hovered in all browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
a:active,
|
||||||
|
a:hover {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Text-level semantics
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address styling not present in IE 8/9/10/11, Safari, and Chrome.
|
||||||
|
*/
|
||||||
|
|
||||||
|
abbr[title] {
|
||||||
|
border-bottom: 1px dotted;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
|
||||||
|
*/
|
||||||
|
|
||||||
|
b,
|
||||||
|
strong {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address styling not present in Safari and Chrome.
|
||||||
|
*/
|
||||||
|
|
||||||
|
dfn {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address variable `h1` font-size and margin within `section` and `article`
|
||||||
|
* contexts in Firefox 4+, Safari, and Chrome.
|
||||||
|
*/
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 2em;
|
||||||
|
margin: 0.67em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address styling not present in IE 8/9.
|
||||||
|
*/
|
||||||
|
|
||||||
|
mark {
|
||||||
|
background: #ff0;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address inconsistent and variable font size in all browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
small {
|
||||||
|
font-size: 80%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
sub,
|
||||||
|
sup {
|
||||||
|
font-size: 75%;
|
||||||
|
line-height: 0;
|
||||||
|
position: relative;
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
sup {
|
||||||
|
top: -0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub {
|
||||||
|
bottom: -0.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Embedded content
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove border when inside `a` element in IE 8/9/10.
|
||||||
|
*/
|
||||||
|
|
||||||
|
img {
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Correct overflow not hidden in IE 9/10/11.
|
||||||
|
*/
|
||||||
|
|
||||||
|
svg:not(:root) {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Grouping content
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address margin not present in IE 8/9 and Safari.
|
||||||
|
*/
|
||||||
|
|
||||||
|
figure {
|
||||||
|
margin: 1em 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address differences between Firefox and other browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
hr {
|
||||||
|
-moz-box-sizing: content-box;
|
||||||
|
box-sizing: content-box;
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contain overflow in all browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
pre {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address odd `em`-unit font size rendering in all browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
code,
|
||||||
|
kbd,
|
||||||
|
pre,
|
||||||
|
samp {
|
||||||
|
font-family: monospace, monospace;
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Forms
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Known limitation: by default, Chrome and Safari on OS X allow very limited
|
||||||
|
* styling of `select`, unless a `border` property is set.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Correct color not being inherited.
|
||||||
|
* Known issue: affects color of disabled elements.
|
||||||
|
* 2. Correct font properties not being inherited.
|
||||||
|
* 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button,
|
||||||
|
input,
|
||||||
|
optgroup,
|
||||||
|
select,
|
||||||
|
textarea {
|
||||||
|
color: inherit; /* 1 */
|
||||||
|
font: inherit; /* 2 */
|
||||||
|
margin: 0; /* 3 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address `overflow` set to `hidden` in IE 8/9/10/11.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button {
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address inconsistent `text-transform` inheritance for `button` and `select`.
|
||||||
|
* All other form control elements do not inherit `text-transform` values.
|
||||||
|
* Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
|
||||||
|
* Correct `select` style inheritance in Firefox.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button,
|
||||||
|
select {
|
||||||
|
text-transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
|
||||||
|
* and `video` controls.
|
||||||
|
* 2. Correct inability to style clickable `input` types in iOS.
|
||||||
|
* 3. Improve usability and consistency of cursor style between image-type
|
||||||
|
* `input` and others.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button,
|
||||||
|
html input[type="button"], /* 1 */
|
||||||
|
input[type="reset"],
|
||||||
|
input[type="submit"] {
|
||||||
|
-webkit-appearance: button; /* 2 */
|
||||||
|
cursor: pointer; /* 3 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Re-set default cursor for disabled elements.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button[disabled],
|
||||||
|
html input[disabled] {
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove inner padding and border in Firefox 4+.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button::-moz-focus-inner,
|
||||||
|
input::-moz-focus-inner {
|
||||||
|
border: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
|
||||||
|
* the UA stylesheet.
|
||||||
|
*/
|
||||||
|
|
||||||
|
input {
|
||||||
|
line-height: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* It's recommended that you don't attempt to style these elements.
|
||||||
|
* Firefox's implementation doesn't respect box-sizing, padding, or width.
|
||||||
|
*
|
||||||
|
* 1. Address box sizing set to `content-box` in IE 8/9/10.
|
||||||
|
* 2. Remove excess padding in IE 8/9/10.
|
||||||
|
*/
|
||||||
|
|
||||||
|
input[type="checkbox"],
|
||||||
|
input[type="radio"] {
|
||||||
|
box-sizing: border-box; /* 1 */
|
||||||
|
padding: 0; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fix the cursor style for Chrome's increment/decrement buttons. For certain
|
||||||
|
* `font-size` values of the `input`, it causes the cursor style of the
|
||||||
|
* decrement button to change from `default` to `text`.
|
||||||
|
*/
|
||||||
|
|
||||||
|
input[type="number"]::-webkit-inner-spin-button,
|
||||||
|
input[type="number"]::-webkit-outer-spin-button {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Address `appearance` set to `searchfield` in Safari and Chrome.
|
||||||
|
* 2. Address `box-sizing` set to `border-box` in Safari and Chrome
|
||||||
|
* (include `-moz` to future-proof).
|
||||||
|
*/
|
||||||
|
|
||||||
|
input[type="search"] {
|
||||||
|
-webkit-appearance: textfield; /* 1 */
|
||||||
|
-moz-box-sizing: content-box;
|
||||||
|
-webkit-box-sizing: content-box; /* 2 */
|
||||||
|
box-sizing: content-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove inner padding and search cancel button in Safari and Chrome on OS X.
|
||||||
|
* Safari (but not Chrome) clips the cancel button when the search input has
|
||||||
|
* padding (and `textfield` appearance).
|
||||||
|
*/
|
||||||
|
|
||||||
|
input[type="search"]::-webkit-search-cancel-button,
|
||||||
|
input[type="search"]::-webkit-search-decoration {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define consistent border, margin, and padding.
|
||||||
|
*/
|
||||||
|
|
||||||
|
fieldset {
|
||||||
|
border: 1px solid #c0c0c0;
|
||||||
|
margin: 0 2px;
|
||||||
|
padding: 0.35em 0.625em 0.75em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Correct `color` not being inherited in IE 8/9/10/11.
|
||||||
|
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
|
||||||
|
*/
|
||||||
|
|
||||||
|
legend {
|
||||||
|
border: 0; /* 1 */
|
||||||
|
padding: 0; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove default vertical scrollbar in IE 8/9/10/11.
|
||||||
|
*/
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Don't inherit the `font-weight` (applied by a rule above).
|
||||||
|
* NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
|
||||||
|
*/
|
||||||
|
|
||||||
|
optgroup {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tables
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove most spacing between table cells.
|
||||||
|
*/
|
||||||
|
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
td,
|
||||||
|
th {
|
||||||
|
padding: 0;
|
||||||
|
}
|
418
blogs/static/css/skeleton.css
vendored
Normal file
418
blogs/static/css/skeleton.css
vendored
Normal file
|
@ -0,0 +1,418 @@
|
||||||
|
/*
|
||||||
|
* Skeleton V2.0.4
|
||||||
|
* Copyright 2014, Dave Gamache
|
||||||
|
* www.getskeleton.com
|
||||||
|
* Free to use under the MIT license.
|
||||||
|
* http://www.opensource.org/licenses/mit-license.php
|
||||||
|
* 12/29/2014
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* Table of contents
|
||||||
|
––––––––––––––––––––––––––––––––––––––––––––––––––
|
||||||
|
- Grid
|
||||||
|
- Base Styles
|
||||||
|
- Typography
|
||||||
|
- Links
|
||||||
|
- Buttons
|
||||||
|
- Forms
|
||||||
|
- Lists
|
||||||
|
- Code
|
||||||
|
- Tables
|
||||||
|
- Spacing
|
||||||
|
- Utilities
|
||||||
|
- Clearing
|
||||||
|
- Media Queries
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* Grid
|
||||||
|
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||||
|
.container {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 960px;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 0 20px;
|
||||||
|
box-sizing: border-box; }
|
||||||
|
.column,
|
||||||
|
.columns {
|
||||||
|
width: 100%;
|
||||||
|
float: left;
|
||||||
|
box-sizing: border-box; }
|
||||||
|
|
||||||
|
/* For devices larger than 400px */
|
||||||
|
@media (min-width: 400px) {
|
||||||
|
.container {
|
||||||
|
width: 85%;
|
||||||
|
padding: 0; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* For devices larger than 550px */
|
||||||
|
@media (min-width: 550px) {
|
||||||
|
.container {
|
||||||
|
width: 80%; }
|
||||||
|
.column,
|
||||||
|
.columns {
|
||||||
|
margin-left: 4%; }
|
||||||
|
.column:first-child,
|
||||||
|
.columns:first-child {
|
||||||
|
margin-left: 0; }
|
||||||
|
|
||||||
|
.one.column,
|
||||||
|
.one.columns { width: 4.66666666667%; }
|
||||||
|
.two.columns { width: 13.3333333333%; }
|
||||||
|
.three.columns { width: 22%; }
|
||||||
|
.four.columns { width: 30.6666666667%; }
|
||||||
|
.five.columns { width: 39.3333333333%; }
|
||||||
|
.six.columns { width: 48%; }
|
||||||
|
.seven.columns { width: 56.6666666667%; }
|
||||||
|
.eight.columns { width: 65.3333333333%; }
|
||||||
|
.nine.columns { width: 74.0%; }
|
||||||
|
.ten.columns { width: 82.6666666667%; }
|
||||||
|
.eleven.columns { width: 91.3333333333%; }
|
||||||
|
.twelve.columns { width: 100%; margin-left: 0; }
|
||||||
|
|
||||||
|
.one-third.column { width: 30.6666666667%; }
|
||||||
|
.two-thirds.column { width: 65.3333333333%; }
|
||||||
|
|
||||||
|
.one-half.column { width: 48%; }
|
||||||
|
|
||||||
|
/* Offsets */
|
||||||
|
.offset-by-one.column,
|
||||||
|
.offset-by-one.columns { margin-left: 8.66666666667%; }
|
||||||
|
.offset-by-two.column,
|
||||||
|
.offset-by-two.columns { margin-left: 17.3333333333%; }
|
||||||
|
.offset-by-three.column,
|
||||||
|
.offset-by-three.columns { margin-left: 26%; }
|
||||||
|
.offset-by-four.column,
|
||||||
|
.offset-by-four.columns { margin-left: 34.6666666667%; }
|
||||||
|
.offset-by-five.column,
|
||||||
|
.offset-by-five.columns { margin-left: 43.3333333333%; }
|
||||||
|
.offset-by-six.column,
|
||||||
|
.offset-by-six.columns { margin-left: 52%; }
|
||||||
|
.offset-by-seven.column,
|
||||||
|
.offset-by-seven.columns { margin-left: 60.6666666667%; }
|
||||||
|
.offset-by-eight.column,
|
||||||
|
.offset-by-eight.columns { margin-left: 69.3333333333%; }
|
||||||
|
.offset-by-nine.column,
|
||||||
|
.offset-by-nine.columns { margin-left: 78.0%; }
|
||||||
|
.offset-by-ten.column,
|
||||||
|
.offset-by-ten.columns { margin-left: 86.6666666667%; }
|
||||||
|
.offset-by-eleven.column,
|
||||||
|
.offset-by-eleven.columns { margin-left: 95.3333333333%; }
|
||||||
|
|
||||||
|
.offset-by-one-third.column,
|
||||||
|
.offset-by-one-third.columns { margin-left: 34.6666666667%; }
|
||||||
|
.offset-by-two-thirds.column,
|
||||||
|
.offset-by-two-thirds.columns { margin-left: 69.3333333333%; }
|
||||||
|
|
||||||
|
.offset-by-one-half.column,
|
||||||
|
.offset-by-one-half.columns { margin-left: 52%; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Base Styles
|
||||||
|
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||||
|
/* NOTE
|
||||||
|
html is set to 62.5% so that all the REM measurements throughout Skeleton
|
||||||
|
are based on 10px sizing. So basically 1.5rem = 15px :) */
|
||||||
|
html {
|
||||||
|
font-size: 62.5%; }
|
||||||
|
body {
|
||||||
|
font-size: 1.5em;
|
||||||
|
line-height: 1.6;
|
||||||
|
font-weight: 400;
|
||||||
|
font-family: "Raleway", "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||||
|
color: #222; }
|
||||||
|
|
||||||
|
|
||||||
|
/* Typography
|
||||||
|
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
font-weight: 300; }
|
||||||
|
h1 { font-size: 4.0rem; line-height: 1.2; letter-spacing: -.1rem;}
|
||||||
|
h2 { font-size: 3.6rem; line-height: 1.25; letter-spacing: -.1rem; }
|
||||||
|
h3 { font-size: 3.0rem; line-height: 1.3; letter-spacing: -.1rem; }
|
||||||
|
h4 { font-size: 2.4rem; line-height: 1.35; letter-spacing: -.08rem; }
|
||||||
|
h5 { font-size: 1.8rem; line-height: 1.5; letter-spacing: -.05rem; }
|
||||||
|
h6 { font-size: 1.5rem; line-height: 1.6; letter-spacing: 0; }
|
||||||
|
|
||||||
|
/* Larger than phablet */
|
||||||
|
@media (min-width: 550px) {
|
||||||
|
h1 { font-size: 5.0rem; }
|
||||||
|
h2 { font-size: 4.2rem; }
|
||||||
|
h3 { font-size: 3.6rem; }
|
||||||
|
h4 { font-size: 3.0rem; }
|
||||||
|
h5 { font-size: 2.4rem; }
|
||||||
|
h6 { font-size: 1.5rem; }
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-top: 0; }
|
||||||
|
|
||||||
|
|
||||||
|
/* Links
|
||||||
|
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||||
|
a {
|
||||||
|
color: #1EAEDB; }
|
||||||
|
a:hover {
|
||||||
|
color: #0FA0CE; }
|
||||||
|
|
||||||
|
|
||||||
|
/* Buttons
|
||||||
|
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||||
|
.button,
|
||||||
|
button,
|
||||||
|
input[type="submit"],
|
||||||
|
input[type="reset"],
|
||||||
|
input[type="button"] {
|
||||||
|
display: inline-block;
|
||||||
|
height: 38px;
|
||||||
|
padding: 0 30px;
|
||||||
|
color: #555;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 38px;
|
||||||
|
letter-spacing: .1rem;
|
||||||
|
text-transform: uppercase;
|
||||||
|
text-decoration: none;
|
||||||
|
white-space: nowrap;
|
||||||
|
background-color: transparent;
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 1px solid #bbb;
|
||||||
|
cursor: pointer;
|
||||||
|
box-sizing: border-box; }
|
||||||
|
.button:hover,
|
||||||
|
button:hover,
|
||||||
|
input[type="submit"]:hover,
|
||||||
|
input[type="reset"]:hover,
|
||||||
|
input[type="button"]:hover,
|
||||||
|
.button:focus,
|
||||||
|
button:focus,
|
||||||
|
input[type="submit"]:focus,
|
||||||
|
input[type="reset"]:focus,
|
||||||
|
input[type="button"]:focus {
|
||||||
|
color: #333;
|
||||||
|
border-color: #888;
|
||||||
|
outline: 0; }
|
||||||
|
.button.button-primary,
|
||||||
|
button.button-primary,
|
||||||
|
input[type="submit"].button-primary,
|
||||||
|
input[type="reset"].button-primary,
|
||||||
|
input[type="button"].button-primary {
|
||||||
|
color: #FFF;
|
||||||
|
background-color: #33C3F0;
|
||||||
|
border-color: #33C3F0; }
|
||||||
|
.button.button-primary:hover,
|
||||||
|
button.button-primary:hover,
|
||||||
|
input[type="submit"].button-primary:hover,
|
||||||
|
input[type="reset"].button-primary:hover,
|
||||||
|
input[type="button"].button-primary:hover,
|
||||||
|
.button.button-primary:focus,
|
||||||
|
button.button-primary:focus,
|
||||||
|
input[type="submit"].button-primary:focus,
|
||||||
|
input[type="reset"].button-primary:focus,
|
||||||
|
input[type="button"].button-primary:focus {
|
||||||
|
color: #FFF;
|
||||||
|
background-color: #1EAEDB;
|
||||||
|
border-color: #1EAEDB; }
|
||||||
|
|
||||||
|
|
||||||
|
/* Forms
|
||||||
|
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||||
|
input[type="email"],
|
||||||
|
input[type="number"],
|
||||||
|
input[type="search"],
|
||||||
|
input[type="text"],
|
||||||
|
input[type="tel"],
|
||||||
|
input[type="url"],
|
||||||
|
input[type="password"],
|
||||||
|
textarea,
|
||||||
|
select {
|
||||||
|
height: 38px;
|
||||||
|
padding: 6px 10px; /* The 6px vertically centers text on FF, ignored by Webkit */
|
||||||
|
background-color: #fff;
|
||||||
|
border: 1px solid #D1D1D1;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-shadow: none;
|
||||||
|
box-sizing: border-box; }
|
||||||
|
/* Removes awkward default styles on some inputs for iOS */
|
||||||
|
input[type="email"],
|
||||||
|
input[type="number"],
|
||||||
|
input[type="search"],
|
||||||
|
input[type="text"],
|
||||||
|
input[type="tel"],
|
||||||
|
input[type="url"],
|
||||||
|
input[type="password"],
|
||||||
|
textarea {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
-moz-appearance: none;
|
||||||
|
appearance: none; }
|
||||||
|
textarea {
|
||||||
|
min-height: 65px;
|
||||||
|
padding-top: 6px;
|
||||||
|
padding-bottom: 6px; }
|
||||||
|
input[type="email"]:focus,
|
||||||
|
input[type="number"]:focus,
|
||||||
|
input[type="search"]:focus,
|
||||||
|
input[type="text"]:focus,
|
||||||
|
input[type="tel"]:focus,
|
||||||
|
input[type="url"]:focus,
|
||||||
|
input[type="password"]:focus,
|
||||||
|
textarea:focus,
|
||||||
|
select:focus {
|
||||||
|
border: 1px solid #33C3F0;
|
||||||
|
outline: 0; }
|
||||||
|
label,
|
||||||
|
legend {
|
||||||
|
display: block;
|
||||||
|
margin-bottom: .5rem;
|
||||||
|
font-weight: 600; }
|
||||||
|
fieldset {
|
||||||
|
padding: 0;
|
||||||
|
border-width: 0; }
|
||||||
|
input[type="checkbox"],
|
||||||
|
input[type="radio"] {
|
||||||
|
display: inline; }
|
||||||
|
label > .label-body {
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: .5rem;
|
||||||
|
font-weight: normal; }
|
||||||
|
|
||||||
|
|
||||||
|
/* Lists
|
||||||
|
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||||
|
ul {
|
||||||
|
list-style: circle inside; }
|
||||||
|
ol {
|
||||||
|
list-style: decimal inside; }
|
||||||
|
ol, ul {
|
||||||
|
padding-left: 0;
|
||||||
|
margin-top: 0; }
|
||||||
|
ul ul,
|
||||||
|
ul ol,
|
||||||
|
ol ol,
|
||||||
|
ol ul {
|
||||||
|
margin: 1.5rem 0 1.5rem 3rem;
|
||||||
|
font-size: 90%; }
|
||||||
|
li {
|
||||||
|
margin-bottom: 1rem; }
|
||||||
|
|
||||||
|
|
||||||
|
/* Code
|
||||||
|
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||||
|
code {
|
||||||
|
padding: .2rem .5rem;
|
||||||
|
margin: 0 .2rem;
|
||||||
|
font-size: 90%;
|
||||||
|
white-space: nowrap;
|
||||||
|
background: #F1F1F1;
|
||||||
|
border: 1px solid #E1E1E1;
|
||||||
|
border-radius: 4px; }
|
||||||
|
pre > code {
|
||||||
|
display: block;
|
||||||
|
padding: 1rem 1.5rem;
|
||||||
|
white-space: pre; }
|
||||||
|
|
||||||
|
|
||||||
|
/* Tables
|
||||||
|
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||||
|
th,
|
||||||
|
td {
|
||||||
|
padding: 12px 15px;
|
||||||
|
text-align: left;
|
||||||
|
border-bottom: 1px solid #E1E1E1; }
|
||||||
|
th:first-child,
|
||||||
|
td:first-child {
|
||||||
|
padding-left: 0; }
|
||||||
|
th:last-child,
|
||||||
|
td:last-child {
|
||||||
|
padding-right: 0; }
|
||||||
|
|
||||||
|
|
||||||
|
/* Spacing
|
||||||
|
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||||
|
button,
|
||||||
|
.button {
|
||||||
|
margin-bottom: 1rem; }
|
||||||
|
input,
|
||||||
|
textarea,
|
||||||
|
select,
|
||||||
|
fieldset {
|
||||||
|
margin-bottom: 1.5rem; }
|
||||||
|
pre,
|
||||||
|
blockquote,
|
||||||
|
dl,
|
||||||
|
figure,
|
||||||
|
table,
|
||||||
|
p,
|
||||||
|
ul,
|
||||||
|
ol,
|
||||||
|
form {
|
||||||
|
margin-bottom: 2.5rem; }
|
||||||
|
|
||||||
|
|
||||||
|
/* Utilities
|
||||||
|
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||||
|
.u-full-width {
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box; }
|
||||||
|
.u-max-full-width {
|
||||||
|
max-width: 100%;
|
||||||
|
box-sizing: border-box; }
|
||||||
|
.u-pull-right {
|
||||||
|
float: right; }
|
||||||
|
.u-pull-left {
|
||||||
|
float: left; }
|
||||||
|
|
||||||
|
|
||||||
|
/* Misc
|
||||||
|
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||||
|
hr {
|
||||||
|
margin-top: 3rem;
|
||||||
|
margin-bottom: 3.5rem;
|
||||||
|
border-width: 0;
|
||||||
|
border-top: 1px solid #E1E1E1; }
|
||||||
|
|
||||||
|
|
||||||
|
/* Clearing
|
||||||
|
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||||
|
|
||||||
|
/* Self Clearing Goodness */
|
||||||
|
.container:after,
|
||||||
|
.row:after,
|
||||||
|
.u-cf {
|
||||||
|
content: "";
|
||||||
|
display: table;
|
||||||
|
clear: both; }
|
||||||
|
|
||||||
|
|
||||||
|
/* Media Queries
|
||||||
|
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||||
|
/*
|
||||||
|
Note: The best way to structure the use of media queries is to create the queries
|
||||||
|
near the relevant code. For example, if you wanted to change the styles for buttons
|
||||||
|
on small devices, paste the mobile query code up in the buttons section and style it
|
||||||
|
there.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* Larger than mobile */
|
||||||
|
@media (min-width: 400px) {}
|
||||||
|
|
||||||
|
/* Larger than phablet (also point when grid becomes active) */
|
||||||
|
@media (min-width: 550px) {}
|
||||||
|
|
||||||
|
/* Larger than tablet */
|
||||||
|
@media (min-width: 750px) {}
|
||||||
|
|
||||||
|
/* Larger than desktop */
|
||||||
|
@media (min-width: 1000px) {}
|
||||||
|
|
||||||
|
/* Larger than Desktop HD */
|
||||||
|
@media (min-width: 1200px) {}
|
2
blogs/static/fonts/helsinki/Vic Fieger License.txt
Executable file
2
blogs/static/fonts/helsinki/Vic Fieger License.txt
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
The Vic Fieger fonts are freeware, to be downloaded and used by anyone who wants them for free. I didn't put them here so people couldn't use them! You don't have to ask for my permission, though it's always good to receive an e-mail from somebody to show me what they are using them for.
|
||||||
|
If you wish to write to let me know how a certain font will be used, and for what purpose, send your e-mail to: vic@vicfieger.com
|
BIN
blogs/static/fonts/helsinki/helsinki.ttf
Executable file
BIN
blogs/static/fonts/helsinki/helsinki.ttf
Executable file
Binary file not shown.
43
blogs/static/fonts/source-sans-pro/SIL Open Font License.txt
Executable file
43
blogs/static/fonts/source-sans-pro/SIL Open Font License.txt
Executable file
|
@ -0,0 +1,43 @@
|
||||||
|
Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
|
||||||
|
|
||||||
|
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||||
|
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
|
||||||
|
|
||||||
|
-----------------------------------------------------------
|
||||||
|
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||||
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
PREAMBLE
|
||||||
|
The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.
|
||||||
|
|
||||||
|
The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
|
||||||
|
|
||||||
|
DEFINITIONS
|
||||||
|
"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.
|
||||||
|
|
||||||
|
"Reserved Font Name" refers to any names specified as such after the copyright statement(s).
|
||||||
|
|
||||||
|
"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).
|
||||||
|
|
||||||
|
"Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.
|
||||||
|
|
||||||
|
"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.
|
||||||
|
|
||||||
|
PERMISSION & CONDITIONS
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
|
||||||
|
|
||||||
|
1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.
|
||||||
|
|
||||||
|
2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
|
||||||
|
|
||||||
|
3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
|
||||||
|
|
||||||
|
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
|
||||||
|
|
||||||
|
5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
|
||||||
|
|
||||||
|
TERMINATION
|
||||||
|
This license becomes null and void if any of the above conditions are not met.
|
||||||
|
|
||||||
|
DISCLAIMER
|
||||||
|
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
|
BIN
blogs/static/fonts/source-sans-pro/SourceSansPro-Black.otf
Executable file
BIN
blogs/static/fonts/source-sans-pro/SourceSansPro-Black.otf
Executable file
Binary file not shown.
BIN
blogs/static/fonts/source-sans-pro/SourceSansPro-BlackIt.otf
Executable file
BIN
blogs/static/fonts/source-sans-pro/SourceSansPro-BlackIt.otf
Executable file
Binary file not shown.
BIN
blogs/static/fonts/source-sans-pro/SourceSansPro-Bold.otf
Executable file
BIN
blogs/static/fonts/source-sans-pro/SourceSansPro-Bold.otf
Executable file
Binary file not shown.
BIN
blogs/static/fonts/source-sans-pro/SourceSansPro-BoldIt.otf
Executable file
BIN
blogs/static/fonts/source-sans-pro/SourceSansPro-BoldIt.otf
Executable file
Binary file not shown.
BIN
blogs/static/fonts/source-sans-pro/SourceSansPro-ExtraLight.otf
Executable file
BIN
blogs/static/fonts/source-sans-pro/SourceSansPro-ExtraLight.otf
Executable file
Binary file not shown.
BIN
blogs/static/fonts/source-sans-pro/SourceSansPro-ExtraLightIt.otf
Executable file
BIN
blogs/static/fonts/source-sans-pro/SourceSansPro-ExtraLightIt.otf
Executable file
Binary file not shown.
BIN
blogs/static/fonts/source-sans-pro/SourceSansPro-It.otf
Executable file
BIN
blogs/static/fonts/source-sans-pro/SourceSansPro-It.otf
Executable file
Binary file not shown.
BIN
blogs/static/fonts/source-sans-pro/SourceSansPro-Light.otf
Executable file
BIN
blogs/static/fonts/source-sans-pro/SourceSansPro-Light.otf
Executable file
Binary file not shown.
BIN
blogs/static/fonts/source-sans-pro/SourceSansPro-LightIt.otf
Executable file
BIN
blogs/static/fonts/source-sans-pro/SourceSansPro-LightIt.otf
Executable file
Binary file not shown.
BIN
blogs/static/fonts/source-sans-pro/SourceSansPro-Regular.otf
Executable file
BIN
blogs/static/fonts/source-sans-pro/SourceSansPro-Regular.otf
Executable file
Binary file not shown.
BIN
blogs/static/fonts/source-sans-pro/SourceSansPro-Semibold.otf
Executable file
BIN
blogs/static/fonts/source-sans-pro/SourceSansPro-Semibold.otf
Executable file
Binary file not shown.
BIN
blogs/static/fonts/source-sans-pro/SourceSansPro-SemiboldIt.otf
Executable file
BIN
blogs/static/fonts/source-sans-pro/SourceSansPro-SemiboldIt.otf
Executable file
Binary file not shown.
8
blogs/static/js/glamr.js
Normal file
8
blogs/static/js/glamr.js
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
function showLoading(){
|
||||||
|
form = document.querySelector("form")
|
||||||
|
loader = document.querySelector(".loader")
|
||||||
|
loader.removeAttribute("hidden")
|
||||||
|
form.setAttribute("hidden", "hidden")
|
||||||
|
}
|
||||||
|
|
||||||
|
addEventListener('submit', showLoading)
|
|
@ -33,6 +33,7 @@
|
||||||
|
|
||||||
<label for="{{ form.feed.id_for_label }}">Feed:</label>
|
<label for="{{ form.feed.id_for_label }}">Feed:</label>
|
||||||
<input type="text" name="feed" id="feed" value="{{ blog_info.feed }}" class="u-full-width" required="" placeholder="https://example.com/rss.xml">
|
<input type="text" name="feed" id="feed" value="{{ blog_info.feed }}" class="u-full-width" required="" placeholder="https://example.com/rss.xml">
|
||||||
|
<span class="helptext">The Atom/RSS feed of your blog. Articles will be shown in AusGLAMR.</span>
|
||||||
|
|
||||||
{{ form.category.errors }}
|
{{ form.category.errors }}
|
||||||
<label for="{{ form.category.id_for_label }}">Category:</label>
|
<label for="{{ form.category.id_for_label }}">Category:</label>
|
||||||
|
|
29
blogs/templates/browse/articles.html
Normal file
29
blogs/templates/browse/articles.html
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{% extends "layout.html" %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
{% for post in latest %}
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-title">
|
||||||
|
<a href="{{ post.url }}"><h4>{{ post.title }}</h4></a>
|
||||||
|
<div class="meta">
|
||||||
|
{% if post.author_name %}
|
||||||
|
<span class="author_name">{{ post.author_name }}</span> |
|
||||||
|
{% endif %}
|
||||||
|
<span class="blog_title">{{ post.blog.title }}</span>
|
||||||
|
<div>
|
||||||
|
{% for tag in post.tags.all %}
|
||||||
|
<a href="{% url 'browse' %}?q={{ tag.name|urlencode }}"><span class="badge">{{ tag.name }}</span></a>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% if post.description %}
|
||||||
|
<div class="card-body">
|
||||||
|
{% autoescape off %}
|
||||||
|
<p>{{ post.description|truncatewords_html:60 }}</p>
|
||||||
|
{% endautoescape %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
{% endblock %}
|
|
@ -1,8 +1,9 @@
|
||||||
{% extends "layout.html" %}
|
{% extends "layout.html" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div>
|
<div class="buttons">
|
||||||
<a href="{% url 'register-blog' %}"><button class="button button-first">Add a Blog</button></a>
|
<a href="{% url 'blog-articles' %}"><button class="button button-primary button-first">Latest posts</button></a>
|
||||||
|
<a href="{% url 'register-blog' %}"><button class="button">Add a Blog</button></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="listing l-three header">
|
<div class="listing l-three header">
|
||||||
<div>Title</div>
|
<div>Title</div>
|
||||||
|
@ -13,7 +14,7 @@
|
||||||
{% for blog in blogs %}
|
{% for blog in blogs %}
|
||||||
<div class="listing l-three">
|
<div class="listing l-three">
|
||||||
<div>
|
<div>
|
||||||
<p><a href="{{blog.url}}">{{blog.title}}</a></p>
|
<p><a href="{{blog.url}}">{{blog.title}}</a><a href="{{blog.feed}}">{% include 'utils/rss-img.html' %}</a></p>
|
||||||
<p>{{blog.description}}</p>
|
<p>{{blog.description}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div><div class="end badge badge_{{blog.category}}"><a href="/blogs/{{blog.category}}">{{blog.category_name}}</a></div></div>
|
<div><div class="end badge badge_{{blog.category}}"><a href="/blogs/{{blog.category}}">{{blog.category_name}}</a></div></div>
|
||||||
|
|
24
blogs/templates/browse/editions.html
Normal file
24
blogs/templates/browse/editions.html
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{% extends "layout.html" %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
{% for edition in latest %}
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-title">
|
||||||
|
<a href="{{ edition.url }}"><h4>{{ edition.title }}</h4></a>
|
||||||
|
<p class="meta">
|
||||||
|
{% if edition.author_name %}
|
||||||
|
<span class="author_name">{{ edition.author_name }}</span> |
|
||||||
|
{% endif %}
|
||||||
|
<span class="blog_title">{{ edition.newsletter.title }}</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
{% if edition.description %}
|
||||||
|
<div class="card-body">
|
||||||
|
{% autoescape off %}
|
||||||
|
<p>{{ edition.description|truncatewords_html:60 }}</p>
|
||||||
|
{% endautoescape %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
{% endblock %}
|
|
@ -2,8 +2,9 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div>
|
<div class="buttons">
|
||||||
<a href="{% url 'register-event' %}"><button class="button button-first">Add an Event</button></a>
|
<a href="{% url 'cfps' %}"><button class="button button-primary button-first">Open CFPs</button></a>
|
||||||
|
<a href="{% url 'register-event' %}"><button class="button">Add an Event</button></a>
|
||||||
<a href="{% url 'register-cfp' %}"><button class="button">Add a CFP</button></a>
|
<a href="{% url 'register-cfp' %}"><button class="button">Add a CFP</button></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="listing l-three header">
|
<div class="listing l-three header">
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
{% extends "layout.html" %}
|
{% extends "layout.html" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div>
|
<div class="buttons">
|
||||||
<a href="{% url 'register-newsletter' %}"><button class="button button-first">Add a Newsletter</button></a>
|
<a href="{% url 'newsletter-editions' %}"><button class="button button-primary button-first">Latest editions</button></a>
|
||||||
|
<a href="{% url 'register-newsletter' %}"><button class="button">Add a Newsletter</button></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="listing l-three header">
|
<div class="listing l-three header">
|
||||||
<span>Title</span>
|
<span>Title</span>
|
||||||
|
@ -12,7 +13,12 @@
|
||||||
<hr/>
|
<hr/>
|
||||||
{% for pub in news %}
|
{% for pub in news %}
|
||||||
<div class="listing l-three">
|
<div class="listing l-three">
|
||||||
<span><a href="{{pub.url}}">{{pub.name}}</a></span>
|
<span>
|
||||||
|
<a href="{{pub.url}}">{{pub.name}}</a>
|
||||||
|
{% if pub.feed %}
|
||||||
|
<a href="{{pub.feed}}">{% include 'utils/rss-img.html' %}</a>
|
||||||
|
{% endif %}
|
||||||
|
</span>
|
||||||
<span>{{pub.author}}</span>
|
<span>{{pub.author}}</span>
|
||||||
<span><span class="badge badge_{{pub.category}}"><a href="/newsletters/{{pub.category}}">{{pub.category_name}}</a></span></span>
|
<span><span class="badge badge_{{pub.category}}"><a href="/newsletters/{{pub.category}}">{{pub.category_name}}</a></span></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
<div class="columns eight">
|
<div class="columns eight">
|
||||||
{{ form }}
|
{{ form }}
|
||||||
<input class="button-primary u-pull-right" type="submit" value="Register!">
|
<input class="button-primary u-pull-right" type="submit" value="Register!">
|
||||||
<a href="/"><button class="button u-pull-right button-first" type="button">No thanks</button></a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{% extends "layout.html" %}
|
{% extends "layout.html" %}
|
||||||
|
|
||||||
{% block intro %}
|
{% block intro %}{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
<section>
|
<section>
|
||||||
<p><em>Aus GLAMR</em> is the place to find out what's happening in the Australasian cultural memory professions. Whether you work in galleries, libraries, archives, museums, or records, you'll find the latest blog posts, conferences and events, newsletters, and discussion groups here!</p>
|
<p><em>Aus GLAMR</em> is the place to find out what's happening in the Australasian cultural memory professions. Whether you work in galleries, libraries, archives, museums, or records, you'll find the latest blog posts, conferences and events, newsletters, and discussion groups here!</p>
|
||||||
<p>Browse one of the lists, <a href="{% url 'search' %}">search by keywords</a>, or <a href="{% url 'contribute' %}">contribute by registering</a> your blog, event, group or newsletter.</p>
|
<p>Browse one of the lists, <a href="{% url 'search' %}">search by keywords</a>, or <a href="{% url 'contribute' %}">contribute by registering</a> your blog, event, group or newsletter.</p>
|
||||||
|
@ -8,29 +10,3 @@
|
||||||
<p>Please note that whilst off-topic or egregiously offensive content may be refused or removed, inclusion on this site does not imply endorsement by Hugh or newCardigan of the content of any particular listed publication or event.</p>
|
<p>Please note that whilst off-topic or egregiously offensive content may be refused or removed, inclusion on this site does not imply endorsement by Hugh or newCardigan of the content of any particular listed publication or event.</p>
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
{% for article in latest %}
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-title">
|
|
||||||
<a href="{{ article.url }}"><h3>{{ article.title }}</h3></a>
|
|
||||||
<p class="meta">
|
|
||||||
{% if article.author_name %}
|
|
||||||
<span class="author_name">{{ article.author_name }}</span> |
|
|
||||||
{% endif %}
|
|
||||||
<span class="blog_title">{{ article.blog.title }}</span>
|
|
||||||
</p>
|
|
||||||
{% for tag in article.tags.all %}
|
|
||||||
<a href="{% url 'browse' %}?q={{ tag.name|urlencode }}"><span class="badge">{{ tag.name }}</span></a>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% if article.description %}
|
|
||||||
<div class="card-body">
|
|
||||||
{% autoescape off %}
|
|
||||||
<p>{{ article.description|truncatewords_html:60 }}</p>
|
|
||||||
{% endautoescape %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
{% endblock %}
|
|
6
blogs/templates/utils/rss-img.html
Normal file
6
blogs/templates/utils/rss-img.html
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<span class="svg">
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="1200pt" height="1200pt" version="1.1" viewBox="0 0 1200 1200" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="m1080 0h-960c-66 0-120 54-120 120v960c0 66 54 120 120 120h960c66 0 120-54 120-120v-960c0-66-54-120-120-120zm-720 960c-66 0-120-54-120-120s54-120 120-120 120 54 120 120-54 120-120 120zm294-90c-30 0-54-18-60-48-24-108-108-198-216-216-30-6-48-30-48-60 0-36 30-66 66-60 162 30 288 156 318 318 6 36-24 66-60 66zm246 0c-30 0-54-24-60-54-24-240-216-432-456-456-30 0-54-30-54-60 0-36 30-66 66-60 294 30 528 264 558 558 12 36-18 72-54 72z" fill="#212121"/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
|
@ -22,9 +22,7 @@ def get_feed_info(feed):
|
||||||
blog["feed"] = feed
|
blog["feed"] = feed
|
||||||
blog["title"] = getattr(b.feed, "title", "")
|
blog["title"] = getattr(b.feed, "title", "")
|
||||||
blog["author_name"] = getattr(b.feed, "author", None)
|
blog["author_name"] = getattr(b.feed, "author", None)
|
||||||
blog["description"] = getattr(b.feed, "summary", None) or getattr(
|
blog["description"] = getattr(b.feed, "subtitle", None) # summary for a FEED is "subtitle"
|
||||||
b.feed, "subtitle", None
|
|
||||||
)
|
|
||||||
|
|
||||||
return blog
|
return blog
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
from .public import (
|
from .public import (
|
||||||
ConfirmBlogRegistration,
|
ConfirmBlogRegistration,
|
||||||
HomeFeed,
|
HomeFeed,
|
||||||
|
Articles,
|
||||||
Blogs,
|
Blogs,
|
||||||
Browse,
|
Browse,
|
||||||
Contribute,
|
Contribute,
|
||||||
|
@ -10,6 +11,7 @@ from .public import (
|
||||||
Conferences,
|
Conferences,
|
||||||
ConfirmEmail,
|
ConfirmEmail,
|
||||||
CallsForPapers,
|
CallsForPapers,
|
||||||
|
Editions,
|
||||||
Groups,
|
Groups,
|
||||||
Help,
|
Help,
|
||||||
Newsletters,
|
Newsletters,
|
||||||
|
|
|
@ -71,3 +71,6 @@ class EventFeed(Feed):
|
||||||
def item_categories(self, item):
|
def item_categories(self, item):
|
||||||
"""event GLAMR category"""
|
"""event GLAMR category"""
|
||||||
return [_(item.category)]
|
return [_(item.category)]
|
||||||
|
|
||||||
|
|
||||||
|
# TODO: newsletter editions feed
|
||||||
|
|
|
@ -26,9 +26,10 @@ class HomeFeed(View):
|
||||||
def get(self, request):
|
def get(self, request):
|
||||||
"""display home page"""
|
"""display home page"""
|
||||||
|
|
||||||
|
# TODO: what do we want on front page?
|
||||||
latest = models.Article.objects.order_by("-pubdate")[:10]
|
latest = models.Article.objects.order_by("-pubdate")[:10]
|
||||||
|
|
||||||
data = {"title": "Latest blog posts", "latest": latest}
|
data = {"title": "", "latest": latest}
|
||||||
return render(request, "index.html", data)
|
return render(request, "index.html", data)
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,13 +40,11 @@ class Blogs(View):
|
||||||
"""here they are"""
|
"""here they are"""
|
||||||
|
|
||||||
if category:
|
if category:
|
||||||
|
blogs = models.Blog.objects.filter(
|
||||||
blogs = models.Blog.objects.filter(approved=True, active=True, category=category).order_by(
|
approved=True, active=True, category=category
|
||||||
"-updateddate"
|
).order_by("-updateddate")
|
||||||
)
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
blogs = models.Blog.objects.filter(approved=True, active=True).order_by(
|
blogs = models.Blog.objects.filter(approved=True, active=True).order_by(
|
||||||
"-updateddate"
|
"-updateddate"
|
||||||
)
|
)
|
||||||
|
@ -55,6 +54,17 @@ class Blogs(View):
|
||||||
data = {"title": "Blogs and websites", "blogs": blogs}
|
data = {"title": "Blogs and websites", "blogs": blogs}
|
||||||
return render(request, "browse/blogs.html", data)
|
return render(request, "browse/blogs.html", data)
|
||||||
|
|
||||||
|
class Articles(View):
|
||||||
|
"""Blog articles"""
|
||||||
|
|
||||||
|
def get(self, request):
|
||||||
|
"""here they are"""
|
||||||
|
latest = models.Article.objects.order_by("-pubdate")[:10]
|
||||||
|
|
||||||
|
data = {"title": "Latest blog posts", "latest": latest}
|
||||||
|
return render(request, "browse/articles.html", data)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Conferences(View):
|
class Conferences(View):
|
||||||
"""browse the list of conferences"""
|
"""browse the list of conferences"""
|
||||||
|
@ -64,17 +74,21 @@ class Conferences(View):
|
||||||
now = timezone.now()
|
now = timezone.now()
|
||||||
|
|
||||||
if category:
|
if category:
|
||||||
cons = models.Event.objects.filter(approved=True, start_date__gte=now, category=category).order_by(
|
cons = models.Event.objects.filter(
|
||||||
"start_date"
|
approved=True, start_date__gte=now, category=category
|
||||||
)
|
).order_by("start_date")
|
||||||
else:
|
else:
|
||||||
cons = models.Event.objects.filter(approved=True, start_date__gte=now).order_by(
|
cons = models.Event.objects.filter(
|
||||||
"start_date"
|
approved=True, start_date__gte=now
|
||||||
)
|
).order_by("start_date")
|
||||||
|
|
||||||
for con in cons:
|
for con in cons:
|
||||||
con.category_name = models.Category(con.category).label
|
con.category_name = models.Category(con.category).label
|
||||||
con.call_for_papers = con.cfp.filter(closing_date__gte=timezone.now()).order_by("-closing_date").last()
|
con.call_for_papers = (
|
||||||
|
con.cfp.filter(closing_date__gte=timezone.now())
|
||||||
|
.order_by("-closing_date")
|
||||||
|
.last()
|
||||||
|
)
|
||||||
|
|
||||||
data = {"title": "Upcoming events", "cons": cons}
|
data = {"title": "Upcoming events", "cons": cons}
|
||||||
return render(request, "browse/events.html", data)
|
return render(request, "browse/events.html", data)
|
||||||
|
@ -100,7 +114,9 @@ class Groups(View):
|
||||||
"""here they are"""
|
"""here they are"""
|
||||||
|
|
||||||
if category:
|
if category:
|
||||||
groups = models.Group.objects.filter(approved=True, category=category).order_by("name")
|
groups = models.Group.objects.filter(
|
||||||
|
approved=True, category=category
|
||||||
|
).order_by("name")
|
||||||
|
|
||||||
else:
|
else:
|
||||||
groups = models.Group.objects.filter(approved=True).order_by("name")
|
groups = models.Group.objects.filter(approved=True).order_by("name")
|
||||||
|
@ -124,6 +140,17 @@ class Newsletters(View):
|
||||||
return render(request, "browse/newsletters.html", data)
|
return render(request, "browse/newsletters.html", data)
|
||||||
|
|
||||||
|
|
||||||
|
class Editions(View):
|
||||||
|
"""Newsletter editions"""
|
||||||
|
|
||||||
|
def get(self, request):
|
||||||
|
"""here they are"""
|
||||||
|
latest = models.Edition.objects.order_by("-pubdate")[:10]
|
||||||
|
|
||||||
|
data = {"title": "Latest newsletter editions", "latest": latest}
|
||||||
|
return render(request, "browse/editions.html", data)
|
||||||
|
|
||||||
|
|
||||||
class RegisterBlog(View):
|
class RegisterBlog(View):
|
||||||
"""register a blog"""
|
"""register a blog"""
|
||||||
|
|
||||||
|
@ -309,8 +336,10 @@ class Search(View):
|
||||||
|
|
||||||
articles = (
|
articles = (
|
||||||
models.Article.objects.annotate(
|
models.Article.objects.annotate(
|
||||||
tagnames=ArrayAgg("tags__name", distinct=True), # see above: this prevents many-to-many objects like tags causing the same article to appear in the results multiple times
|
tagnames=ArrayAgg(
|
||||||
rank=SearchRank(article_vector, query)
|
"tags__name", distinct=True
|
||||||
|
), # see above: this prevents many-to-many objects like tags causing the same article to appear in the results multiple times
|
||||||
|
rank=SearchRank(article_vector, query),
|
||||||
)
|
)
|
||||||
.filter(rank__gte=0.1)
|
.filter(rank__gte=0.1)
|
||||||
.order_by("-rank")
|
.order_by("-rank")
|
||||||
|
@ -349,6 +378,17 @@ class Search(View):
|
||||||
.order_by("-rank")
|
.order_by("-rank")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
edn_vector = SearchVector("title", weight="A") + SearchVector(
|
||||||
|
"description", weight="C"
|
||||||
|
)
|
||||||
|
|
||||||
|
editions = (
|
||||||
|
models.Edition.objects.filter()
|
||||||
|
.annotate(rank=SearchRank(edn_vector, query))
|
||||||
|
.filter(rank__gte=0.1)
|
||||||
|
.order_by("-rank")
|
||||||
|
)
|
||||||
|
|
||||||
group_vector = SearchVector("name", weight="A") + SearchVector(
|
group_vector = SearchVector("name", weight="A") + SearchVector(
|
||||||
"description", weight="C"
|
"description", weight="C"
|
||||||
)
|
)
|
||||||
|
@ -361,7 +401,7 @@ class Search(View):
|
||||||
)
|
)
|
||||||
|
|
||||||
combined = sorted(
|
combined = sorted(
|
||||||
chain(articles, events, cfps, newsletters, groups),
|
chain(articles, events, editions, cfps, newsletters, groups),
|
||||||
key=attrgetter("rank"),
|
key=attrgetter("rank"),
|
||||||
reverse=True,
|
reverse=True,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue