diff --git a/.gitignore b/.gitignore index f55b2e7..a614f6a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ staticfiles local_settings.py db.sqlite3 *~ +*.env *.py[co] settings_secret.py .idea/* diff --git a/README.md b/README.md index 4cd4651..ad8bb5f 100644 --- a/README.md +++ b/README.md @@ -9,4 +9,3 @@ later works in same gallery group are available, you get links to scroll over to The live website has been deployed to Heroku and can be viewed at https://paivisuomela.herokuapp.com - diff --git a/gallery/migrations/0001_initial.py b/gallery/migrations/0001_initial.py index 4bc5c1c..04a3649 100644 --- a/gallery/migrations/0001_initial.py +++ b/gallery/migrations/0001_initial.py @@ -1,41 +1,35 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals +# Generated by Django 4.2.3 on 2023-07-11 20:55 -from django.db import models, migrations +from django.db import migrations, models +import django.db.models.deletion class Migration(migrations.Migration): + initial = True + dependencies = [ ] operations = [ migrations.CreateModel( - name='Artwork', + name='GalleryGroup', fields=[ - ('id', models.AutoField(serialize=False, primary_key=True, verbose_name='ID', auto_created=True)), - ('title', models.CharField(max_length=200)), + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(default='', max_length=100)), ('description', models.TextField()), - ('published_date', models.DateTimeField(null=True, blank=True)), - ('art', models.ImageField(upload_to='media/art')), + ('slug', models.SlugField(unique=True)), ], - options={ - }, - bases=(models.Model,), ), migrations.CreateModel( - name='Group', + name='Artwork', fields=[ - ('id', models.AutoField(serialize=False, primary_key=True, verbose_name='ID', auto_created=True)), + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=200)), + ('description', models.TextField()), + ('published_date', models.DateTimeField(blank=True)), + ('art', models.ImageField(upload_to='art')), + ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gallery.gallerygroup')), ], - options={ - }, - bases=(models.Model,), - ), - migrations.AddField( - model_name='artwork', - name='group', - field=models.ForeignKey(to='gallery.Group'), - preserve_default=True, ), ] diff --git a/gallery/migrations/0002_alter_artwork_description.py b/gallery/migrations/0002_alter_artwork_description.py new file mode 100644 index 0000000..f46dead --- /dev/null +++ b/gallery/migrations/0002_alter_artwork_description.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.3 on 2023-07-12 00:26 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('gallery', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='artwork', + name='description', + field=models.TextField(default=''), + ), + ] diff --git a/gallery/migrations/0002_auto_20150427_1134.py b/gallery/migrations/0002_auto_20150427_1134.py deleted file mode 100644 index 0fe9432..0000000 --- a/gallery/migrations/0002_auto_20150427_1134.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import models, migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('gallery', '0001_initial'), - ] - - operations = [ - migrations.AddField( - model_name='group', - name='description', - field=models.TextField(null=True, blank=True), - preserve_default=True, - ), - migrations.AddField( - model_name='group', - name='title', - field=models.CharField(max_length=100, default=''), - preserve_default=True, - ), - ] diff --git a/gallery/migrations/0003_alter_gallerygroup_description.py b/gallery/migrations/0003_alter_gallerygroup_description.py new file mode 100644 index 0000000..c891575 --- /dev/null +++ b/gallery/migrations/0003_alter_gallerygroup_description.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.3 on 2023-07-12 00:27 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('gallery', '0002_alter_artwork_description'), + ] + + operations = [ + migrations.AlterField( + model_name='gallerygroup', + name='description', + field=models.TextField(default=''), + ), + ] diff --git a/gallery/migrations/0003_auto_20150427_1134.py b/gallery/migrations/0003_auto_20150427_1134.py deleted file mode 100644 index 9e3911e..0000000 --- a/gallery/migrations/0003_auto_20150427_1134.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import models, migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('gallery', '0002_auto_20150427_1134'), - ] - - operations = [ - migrations.AlterField( - model_name='group', - name='description', - field=models.TextField(), - ), - ] diff --git a/gallery/migrations/0004_alter_artwork_description_and_more.py b/gallery/migrations/0004_alter_artwork_description_and_more.py new file mode 100644 index 0000000..eb9d3d1 --- /dev/null +++ b/gallery/migrations/0004_alter_artwork_description_and_more.py @@ -0,0 +1,23 @@ +# Generated by Django 4.2.3 on 2023-07-12 00:27 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('gallery', '0003_alter_gallerygroup_description'), + ] + + operations = [ + migrations.AlterField( + model_name='artwork', + name='description', + field=models.TextField(blank=True, default=''), + ), + migrations.AlterField( + model_name='gallerygroup', + name='description', + field=models.TextField(blank=True, default=''), + ), + ] diff --git a/gallery/migrations/0004_auto_20150427_1254.py b/gallery/migrations/0004_auto_20150427_1254.py deleted file mode 100644 index 956a93e..0000000 --- a/gallery/migrations/0004_auto_20150427_1254.py +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import models, migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('gallery', '0003_auto_20150427_1134'), - ] - - operations = [ - migrations.CreateModel( - name='GalleryGroup', - fields=[ - ('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)), - ('title', models.CharField(max_length=100, default='')), - ('description', models.TextField()), - ], - options={ - }, - bases=(models.Model,), - ), - migrations.AlterField( - model_name='artwork', - name='group', - field=models.ForeignKey(to='gallery.GalleryGroup'), - ), - migrations.DeleteModel( - name='Group', - ), - ] diff --git a/gallery/migrations/0005_artwork_featured.py b/gallery/migrations/0005_artwork_featured.py new file mode 100644 index 0000000..f0f0a3d --- /dev/null +++ b/gallery/migrations/0005_artwork_featured.py @@ -0,0 +1,19 @@ +# Generated by Django 4.2.3 on 2023-07-12 00:51 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('gallery', '0004_alter_artwork_description_and_more'), + ] + + operations = [ + migrations.AddField( + model_name='artwork', + name='featured', + field=models.BooleanField(default=False, help_text='Feature this artwork on the home page'), + preserve_default=False, + ), + ] diff --git a/gallery/migrations/0005_gallerygroup_slug.py b/gallery/migrations/0005_gallerygroup_slug.py deleted file mode 100644 index 6a1e09f..0000000 --- a/gallery/migrations/0005_gallerygroup_slug.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import models, migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('gallery', '0004_auto_20150427_1254'), - ] - - operations = [ - migrations.AddField( - model_name='gallerygroup', - name='slug', - field=models.SlugField(unique=True, default=''), - preserve_default=False, - ), - ] diff --git a/gallery/migrations/0006_auto_20150428_1116.py b/gallery/migrations/0006_auto_20150428_1116.py deleted file mode 100644 index 4a5af14..0000000 --- a/gallery/migrations/0006_auto_20150428_1116.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import models, migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('gallery', '0005_gallerygroup_slug'), - ] - - operations = [ - migrations.AlterField( - model_name='gallerygroup', - name='slug', - field=models.SlugField(), - ), - ] diff --git a/gallery/migrations/0007_auto_20150428_1131.py b/gallery/migrations/0007_auto_20150428_1131.py deleted file mode 100644 index ab68579..0000000 --- a/gallery/migrations/0007_auto_20150428_1131.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import models, migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('gallery', '0006_auto_20150428_1116'), - ] - - operations = [ - migrations.AlterField( - model_name='gallerygroup', - name='slug', - field=models.SlugField(), - ), - ] diff --git a/gallery/models.py b/gallery/models.py index 60ef016..016409c 100644 --- a/gallery/models.py +++ b/gallery/models.py @@ -1,12 +1,11 @@ from django.db import models -from django.core.urlresolvers import reverse +from django.urls import reverse from django.template.defaultfilters import slugify class GalleryGroup(models.Model): - title = models.CharField(max_length=100, default='') - description = models.TextField() + description = models.TextField(blank=True, default='') slug = models.SlugField(unique=True) def __str__(self): @@ -22,10 +21,11 @@ def get_absolute_url(self): class Artwork(models.Model): title = models.CharField(max_length=200) - description = models.TextField() + description = models.TextField(blank=True, default='') published_date = models.DateTimeField(blank=True) art = models.ImageField(upload_to="art") - group = models.ForeignKey('GalleryGroup') + group = models.ForeignKey('GalleryGroup', on_delete=models.CASCADE) + featured = models.BooleanField(help_text='Feature this artwork on the home page') def publish(self): self.save() diff --git a/gallery/templates/404.html b/gallery/templates/404.html index 36c3432..2e0201f 100644 --- a/gallery/templates/404.html +++ b/gallery/templates/404.html @@ -1,5 +1,4 @@ -{% extends 'blog/base.html' %} - +{% extends 'base.html' %} {% block content %}


diff --git a/gallery/templates/gallery/base.html b/gallery/templates/base.html similarity index 76% rename from gallery/templates/gallery/base.html rename to gallery/templates/base.html index 9601f3e..8969ba0 100644 --- a/gallery/templates/gallery/base.html +++ b/gallery/templates/base.html @@ -1,4 +1,4 @@ -{% load staticfiles %} +{% load static %} @@ -25,7 +25,7 @@

- - {% block content %} - {% endblock %} - + + +
+ {% block content %} + {% endblock %} +
-
- - -
+
+
+
diff --git a/gallery/templates/gallery/about_me.html b/gallery/templates/gallery/about_me.html index f29c4b1..ae74a09 100644 --- a/gallery/templates/gallery/about_me.html +++ b/gallery/templates/gallery/about_me.html @@ -1,7 +1,6 @@ -{% extends 'gallery/base.html' %} -{% load staticfiles %} +{% extends '../base.html' %} +{% load static %} {% block content %} -
@@ -18,6 +17,4 @@

Contact me

- - {% endblock content %} diff --git a/gallery/templates/gallery/art_detail.html b/gallery/templates/gallery/art_detail.html index 5cfdceb..f22c150 100644 --- a/gallery/templates/gallery/art_detail.html +++ b/gallery/templates/gallery/art_detail.html @@ -1,6 +1,8 @@ -{% extends 'gallery/base.html' %} -{% block content %} - +{% extends '../base.html' %} +{% block content %} +
+ Back to gallery +
@@ -8,18 +10,19 @@
-
+

{{ artwork.title }} - {{ artwork.published_date.year }}

{{ artwork.description|linebreaks }}

+
+

{% if previous %} - Previous + Previous {% endif %} {% if next %} - Next + Next {% endif %}

- {% endblock content %} diff --git a/gallery/templates/gallery/galleries.html b/gallery/templates/gallery/galleries.html index a09302c..530bff4 100644 --- a/gallery/templates/gallery/galleries.html +++ b/gallery/templates/gallery/galleries.html @@ -1,58 +1,54 @@ -{% extends 'gallery/base.html' %} -{% load staticfiles %} +{% extends '../base.html' %} +{% load static %} {% block content %} - + +
+
+ {% if gallery_groups|length != 0 %} +

Galleries

+ {% endif %} + {% for gallery_group in gallery_groups %} +
+

{{ gallery_group.title }}

+

{{ gallery_group.description|linebreaks }}

+

View {{ gallery_group.title }} Gallery »

+
+ {% endfor %} +
+
+ + + {% endblock content %} diff --git a/gallery/templates/gallery/gallery_detail.html b/gallery/templates/gallery/gallery_detail.html index a7624fa..e2c8c7d 100644 --- a/gallery/templates/gallery/gallery_detail.html +++ b/gallery/templates/gallery/gallery_detail.html @@ -1,35 +1,30 @@ -{% extends 'gallery/base.html' %} +{% extends '../base.html' %} {% block content %} -
{% if artworks %}
-

{{ galleryGroups.title }} Gallery

-

{{ galleryGroups.description|linebreaks }}

+

{{ gallery_group.title }} Gallery

+

{{ gallery_group.description|linebreaks }}

Click an image to view further details.

-
{% for artwork in artworks %} - -
- + {% endfor %}
{% else %} - -
-
-

Oopsie!

-

No galleries with that name found.

-
+
+
+

Oopsie!

+

No galleries with that name found.

+
{% endif %} -
- +
{% endblock content %} diff --git a/gallery/urls.py b/gallery/urls.py index 9a0d56c..4791afa 100644 --- a/gallery/urls.py +++ b/gallery/urls.py @@ -1,11 +1,13 @@ -from django.conf.urls import url +from django.urls import re_path from . import views +app_name = 'gallery' urlpatterns = [ - url(r'^$', views.galleries, name='home'), - url(r'^gallery/(?P[\w\-]+)/', views.gallery_detail, name='gallery_detail'), - url(r'^art/(?P[0-9]+)/$', views.art_detail, name='art'), - url(r'^about/$', views.about_me, name="aboutMe"), + re_path(r'^$', views.galleries, name='home'), + re_path(r'^gallery/(?P[\w\-]+)/', views.gallery_detail, name='gallery_detail'), + re_path(r'^art/(?P[\w\-]+)/(?P[0-9]+)/$', views.art_detail, name='art'), + re_path(r'^about/$', views.about_me, name="aboutMe"), ] +handler404 = views.handle_404 \ No newline at end of file diff --git a/gallery/views.py b/gallery/views.py index 093fca9..5d37cf0 100644 --- a/gallery/views.py +++ b/gallery/views.py @@ -2,27 +2,36 @@ from .models import GalleryGroup, Artwork +def handle_404(request, exception): + return render(request, '404.html', context={}) + + def galleries(request): - gallery_groups = GalleryGroup.objects.all().order_by('title') - return render(request, 'gallery/galleries.html', {'galleryGroups': gallery_groups}) + featured_works = Artwork.objects.filter(featured=True) + + context = { + 'featured_works': featured_works + } + + return render(request, 'gallery/galleries.html', context) def gallery_detail(request, gallery_title_slug): - context_dict = {} - + context = {} try: - gallery_groups = GalleryGroup.objects.get(slug=gallery_title_slug) - context_dict['galleryGroups'] = gallery_groups - artworks = Artwork.objects.filter(group=gallery_groups).order_by('published_date') - context_dict['artworks'] = artworks + gallery_group = GalleryGroup.objects.get(slug=gallery_title_slug) + artworks = Artwork.objects.filter(group=gallery_group).order_by('published_date') + context['gallery_title_slug'] = gallery_title_slug + context['gallery_group'] = gallery_group + context['artworks'] = artworks except GalleryGroup.DoesNotExist: pass - return render(request, 'gallery/gallery_detail.html', context_dict) + return render(request, 'gallery/gallery_detail.html', context) -def art_detail(request, art_id): +def art_detail(request, gallery_title_slug, art_id,): artwork = get_object_or_404(Artwork, id=art_id) try: next_artwork = artwork.get_next_by_published_date() @@ -38,7 +47,14 @@ def art_detail(request, art_id): except Artwork.DoesNotExist: previous = None - return render(request, 'gallery/art_detail.html', {'artwork': artwork, 'next': next_artwork, 'previous': previous}) + context = { + 'gallery_title_slug': gallery_title_slug, + 'artwork': artwork, + 'next': next_artwork, + 'previous': previous + } + + return render(request, 'gallery/art_detail.html', context) def about_me(request): diff --git a/portfolio/global_context.py b/portfolio/global_context.py new file mode 100644 index 0000000..0848b32 --- /dev/null +++ b/portfolio/global_context.py @@ -0,0 +1,10 @@ +from gallery.models import GalleryGroup + +def add_to_context(request): + gallery_groups = GalleryGroup.objects.all().order_by('title') + + context = { + 'gallery_groups': gallery_groups + } + + return context diff --git a/portfolio/settings.py b/portfolio/settings.py index eac6cca..e2f0657 100644 --- a/portfolio/settings.py +++ b/portfolio/settings.py @@ -7,21 +7,27 @@ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ +from dotenv import load_dotenv +import os + # Build paths inside the project like this: os.path.join(BASE_DIR, ...) -import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) +load_dotenv() # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/ #from settings_secret import * -SECRET_KEY = os.environ['SECRET_KEY'] +DEBUG = bool(int(os.environ['PORTFOLIO_DEBUG'])) # Parses # "0" or "1" -ALLOWED_HOSTS = [] +SECRET_KEY = os.environ['PORTFOLIO_SECRET_KEY'] +ALLOWED_HOSTS = [ + '127.0.0.1' +] # Application definition @@ -36,14 +42,18 @@ 'storages', ) -MIDDLEWARE_CLASSES = ( +MIDDLEWARE = ( + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', + 'whitenoise.middleware.WhiteNoiseMiddleware', ) ROOT_URLCONF = 'portfolio.urls' @@ -59,6 +69,7 @@ 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', + 'portfolio.global_context.add_to_context', ], }, }, @@ -81,18 +92,14 @@ # https://docs.djangoproject.com/en/1.7/howto/static-files/ STATIC_URL = '/static/' - MEDIA_URL = '/media/' +MEDIA_ROOT = os.path.join(BASE_DIR, "media") # static files (css) STATICFILES_DIRS = ( - os.path.join(BASE_DIR, "static"), + os.path.join(BASE_DIR, "static"), ) - -MEDIA_ROOT = (os.path.join(BASE_DIR, "media")) - - DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', @@ -100,9 +107,8 @@ } } - -# deployment - +# deployment +''' import dj_database_url DATABASES['default'] = dj_database_url.config() @@ -127,5 +133,4 @@ from .local_settings import * except ImportError: pass - - +''' \ No newline at end of file diff --git a/portfolio/urls.py b/portfolio/urls.py index 5184a4b..c3c4f9a 100644 --- a/portfolio/urls.py +++ b/portfolio/urls.py @@ -1,10 +1,11 @@ -from django.conf.urls import include, url +from django.urls import path, include, re_path from django.contrib import admin from django.conf import settings from django.conf.urls.static import static -urlpatterns = [ - url(r'^admin/', include(admin.site.urls)), - url(r'', include('gallery.urls')), - ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) +app_name = 'portfolio' +urlpatterns = [ + re_path(r'^admin/', admin.site.urls), + path('', include('gallery.urls')), +] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) \ No newline at end of file diff --git a/portfolio/wsgi.py b/portfolio/wsgi.py index f52bfa0..6f9db96 100644 --- a/portfolio/wsgi.py +++ b/portfolio/wsgi.py @@ -8,10 +8,7 @@ """ import os -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "portfolio.settings") - from django.core.wsgi import get_wsgi_application -application = get_wsgi_application() -from whitenoise.django import DjangoWhiteNoise -application = DjangoWhiteNoise(application) +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "portfolio.settings") +application = get_wsgi_application() diff --git a/requirements.txt b/requirements.txt index 5ab914a..934a223 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,12 @@ -Django==1.10.2 -Markdown==2.6.7 -Pillow==3.4.1 -boto==2.42.0 -dj-database-url==0.4.1 -django-storages==1.5.1 -django-storages-redux==1.3.2 -gunicorn==19.6.0 -pytz==2016.7 -whitenoise==3.2.2 -psycopg2==2.6.2 +asgiref==3.7.2 +boto==2.49.0 +dj-database-url==2.0.0 +Django==4.2.3 +django-storages==1.13.2 +Pillow==10.0.0 +python-dotenv==1.0.0 +pytz==2023.3 +sqlparse==0.4.4 +typing_extensions==4.7.1 +tzdata==2023.3 +whitenoise==6.5.0 diff --git a/static/css/custom.css b/static/css/custom.css index 6daedc9..20a8cad 100644 --- a/static/css/custom.css +++ b/static/css/custom.css @@ -1,8 +1,48 @@ +/* --------------------- */ +/* Custom properties */ +/* --------------------- */ +:root { + /* Colors */ + --clr-dark: 0, 0%, 13%; + --clr-light: 210, 17%, 98%; + --clr-darkpurple: 270, 95%, 23%; + --clr-darkpurple-hover: 270, 96%, 18%; + --clr-border-dark: 270, 94%, 13%; + + /* Font-sizes */ + --fs-900: 9.375rem; + --fs-850: 7.813rem; + --fs-800: 6.25rem; + --fs-750: 4.875rem; + --fs-700: 3.5rem; + --fs-650: 2.75rem; + --fs-600: 2rem; + --fs-550: 1.875rem; + --fs-500: 1.75rem; + --fs-450: 1.313rem; + --fs-400: 1.125rem; + --fs-350: 1.06rem; + --fs-300: 1rem; + --fs-250: 0.94rem; + --fs-200: 0.875rem; + --fs-150: 0.81rem; + --fs-100: 0.75rem; + --fs-0: 0.625rem; + + /* Font families */ + --ff-neucha: 'Neucha', cursive; + --ff-comingsoon: 'Coming Soon', cursive; +} + body { padding-top: 60px; /* Required padding for .navbar-fixed-top. Change if height of navigation changes. */ } +.content-wrapper { + margin-top: 2vh; +} + .thumb { margin-top: 5px; } @@ -78,8 +118,8 @@ p { } .galleryOptions { - text-align: center; - } + text-align: center; +} .myface { margin-top: 40px; @@ -93,23 +133,25 @@ body { /* remove gradient background form carousel */ .carousel-control.right, .carousel-control.left { background-image:none; + color: #202830; } /* custom button code */ - .btn-custom { - background-color: #3a0371; - border-color: #3a0371; + background-color: hsl(var(--clr-darkpurple)); + border-color: hsl(var(--clr-darkpurple)); font-family: 'Neucha', cursive; } + .btn-custom:hover, .btn-custom:focus, .btn-custom:active, .btn-custom.active { - background-color: #2d0258; - border-color: #21023f; + background-color: hsl(var(--clr-darkpurple-hover)); + border-color: hsl(var(--clr-border-dark)); } + .btn-custom.disabled:hover, .btn-custom.disabled:focus, .btn-custom.disabled:active, @@ -122,10 +164,61 @@ fieldset[disabled] .btn-custom:hover, fieldset[disabled] .btn-custom:focus, fieldset[disabled] .btn-custom:active, fieldset[disabled] .btn-custom.active { - background-color: #3a0371; - border-color: #3a0371; -} - - - + background-color: hsl(var(--clr-darkpurple)); + border-color: hsl(var(--clr-darkpurple)); +} + +/* Custom background colors */ +.bg-dark { background-color: hsl(var(--clr-dark)); } +.bg-light { background-color: hsl(var(--clr-light)); } + +/* Custom text colors */ +.text-dark { color: hsl(var(--clr-dark)); } +.text-light { color: hsl(var(--clr-light)); } + +/* Typography */ +.ff-neucha { font-family: var(--ff-neucha); } +.ff-comingsoon { font-family: var(--ff-comingsoon); } +.ff-neucha-bolder { font-family: var(--ff-neucha); font-weight: 500; } +.ff-neucha-bold { font-family: var(--ff-neucha); font-weight: 600; } +.ff-comingsoon-bolder { font-family: var(--ff-comingsoon); font-weight: 500; } +.ff-comingsoon-bold { font-family: var(--ff-comingsoon); font-weight: 600; } + +.letter-spacing-1 { letter-spacing: 4.75px; } +.letter-spacing-2 { letter-spacing: 2.7px; } +.letter-spacing-3 { letter-spacing: 2.35px; } + +.uppercase { text-transform: uppercase; } +.lowercase { text-transform: lowercase; } + +.text-center{text-align: center!important} + +.fs-900 { font-size: var(--fs-900); } +.fs-850 { font-size: var(--fs-850); } +.fs-800 { font-size: var(--fs-800); } +.fs-750 { font-size: var(--fs-750); } +.fs-700 { font-size: var(--fs-700); } +.fs-650 { font-size: var(--fs-650); } +.fs-600 { font-size: var(--fs-600); } +.fs-550 { font-size: var(--fs-550); } +.fs-500 { font-size: var(--fs-500); } +.fs-450 { font-size: var(--fs-450); } +.fs-400 { font-size: var(--fs-400); } +.fs-350 { font-size: var(--fs-350); } +.fs-300 { font-size: var(--fs-300); } +.fs-250 { font-size: var(--fs-250); } +.fs-200 { font-size: var(--fs-200); } +.fs-150 { font-size: var(--fs-150); } +.fs-100 { font-size: var(--fs-100); } +.fs-0 { font-size: var(--fs-0); } + +.fs-900, +.fs-800, +.fs-700, +.fs-600 { + line-height: 1.1; +} + + +/* Typography */ diff --git a/static/js/myScript.js b/static/js/myScript.js index 9b9d2b8..36cdfd8 100644 --- a/static/js/myScript.js +++ b/static/js/myScript.js @@ -1,12 +1,7 @@ jQuery(window).load(function () { - - var $container = jQuery('#art-images'); - $container.masonry({ - itemSelector: '.image-box', - columnWidth: '.image-box' + itemSelector: '.image-box', + columnWidth: '.image-box' }); - - });