From 9d73326aad4d9aee61a16f7274819fa93f32dc72 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Thu, 2 May 2019 09:36:31 -0500 Subject: migrated to LXC container --- apps/accounts/migrations/0001_initial.py | 10 +- .../accounts/migrations/0002_auto_20190108_2115.py | 35 - apps/notes/migrations/0001_initial.py | 78 +- apps/notes/migrations/0002_auto_20181204_0620.py | 42 -- apps/notes/migrations/0003_auto_20181204_0641.py | 59 -- apps/notes/migrations/0004_auto_20181204_0653.py | 19 - apps/notes/migrations/0005_luxtag_owner.py | 22 - apps/notes/migrations/0006_auto_20181204_0957.py | 22 - apps/notes/migrations/0007_auto_20181204_1050.py | 22 - apps/notes/migrations/0008_auto_20181204_1311.py | 19 - apps/notes/migrations/0009_remove_luxtag_owner.py | 17 - apps/notes/migrations/0010_auto_20181204_2117.py | 22 - apps/notes/migrations/0011_auto_20181221_1029.py | 39 - apps/notes/migrations/0012_auto_20181221_1038.py | 22 - apps/notes/migrations/0013_remove_luxtag_owner.py | 17 - apps/notes/migrations/0014_auto_20190104_1945.py | 56 -- apps/notes/migrations/0015_auto_20190104_1946.py | 31 - apps/notes/views.py | 11 +- apps/utils/views.py | 9 + config/base_urls.py | 1 + config/requirements.txt | 1 - config/settings.py | 8 +- design/logo-blk.svg | 90 +++ design/logo-org.svg | 90 +++ design/logo-sm-caps.svg | 87 +++ design/logo-sm.svg | 47 ++ design/logo.svg | 82 ++ design/sass/_awesomeplete.scss | 88 +++ design/sass/_global.scss | 5 + design/sass/_icons.scss | 1 + design/templates/base.html | 2 +- design/templates/notes/notes_list.html | 2 +- scripts/package.json | 2 + scripts/shrinkwrap.yaml | 829 ++++++++++++++++----- scripts/src/note-edit.js | 86 ++- 35 files changed, 1282 insertions(+), 691 deletions(-) delete mode 100644 apps/accounts/migrations/0002_auto_20190108_2115.py delete mode 100644 apps/notes/migrations/0002_auto_20181204_0620.py delete mode 100644 apps/notes/migrations/0003_auto_20181204_0641.py delete mode 100644 apps/notes/migrations/0004_auto_20181204_0653.py delete mode 100644 apps/notes/migrations/0005_luxtag_owner.py delete mode 100644 apps/notes/migrations/0006_auto_20181204_0957.py delete mode 100644 apps/notes/migrations/0007_auto_20181204_1050.py delete mode 100644 apps/notes/migrations/0008_auto_20181204_1311.py delete mode 100644 apps/notes/migrations/0009_remove_luxtag_owner.py delete mode 100644 apps/notes/migrations/0010_auto_20181204_2117.py delete mode 100644 apps/notes/migrations/0011_auto_20181221_1029.py delete mode 100644 apps/notes/migrations/0012_auto_20181221_1038.py delete mode 100644 apps/notes/migrations/0013_remove_luxtag_owner.py delete mode 100644 apps/notes/migrations/0014_auto_20190104_1945.py delete mode 100644 apps/notes/migrations/0015_auto_20190104_1946.py create mode 100644 design/logo-blk.svg create mode 100644 design/logo-org.svg create mode 100644 design/logo-sm-caps.svg create mode 100644 design/logo-sm.svg create mode 100644 design/logo.svg create mode 100644 design/sass/_awesomeplete.scss create mode 100644 design/sass/_icons.scss diff --git a/apps/accounts/migrations/0001_initial.py b/apps/accounts/migrations/0001_initial.py index 36aa6ba..b23159c 100644 --- a/apps/accounts/migrations/0001_initial.py +++ b/apps/accounts/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 2.1.2 on 2018-11-24 04:41 +# Generated by Django 2.1.2 on 2019-05-02 14:30 from django.conf import settings import django.contrib.auth.models @@ -46,10 +46,10 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('photo', models.ImageField(blank=True, null=True, upload_to='profile')), - ('website', models.CharField(blank=True, default='', max_length=300, null=True)), - ('location', models.CharField(blank=True, default='', max_length=300, null=True)), - ('bio', models.TextField(blank=True, default='', null=True)), - ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ('website', models.CharField(blank=True, default='', max_length=300)), + ('location', models.CharField(blank=True, default='', max_length=300)), + ('bio', models.CharField(blank=True, default='', max_length=350)), + ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='profile', to=settings.AUTH_USER_MODEL)), ], ), ] diff --git a/apps/accounts/migrations/0002_auto_20190108_2115.py b/apps/accounts/migrations/0002_auto_20190108_2115.py deleted file mode 100644 index 1ebb280..0000000 --- a/apps/accounts/migrations/0002_auto_20190108_2115.py +++ /dev/null @@ -1,35 +0,0 @@ -# Generated by Django 2.1.2 on 2019-01-09 03:15 - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('accounts', '0001_initial'), - ] - - operations = [ - migrations.AlterField( - model_name='userprofile', - name='bio', - field=models.CharField(blank=True, default='', max_length=350), - ), - migrations.AlterField( - model_name='userprofile', - name='location', - field=models.CharField(blank=True, default='', max_length=300), - ), - migrations.AlterField( - model_name='userprofile', - name='user', - field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='profile', to=settings.AUTH_USER_MODEL), - ), - migrations.AlterField( - model_name='userprofile', - name='website', - field=models.CharField(blank=True, default='', max_length=300), - ), - ] diff --git a/apps/notes/migrations/0001_initial.py b/apps/notes/migrations/0001_initial.py index f8e2fff..d2bb58e 100644 --- a/apps/notes/migrations/0001_initial.py +++ b/apps/notes/migrations/0001_initial.py @@ -1,9 +1,10 @@ -# Generated by Django 2.1.2 on 2018-11-24 13:55 +# Generated by Django 2.1.2 on 2019-05-02 14:30 from django.conf import settings import django.contrib.postgres.fields.jsonb from django.db import migrations, models import django.db.models.deletion +import django.db.models.manager import taggit.managers import uuid @@ -13,11 +14,38 @@ class Migration(migrations.Migration): initial = True dependencies = [ - ('taggit', '0002_auto_20150616_2121'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('contenttypes', '0002_remove_content_type_name'), ] operations = [ + migrations.CreateModel( + name='Annotation', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('unique_id', models.UUIDField(default=uuid.uuid4, editable=False)), + ('date_created', models.DateTimeField(auto_now_add=True)), + ('date_updated', models.DateTimeField(auto_now=True)), + ('highlight_text', models.TextField(blank=True)), + ('body_text', models.TextField(blank=True)), + ('body_html', models.TextField(blank=True)), + ('body_qjson', django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True)), + ('is_public', models.BooleanField(default=False)), + ], + ), + migrations.CreateModel( + name='LuxTag', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=100, unique=True, verbose_name='Name')), + ('slug', models.SlugField(max_length=100, unique=True, verbose_name='Slug')), + ('color_rgb', models.CharField(blank=True, max_length=20)), + ], + options={ + 'verbose_name_plural': 'Tags', + 'verbose_name': 'Tag', + }, + ), migrations.CreateModel( name='Note', fields=[ @@ -26,13 +54,19 @@ class Migration(migrations.Migration): ('date_created', models.DateTimeField(auto_now_add=True)), ('date_updated', models.DateTimeField(auto_now=True)), ('title', models.CharField(max_length=250)), - ('body_text', models.TextField(null=True)), - ('body_html', models.TextField(blank=True, null=True)), + ('body_text', models.TextField(blank=True)), + ('body_html', models.TextField(blank=True)), ('body_qjson', django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True)), - ('url', models.CharField(blank=True, max_length=250, null=True)), + ('url', models.CharField(blank=True, max_length=250)), ('slug', models.SlugField(blank=True)), ('is_public', models.BooleanField(default=False)), ], + options={ + 'ordering': ('-date_created', '-date_updated'), + }, + managers=[ + ('include_trash', django.db.models.manager.Manager()), + ], ), migrations.CreateModel( name='Notebook', @@ -40,12 +74,30 @@ class Migration(migrations.Migration): ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('unique_id', models.UUIDField(default=uuid.uuid4, editable=False)), ('name', models.CharField(max_length=250)), - ('url', models.CharField(blank=True, max_length=250, null=True)), + ('color_rgb', models.CharField(blank=True, max_length=20)), ('slug', models.SlugField(blank=True)), ('date_created', models.DateTimeField(auto_now_add=True)), ('date_updated', models.DateTimeField(auto_now=True)), ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], + options={ + 'ordering': ('name', 'date_created', 'date_updated'), + }, + managers=[ + ('include_trash', django.db.models.manager.Manager()), + ], + ), + migrations.CreateModel( + name='TaggedNotes', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('object_id', models.IntegerField(db_index=True, verbose_name='Object id')), + ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='notes_taggednotes_tagged_items', to='contenttypes.ContentType', verbose_name='Content type')), + ('tag', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='notes_taggednotes_items', to='notes.LuxTag')), + ], + options={ + 'abstract': False, + }, ), migrations.AddField( model_name='note', @@ -60,11 +112,21 @@ class Migration(migrations.Migration): migrations.AddField( model_name='note', name='tags', - field=taggit.managers.TaggableManager(blank=True, help_text='Tags', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags'), + field=taggit.managers.TaggableManager(blank=True, help_text='Tags', through='notes.TaggedNotes', to='notes.LuxTag', verbose_name='Tags'), + ), + migrations.AddField( + model_name='annotation', + name='note', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='notes.Note'), + ), + migrations.AddField( + model_name='annotation', + name='owner', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), ), migrations.AlterUniqueTogether( name='notebook', - unique_together={('owner', 'slug')}, + unique_together={('owner', 'name')}, ), migrations.AlterUniqueTogether( name='note', diff --git a/apps/notes/migrations/0002_auto_20181204_0620.py b/apps/notes/migrations/0002_auto_20181204_0620.py deleted file mode 100644 index e7cb38d..0000000 --- a/apps/notes/migrations/0002_auto_20181204_0620.py +++ /dev/null @@ -1,42 +0,0 @@ -# Generated by Django 2.1.2 on 2018-12-04 12:20 - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('notes', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='Tag', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=40)), - ('slug', models.SlugField(blank=True)), - ('color_hex', models.CharField(max_length=6)), - ('date_created', models.DateTimeField(auto_now_add=True)), - ('date_updated', models.DateTimeField(auto_now=True)), - ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='parent_tag', to='notes.Tag')), - ], - ), - migrations.AlterModelOptions( - name='note', - options={'ordering': ('-date_created', '-date_updated')}, - ), - migrations.AddField( - model_name='note', - name='tagstwo', - field=models.ManyToManyField(blank=True, to='notes.Tag'), - ), - migrations.AlterUniqueTogether( - name='tag', - unique_together={('owner', 'name')}, - ), - ] diff --git a/apps/notes/migrations/0003_auto_20181204_0641.py b/apps/notes/migrations/0003_auto_20181204_0641.py deleted file mode 100644 index 9423058..0000000 --- a/apps/notes/migrations/0003_auto_20181204_0641.py +++ /dev/null @@ -1,59 +0,0 @@ -# Generated by Django 2.1.2 on 2018-12-04 12:41 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('contenttypes', '0002_remove_content_type_name'), - ('notes', '0002_auto_20181204_0620'), - ] - - operations = [ - migrations.CreateModel( - name='LuxTag', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=100, unique=True, verbose_name='Name')), - ('slug', models.SlugField(max_length=100, unique=True, verbose_name='Slug')), - ('color_hex', models.CharField(max_length=6)), - ], - options={ - 'verbose_name': 'Tag', - 'verbose_name_plural': 'Tags', - }, - ), - migrations.CreateModel( - name='TaggedNotes', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('object_id', models.IntegerField(db_index=True, verbose_name='Object id')), - ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='notes_taggednotes_tagged_items', to='contenttypes.ContentType', verbose_name='Content type')), - ('tag', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='notes_taggednotes_items', to='notes.LuxTag')), - ], - options={ - 'abstract': False, - }, - ), - migrations.AlterUniqueTogether( - name='tag', - unique_together=set(), - ), - migrations.RemoveField( - model_name='tag', - name='owner', - ), - migrations.RemoveField( - model_name='tag', - name='parent', - ), - migrations.RemoveField( - model_name='note', - name='tagstwo', - ), - migrations.DeleteModel( - name='Tag', - ), - ] diff --git a/apps/notes/migrations/0004_auto_20181204_0653.py b/apps/notes/migrations/0004_auto_20181204_0653.py deleted file mode 100644 index fc6d911..0000000 --- a/apps/notes/migrations/0004_auto_20181204_0653.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 2.1.2 on 2018-12-04 12:53 - -from django.db import migrations -import taggit.managers - - -class Migration(migrations.Migration): - - dependencies = [ - ('notes', '0003_auto_20181204_0641'), - ] - - operations = [ - migrations.AlterField( - model_name='note', - name='tags', - field=taggit.managers.TaggableManager(blank=True, help_text='Tags', through='notes.TaggedNotes', to='notes.LuxTag', verbose_name='Tags'), - ), - ] diff --git a/apps/notes/migrations/0005_luxtag_owner.py b/apps/notes/migrations/0005_luxtag_owner.py deleted file mode 100644 index 168bd0b..0000000 --- a/apps/notes/migrations/0005_luxtag_owner.py +++ /dev/null @@ -1,22 +0,0 @@ -# Generated by Django 2.1.2 on 2018-12-04 13:06 - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('notes', '0004_auto_20181204_0653'), - ] - - operations = [ - migrations.AddField( - model_name='luxtag', - name='owner', - field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), - preserve_default=False, - ), - ] diff --git a/apps/notes/migrations/0006_auto_20181204_0957.py b/apps/notes/migrations/0006_auto_20181204_0957.py deleted file mode 100644 index bf4293c..0000000 --- a/apps/notes/migrations/0006_auto_20181204_0957.py +++ /dev/null @@ -1,22 +0,0 @@ -# Generated by Django 2.1.2 on 2018-12-04 15:57 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('notes', '0005_luxtag_owner'), - ] - - operations = [ - migrations.RemoveField( - model_name='notebook', - name='url', - ), - migrations.AddField( - model_name='notebook', - name='color_hex', - field=models.CharField(blank=True, max_length=6, null=True), - ), - ] diff --git a/apps/notes/migrations/0007_auto_20181204_1050.py b/apps/notes/migrations/0007_auto_20181204_1050.py deleted file mode 100644 index a4bdc30..0000000 --- a/apps/notes/migrations/0007_auto_20181204_1050.py +++ /dev/null @@ -1,22 +0,0 @@ -# Generated by Django 2.1.2 on 2018-12-04 16:50 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('notes', '0006_auto_20181204_0957'), - ] - - operations = [ - migrations.RemoveField( - model_name='notebook', - name='color_hex', - ), - migrations.AddField( - model_name='notebook', - name='color_rgb', - field=models.CharField(blank=True, max_length=20, null=True), - ), - ] diff --git a/apps/notes/migrations/0008_auto_20181204_1311.py b/apps/notes/migrations/0008_auto_20181204_1311.py deleted file mode 100644 index 02bf272..0000000 --- a/apps/notes/migrations/0008_auto_20181204_1311.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 2.1.2 on 2018-12-04 19:11 - -from django.conf import settings -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('notes', '0007_auto_20181204_1050'), - ] - - operations = [ - migrations.AlterUniqueTogether( - name='notebook', - unique_together={('owner', 'name')}, - ), - ] diff --git a/apps/notes/migrations/0009_remove_luxtag_owner.py b/apps/notes/migrations/0009_remove_luxtag_owner.py deleted file mode 100644 index 18896f3..0000000 --- a/apps/notes/migrations/0009_remove_luxtag_owner.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 2.1.2 on 2018-12-05 03:15 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('notes', '0008_auto_20181204_1311'), - ] - - operations = [ - migrations.RemoveField( - model_name='luxtag', - name='owner', - ), - ] diff --git a/apps/notes/migrations/0010_auto_20181204_2117.py b/apps/notes/migrations/0010_auto_20181204_2117.py deleted file mode 100644 index 69da825..0000000 --- a/apps/notes/migrations/0010_auto_20181204_2117.py +++ /dev/null @@ -1,22 +0,0 @@ -# Generated by Django 2.1.2 on 2018-12-05 03:17 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('notes', '0009_remove_luxtag_owner'), - ] - - operations = [ - migrations.RemoveField( - model_name='luxtag', - name='color_hex', - ), - migrations.AddField( - model_name='luxtag', - name='color_rgb', - field=models.CharField(blank=True, max_length=20, null=True), - ), - ] diff --git a/apps/notes/migrations/0011_auto_20181221_1029.py b/apps/notes/migrations/0011_auto_20181221_1029.py deleted file mode 100644 index 7b88a62..0000000 --- a/apps/notes/migrations/0011_auto_20181221_1029.py +++ /dev/null @@ -1,39 +0,0 @@ -# Generated by Django 2.1.2 on 2018-12-21 16:29 - -from django.conf import settings -import django.contrib.postgres.fields.jsonb -from django.db import migrations, models -import django.db.models.deletion -import uuid - - -class Migration(migrations.Migration): - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('notes', '0010_auto_20181204_2117'), - ] - - operations = [ - migrations.CreateModel( - name='Annotation', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('unique_id', models.UUIDField(default=uuid.uuid4, editable=False)), - ('date_created', models.DateTimeField(auto_now_add=True)), - ('date_updated', models.DateTimeField(auto_now=True)), - ('highlight_text', models.TextField(null=True)), - ('body_text', models.TextField(null=True)), - ('body_html', models.TextField(blank=True, null=True)), - ('body_qjson', django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True)), - ('is_public', models.BooleanField(default=False)), - ('note', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='notes.Note')), - ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.AddField( - model_name='luxtag', - name='owner', - field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), - ), - ] diff --git a/apps/notes/migrations/0012_auto_20181221_1038.py b/apps/notes/migrations/0012_auto_20181221_1038.py deleted file mode 100644 index f02cbeb..0000000 --- a/apps/notes/migrations/0012_auto_20181221_1038.py +++ /dev/null @@ -1,22 +0,0 @@ -# Generated by Django 2.1.2 on 2018-12-21 16:38 - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion -from django.contrib import auth -User = auth.get_user_model() - -class Migration(migrations.Migration): - - dependencies = [ - ('notes', '0011_auto_20181221_1029'), - ] - - operations = [ - migrations.AlterField( - model_name='luxtag', - name='owner', - field=models.ForeignKey(default=User.objects.get(username='luxagraf').id, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), - preserve_default=False, - ), - ] diff --git a/apps/notes/migrations/0013_remove_luxtag_owner.py b/apps/notes/migrations/0013_remove_luxtag_owner.py deleted file mode 100644 index a96b105..0000000 --- a/apps/notes/migrations/0013_remove_luxtag_owner.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 2.1.2 on 2018-12-21 17:20 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('notes', '0012_auto_20181221_1038'), - ] - - operations = [ - migrations.RemoveField( - model_name='luxtag', - name='owner', - ), - ] diff --git a/apps/notes/migrations/0014_auto_20190104_1945.py b/apps/notes/migrations/0014_auto_20190104_1945.py deleted file mode 100644 index 42398a3..0000000 --- a/apps/notes/migrations/0014_auto_20190104_1945.py +++ /dev/null @@ -1,56 +0,0 @@ -# Generated by Django 2.1.2 on 2019-01-05 01:45 - -from django.db import migrations, models -import django.db.models.manager - - -class Migration(migrations.Migration): - - dependencies = [ - ('notes', '0013_remove_luxtag_owner'), - ] - - operations = [ - migrations.AlterModelManagers( - name='note', - managers=[ - ('include_trash', django.db.models.manager.Manager()), - ], - ), - migrations.AlterModelManagers( - name='notebook', - managers=[ - ('include_trash', django.db.models.manager.Manager()), - ], - ), - migrations.AlterField( - model_name='annotation', - name='body_html', - field=models.TextField(blank=True, default=''), - preserve_default=False, - ), - migrations.AlterField( - model_name='annotation', - name='body_text', - field=models.TextField(blank=True, default=''), - preserve_default=False, - ), - migrations.AlterField( - model_name='annotation', - name='highlight_text', - field=models.TextField(blank=True, default=''), - preserve_default=False, - ), - migrations.AlterField( - model_name='note', - name='body_html', - field=models.TextField(blank=True, default=''), - preserve_default=False, - ), - migrations.AlterField( - model_name='note', - name='body_text', - field=models.TextField(blank=True, default=''), - preserve_default=False, - ), - ] diff --git a/apps/notes/migrations/0015_auto_20190104_1946.py b/apps/notes/migrations/0015_auto_20190104_1946.py deleted file mode 100644 index 542dfc6..0000000 --- a/apps/notes/migrations/0015_auto_20190104_1946.py +++ /dev/null @@ -1,31 +0,0 @@ -# Generated by Django 2.1.2 on 2019-01-05 01:46 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('notes', '0014_auto_20190104_1945'), - ] - - operations = [ - migrations.AlterField( - model_name='luxtag', - name='color_rgb', - field=models.CharField(blank=True, default='', max_length=20), - preserve_default=False, - ), - migrations.AlterField( - model_name='note', - name='url', - field=models.CharField(blank=True, default='', max_length=250), - preserve_default=False, - ), - migrations.AlterField( - model_name='notebook', - name='color_rgb', - field=models.CharField(blank=True, default='', max_length=20), - preserve_default=False, - ), - ] diff --git a/apps/notes/views.py b/apps/notes/views.py index 280020a..2418043 100644 --- a/apps/notes/views.py +++ b/apps/notes/views.py @@ -20,7 +20,7 @@ from rest_framework import permissions from .serializers import NoteSerializer, NotebookSerializer, NoteTagSerializer from .models import Note, Notebook, LuxTag from .forms import NoteForm, NotebookForm -from utils.views import AjaxableResponseMixin +from utils.views import AjaxableResponseMixin, LoggedInViewWithUser ################## # Base Views @@ -37,15 +37,6 @@ class BaseDetailView(DetailView): pass -@method_decorator(login_required, name='dispatch') -class LoggedInViewWithUser(FormView): - - def get_form_kwargs(self, **kwargs): - kwargs = super().get_form_kwargs(**kwargs) - kwargs.update({'user': self.request.user}) - return kwargs - - ################## # Note Views ################## diff --git a/apps/utils/views.py b/apps/utils/views.py index c752706..677ac4b 100644 --- a/apps/utils/views.py +++ b/apps/utils/views.py @@ -4,6 +4,7 @@ from django.http import Http404, HttpResponse, JsonResponse from django.apps import apps from django.views.generic import ListView from django.views.generic.base import View, RedirectView +from django.views.generic.edit import FormView, ModelFormMixin from django.utils.decorators import method_decorator from django.contrib.auth.decorators import login_required #from photos.models import LuxImage, LuxVideo @@ -42,6 +43,14 @@ class LoggedInViewWithUser(View): return kwargs +@method_decorator(login_required, name='dispatch') +class LoggedInViewWithUser(FormView): + + def get_form_kwargs(self, **kwargs): + kwargs = super().get_form_kwargs(**kwargs) + kwargs.update({'user': self.request.user}) + return kwargs + class AjaxableResponseMixin: """ diff --git a/config/base_urls.py b/config/base_urls.py index ed4bd91..19d6499 100644 --- a/config/base_urls.py +++ b/config/base_urls.py @@ -39,6 +39,7 @@ urlpatterns += [ path(r'', NoteListView.as_view(), name='homepage',), path(r'forum/', include('forum.urls')), path(r'n/', include('notes.notes_urls')), + path(r'o/', include('outlines.urls')), path(r'nb/', include('notes.notebook_urls')), path(r'api/v1/', include(router.urls)), path(r'', PageDetailView.as_view(), name="pages"), diff --git a/config/requirements.txt b/config/requirements.txt index 634c3b6..d443342 100644 --- a/config/requirements.txt +++ b/config/requirements.txt @@ -41,7 +41,6 @@ parso==0.3.1 pexpect==4.6.0 pickleshare==0.7.5 Pillow==5.3.0 -pkg-resources==0.0.0 prompt-toolkit==2.0.7 psycopg2==2.7.5 psycopg2-binary==2.7.6.1 diff --git a/config/settings.py b/config/settings.py index dcd14ee..d2b0b08 100644 --- a/config/settings.py +++ b/config/settings.py @@ -77,6 +77,7 @@ LOCAL_APPS = [ 'pages', 'accounts', 'notes', + 'outlines', 'forum', ] INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS @@ -87,7 +88,7 @@ MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', - #'debug_toolbar.middleware.DebugToolbarMiddleware', + # 'debug_toolbar.middleware.DebugToolbarMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', @@ -99,9 +100,7 @@ ROOT_URLCONF = 'config.base_urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [ - os.path.join(BASE_DIR, 'design/templates'), - ], + 'DIRS': [os.path.join(BASE_DIR, 'design/templates'), ], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ @@ -109,7 +108,6 @@ TEMPLATES = [ 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', - #'notes.context_processors.add_login_form', ], }, }, diff --git a/design/logo-blk.svg b/design/logo-blk.svg new file mode 100644 index 0000000..d2471a1 --- /dev/null +++ b/design/logo-blk.svg @@ -0,0 +1,90 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + A + N + diff --git a/design/logo-org.svg b/design/logo-org.svg new file mode 100644 index 0000000..10ffcfa --- /dev/null +++ b/design/logo-org.svg @@ -0,0 +1,90 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + A + N + diff --git a/design/logo-sm-caps.svg b/design/logo-sm-caps.svg new file mode 100644 index 0000000..87bf2b6 --- /dev/null +++ b/design/logo-sm-caps.svg @@ -0,0 +1,87 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + diff --git a/design/logo-sm.svg b/design/logo-sm.svg new file mode 100644 index 0000000..8bd1aa4 --- /dev/null +++ b/design/logo-sm.svg @@ -0,0 +1,47 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/design/logo.svg b/design/logo.svg new file mode 100644 index 0000000..8d4aea8 --- /dev/null +++ b/design/logo.svg @@ -0,0 +1,82 @@ + + + + + + image/svg+xml + + + + + + + + + + a + n + diff --git a/design/sass/_awesomeplete.scss b/design/sass/_awesomeplete.scss new file mode 100644 index 0000000..deb97f3 --- /dev/null +++ b/design/sass/_awesomeplete.scss @@ -0,0 +1,88 @@ +.awesomplete [hidden] { + display: none; +} + +.awesomplete .visually-hidden { + position: absolute; + clip: rect(0, 0, 0, 0); +} + +.awesomplete { + display: inline-block; + position: relative; +} + +.awesomplete > input { + display: block; +} + +.awesomplete > ul { + position: absolute; + left: 0; + z-index: 1; + min-width: 100%; + box-sizing: border-box; + list-style: none; + padding: 0; + margin: 0; + background: #fff; +} + +.awesomplete > ul:empty { + display: none; +} + +.awesomplete > ul { + border-radius: .3em; + margin: .2em 0 0; + background: hsla(0,0%,100%,.9); + background: linear-gradient(to bottom right, white, hsla(0,0%,100%,.8)); + border: 1px solid rgba(0,0,0,.3); + box-shadow: .05em .2em .6em rgba(0,0,0,.2); + text-shadow: none; +} + +@supports (transform: scale(0)) { + .awesomplete > ul { + transition: .3s cubic-bezier(.4,.2,.5,1.4); + transform-origin: 1.43em -.43em; + } + + .awesomplete > ul[hidden], + .awesomplete > ul:empty { + opacity: 0; + display: block; + transition-timing-function: ease; + } +} + + /* Pointer */ + + .awesomplete > ul > li { + position: relative; + padding: .2em .5em; + cursor: pointer; + } + + .awesomplete > ul > li:hover { + background: hsl(200, 40%, 80%); + color: black; + } + + .awesomplete > ul > li[aria-selected="true"] { + background: hsl(205, 40%, 40%); + color: white; + } + + .awesomplete mark { + background: hsl(65, 100%, 50%); + } + + .awesomplete li:hover mark { + background: hsl(68, 100%, 41%); + } + + .awesomplete li[aria-selected="true"] mark { + background: hsl(86, 100%, 21%); + color: inherit; + } diff --git a/design/sass/_global.scss b/design/sass/_global.scss index ff23500..584e4fa 100644 --- a/design/sass/_global.scss +++ b/design/sass/_global.scss @@ -249,6 +249,11 @@ h3 { .space-between { justify-content: space-between; } +.page-subhead { + @include fontsize(15); + @include smcaps; + @include fancy_sans; +} //************** other global classes ************************ .sans { @include generic_sans; diff --git a/design/sass/_icons.scss b/design/sass/_icons.scss new file mode 100644 index 0000000..71f905a --- /dev/null +++ b/design/sass/_icons.scss @@ -0,0 +1 @@ +$trashicon:"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIgogICB4bWxuczppbmtzY2FwZT0iaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvbmFtZXNwYWNlcy9pbmtzY2FwZSIKICAgdmlld0JveD0iMCAtMjU2IDE3OTIgMTc5MiIKICAgaWQ9InN2ZzM3NDEiCiAgIHZlcnNpb249IjEuMSIKICAgaW5rc2NhcGU6dmVyc2lvbj0iMC40OC4zLjEgcjk4ODYiCiAgIHdpZHRoPSIxMDAlIgogICBoZWlnaHQ9IjEwMCUiCiAgIHNvZGlwb2RpOmRvY25hbWU9InRyYXNoX2ZvbnRfYXdlc29tZS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BIIDI4OCBxIC02NiwwIC0xMTMsNTguNSBRIDEyOCwtMTEgMTI4LDcyIHYgOTUyIEggMzIgcSAtMTQsMCAtMjMsOSAtOSw5IC05LDIzIHYgNjQgcSAwLDE0IDksMjMgOSw5IDIzLDkgaCAzMDkgbCA3MCwxNjcgcSAxNSwzNyA1NCw2MyAzOSwyNiA3OSwyNiBoIDMyMCBxIDQwLDAgNzksLTI2IDM5LC0yNiA1NCwtNjMgbCA3MCwtMTY3IGggMzA5IHEgMTQsMCAyMywtOSA5LC05IDksLTIzIHoiCiAgICAgICBpZD0icGF0aDM3NDUiCiAgICAgICBpbmtzY2FwZTpjb25uZWN0b3ItY3VydmF0dXJlPSIwIgogICAgICAgc3R5bGU9ImZpbGw6Y3VycmVudENvbG9yIiAvPgogIDwvZz4KPC9zdmc+Cg=="; diff --git a/design/templates/base.html b/design/templates/base.html index cdbed90..7049d5e 100644 --- a/design/templates/base.html +++ b/design/templates/base.html @@ -16,7 +16,7 @@ {% block jsinclude %}{%endblock%} - +
diff --git a/design/templates/notes/notes_list.html b/design/templates/notes/notes_list.html index 5b050b4..6cf4347 100644 --- a/design/templates/notes/notes_list.html +++ b/design/templates/notes/notes_list.html @@ -16,7 +16,7 @@ {% endfor %} {% endif %} - {% if tags|length >= 1%}

Tagged with: {% for tag in tags%}{{tag.name}}{%endfor%}

{%endif%} + {% if tags|length >= 1%}

Tagged with: {% for tag in tags%}{{tag.name}} View Outline{%endfor%}

{%endif%}
{%comment%}