summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/builder/views.py5
-rw-r--r--app/gtd/admin.py9
-rw-r--r--app/media/utils.py2
-rw-r--r--app/notes/admin.py28
-rw-r--r--app/notes/forms.py15
-rw-r--r--app/notes/migrations/0001_initial.py30
-rw-r--r--app/notes/migrations/0002_luxnote_tags.py20
-rw-r--r--app/notes/migrations/__init__.py0
-rw-r--r--app/notes/models.py48
-rw-r--r--app/notes/templates/confirm_delete.html12
-rw-r--r--app/notes/templates/note_detail.html25
-rw-r--r--app/notes/templates/note_form.html37
-rw-r--r--app/notes/templates/note_list.html32
-rw-r--r--app/notes/templates/project_detail.html40
-rw-r--r--app/notes/templates/project_form.html35
-rw-r--r--app/notes/templates/project_list.html25
-rw-r--r--app/notes/urls.py39
-rw-r--r--app/notes/views.py72
-rw-r--r--app/pages/views.py2
-rw-r--r--app/posts/build.py16
-rw-r--r--app/posts/models.py17
-rw-r--r--app/posts/templates/photo_essay_detail.html4
-rw-r--r--app/posts/templates/photo_essay_list.html47
-rw-r--r--app/posts/templates/posts/jrnl_detail.html7
-rw-r--r--app/posts/urls/__init__old.py4
-rw-r--r--app/posts/urls/friends_urls.py25
-rw-r--r--app/posts/urls/guide_urls.py30
-rw-r--r--app/posts/urls/jrnl_urls.py5
-rw-r--r--app/posts/urls/range_urls.py20
-rw-r--r--app/posts/urls/trip_urls.py25
-rw-r--r--app/posts/views/jrnl_views.py21
-rw-r--r--app/posts/views/photo_essay_views.py10
-rw-r--r--app/trading/admin.py2
-rw-r--r--config/base_urls.py30
-rw-r--r--config/django.ini12
-rw-r--r--templates/base.html12
-rw-r--r--templates/base_notes.html43
-rw-r--r--templates/lib/img_cluster.html2
-rw-r--r--templates/lib/img_picwide.html2
-rw-r--r--templates/lib/img_wideessay.html0
40 files changed, 651 insertions, 159 deletions
diff --git a/app/builder/views.py b/app/builder/views.py
index 6621bc2..c39297d 100644
--- a/app/builder/views.py
+++ b/app/builder/views.py
@@ -6,7 +6,7 @@ from django.template import RequestContext
from books.build import builder as book_builder
from sightings.build import builder as sightings_builder
from pages.build import BuildPages, BuildHome
-from posts.build import BuildJrnl, BuildFieldNotes, BuildSrc, BuildGuide, BuildEssays, BuildRange, BuildFriends, BuildFilms, BuildTrips, BuildSitemap
+from posts.build import BuildJrnl, BuildFieldNotes, BuildSrc, BuildGuide, BuildEssays, BuildRange, BuildFriends, BuildFilms, BuildTrips, BuildSitemap, BuildPhotoEssays
def do_build(request):
section = request.GET.get('id', '')
@@ -28,6 +28,9 @@ def do_build(request):
elif section == 'homepage':
context = {'message': 'Writing index to Disk'}
BuildHome("pages", "homepage").build()
+ elif section == 'photos':
+ context = {'message': 'Writing Photo Essasy to Disk'}
+ BuildPhotoEssays("posts", "post").build()
elif section == 'films':
context = {'message': 'Writing films to Disk'}
BuildFilms("posts", "post").build()
diff --git a/app/gtd/admin.py b/app/gtd/admin.py
index 7335727..49520f2 100644
--- a/app/gtd/admin.py
+++ b/app/gtd/admin.py
@@ -5,7 +5,9 @@ from utils.widgets import AdminImageWidget, LGEntryForm
from .models import (
WiredNote,
WiredPost,
- WiredUpdate
+ WiredUpdate,
+ GTDNote,
+ GTDProject
)
@admin.register(WiredPost)
class WiredPostAdmin(admin.ModelAdmin):
@@ -22,3 +24,8 @@ class WiredPostAdmin(admin.ModelAdmin):
class WiredUpdateAdmin(admin.ModelAdmin):
list_display = ('name', 'date')
+
+@admin.register(GTDNote)
+class GTDNoteAdmin(admin.ModelAdmin):
+ list_display = ('title', 'project','url', 'note_type' )
+ list_filter = ['project', 'note_type']
diff --git a/app/media/utils.py b/app/media/utils.py
index 893663c..0a5a8ea 100644
--- a/app/media/utils.py
+++ b/app/media/utils.py
@@ -23,4 +23,4 @@ def resize_image(img, width=None, height=None, quality=72, filepath=""):
newimg = resizeimage.resize_height(img, height)
ImageFile.MAXBLOCK = img.size[0] * img.size[1] * 4
newimg.save(filepath, newimg.format, quality=quality)
- subprocess.call(["jpegoptim", "%s" % filepath])
+ #subprocess.call(["jpegoptim", "%s" % filepath])
diff --git a/app/notes/admin.py b/app/notes/admin.py
new file mode 100644
index 0000000..931e2e0
--- /dev/null
+++ b/app/notes/admin.py
@@ -0,0 +1,28 @@
+from django.contrib import admin
+
+from utils.widgets import AdminImageWidget, LGEntryForm, TagListFilter
+
+from .models import (
+ LuxNote,
+)
+
+
+@admin.register(LuxNote)
+class LuxNoteAdmin(admin.ModelAdmin):
+ list_display = ('title', 'admin_link', 'date_created', 'admin_tags')
+ search_fields = ['title', 'description', 'url']
+ list_filter = [TagListFilter]
+ fieldsets = (
+ (None, {
+ 'fields': (
+ 'title',
+ 'url',
+ 'description',
+ 'body_markdown',
+ 'tags',
+ )
+ }),
+ )
+
+ class Media:
+ js = ('next-prev-links.js',)
diff --git a/app/notes/forms.py b/app/notes/forms.py
new file mode 100644
index 0000000..72395c6
--- /dev/null
+++ b/app/notes/forms.py
@@ -0,0 +1,15 @@
+from django.forms import ModelForm
+
+from .models import LuxNote
+
+
+class LuxNoteCreateForm(ModelForm):
+ class Meta:
+ model = LuxNote
+ fields = ['title', 'url', 'description', 'body_markdown', 'tags' ]
+
+
+class LuxNoteEditForm(ModelForm):
+ class Meta:
+ model = LuxNote
+ fields = ['title', 'url', 'description', 'body_markdown', 'tags' ]
diff --git a/app/notes/migrations/0001_initial.py b/app/notes/migrations/0001_initial.py
new file mode 100644
index 0000000..deb651d
--- /dev/null
+++ b/app/notes/migrations/0001_initial.py
@@ -0,0 +1,30 @@
+# Generated by Django 5.1.7 on 2025-04-07 16:21
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ initial = True
+
+ dependencies = [
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='LuxNote',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('title', models.CharField(max_length=200)),
+ ('url', models.CharField(blank=True, max_length=400, null=True)),
+ ('description', models.TextField(blank=True, null=True)),
+ ('body_markdown', models.TextField(blank=True, null=True)),
+ ('body_html', models.TextField(blank=True)),
+ ('date_created', models.DateTimeField(auto_now=True)),
+ ],
+ options={
+ 'ordering': ('-date_created',),
+ 'get_latest_by': 'date_created',
+ },
+ ),
+ ]
diff --git a/app/notes/migrations/0002_luxnote_tags.py b/app/notes/migrations/0002_luxnote_tags.py
new file mode 100644
index 0000000..6cb50be
--- /dev/null
+++ b/app/notes/migrations/0002_luxnote_tags.py
@@ -0,0 +1,20 @@
+# Generated by Django 5.1.7 on 2025-04-07 16:22
+
+import taggit.managers
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('notes', '0001_initial'),
+ ('taggit', '0006_rename_taggeditem_content_type_object_id_taggit_tagg_content_8fc721_idx'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='luxnote',
+ name='tags',
+ field=taggit.managers.TaggableManager(blank=True, help_text='A comma-separated list of tags.', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags'),
+ ),
+ ]
diff --git a/app/notes/migrations/__init__.py b/app/notes/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/app/notes/migrations/__init__.py
diff --git a/app/notes/models.py b/app/notes/models.py
new file mode 100644
index 0000000..76670f5
--- /dev/null
+++ b/app/notes/models.py
@@ -0,0 +1,48 @@
+import datetime
+
+from django.db import models
+from django.urls import reverse
+from django.utils import timezone
+from django.utils.html import format_html, format_html_join
+
+from taggit.managers import TaggableManager
+from utils.util import markdown_to_html
+
+
+#class LuxProject(models.Model):
+
+class LuxNote(models.Model):
+ title = models.CharField(max_length=200)
+ url = models.CharField(max_length=400, blank=True, null=True)
+ description = models.TextField(blank=True, null=True)
+ body_markdown = models.TextField(null=True, blank=True)
+ body_html = models.TextField(blank=True)
+ date_created = models.DateTimeField(auto_now=True)
+ #project = models.ForeignKey(LuxProject, on_delete=models.SET_NULL, null=True, blank=True)
+ tags = TaggableManager(blank=True)
+
+ class Meta:
+ ordering = ('-date_created',)
+ get_latest_by = 'date_created'
+
+ def __str__(self):
+ return self.title
+
+ def admin_link(self):
+ return format_html('<a href="%s">Visit Site</a>' % (self.url))
+ admin_link.short_description = 'Link'
+
+ def save(self, *args, **kwargs):
+ if self.body_markdown:
+ self.body_html = markdown_to_html(self.body_markdown)
+ super(LuxNote, self).save(*args, **kwargs)
+
+ def admin_tags(self):
+ return format_html_join(
+ '\n', "<a href='/admin/links/link?tag={}'>{}</a>,",
+ ((tag.slug, tag.name) for tag in self.tags.all())
+ )
+ admin_tags.short_description = 'Tags'
+
+ def get_absolute_url(self, *args, **kwargs):
+ return reverse('notes:note-edit', kwargs={"pk": self.pk})
diff --git a/app/notes/templates/confirm_delete.html b/app/notes/templates/confirm_delete.html
new file mode 100644
index 0000000..8e657b1
--- /dev/null
+++ b/app/notes/templates/confirm_delete.html
@@ -0,0 +1,12 @@
+<form method="post">{% csrf_token %}
+
+
+
+
+<p>Are you sure you want to delete "{{ object }}"?</p>
+
+
+
+
+ <input type="submit" value="Confirm">
+</form>
diff --git a/app/notes/templates/note_detail.html b/app/notes/templates/note_detail.html
new file mode 100644
index 0000000..5dc7ace
--- /dev/null
+++ b/app/notes/templates/note_detail.html
@@ -0,0 +1,25 @@
+{% extends 'base_notes.html' %}
+{% block primary %}
+<style>
+p {
+ margin-top: 1rem !important;
+ margin-bottom: 1rem;
+}
+</style>
+<main class="post-detail">
+ <div class="note-list">
+ <article>
+ <h2>{% if object.url %}<a href="{{object.url}}">{{object.title}}</a>{%else%}{{object.title}}{%endif%} <span class="note-edit"><a href="{%url 'notes:note-edit' object.id %}">edit</a></span></h2>
+ <p>{{object.description}}</p>
+ --------------------
+ <p>{{object.body_html|safe}}</p>
+ <p class="small"><a href="{% url 'notes:note-delete' object.pk %}">delete</a></p>
+ </article>
+</div>
+</main>
+
+
+{% endblock %}
+{% block js %}
+<script type="text/javascript">var go_from_select = function(opt) { window.location = window.location.pathname + opt };</script>
+{% endblock%}
diff --git a/app/notes/templates/note_form.html b/app/notes/templates/note_form.html
new file mode 100644
index 0000000..3924d48
--- /dev/null
+++ b/app/notes/templates/note_form.html
@@ -0,0 +1,37 @@
+{% extends 'base_notes.html' %}
+{% block extrahead %}
+<style>
+form .selector label {
+ position: inherit;
+}
+</style>
+<script src="/media/js/nice-select2.js"></script>
+<link rel="stylesheet" href="/media/nice-select2.css">
+{% endblock %}
+{% block primary %}
+<main role="main" class="archive-wrapper">
+ <div class="post-body">
+ <form action="" method="post" class="comment-form">{% csrf_token %}
+ {% for field in form %}
+ <fieldset>
+ {%if field.name == "project" or field.name == "status" or field.name == 'note_type'%}<span class="selector">{{field.label_tag}}</span>{%else%}{{field.label_tag}}{%endif%}
+ {%if field.name == "body_markdown" or field.name == "description" %}<div class="textarea-rounded">{{ field }}</div>{%else%}{{field}}{%endif%}
+ </fieldset>
+ <small class="alert">{% if field.errors %}{{field.errors}}{% endif %}</small>
+ {%endfor%}
+ <input class="btn" type="submit" name="add_new" value="Save and add another" />
+ <input type="submit" name="save" class="btn" value="Save" />
+ </form>
+ </div>
+</main>
+{% endblock %}
+ {% block js %}
+<script type="text/javascript">
+{% if is_update %}{%else%}
+let params = new URL(document.location).searchParams;
+document.getElementById('id_title').value = params.get("title");
+document.getElementById('id_url').value = params.get("url");
+document.getElementById('id_description').value = params.get("description");
+{% endif %}
+</script>
+ {% endblock%}
diff --git a/app/notes/templates/note_list.html b/app/notes/templates/note_list.html
new file mode 100644
index 0000000..e262558
--- /dev/null
+++ b/app/notes/templates/note_list.html
@@ -0,0 +1,32 @@
+{% extends 'base_notes.html' %}
+{% block primary %}
+<main class="post-detail">
+ <div class="post-header"><ul class="flex header-list">
+ <li><a class="btn" href="{% url 'notes:note-list' %}">All</a></li>
+ {% for object in note_types %}
+ <li><a class="btn" href="{% url 'gtd:note-list-status' object.label|lower%}">{{object.label}}</a></li>
+ {% endfor %}
+ <li class="right"><a href="{% url 'notes:note-create' %}" class="btn">New Note</a></li>
+ </ul>
+
+<select class="form-control" style="margin-top: 2%;" onchange="go_from_select(this.options[this.selectedIndex].value)">
+ <option value="">All Projects</option>{% for object in tags %}
+ <option {% if current == object.name %}selected="selected" {%endif%}value="?tag={{object}}">{{object}}</option>{%endfor%}
+</select>
+ </div>
+ <div class="note-list">{% for object in object_list %}<article>
+ <h2>{% if object.url %}<a href="{{object.url}}">{{object.title}}</a>{%else%}{{object.title}}{%endif%} <span class="note-edit"><a href="{%url 'notes:note-edit' object.id %}">edit</a></span></h2>
+ <p>{{object.description}}</p>
+ {% if object.project %}<p class="small">For: <a href="{% url 'notes:project-detail' object.project.id %}">{{object.project}}</a></p>{%endif%}
+ <p class="note-edit">TAGS: {% for tag in object.tags.all %}<a href="/notes/?tag={{tag}}">{{tag}}</a>, {%endfor%}</p>
+ <p class="note-edit"><a href="{% url 'notes:note-detail' object.pk %}">View local</a></p>
+ <p class="small"><a href="{% url 'notes:note-delete' object.pk %}">delete</a></p>
+ </article>
+{% endfor%}</div>
+</main>
+
+
+{% endblock %}
+{% block js %}
+<script type="text/javascript">var go_from_select = function(opt) { window.location = window.location.pathname + opt };</script>
+{% endblock%}
diff --git a/app/notes/templates/project_detail.html b/app/notes/templates/project_detail.html
new file mode 100644
index 0000000..543b9f6
--- /dev/null
+++ b/app/notes/templates/project_detail.html
@@ -0,0 +1,40 @@
+{% extends 'base_gtd.html' %}
+{% load typogrify_tags %}
+{% load get_note_type %}
+{% block extrahead %}
+<style>
+.detail-header {
+ margin-top: 3rem;
+ margin-bottom: 1rem;
+ padding-bottom: 1rem;
+}
+</style>
+{% endblock %}
+{% block primary %}
+<main role="main" class="archive-wrapper">
+ <div class="post-header detail-header">
+ <h1>Project: {{object.title}}</h1>
+
+<select class="form-control" style="margin-top: 2%;" onchange="go_from_select(this.options[this.selectedIndex].value)">
+ <option value="">All Projects</option>{% for object in projects %}
+ <option {% if object.title == project %}selected="selected" {%endif%}value="{% url 'gtd:project-detail' object.id%}">{{object}}</option>{%endfor%}
+</select>
+ </div>
+ <div class="post-body">
+ {{object.body_html|smartypants|safe}}
+ {% regroup note_set by note_type as type_list %}
+ {% for type in type_list %}
+ <h4>{% get_note_type type.grouper %}</h4>
+ <div class="note-list">{% for object in type.list %}<article>
+ <h2>{% if object.get_status_display == 'Completed' %}<strike style="color: #918d8d">{%endif%}{% if object.url %}<a href="{{object.url}}">{{object.title}}</a>{%else%}{{object.title}}{%endif%} <span class="note-edit"><a href="{%url 'gtd:note-edit' object.pk%}">edit</a></span>{% if object.get_status_display == 'Completed' %}</strike>{%endif%}</h2>
+ {{object.body_html|smartypants|safe}}
+ {% if object.get_status_display != 'None' %}<p class="small">{{object.get_status_display}}</p>{% endif %}
+ <p class="small"><a href="{% url 'gtd:note-delete' object.pk %}">delete</a></p></article>
+ {% endfor %}</div>
+{% endfor %}
+ </div>
+</main>
+{% endblock %}
+{% block js %}
+<script type="text/javascript">var go_from_select = function(opt) { console.log(opt); window.location = opt };</script>
+{% endblock%}
diff --git a/app/notes/templates/project_form.html b/app/notes/templates/project_form.html
new file mode 100644
index 0000000..ac7d13f
--- /dev/null
+++ b/app/notes/templates/project_form.html
@@ -0,0 +1,35 @@
+{% extends 'base_gtd.html' %}
+
+{% block extrahead %}
+<style>
+form .selector label {
+ position: inherit;
+}
+</style>
+{% endblock %}
+{% block primary %}
+<main role="main" class="archive-wrapper">
+ <div class="post-body">
+ <form action="" method="post" class="comment-form">{% csrf_token %}
+ {% for field in form %}
+ <fieldset>
+ {%if field.name == "project_type" or field.name == "outcome" or field.name == 'note_type'%}<span class="selector">{{field.label_tag}}</span>{%else%}{{field.label_tag}}{%endif%}
+ {%if field.name == "body_markdown"%}<div class="textarea-rounded">{{ field }}</div>{%else%}{{field}}{%endif%}
+ </fieldset>
+ <small class="alert">{% if field.errors %}{{field.errors}}{% endif %}</small>
+ {%endfor%}
+ <input class="btn" type="submit" name="add_new" value="Save and add another" />
+ <input type="submit" name="save" class="btn" value="Save" />
+ </form>
+ </div>
+</main>
+{% endblock %}
+ {% block js %}
+ {% if is_update %}{%else%}
+<script type="text/javascript">
+let params = new URL(document.location).searchParams;
+document.getElementById('id_title').value = params.get("title");
+document.getElementById('id_body_markdown').value = params.get("description");
+</script>
+{% endif %}
+ {% endblock%}
diff --git a/app/notes/templates/project_list.html b/app/notes/templates/project_list.html
new file mode 100644
index 0000000..ba46b59
--- /dev/null
+++ b/app/notes/templates/project_list.html
@@ -0,0 +1,25 @@
+{% extends 'base_gtd.html' %}
+{% block primary %}
+<main class="post-detail">
+ <div class="post-header"><ul class="flex header-list">
+ <li><a class="btn" href="{% url 'gtd:project-list' %}">All</a></li>
+ {% for object in project_types %}
+ <li><a class="btn" href="{% url 'gtd:project-list-type' object.1|lower%}">{%if object.1 == 'Lbh'%}{{object.1|upper}}{%else%}{{object.1}}{%endif%}</a></li>
+ {% endfor %}
+ <li class="right"><a href="{% url 'gtd:project-create' %}" class="btn">New</a></li>
+ </ul>
+ </div>
+ <div class="note-list">{% for object in object_list %}<article>
+ <h2><a href="{{object.get_absolute_url}}">{{object.title}}</a><span class="note-edit"><a href="{% url 'gtd:project-edit' object.pk %}">edit</a></span></h2>
+ <p>{{object.body_markdown}}</p>
+ <p class="small">Date Goal: {{object.date_goal}}</p>
+ <p class="small">Type: {{object.get_project_type_display}}</p>
+ <p class="small"><a href="{% url 'gtd:project-delete' object.pk %}">delete</a></p>
+ </article>
+{% endfor%}</div>
+</main>
+
+
+{% endblock %}
+{% block js %}
+{% endblock%}
diff --git a/app/notes/urls.py b/app/notes/urls.py
new file mode 100644
index 0000000..cdab47c
--- /dev/null
+++ b/app/notes/urls.py
@@ -0,0 +1,39 @@
+from django.urls import path
+
+from . import views
+
+app_name = "notes"
+
+urlpatterns = [
+ path(
+ r'',
+ views.LuxNoteListView.as_view(),
+ {'note_type': None},
+ name="note-list"
+ ),
+ path(
+ r'create',
+ views.LuxNoteCreateView.as_view(),
+ name="note-create"
+ ),
+ path(
+ r'<pk>',
+ views.LuxNoteDetailView.as_view(),
+ name="note-detail"
+ ),
+ path(
+ r'<str:note_type>',
+ views.LuxNoteListView.as_view(),
+ name="note-list-status"
+ ),
+ path(
+ r'<pk>/edit',
+ views.LuxNoteUpdateView.as_view(),
+ name="note-edit"
+ ),
+ path(
+ r'<pk>/delete',
+ views.LuxNoteDeleteView.as_view(),
+ name="note-delete"
+ ),
+]
diff --git a/app/notes/views.py b/app/notes/views.py
new file mode 100644
index 0000000..53811d0
--- /dev/null
+++ b/app/notes/views.py
@@ -0,0 +1,72 @@
+from django.views.generic import UpdateView, DetailView, ListView, CreateView, DeleteView, RedirectView
+from django.views.generic.base import TemplateView
+from django.urls import reverse, reverse_lazy
+from django.db.models import Q
+from django.db.models import Count
+
+#from taxonomy.models import Category
+
+from .models import (
+ LuxNote,
+)
+
+from .forms import (
+ LuxNoteCreateForm,
+ LuxNoteEditForm,
+)
+
+
+class LuxNoteCreateView(CreateView):
+ model = LuxNote
+ form_class = LuxNoteCreateForm
+ template_name = "note_form.html"
+
+ def get_success_url(self):
+ if 'add_new' in self.request.POST:
+ return reverse('notes:note-create')
+ else:
+ return reverse('notes:note-create')
+
+
+class LuxNoteUpdateView(UpdateView):
+ model = LuxNote
+ form_class = LuxNoteEditForm
+ template_name = "note_form.html"
+
+ def get_context_data(self, **kwargs):
+ context = super(LuxNoteUpdateView, self).get_context_data(**kwargs)
+ context['is_update'] = True
+ return context
+
+ def get_success_url(self):
+ return reverse('notes:note-list')
+
+
+class LuxNoteListView(ListView):
+ model = LuxNote
+ template_name = "note_list.html"
+
+ def get_queryset(self):
+ tag = self.request.GET.get("tag", False)
+ if tag:
+ return LuxNote.objects.filter(tags__name__in=[tag])
+ return LuxNote.objects.all()
+
+ def get_context_data(self, **kwargs):
+ context = super(LuxNoteListView, self).get_context_data(**kwargs)
+ context['tags'] = LuxNote.tags.all().order_by('name')
+ context['current'] = self.request.GET.get("tag", False)
+ return context
+
+
+class LuxNoteDeleteView(DeleteView):
+ # specify the model you want to use
+ model = LuxNote
+ success_url = "/notes/"
+ template_name = "confirm_delete.html"
+
+
+class LuxNoteDetailView(DetailView):
+ model = LuxNote
+ template_name = "note_detail.html"
+
diff --git a/app/pages/views.py b/app/pages/views.py
index d4c4880..4becff8 100644
--- a/app/pages/views.py
+++ b/app/pages/views.py
@@ -35,7 +35,7 @@ class HomePageList(DetailView):
def get_context_data(self, **kwargs):
# Call the base implementation first to get a context
context = super(HomePageList, self).get_context_data(**kwargs)
- context['object_list'] = Post.objects.filter(post_type=PostType.JRNL).filter(status__exact=1).order_by('-pub_date').exclude().select_related('location').select_related('featured_image')[1:9]
+ context['object_list'] = Post.objects.filter(post_type__in=[PostType.JRNL,PostType.ESSAY, PostType.PHOTO_ESSAY]).filter(status__exact=1).order_by('-pub_date').exclude().select_related('location').select_related('featured_image')[1:9]
context['location'] = LuxCheckIn.objects.latest()
return context
diff --git a/app/posts/build.py b/app/posts/build.py
index fdfcd1a..5c8b8f2 100644
--- a/app/posts/build.py
+++ b/app/posts/build.py
@@ -4,6 +4,7 @@ from django.apps import apps
from builder.base import BuildNew
from itertools import chain
+from django.db.models import Q
from django.conf import settings
from .models import PostType, PostTopic
@@ -55,7 +56,7 @@ class BuildJrnl(BuildNew):
Write jrnl to disk
'''
def get_model_queryset(self):
- return self.model.objects.filter(post_type=PostType.JRNL).filter(status__exact=1).order_by('-pub_date')
+ return self.model.objects.filter(Q(post_type=PostType.JRNL)|Q(post_type=PostType.ESSAY)).filter(status__exact=1).order_by('-pub_date')
def build(self):
self.build_list_view(
@@ -65,6 +66,7 @@ class BuildJrnl(BuildNew):
self.build_year_view("jrnl:list_year")
self.build_month_view("jrnl:list_month")
self.build_detail_view()
+ self.build_detail_view()
self.build_location_view()
self.build_latest()
@@ -175,6 +177,18 @@ class BuildFilms(BuildNew):
self.build_detail_view()
+class BuildPhotoEssays(BuildNew):
+
+ def get_model_queryset(self):
+ return self.model.objects.filter(post_type=PostType.PHOTO_ESSAY).filter(status__exact=1).order_by('-pub_date')
+
+ def build(self):
+ self.build_list_view(
+ base_path=reverse("photo_essay:list"),
+ paginate_by=30
+ )
+ self.build_detail_view()
+
class BuildTrips(BuildNew):
def get_model_queryset(self):
diff --git a/app/posts/models.py b/app/posts/models.py
index 6179fbe..997e5de 100644
--- a/app/posts/models.py
+++ b/app/posts/models.py
@@ -135,8 +135,11 @@ class Post(models.Model):
return self.title
def get_absolute_url(self):
+ if self.post_type == PostType.PHOTO_ESSAY:
+ return reverse('photo_essay:detail', kwargs={"slug": self.slug})
if self.post_type == PostType.ESSAY:
- return reverse('essays:detail', kwargs={"cat": self.get_post_topic_display(), "slug": self.slug})
+ #return reverse('essays:detail', kwargs={"cat": self.get_post_topic_display(), "slug": self.slug})
+ return reverse('jrnl:essay', kwargs={"slug": self.slug,})
if self.post_type == PostType.SRC:
return reverse('src:detail', kwargs={"slug": self.slug})
if self.post_type == PostType.FIELD_NOTE:
@@ -155,7 +158,10 @@ class Post(models.Model):
@property
def get_previous_published(self):
- return self.get_previous_by_pub_date(status__exact=1,post_type=self.post_type)
+ if self.post_type in (2, 4, 6):
+ return self.get_previous_by_pub_date(status__exact=1,post_type__in=[2,4,6])
+ else:
+ return self.get_previous_by_pub_date(status__exact=1,post_type=self.post_type)
@property
def get_previous_admin_url(self):
@@ -164,8 +170,11 @@ class Post(models.Model):
@property
def get_next_published(self):
- return self.get_next_by_pub_date(status__exact=1,post_type=self.post_type)
-
+ if self.post_type in (2, 4, 6):
+ return self.get_next_by_pub_date(status__exact=1,post_type__in=[2,4,6])
+ else:
+ return self.get_next_by_pub_date(status__exact=1,post_type=self.post_type)
+
@property
def get_next_admin_url(self):
model = apps.get_model(app_label=self._meta.app_label, model_name=self._meta.model_name)
diff --git a/app/posts/templates/photo_essay_detail.html b/app/posts/templates/photo_essay_detail.html
index 0655f40..de735f2 100644
--- a/app/posts/templates/photo_essay_detail.html
+++ b/app/posts/templates/photo_essay_detail.html
@@ -9,7 +9,7 @@
{% block breadcrumbs %}{% include "lib/breadcrumbs.html" with breadcrumbs=breadcrumbs %}{% endblock %}
{% block primary %}
<main role="main">
- <figure class="large-top-image">{%with object=object_list%}
+ <figure class="large-top-image">
<a href="{{object.get_absolute_url}}" title="{{object.title}}">{%with image=object.featured_image%}
<img style="margin:0;" sizes="(max-width: 960px) 100vw"
srcset="{{image.get_srcset}}"
@@ -30,5 +30,5 @@
{{object.body_html|safe|smartypants}}
</div>
</div>
- </main>{%endwith%}
+ </main>
{% endblock%}
diff --git a/app/posts/templates/photo_essay_list.html b/app/posts/templates/photo_essay_list.html
new file mode 100644
index 0000000..e8bebfd
--- /dev/null
+++ b/app/posts/templates/photo_essay_list.html
@@ -0,0 +1,47 @@
+{% extends 'base.html' %}
+{%block htmlclass%}class="detail single"{% endblock %}
+{% load typogrify_tags %}
+{% load get_image_by_size %}
+{% load html5_datetime %}
+{% load pagination_tags %}
+{% block pagetitle %} Photos | luxagraf {% endblock %}
+{% block metadescription %} Recent Images {% endblock %}
+{%block bodyid%}class="photos" id="notes-archive"{%endblock%}
+{% block breadcrumbs %}{% include "lib/breadcrumbs.html" with breadcrumbs=breadcrumbs %}{% endblock %}
+{% block primary %}
+ <main class="archive-wrapper">
+ <div class="archive-intro">
+ <h1>Photos</h1>
+ <h3>I first picked up a camera in the late 1980s and started documenting trips into the mountains, inspired by <a href="https://en.wikipedia.org/wiki/Galen_Rowell">Galen Rowell</a>. These are ongoing projects, updated regularly.</h3>
+ <hr />
+ <h2>Join us. Subscribe to <em>Friends of a Long Year</em></h2>
+ <iframe target='_parent' style="border:none; background:white; width:100%;" title="embedded form for subscribing the the Friends of a Long Year newsletter" onload="resizeIframe(this)" src="{% url 'lttr:subscribe' slug='friends' %}"></iframe>
+ </div>
+ <ul class="photo-list">{% for object in object_list %}
+ <li class="h-entry hentry" itemscope itemType="http://schema.org/BlogPosting">{% get_image_by_size object.featured_image 'featured_photo_essay' as featured %}
+ <figure>
+ <a href="{{object.get_absolute_url}}">
+ <img src="{{featured}}" alt="{{object.featured_image.alt}} photographed by Scott Gilbertson">
+ </a>
+ <figcaption>
+ <h1 class="p-name" itemprop="headline">{{object.title|smartypants|safe}}</h1>
+ <time class="dt-published published dt-updated card-smcaps" datetime="{{object.pub_date|date:'c'}}" itemprop="datePublished"> &nbsp;&ndash; Last update: {{object.last_updated|date:"F Y"}}</time>
+ <span class="hide" itemprop="author" itemscope itemtype="http://schema.org/Person">by <span class="p-author h-card" ><span itemprop="name">Scott Gilbertson</span></span></span>
+ {%if object.location %}<span class="p-location h-adr adr card-smcaps" itemprop="contentLocation" itemscope itemtype="http://schema.org/Place">(
+ {% if object.location.country_name == "United States" %}<span class="p-locality locality">{{object.location.name|smartypants|safe}}</span>, <a class="p-region region" href="/jrnl/united-states/" title="travel writing from the United States">{{object.location.state_name}}</a>, <span class="p-country-name">U.S.</span>{%else%}<span class="p-region">{{object.location.name|smartypants|safe}}</span>, <a class="p-country-name country-name" href="/jrnl/{{object.location.country_slug}}/" title="travel writing from {{object.location.country_name}}">{{object.location.country_name}}</a>{%endif%}
+ )</span>{%endif%}
+ </figcaption>
+ </figure>
+ </a>
+ </li>{%endfor%}
+ </ul>
+ </main>
+{% endblock%}
+{% block js %}
+
+<script>
+ function resizeIframe(obj) {
+ obj.style.height = (obj.contentWindow.document.body.scrollHeight - 75) + 'px';
+ }
+</script>
+{% endblock %}
diff --git a/app/posts/templates/posts/jrnl_detail.html b/app/posts/templates/posts/jrnl_detail.html
index e34a825..ee5590b 100644
--- a/app/posts/templates/posts/jrnl_detail.html
+++ b/app/posts/templates/posts/jrnl_detail.html
@@ -27,7 +27,7 @@
</div>
</header>
<div class="e-content entry-content post-body" itemprop="articleBody">
- {{object.body_html|safe|smartypants}}
+ {{object.body_html|safe|smartypants|widont}}
</div>
{%if wildlife or object.field_notes.all or object.books.all %}<div class="entry-footer">{%if wildlife %}
<aside id="wildlife">
@@ -117,5 +117,10 @@
{% block js %}
<script src="/media/js/leaflet-master/leaflet-mod.js"></script>
<script src="/media/js/detail.min.js"></script>
+<script src="/media/js/fslightbox.js"></script>
+<script>
+ fsLightbox.props.type = "image";
+ fsLightbox.props.showThumbsOnMount = true;
+</script>
{{ block.super }}
{%endblock%}
diff --git a/app/posts/urls/__init__old.py b/app/posts/urls/__init__old.py
deleted file mode 100644
index 4993c34..0000000
--- a/app/posts/urls/__init__old.py
+++ /dev/null
@@ -1,4 +0,0 @@
-from .guide_urls import urlpatterns as guide_urlpatterns
-from .reviews_urls import urlpatterns as review_urlpatterns
-
-urlpatterns = review_urlpatterns + guide_urlpatterns
diff --git a/app/posts/urls/friends_urls.py b/app/posts/urls/friends_urls.py
deleted file mode 100644
index ca68ca0..0000000
--- a/app/posts/urls/friends_urls.py
+++ /dev/null
@@ -1,25 +0,0 @@
-from django.urls import path, re_path, include
-from django.views.generic.base import RedirectView
-
-from ..views import friends_views as views
-
-app_name = "range"
-
-urlpatterns = [
- # path(
- # r'feed.xml',
- # views.FriendsRSSFeedView(),
- # name="feed"
- # ),
- # path(
- # r'<int:issue>/<str:slug>',
- # views.FriendsDetailView.as_view(),
- # name="friends-detail"
- # ),
- path(
- r'',
- views.FriendsListView.as_view(),
- {'page':1},
- name="friends-list"
- ),
-]
diff --git a/app/posts/urls/guide_urls.py b/app/posts/urls/guide_urls.py
deleted file mode 100644
index 5e2b37e..0000000
--- a/app/posts/urls/guide_urls.py
+++ /dev/null
@@ -1,30 +0,0 @@
-from django.urls import path, re_path, include
-from django.views.generic.base import RedirectView
-
-from ..views import guide_views as views
-
-app_name = "guides"
-
-urlpatterns = [
- path(
- r'',
- views.GuideListView.as_view(),
- {'page':1},
- name="guide-list"
- ),
- path(
- r'<int:page>/',
- views.GuideListView.as_view(),
- name="guide-list"
- ),
- path(
- r'<str:topic>/<str:slug>',
- views.GuidePostDetailView.as_view(),
- name="guide-post-detail"
- ),
- path(
- r'<str:slug>/',
- views.GuideDetailView.as_view(),
- name="guide-detail"
- ),
-]
diff --git a/app/posts/urls/jrnl_urls.py b/app/posts/urls/jrnl_urls.py
index d7f0fb1..11685b0 100644
--- a/app/posts/urls/jrnl_urls.py
+++ b/app/posts/urls/jrnl_urls.py
@@ -36,6 +36,11 @@ urlpatterns = [
name="list"
),
path(
+ r'<str:slug>',
+ views.JrnlEssayView.as_view(),
+ name="essay"
+ ),
+ path(
r'latest/',
views.JrnlLatestView.as_view(),
name="latest"
diff --git a/app/posts/urls/range_urls.py b/app/posts/urls/range_urls.py
deleted file mode 100644
index 65638ce..0000000
--- a/app/posts/urls/range_urls.py
+++ /dev/null
@@ -1,20 +0,0 @@
-from django.urls import path, re_path, include
-from django.views.generic.base import RedirectView
-
-from ..views import range_views as views
-
-app_name = "range"
-
-urlpatterns = [
- path(
- r'',
- views.RangeListView.as_view(),
- {'page':1},
- name="list"
- ),
- path(
- r'<int:page>',
- views.RangeListView.as_view(),
- name="list"
- ),
-]
diff --git a/app/posts/urls/trip_urls.py b/app/posts/urls/trip_urls.py
deleted file mode 100644
index 7e9c95f..0000000
--- a/app/posts/urls/trip_urls.py
+++ /dev/null
@@ -1,25 +0,0 @@
-from django.urls import path, re_path, include
-from django.views.generic.base import RedirectView
-
-from ..views import trip_views as views
-
-app_name = "trips"
-
-urlpatterns = [
- path(
- r'<str:slug>',
- views.TripDetailView.as_view(),
- name="detail"
- ),
- path(
- r'<int:page>/',
- views.TripListView.as_view(),
- name="list"
- ),
- path(
- r'',
- views.TripListView.as_view(),
- {'page':1},
- name="list"
- ),
-]
diff --git a/app/posts/views/jrnl_views.py b/app/posts/views/jrnl_views.py
index a7d9f1c..bd22343 100644
--- a/app/posts/views/jrnl_views.py
+++ b/app/posts/views/jrnl_views.py
@@ -24,7 +24,7 @@ class JrnlListView(PaginatedListView):
"""
model = Post
template_name = "posts/jrnl_list.html"
- queryset = Post.objects.filter(post_type=PostType.JRNL).filter(status__exact=1).order_by('-pub_date').prefetch_related('location').prefetch_related('featured_image')
+ queryset = Post.objects.filter(Q(post_type=PostType.JRNL)|Q(post_type=PostType.ESSAY)).filter(status__exact=1).order_by('-pub_date').prefetch_related('location').prefetch_related('featured_image')
def get_context_data(self, **kwargs):
context = super(JrnlListView, self).get_context_data(**kwargs)
@@ -87,6 +87,23 @@ class JrnlMonthArchiveView(MonthArchiveView):
template_name = "posts/jrnl_date.html"
+class JrnlEssayView(DetailView):
+ model = Post
+ slug_field = "slug"
+ template_name = "posts/jrnl_detail.html"
+
+ def get_context_data(self, **kwargs):
+ context = super(JrnlEssayView, self).get_context_data(**kwargs)
+ related = []
+ for obj in self.object.related.all():
+ model = apps.get_model(obj.model_name.app_label, obj.model_name.model)
+ related.append(model.objects.get(slug=obj.slug, pub_date=obj.pub_date))
+ context['related'] = related
+ context['breadcrumbs'] = ("jrnl",)
+ context['crumb_url'] = '/jrnl/'
+ return context
+
+
class JrnlDetailView(DateDetailView):
model = Post
date_field = 'pub_date'
@@ -147,7 +164,7 @@ class JrnlRSSFeedView(Feed):
description_template = 'feeds/blog_description.html'
def items(self):
- return Post.objects.filter(status__exact=1).filter(post_type__in=[PostType.JRNL]).order_by('-pub_date')[:10]
+ return Post.objects.filter(status__exact=1).filter(post_type__in=[PostType.JRNL,PostType.ESSAY]).order_by('-pub_date')[:10]
def item_pubdate(self, item):
"""
diff --git a/app/posts/views/photo_essay_views.py b/app/posts/views/photo_essay_views.py
index 4f08910..8c35621 100644
--- a/app/posts/views/photo_essay_views.py
+++ b/app/posts/views/photo_essay_views.py
@@ -14,13 +14,11 @@ from taxonomy.models import Category
class PhotoEssayListView(PaginatedListView):
model = Post
# TODO: change this when I have an actual archive to show
- template_name = "photo_essay_detail.html"
+ template_name = "photo_essay_list.html"
def get_queryset(self):
queryset = super(PhotoEssayListView, self).get_queryset()
- return queryset.get(slug="dawn")
- # real queryset
- #return queryset.filter(site__domain='luxagraf.net').filter(post_type__in=[PostType.PHOTO_ESSAY]).filter(status__exact=1).order_by('-pub_date').prefetch_related('location').prefetch_related('featured_image')
+ return queryset.filter(site__domain='luxagraf.net').filter(post_type__in=[PostType.PHOTO_ESSAY]).filter(status__exact=1).order_by('-pub_date').prefetch_related('location').prefetch_related('featured_image')
def get_context_data(self, **kwargs):
'''
@@ -48,10 +46,10 @@ class PhotoEssayDetailView(LuxDetailView):
related.append(model.objects.get(slug=obj.slug, pub_date=obj.pub_date))
context['related'] = related
context['breadcrumbs'] = ('Photos',)
- context['crumb_url'] = reverse('posts:photo-essay-list')
+ context['crumb_url'] = reverse('photo_essay:list')
return context
def get_template_names(self):
obj = self.get_object()
- return ["film_detail.html"]
+ return ["photo_essay_detail.html"]
diff --git a/app/trading/admin.py b/app/trading/admin.py
index 46982b0..5206c82 100644
--- a/app/trading/admin.py
+++ b/app/trading/admin.py
@@ -26,7 +26,7 @@ class LuxOptionsTradeAdmin(admin.ModelAdmin):
@admin.register(LuxTrade)
class LuxTradeAdmin(admin.ModelAdmin):
- list_display = ('symbol', 'status', 'open_date', 'entry_price', 'stop_price', 'close_price', 'shares', 'amount_invested')
+ list_display = ('symbol', 'status', 'open_date', 'close_date', 'entry_price', 'stop_price', 'close_price', 'shares', 'amount_invested')
list_filter = ['status', 'open_date']
class Media:
js = ('image-loader.js', 'next-prev-links.js')
diff --git a/config/base_urls.py b/config/base_urls.py
index 2b7d43d..ce0b577 100644
--- a/config/base_urls.py
+++ b/config/base_urls.py
@@ -45,11 +45,18 @@ urlpatterns = [
#path(r'people/', include('people.urls')),
#path(r'work/', include('resume.urls', namespace='resume')),
#path(r'<path>/<slug>/', PageDetailView.as_view()),
+ #re_path(r'^trip/$', RedirectView.as_view(url='/trips/')),
+ #path(r'trip/', include('posts.urls.trip_urls')),
+ #path(r'trips/', include('posts.urls.trip_urls', namespace='trips')),
+ #re_path(r'^guide/$', RedirectView.as_view(url='/guides/')),
+ #path(r'guides/', include('posts.urls.guide_urls', namespace='guides')),
+ #path(r'guide/', include('posts.urls.guide_urls')),
re_path(r'^admin/build/.*', builder.views.do_build),
path(r'admin/data/', include('utils.urls')),
path(r'admin/', admin.site.urls),
path(r'trading/', include('trading.urls')),
path(r'gtd/', include('gtd.urls')),
+ path(r'notes/', include('notes.urls')),
path(r'planner/', include('planner.urls')),
path(r'luximages/insert/', utils.views.insert_image),
path(r'feed.xml', JrnlRSSFeedView(),name="feed"),
@@ -61,18 +68,12 @@ urlpatterns = [
path(r'locations/', include('locations.urls')),
path(r'newsletter/', include('lttr.urls')),
path(r'photos/', include('media.urls')),
- path(r'images/', include('posts.urls.photo_essay_urls', namespace='photo-essay-list')),
- re_path(r'^trip/$', RedirectView.as_view(url='/trips/')),
- path(r'trip/', include('posts.urls.trip_urls')),
- path(r'trips/', include('posts.urls.trip_urls', namespace='trips')),
- re_path(r'^guide/$', RedirectView.as_view(url='/guides/')),
- path(r'guides/', include('posts.urls.guide_urls', namespace='guides')),
- path(r'guide/', include('posts.urls.guide_urls')),
+ path(r'photos/', include('posts.urls.photo_essay_urls', namespace='photo-essay-list')),
re_path(r'^essay/$', RedirectView.as_view(url='/essays/')),
path(r'essay/', include('posts.urls.essay_urls')),
path(r'essays/', include('posts.urls.essay_urls', namespace='essay-list')),
- path(r'range/', include('posts.urls.range_urls', namespace='range')),
- path(r'friends/', include('posts.urls.friends_urls', namespace='friends')),
+ #path(r'range/', include('posts.urls.range_urls', namespace='range')),
+ #path(r'friends/', include('posts.urls.friends_urls', namespace='friends')),
path(r'book-notes/', include('books.urls')),
path(r'dialogues/', include('sightings.urls', namespace='sightings')),
path(r'field-notes/', include('posts.urls.field_note_urls', namespace='fieldnote')),
@@ -84,14 +85,3 @@ urlpatterns = [
path(r'<slug>.txt', PageDetailTXTView.as_view()),
path(r'<slug>', include('pages.urls', namespace='pages')),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
-
-
-if settings.DEBUG:
- import debug_toolbar
- urlpatterns = [
- path('__debug__/', include(debug_toolbar.urls)),
-
- # For django versions before 2.0:
- # url(r'^__debug__/', include(debug_toolbar.urls)),
-
- ] + urlpatterns
diff --git a/config/django.ini b/config/django.ini
index 4cf9697..d1b157a 100644
--- a/config/django.ini
+++ b/config/django.ini
@@ -1,18 +1,18 @@
# django.ini file
[uwsgi]
-plugins = python
+#plugins = python
# maximum number of processes
processes = 4
max-requests = 5000
enable-threads = true
# the socket (use the full path to be safe)
-socket = /run/uwsgi/%n.sock
+socket = /var/run/uwsgi/%n.sock
-uid = http
-gid = http
+uid = www
+gid = www
chmod-socket = 664
-chown-socket = http:http
+chown-socket = www:www
# the base directory
chdir = /home/lxf/sites/luxagraf
@@ -29,5 +29,5 @@ limit-post = 0
# clear environment on exit
vacuum = true
logto = /var/log/uwsgi/luxagraf.log
-logfile-chown = http:http
+logfile-chown = www:www
logfile-chmod = 664
diff --git a/templates/base.html b/templates/base.html
index 0bce354..9aecc6a 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -28,11 +28,9 @@
</div>
<nav>
<a class="nav-item smcaps" href="{% url "jrnl:list" %}" title="Stories of life on the road.">Jrnl</a>
- <a class="nav-item smcaps" href="/essays/" title="Life and how to live it">Essays</a>
- <!--<a class="nav-item smcaps" href="{% url "guides:guide-list" %}" title="Guides">Guides</a> -->
+ <!--<a class="nav-item smcaps" href="/essays/" title="Life and how to live it">Essays</a>
+ <a class="nav-item smcaps" href="{% url "photo_essay:list" %}" title="Photo essays">Photos</a>-->
<a class="nav-item smcaps" href="/about" title="About Scott">About</a>
- <!--
- <a class="nav-item smcaps" href="/guides/" title="Useful Stuff">Guides</a> -->
</nav>
</header>
{% block breadcrumbs %}{% endblock %}
@@ -51,7 +49,8 @@
<span class="h-card"><a class="p-name u-url" href="https://luxagraf.net/">Scott Gilbertson</a><data class="p-nickname" value="luxagraf"></data></span>.
</p>
</footer>
-{% block js %}<script>
+{% block js %}
+<script>
function isOdd(num) { return num % 2;}
document.addEventListener("DOMContentLoaded", function(event) {
var today = new Date();
@@ -61,5 +60,6 @@ document.addEventListener("DOMContentLoaded", function(event) {
slogan.innerHTML = "Safety Third";
}
});
-</script>{% endblock%}</body>
+</script>
+{% endblock%}</body>
</html>
diff --git a/templates/base_notes.html b/templates/base_notes.html
new file mode 100644
index 0000000..f406446
--- /dev/null
+++ b/templates/base_notes.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html {%block htmlclass%}{%endblock%} dir="ltr" lang="en-US">
+ {% block sitename %}
+<head>
+ <title>{% block pagetitle %}{% endblock %}</title>{%endblock%}
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta name="description"
+ content="{% block metadescription %}{% endblock %}">
+ <meta name="author" content="luxagraf">
+ {%block stylesheet%}<link rel="stylesheet"
+ href="/media/gtdscreenv1.css{%comment%}?{% now "u" %}{%endcomment%}"
+ media="screen">{%endblock%}
+ <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+ {%block extrahead%}{%endblock%}
+</head>
+<body {%block bodyid%}{%endblock%}{%block bodyevents%}{%endblock%}>
+ <header class="header-wrapper">
+ <div id="logo">
+ <a class="logo-link" href="/" title="Home">L</span></a>
+ </div>
+ <nav>
+ <a class="nav-item" href="{% url 'notes:note-list' %}" title="View Notes">Notes</a>
+ <a class="nav-item" href="{% url 'notes:note-list' %}" title="View things that need to be done">todo</a>
+ </nav>
+ </header>
+ {% block breadcrumbs %}{% endblock %}
+ {% block primary %}{% endblock %}
+ {% block extrabody %}{% endblock %}
+ <footer class="page-footer">
+ <nav>
+ <a class="nav-item" href="/notes/todo" title="See what needs to be called in">Todo</a>
+ <a class="nav-item" href="/notes" title="View Guides">Notes</a>
+ <a class="nav-item" href="/posts" title="View Guides">Guides</a>
+ </nav>
+ <p id="license">
+ &copy; 2020-{% now "Y" %}
+ <span class="h-card"><a class="p-name u-url" href="https://luxagraf.net/">luxagraf</a><data class="p-locality" value="Everywhere"></data><data class="p-country-name" value="United States"></data></span>.
+ </p>
+ </footer>
+ {% block js %}{% endblock%}
+</body>
+</html>
diff --git a/templates/lib/img_cluster.html b/templates/lib/img_cluster.html
index 8117298..e405db1 100644
--- a/templates/lib/img_cluster.html
+++ b/templates/lib/img_cluster.html
@@ -1,6 +1,6 @@
{% load get_image_by_size %}{%if cluster_class != "picwide"%}<span class="{{cluster_class}}">{%endif%}
{% if caption %}<figure {%if cluster_class != "picwide"%}class="{{cluster_class}}"{%endif%}>{%endif%}
- <a href="{%get_image_by_size image "original"%}" title="view larger image">
+ <a data-fslightbox href="{%get_image_by_size image "original"%}" title="view larger image">
<img {%if cluster_class == "picwide"%} class="picwide"
sizes="(max-width: 1439px) 100vw, (min-width: 1440px) 1440px" srcset="{% for size in image.sizes.all%}{% get_image_by_size image size.slug %} {{size.width}}w{% if forloop.last%}"{%else%}, {%endif%}{%endfor%}
{% for size in image.sizes.all%}{%if not forloop.first and not forloop.last%} src="{% get_image_by_size image size.slug%}"{%endif%}{%endfor%}
diff --git a/templates/lib/img_picwide.html b/templates/lib/img_picwide.html
index 871a97e..8f25a84 100644
--- a/templates/lib/img_picwide.html
+++ b/templates/lib/img_picwide.html
@@ -1,5 +1,5 @@
{% load get_image_by_size %}{% if caption or exif or image.photo_credit_source %}<figure{%if not is_cluster %} class="picwide" id="{{image.id}}"{%endif%}>{%else%}{%if not is_cluster %}<div class="picwide" id="{{image.id}}">{%endif%}{%endif%}
- <a itemscope itemtype="http://schema.org/ImageObject" href="{%get_image_by_size image "original"%}" title="view larger image">
+ <a data-fslightbox itemscope itemtype="http://schema.org/ImageObject" href="{%get_image_by_size image "original"%}" title="view larger image">
<img class="u-photo" itemprop="contentUrl" sizes="(max-width: 1439px) 100vw, (min-width: 1440px) 1440px" srcset="{% for size in image.sizes.all%}{% get_image_by_size image size.slug %} {{size.width}}w{% if forloop.last%}"{%else%}, {%endif%}{%endfor%}{% for size in image.sizes.all%}{%if not forloop.first and not forloop.last%} src="{% get_image_by_size image size.slug %}"{%endif%}{%endfor%} alt="{{image.alt}} photographed by {% if image.photo_credit_source %}{{image.photo_credit_source}}{%else%}Scott Gilbertson{%endif%}" data-jslghtbx="{%get_image_by_size image "original"%}" data-jslghtbx-group="group" {% if caption%}data-jslghtbx-caption="{{image.caption}}"{%endif%}>
</a>
{% if caption or exif or image.photo_credit_source %}<figcaption>{% endif %}{% if caption %}{{image.caption|safe}}{% endif %}{% if exif %} | <small>Camera: {{image.exif_make}} {{image.exif_model}} with {{image.exif_lens}}</small>{% endif %}{% if image.photo_credit_source %}{%if caption or exif %} | {%endif%}image by {% if image.photo_credit_url %}<a href="{{image.photo_credit_url}}" itemprop="author">{%endif%}{{image.photo_credit_source}}{% if image.photo_credit_url %}</a>{%endif%}{%endif%}{% if caption or exif or image.photo_credit_source %}</figcaption>
diff --git a/templates/lib/img_wideessay.html b/templates/lib/img_wideessay.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/templates/lib/img_wideessay.html