diff --git a/Pipfile b/Pipfile index 26d7f90c5fbffc21db67dd20c1790bf34942eb6e..8ec0927a086361824cc585e265570e9ed6d4a7d1 100644 --- a/Pipfile +++ b/Pipfile @@ -26,6 +26,7 @@ django-stubs = "*" psycopg2-binary = "*" redis = "*" requests = "*" +natsort = "*" [scripts] test = "./test.sh" diff --git a/Pipfile.lock b/Pipfile.lock index 5485bdcd80dbd4cdc42cb5e05e40562a6387deb0..af21006cae6d16df1eecf00bb5029aa81a403b4f 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "f4ef4aa2e79264120750c6ed8077abf04cd0ca64823f1098b2042a22b4618d76" + "sha256": "68f975488caab91b3500fb126943adab48c76a27129ba7cd4d0c37aac8618ad1" }, "pipfile-spec": 6, "requires": {}, @@ -16,11 +16,11 @@ "default": { "asgiref": { "hashes": [ - "sha256:2f8abc20f7248433085eda803936d98992f1343ddb022065779f37c5da0181d0", - "sha256:88d59c13d634dcffe0510be048210188edd79aeccb6a6c9028cdad6f31d730a9" + "sha256:45a429524fba18aba9d512498b19d220c4d628e75b40cf5c627524dbaebc5cc1", + "sha256:fddeea3c53fa99d0cdb613c3941cc6e52d822491fc2753fba25768fb5bf4e865" ], "markers": "python_version >= '3.7'", - "version": "==3.5.0" + "version": "==3.5.1" }, "beautifulsoup4": { "hashes": [ @@ -55,11 +55,11 @@ }, "django-debug-toolbar": { "hashes": [ - "sha256:644bbd5c428d3283aa9115722471769cac1bec189edf3a0c855fd8ff870375a9", - "sha256:6b633b6cfee24f232d73569870f19aa86c819d750e7f3e833f2344a9eb4b4409" + "sha256:42c1c2e9dc05bb57b53d641e3a6d131fc031b92377b34ae32e604a1fe439bb83", + "sha256:ae6bec2c1ce0e6900b0ab0443e1427eb233d8e6f57a84a0b2705eeecb8874e22" ], "index": "pypi", - "version": "==3.2.4" + "version": "==3.4.0" }, "django-redis-cache": { "hashes": [ @@ -100,13 +100,21 @@ "markers": "python_version >= '3'", "version": "==3.3" }, + "importlib-metadata": { + "hashes": [ + "sha256:1208431ca90a8cca1a6b8af391bb53c1a2db74e5d1cef6ddced95d4b2062edc6", + "sha256:ea4c597ebf37142f827b8f39299579e31685c31d3a438b59f469406afd0f2539" + ], + "markers": "python_version < '3.10'", + "version": "==4.11.3" + }, "markdown": { "hashes": [ - "sha256:76df8ae32294ec39dcf89340382882dfa12975f87f45c3ed1ecdb1e8cefc7006", - "sha256:9923332318f843411e9932237530df53162e29dc7a4e2b91e35764583c46c9a3" + "sha256:cbb516f16218e643d8e0a95b309f77eb118cb138d39a4f27851e6a63581db874", + "sha256:f5da449a6e1c989a4cea2631aa8ee67caa5a2ef855d551c88f9e309f4634c621" ], "index": "pypi", - "version": "==3.3.6" + "version": "==3.3.7" }, "mypy": { "hashes": [ @@ -144,6 +152,14 @@ ], "version": "==0.4.3" }, + "natsort": { + "hashes": [ + "sha256:c7c1f3f27c375719a4dfcab353909fe39f26c2032a062a8c80cc844eaaca0445", + "sha256:f59988d2f24e77b6b56f8a8f882d5df6b3b637e09e075abc67b486d59fba1a4b" + ], + "index": "pypi", + "version": "==8.1.0" + }, "pillow": { "hashes": [ "sha256:01ce45deec9df310cbbee11104bae1a2a43308dd9c317f99235b6d3080ddd66e", @@ -299,10 +315,10 @@ }, "types-pytz": { "hashes": [ - "sha256:6805c72d51118923c5bf98633c39593d5b464d2ab49a803440e2d7ab6b8920df", - "sha256:74547fd90d8d8ab4f1eedf3a344a7d186d97486973895f81221a712e1e2cd993" + "sha256:41253a3a2bf028b6a3f17b58749a692d955af0f74e975de94f6f4d2d3cd01dbd", + "sha256:aef4a917ab28c585d3f474bfce4f4b44b91e95d9d47d4de29dd845e0db8e3910" ], - "version": "==2021.3.6" + "version": "==2021.3.8" }, "types-pyyaml": { "hashes": [ @@ -326,6 +342,14 @@ ], "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'", "version": "==1.26.9" + }, + "zipp": { + "hashes": [ + "sha256:56bf8aadb83c24db6c4b577e13de374ccfb67da2078beba1d037c17980bf43ad", + "sha256:c4f6e5bbf48e74f7a38e7cc5b0480ff42b0ae5178957d564d18932525d5cf099" + ], + "markers": "python_version >= '3.7'", + "version": "==3.8.0" } }, "develop": { @@ -360,11 +384,11 @@ }, "click": { "hashes": [ - "sha256:24e1a4a9ec5bf6299411369b208c1df2188d9eb8d916302fe6bf03faed227f1e", - "sha256:479707fe14d9ec9a0757618b7a100a0ae4c4e236fac5b7f80ca68028141a1a72" + "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e", + "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48" ], "markers": "python_version >= '3.7'", - "version": "==8.1.2" + "version": "==8.1.3" }, "colorama": { "hashes": [ @@ -545,34 +569,34 @@ }, "types-markdown": { "hashes": [ - "sha256:35711d58243172b81a6bed4148005f1bd9661f7df9d636e281e5810180f391e8", - "sha256:43a4b5392084124621766e3c17732b1a26c4b6a044bb5f75aa257c0b1be2b431" + "sha256:10841332581bd79efdb153fb8f856818ef5cdb40a6e71e5d18505b5db6eba01c", + "sha256:49a406c12be2181346a756086f326d42d5bb3abbfaede8942ccdc9cef367db1f" ], "index": "pypi", - "version": "==3.3.13" + "version": "==3.3.14" }, "types-redis": { "hashes": [ - "sha256:24c0effe59b2eef030733fd352fdcee6647a66611001aa25762475c3f26fb5f1", - "sha256:c9b61894c7621b801db44efd63f843ead93cbbcf034186d7343f7f5771e1106a" + "sha256:616e5331e957832321c14a4bd206b41f967657cf360f62419b21588880af3933", + "sha256:8035a2631591ea2d0484f979f1424789ed757e72b56f0c5d6291a9484540e9c0" ], "index": "pypi", - "version": "==4.2.0" + "version": "==4.2.2" }, "types-requests": { "hashes": [ - "sha256:63344573cde6c4efd44d867c0158d9fb7e6beb95721cbe9882f3f857ee8a5398", - "sha256:68b8de86552116424ec23b77afc925e111afb6496d3821b183b7d151b3b834d4" + "sha256:2444905c89731dbcb6bbcd6d873a04252445df7623917c640e463b2b28d2a708", + "sha256:805ae7e38fd9d157153066dc4381cf585fd34dfa212f2fc1fece248c05aac571" ], "index": "pypi", - "version": "==2.27.20" + "version": "==2.27.25" }, "types-urllib3": { "hashes": [ - "sha256:40f8fb5e8cd7d57e8aefdee3fdd5e930aa1a1bb4179cdadd55226cea588af790", - "sha256:ff7500641824f881b2c7bde4cc57e6c3abf03d1e005bae83aca752e77213a5da" + "sha256:2a2578e4b36341ccd240b00fccda9826988ff0589a44ba4a664bbd69ef348d27", + "sha256:5d2388aa76395b1e3999ff789ea5b3283677dad8e9bcf3d9117ba19271fd35d9" ], - "version": "==1.26.13" + "version": "==1.26.14" }, "typing-extensions": { "hashes": [ diff --git a/bde/views.py b/bde/views.py index 2736699f32e93c5d5882543eabd33d1debb147cc..4286ba0d77f58033cd16cfdf6a045209af81a4dd 100644 --- a/bde/views.py +++ b/bde/views.py @@ -10,6 +10,7 @@ from django.http import JsonResponse from django.shortcuts import render from django.utils import timezone +from core.cache import invalid_cache from . import models @@ -40,7 +41,7 @@ def contributors(request) -> HttpResponse: "full_contribution_delete", ] valid_means = (key for key, desc in settings.PAYMENT_MEANS) - + invalid_cache("members") if req.get("action") not in valid_actions: return JsonResponse({"error": "Action inconnue. Contactez votre sysadmin."}) diff --git a/events/templates/events/admin/event_extern_admin.html b/events/templates/events/admin/event_extern_admin.html index eb9d0f84bb28e515fcefbcc079c4d9509c7bf6a7..30d4a23494fecc31d095c4ad2d9bfb00e1ff9a5d 100644 --- a/events/templates/events/admin/event_extern_admin.html +++ b/events/templates/events/admin/event_extern_admin.html @@ -19,12 +19,16 @@
>1,v=23===a?n(2,-24)-n(2,-77):0,y=e<0||0===e&&1/e<0?1:0,g=0;for((e=t(e))!=e||e===1/0?(l=e!=e?1:0,s=h):(s=r(i(e)/o),e*(c=n(2,-s))<1&&(s--,c*=2),(e+=s+d>=1?v/c:v*n(2,1-d))*c>=2&&(s++,c/=2),s+d>=h?(l=0,s=h):s+d>=1?(l=(e*c-1)*n(2,a),s+=d):(l=e*n(2,d-1)*n(2,a),s=0));a>=8;f[g++]=255&l,l/=256,a-=8);for(s=s<0;f[g++]=255&s,s/=256,p-=8);return f[--g]|=128*y,f},unpack:function(e,t){var r,i=e.length,o=8*i-t-1,a=(1<
+
+ Photos
+ {% for folder in breadcrumb %}
+
+ {{ folder.folder }}
+ {% endfor %}
+
+
+
+ {% if perms.photo.add_files %}
+
+
+
+
{% endfor %}
+ Pour restreindre l'accès a la communauté ENIB, ajouter une permission au groupe "ENIB".
+ La permission "Accès publique" donne accès a l'album sans être connecté.
+ Les albums parents doivent avoir des permissions similaires pour que cet album puisse être accessible.
{% if permissions %}
Permissions en vigueur
diff --git a/photo/views.py b/photo/views.py
index 56181e211ff2c75d007d60bc9bf4785dc318a74c..555aa0a5995f020b419c6b5e3b35d5a0d448701d 100644
--- a/photo/views.py
+++ b/photo/views.py
@@ -1,54 +1,103 @@
+import json
import os
-from PIL import Image
-from django.shortcuts import render, redirect, get_object_or_404
-from django.contrib import messages
-from django.http import Http404
+
+from PIL import Image, ImageOps
from django.conf import settings
-from django.db import IntegrityError
+from django.contrib import messages
from django.contrib.auth.decorators import permission_required
+from django.db import IntegrityError
+from django.http import Http404, JsonResponse, HttpResponse, HttpResponseNotAllowed
+from django.shortcuts import render, redirect, get_object_or_404
+from natsort import natsorted
+
from . import forms
from . import models
-
# photo directory name
+from .models import PublicAccess, GroupAccess, EventAccess
+
PHOTO_DIRNAME = settings.PHOTO_DIRNAME
THUMBNAIL_DIRNAME = settings.PHOTO_THUMBNAIL_DIRNAME
+COMPRESSED_DIRNAME = settings.PHOTO_COMPRESSED_DIRNAME
THUMBNAIL_SIZE = settings.PHOTO_THUMBNAIL_SIZE
+COMPRESSED_SIZE = settings.PHOTO_COMPRESSED_SIZE
+COMPRESSION_QUALITY = settings.PHOTO_COMPRESSION_QUALITY
ALLOWED_IMAGE_EXT = settings.PHOTO_ALLOWED_IMAGE_EXT
+MAX_UNCOMPRESSED_WEIGHT = settings.PHOTO_MAX_UNCOMPRESSED_WEIGHT
def create_thumbnail(realpath, filename):
+ if os.path.isfile(os.path.join(realpath, THUMBNAIL_DIRNAME, filename)):
+ return
+
if not os.path.isdir(os.path.join(realpath, THUMBNAIL_DIRNAME)):
os.mkdir(os.path.join(realpath, THUMBNAIL_DIRNAME))
- if os.path.isfile(os.path.join(realpath, THUMBNAIL_DIRNAME, filename)):
+ try:
+
+ image = Image.open(os.path.join(realpath, filename))
+
+ if image.format == 'PNG':
+ bg = Image.new("RGB", image.size, "WHITE")
+ bg.paste(image, (0, 0), image)
+ image = bg
+
+ # Get current and desired ratio for the images
+ image_ratio = image.size[0] / float(image.size[1])
+ ratio = THUMBNAIL_SIZE[0] / float(THUMBNAIL_SIZE[1])
+ # The image is scaled/cropped vertically or horizontally depending on the ratio
+ if ratio > image_ratio:
+ image = image.resize((THUMBNAIL_SIZE[0], int(THUMBNAIL_SIZE[0] * image.size[1] / image.size[0])),
+ Image.ANTIALIAS)
+ box = (0, (image.size[1] - THUMBNAIL_SIZE[1]) / 2, image.size[0], (image.size[1] + THUMBNAIL_SIZE[1]) / 2)
+
+ image = image.crop(box)
+ elif ratio < image_ratio:
+ image = image.resize((int(THUMBNAIL_SIZE[1] * image.size[0] / image.size[1]), THUMBNAIL_SIZE[1]),
+ Image.ANTIALIAS)
+ box = ((image.size[0] - THUMBNAIL_SIZE[0]) / 2, 0, (image.size[0] + THUMBNAIL_SIZE[0]) / 2, image.size[1])
+
+ image = image.crop(box)
+ else:
+ image = image.resize((THUMBNAIL_SIZE[0], THUMBNAIL_SIZE[1]),
+ Image.ANTIALIAS)
+ # If the scale is the same, we do not need to crop
+
+ image = ImageOps.exif_transpose(image)
+
+ image.save(os.path.join(realpath, THUMBNAIL_DIRNAME, filename), "JPEG")
+ except OSError:
+ return
+
+
+def create_compressed_image(realpath, filename):
+
+ if os.path.isfile(os.path.join(realpath, COMPRESSED_DIRNAME, filename)):
return
+ if not os.path.isdir(os.path.join(realpath, COMPRESSED_DIRNAME)):
+ os.mkdir(os.path.join(realpath, COMPRESSED_DIRNAME))
+
try:
image = Image.open(os.path.join(realpath, filename))
+
if image.format == 'PNG':
bg = Image.new("RGB", image.size, "WHITE")
bg.paste(image, (0, 0), image)
image = bg
- width, height = image.size
- factor = 1
- while width / factor > 2 * THUMBNAIL_SIZE[0] and height / factor > 2 * THUMBNAIL_SIZE[1]:
- factor *= 2
- if factor > 1:
- width, height = width / factor, height / factor
- image.thumbnail((width, height), Image.NEAREST)
-
- crop_size = min(width, height)
- box = (
- int((width - crop_size) / 2),
- int((height - crop_size) / 2),
- int((width + crop_size) / 2),
- int((height + crop_size) / 2)
- )
+ image = ImageOps.exif_transpose(image)
- region = image.crop(box)
- region.thumbnail(THUMBNAIL_SIZE, Image.ANTIALIAS)
- region.save(os.path.join(realpath, THUMBNAIL_DIRNAME, filename), "JPEG")
+ if os.path.getsize(os.path.join(realpath, filename)) > (MAX_UNCOMPRESSED_WEIGHT * (10 ** 6)):
+
+ original_size = image.size
+ if original_size[0] > original_size[1] and original_size[0] > COMPRESSED_SIZE[0]:
+ side = int(COMPRESSED_SIZE[0] * original_size[1] / original_size[0])
+ image = image.resize((COMPRESSED_SIZE[0], side), Image.ANTIALIAS)
+ elif original_size[0] <= original_size[1] and original_size[1] > COMPRESSED_SIZE[1]:
+ side = int(COMPRESSED_SIZE[1] * original_size[0] / original_size[1])
+ image = image.resize((side, COMPRESSED_SIZE[1]), Image.ANTIALIAS)
+
+ image.save(os.path.join(realpath, COMPRESSED_DIRNAME, filename), "JPEG", optimize=True, quality=COMPRESSION_QUALITY)
except OSError:
return
@@ -64,7 +113,14 @@ def can_access(path, user=None, email=None):
return access
-def list_entries(realpath, path, user=None, email=None):
+def list_entries(path, user=None, email=None):
+ realpath = getRealPath(path)
+ if not os.path.normpath(realpath).startswith(os.path.join(settings.PHOTO_ROOT, PHOTO_DIRNAME)):
+ raise Http404
+ if not os.path.isdir(realpath):
+ raise Http404
+ if os.path.basename(realpath).startswith('.'):
+ raise Http404
entries = {
'files': [],
'dirs': [],
@@ -72,20 +128,25 @@ def list_entries(realpath, path, user=None, email=None):
for entry in os.scandir(realpath):
if entry.is_dir():
- if entry.name != THUMBNAIL_DIRNAME:
+ if not entry.name.startswith("."):
if can_access(os.path.join(path, entry.name), user, email):
entries['dirs'].append({
'name': entry.name,
'path': os.path.join(path, entry.name),
+ 'hidden': (len(models.AccessPolicy.list(os.path.join(path, entry.name))) == 0)
})
elif entry.is_file():
if os.path.splitext(entry.name)[1].lower() in ALLOWED_IMAGE_EXT:
+ create_thumbnail(realpath, entry.name)
+ create_compressed_image(realpath, entry.name)
+ image = Image.open(os.path.join(os.path.join(realpath, COMPRESSED_DIRNAME), entry.name))
entries['files'].append({
'name': entry.name,
'path': os.path.join(
settings.MEDIA_URL,
PHOTO_DIRNAME,
path,
+ COMPRESSED_DIRNAME,
entry.name
),
'thumbnail': os.path.join(
@@ -95,40 +156,182 @@ def list_entries(realpath, path, user=None, email=None):
THUMBNAIL_DIRNAME,
entry.name
),
+ 'original': os.path.join(
+ settings.MEDIA_URL,
+ PHOTO_DIRNAME,
+ path,
+ entry.name
+ ),
+ 'width': image.size[0],
+ 'height': image.size[1]
})
- create_thumbnail(realpath, entry.name)
-
+ image.close()
return entries
-def browse(request, path):
+def getRealPath(path, dir=True, file=False):
realpath = os.path.join(settings.PHOTO_ROOT, PHOTO_DIRNAME, path)
if not os.path.normpath(realpath).startswith(os.path.join(settings.PHOTO_ROOT, PHOTO_DIRNAME)):
raise Http404
- if not os.path.isdir(realpath):
+ if not file and not os.path.isdir(realpath):
+ raise Http404
+ if not dir and not os.path.isfile(realpath):
raise Http404
if os.path.basename(realpath).startswith('.'):
raise Http404
+ return realpath
+
+
+def buildBreadcrumb(path):
+ path = os.path.normpath(path)
+ folders = path.split(os.sep)
+ uri = ''
+ breadcumb = []
+ if not path == '.':
+ for folder in folders:
+ uri += folder + '/'
+ breadcumb.append({'link': uri, 'folder': folder})
+ return breadcumb
+
+def render_album(request, path) -> HttpResponse:
email = request.session.get('email')
user = request.user if request.user.is_authenticated else None
if path and not can_access(path, user, email):
if user:
- raise Http404
+ messages.error(request, "Vous n\'êtes pas autorisé à visualiser l'album \" " + path + "\".")
+ return redirect('photo:browse', path="")
else:
return redirect('photo:extern_login', next=path)
- entries = list_entries(realpath, path, user, email)
+ entries = list_entries(path, user, email)
context = {
'path': path,
+ 'breadcrumb': buildBreadcrumb(path),
'parent': os.path.normpath(os.path.join(path, '..')),
- 'albums': sorted(entries['dirs'], key=lambda x: x['name'].lower()),
- 'images': entries['files'],
+ 'albums': natsorted(entries['dirs'], key=lambda x: x['name'].lower()),
+ 'images': natsorted(entries['files'], key=lambda x: x['name'].lower()),
}
-
return render(request, 'photo/browse.html', context)
+def add_file(request, path) -> JsonResponse:
+ if not request.user.has_perm('photo.add_files'):
+ return JsonResponse({"status": "error",
+ "message": "L'utilisateur n'a pas la permission d'ajouter des fichiers'",
+ "error": "Permissions insuffisantes"},
+ status=403)
+ try:
+ realpath = getRealPath(path)
+ if os.path.isfile(os.path.join(realpath, request.FILES['file'].name)):
+ messages.add_message(request, messages.ERROR, "Le fichier " + request.FILES['file'].name + " existe déjà")
+ return JsonResponse({"status": "error",
+ "error": "Le fichier " + request.FILES['file'].name + " existe déjà"},
+ status=409)
+ handle_uploaded_file(realpath, request.FILES['file'])
+ return JsonResponse({"thumbnail": os.path.join(
+ settings.MEDIA_URL,
+ PHOTO_DIRNAME,
+ path,
+ THUMBNAIL_DIRNAME,
+ request.FILES['file'].name)}, status=201)
+ except Exception:
+ return JsonResponse({"status": "error", "error": "Erreur inattendue lors de l'ajout de l'image'"},
+ status=500)
+
+
+def create_folder(request, path) -> JsonResponse:
+ if not request.user.has_perm('photo.add_files'):
+ return JsonResponse({"status": "error",
+ "message": "L'utilisateur n'a pas la permission de créer des dossiers",
+ "error": "Permissions insuffisantes"},
+ status=403)
+ folder_name = json.loads(request.read().decode()).get("folder_name").strip()
+ realpath = getRealPath(path)
+
+ if (folder_name is None) or (len(folder_name) == 0) or folder_name.startswith(".") or folder_name.isspace() \
+ or (not folder_name.isprintable() or "/" in folder_name):
+ return JsonResponse({"status": "error", "message": "Le nom du dossier n'est pas correct"}, status=400)
+ folder_path = realpath + folder_name
+ if os.path.isdir(folder_path):
+ return JsonResponse({"status": "error", "message": "Ce dossier existe déjà"}, status=409)
+ if os.path.isfile(folder_path):
+ return JsonResponse({"status": "error", "message": "Un fichier du même nom existe"}, status=409)
+
+ try:
+ os.mkdir(os.path.join(realpath, folder_name))
+ messages.add_message(request, messages.SUCCESS, "Le dossier " + path + folder_name + " a été créé.")
+ return JsonResponse({"status": "success", "message": "Le dossier " + path + folder_name + " a été créé."},
+ status=201)
+ except FileNotFoundError:
+ return JsonResponse({"status": "error", "message": "Le nom du dossier n'est pas correct"}, status=400)
+ except Exception:
+ return JsonResponse({"status": "error", "message": "Erreur inattendue lors de la création du dossier"},
+ status=500)
+
+
+def delete_files(request, path) -> JsonResponse:
+ if not request.user.has_perm('photo.delete_files'):
+ return JsonResponse({"status": "error",
+ "message": "L'utilisateur n'a pas la permission de supprimer des fichiers'",
+ "error": "Permissions insuffisantes"},
+ status=403)
+ if path == "" or path == "/":
+ return JsonResponse(
+ {"status": "error", "message": "Impossible de supprimer la racine"}, status=400)
+ realpath = getRealPath(path, file=True)
+ if os.path.isdir(realpath):
+ for root, dirs, files in os.walk(realpath, topdown=False):
+ for name in files:
+ os.remove(os.path.join(root, name))
+ for name in dirs:
+ os.rmdir(os.path.join(root, name))
+ deleteAllAccessPolicy(path)
+ os.rmdir(realpath)
+ messages.add_message(request, messages.SUCCESS, "Le dossier " + path + " a été supprimé")
+ return JsonResponse(
+ {"status": "success", "message": "Le dossier " + path + " a été supprimé."})
+ elif os.path.isfile(realpath):
+ os.remove(realpath)
+ messages.add_message(request, messages.SUCCESS, "L'image" + path + " a été supprimé")
+ return JsonResponse(
+ {"status": "success", "message": "L'image " + path + " a été supprimé."})
+
+ else:
+ return JsonResponse({"status": "error", "message": "Ce dossier n'existe pas"}, status=404)
+
+
+def browse(request, path) -> HttpResponse:
+ if request.method == 'GET':
+ return render_album(request, path)
+
+ if request.method == "POST":
+ if request.content_type == "multipart/form-data":
+ return add_file(request, path)
+ else:
+ return create_folder(request, path)
+
+ elif request.method == "DELETE":
+ return delete_files(request, path)
+
+ else:
+ return HttpResponseNotAllowed(permitted_methods=["GET", "POST", "DELETE"])
+
+
+def handle_uploaded_file(realpath, file):
+ with open(os.path.join(realpath, file.name), 'wb+') as destination:
+ for chunk in file.chunks():
+ destination.write(chunk)
+ create_thumbnail(realpath, file.name)
+ create_compressed_image(realpath, file.name)
+
+
+def deleteAllAccessPolicy(path):
+ PublicAccess.objects.filter(path__startswith=path).delete()
+ GroupAccess.objects.filter(path__startswith=path).delete()
+ EventAccess.objects.filter(path__startswith=path).delete()
+
+
@permission_required('photo.manage_access_policy')
def permissions(request, path):
form_instances = []
diff --git a/site_des_eleves/settings.py b/site_des_eleves/settings.py
index 539e249f90c568f28951658c9e1fc2442302ec70..600ed1fb1d975dc23f44fc71fb2538894b8f63fc 100644
--- a/site_des_eleves/settings.py
+++ b/site_des_eleves/settings.py
@@ -213,6 +213,8 @@ PERM_WHITELIST = {
],
"photo": [
"manage_access_policy",
+ "add_files",
+ "delete_files"
],
"quotes": [
"manage_prof",
@@ -238,8 +240,12 @@ AUTH_SYNC_ENIBAR_TOKEN = "changeme"
PHOTO_ROOT = MEDIA_ROOT
PHOTO_DIRNAME = "photo"
PHOTO_THUMBNAIL_DIRNAME = ".thumbnails"
+PHOTO_COMPRESSED_DIRNAME = ".compressed"
PHOTO_THUMBNAIL_SIZE = (150, 150)
+PHOTO_COMPRESSED_SIZE = (3840, 2160)
+PHOTO_COMPRESSION_QUALITY = 90
PHOTO_ALLOWED_IMAGE_EXT = [".jpg", ".jpeg", ".png"]
+PHOTO_MAX_UNCOMPRESSED_WEIGHT = 2 # MB
# lydia
PAYMENT_DEBUG = True
diff --git a/static/css/base.css b/static/css/base.css
index 17b7083fb941ea6fc5f7fec3c7f80e1c707ef63b..6864a0fb1111dd9eec7332492e24a8e4d8eaab39 100644
--- a/static/css/base.css
+++ b/static/css/base.css
@@ -8,7 +8,6 @@
* {
-webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
-ms-box-sizing: border-box;
-o-box-sizing: border-box;
box-sizing: border-box;
@@ -26,26 +25,29 @@ body {
padding: 0;
min-height: 100%;
background-color: #FFF;
- display: -webkit-flex;
display: -moz-flex;
display: -ms-flex;
display: -o-flex;
+ display: -webkit-box;
+ display: -ms-flexbox;
display: flex;
- -webkit-flex-flow: row;
- -moz-flex-flow: row;
-ms-flex-flow: row;
-o-flex-flow: row;
- flex-flow: row;
- -webkit-align-items: stretch;
+ -webkit-box-orient: horizontal;
+ -webkit-box-direction: normal;
+ flex-flow: row;
-moz-align-items: stretch;
-ms-align-items: stretch;
-o-align-items: stretch;
- align-items: stretch;
+ -webkit-box-align: stretch;
+ -ms-flex-align: stretch;
+ align-items: stretch;
}
a {
text-decoration: none;
color: #df8a11;
+ -webkit-transition: text-shadow 0.5s;
transition: text-shadow 0.5s;
}
@@ -60,7 +62,10 @@ nav > ul {
@media screen and (max-width: 640px) {
body {
- flex-flow: column;
+ -webkit-box-orient: vertical;
+ -webkit-box-direction: normal;
+ -ms-flex-flow: column;
+ flex-flow: column;
}
}
@@ -76,11 +81,13 @@ button, .button {
border: none;
border-radius: 15px;
color: white;
+ -webkit-transition: background-color 0.5s;
transition: background-color 0.5s;
font-size: 1em;
font-weight: bold;
margin: 5px 2px;
- box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
+ -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
+ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
min-height: 40px !important;
}
@@ -100,33 +107,33 @@ button:hover, .button:hover {
color: white !important;
}
-button[type=button], .button[type=button] {
+button[type=button] button:not(.lg-icon), .button[type=button] button:not(.lg-icon), button[type=button] .button:not(.lg-icon), .button[type=button] .button:not(.lg-icon) {
border-radius: 0;
background-color: white;
color: #333;
- border: 1px solid #bbb;
}
-button[type=button] + button, .button[type=button] + button {
+button[type=button] button:not(.lg-icon) + button, .button[type=button] button:not(.lg-icon) + button, button[type=button] .button:not(.lg-icon) + button, .button[type=button] .button:not(.lg-icon) + button {
border-left: none;
+ -webkit-transition: background-color 0.5s;
transition: background-color 0.5s;
}
-button[type=button]:first-child, .button[type=button]:first-child {
+button[type=button] button:not(.lg-icon):first-child, .button[type=button] button:not(.lg-icon):first-child, button[type=button] .button:not(.lg-icon):first-child, .button[type=button] .button:not(.lg-icon):first-child {
border-top-left-radius: 18px;
border-bottom-left-radius: 18px;
}
-button[type=button]:last-child, .button[type=button]:last-child {
+button[type=button] button:not(.lg-icon):last-child, .button[type=button] button:not(.lg-icon):last-child, button[type=button] .button:not(.lg-icon):last-child, .button[type=button] .button:not(.lg-icon):last-child {
border-top-right-radius: 18px;
border-bottom-right-radius: 18px;
}
-button[type=button]:hover, .button[type=button]:hover {
+button[type=button] button:not(.lg-icon):hover, .button[type=button] button:not(.lg-icon):hover, button[type=button] .button:not(.lg-icon):hover, .button[type=button] .button:not(.lg-icon):hover {
background-color: #eaeaea;
}
-button[type=button]:active, button[type=button].toggled, .button[type=button]:active, .button[type=button].toggled {
+button[type=button] button:not(.lg-icon):active, button[type=button] button:not(.lg-icon).toggled, .button[type=button] button:not(.lg-icon):active, .button[type=button] button:not(.lg-icon).toggled, button[type=button] .button:not(.lg-icon):active, button[type=button] .button:not(.lg-icon).toggled, .button[type=button] .button:not(.lg-icon):active, .button[type=button] .button:not(.lg-icon).toggled {
background-color: #ddd;
}
@@ -135,50 +142,58 @@ form p {
-moz-display: flex;
-ms-display: flex;
-o-display: flex;
+ display: -webkit-box;
display: flex;
- -webkit-flex-flow: row;
- -moz-flex-flow: row;
-ms-flex-flow: row;
-o-flex-flow: row;
- flex-flow: row;
- -webkit-align-items: center;
+ -webkit-box-orient: horizontal;
+ -webkit-box-direction: normal;
+ flex-flow: row;
-moz-align-items: center;
-ms-align-items: center;
-o-align-items: center;
- align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
}
form p label {
- -webkit-flex: 0 1 35%;
-moz-flex: 0 1 35%;
-ms-flex: 0 1 35%;
-o-flex: 0 1 35%;
- flex: 0 1 35%;
+ -webkit-box-flex: 0;
+ flex: 0 1 35%;
min-width: 35%;
+ max-width: 250px;
display: inline-block;
font-weight: bold;
padding-right: 0.5em;
}
+form p input[type=checkbox] {
+ width: 20px;
+}
+
form p input, form p .button, form p textarea {
- -webkit-flex: 1 1 auto;
-moz-flex: 1 1 auto;
-ms-flex: 1 1 auto;
-o-flex: 1 1 auto;
- flex: 1 1 auto;
- min-width: 0;
+ -webkit-box-flex: 1;
+ flex: 1 1 auto;
min-height: 30px;
display: inline-block;
}
form p input:last-of-type, form p .button:last-of-type, form p textarea:last-of-type {
- border-top-right-radius: 15px;
- border-bottom-right-radius: 15px;
+ border-radius: 0 15px 15px 0;
}
form p input:first-of-type, form p .button:first-of-type, form p textarea:first-of-type {
- border-top-left-radius: 15px;
- border-bottom-left-radius: 15px;
+ border-radius: 15px 0 0 15px;
+}
+
+form p input:only-of-type, form p .button:only-of-type, form p textarea:only-of-type {
+ border-radius: 15px;
}
form p input + input, form p .button + input, form p textarea + input {
@@ -197,7 +212,8 @@ form p button, form p .button {
form img {
border-radius: 15px;
- box-shadow: darkgray 3px 3px 10px;
+ -webkit-box-shadow: darkgray 3px 3px 10px;
+ box-shadow: darkgray 3px 3px 10px;
}
form ul {
@@ -206,17 +222,18 @@ form ul {
}
form ul li {
- display: -webkit-flex;
- display: -webkit-flex;
display: -moz-flex;
display: -ms-flex;
display: -o-flex;
+ display: -webkit-box;
+ display: -ms-flexbox;
display: flex;
- -webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-o-align-items: center;
- align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
padding: 0;
}
@@ -225,11 +242,11 @@ form ul li:hover {
}
form ul label {
- -webkit-flex: 1 1 auto;
-moz-flex: 1 1 auto;
-ms-flex: 1 1 auto;
-o-flex: 1 1 auto;
- flex: 1 1 auto;
+ -webkit-box-flex: 1;
+ flex: 1 1 auto;
padding: 0.5em;
display: block;
cursor: pointer;
@@ -251,7 +268,7 @@ form ul input[type=radio] + label {
margin-left: 0;
}
-input, textarea {
+input:not([type=checkbox]), textarea {
padding: 0.25em 0.5em;
border: 1px solid #ccc;
background-color: #eee;
@@ -259,11 +276,11 @@ input, textarea {
border-radius: 15px;
}
-input[type=checkbox], textarea[type=checkbox] {
+input:not([type=checkbox])[type=checkbox], textarea[type=checkbox] {
text-align: start;
}
-input:focus, textarea:focus {
+input:not([type=checkbox]):focus, textarea:focus {
border-color: #FCCD76;
}
@@ -340,11 +357,11 @@ fieldset {
width: 100%;
}
form p {
- -webkit-flex-flow: column;
- -moz-flex-flow: column;
-ms-flex-flow: column;
-o-flex-flow: column;
- flex-flow: column;
+ -webkit-box-orient: vertical;
+ -webkit-box-direction: normal;
+ flex-flow: column;
}
form p label, form p input {
width: 100%;
@@ -352,30 +369,22 @@ fieldset {
}
form p input {
padding: 0.25em 0.5em;
- border-radius: 3px;
+ border-radius: 15px !important;
}
form p input + input {
border-left: 1px solid #ccc;
}
form p input, form p .button, form p label, form p textarea {
- -webkit-flex: 1 1 auto;
-moz-flex: 1 1 auto;
-ms-flex: 1 1 auto;
-o-flex: 1 1 auto;
- flex: 1 1 auto;
+ -webkit-box-flex: 1;
+ flex: 1 1 auto;
display: block;
- border-radius: 3px;
- }
- form p input:last-child, form p .button:last-child, form p label:last-child, form p textarea:last-child {
- border-radius: 15px;
}
form p input + input, form p .button + input, form p label + input, form p textarea + input {
border-left: 1px solid #ccc;
}
- form p label + input, form p label + textarea {
- border-top-left-radius: 15px;
- border-bottom-left-radius: 15px;
- }
form p button, form p .button {
padding: 0.25em 0.5em;
border-radius: 3px;
@@ -408,6 +417,7 @@ table:not(.rd-days) thead th {
table:not(.rd-days) tbody tr {
background-color: #eee;
+ -webkit-transition: background-color 0.25s;
transition: background-color 0.25s;
}
@@ -461,33 +471,37 @@ table:not(.rd-days) .action_cell a:last-child {
-moz-display: flex;
-ms-display: flex;
-o-display: flex;
+ display: -webkit-box;
display: flex;
- -webkit-flex-flow: row;
- -moz-flex-flow: row;
-ms-flex-flow: row;
-o-flex-flow: row;
- flex-flow: row;
- -webkit-align-items: stretch;
+ -webkit-box-orient: horizontal;
+ -webkit-box-direction: normal;
+ flex-flow: row;
-moz-align-items: stretch;
-ms-align-items: stretch;
-o-align-items: stretch;
- align-items: stretch;
+ -webkit-box-align: stretch;
+ -ms-flex-align: stretch;
+ align-items: stretch;
}
.flex_container.center_vertical {
- -webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-o-align-items: center;
- align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
}
.flex_container.start {
- -webkit-align-items: flex-start;
-moz-align-items: flex-start;
-ms-align-items: flex-start;
-o-align-items: flex-start;
- align-items: flex-start;
+ -webkit-box-align: start;
+ -ms-flex-align: start;
+ align-items: flex-start;
}
.right {
@@ -495,36 +509,36 @@ table:not(.rd-days) .action_cell a:last-child {
}
.flex {
- -webkit-flex: 0 1 auto;
-moz-flex: 0 1 auto;
-ms-flex: 0 1 auto;
-o-flex: 0 1 auto;
- flex: 0 1 auto;
+ -webkit-box-flex: 0;
+ flex: 0 1 auto;
}
.flex.expand {
- -webkit-flex: 1 1 auto;
-moz-flex: 1 1 auto;
-ms-flex: 1 1 auto;
-o-flex: 1 1 auto;
- flex: 1 1 auto;
+ -webkit-box-flex: 1;
+ flex: 1 1 auto;
}
.flex.expand30 {
- -webkit-flex: 0 1 30%;
-moz-flex: 0 1 30%;
-ms-flex: 0 1 30%;
-o-flex: 0 1 30%;
- flex: 0 1 30%;
+ -webkit-box-flex: 0;
+ flex: 0 1 30%;
min-width: 30%;
}
.flex.expand50 {
- -webkit-flex: 0 1 50%;
-moz-flex: 0 1 50%;
-ms-flex: 0 1 50%;
-o-flex: 0 1 50%;
- flex: 0 1 50%;
+ -webkit-box-flex: 0;
+ flex: 0 1 50%;
min-width: 50%;
}
@@ -534,20 +548,37 @@ table:not(.rd-days) .action_cell a:last-child {
width: 50px;
height: 50px;
border-radius: 100%;
- animation-duration: 0.5s;
- animation-name: spin;
- animation-iteration-count: infinite;
- animation-timing-function: linear;
+ -webkit-animation-duration: 0.5s;
+ animation-duration: 0.5s;
+ -webkit-animation-name: spin;
+ animation-name: spin;
+ -webkit-animation-iteration-count: infinite;
+ animation-iteration-count: infinite;
+ -webkit-animation-timing-function: linear;
+ animation-timing-function: linear;
border-top: 3px solid #bbb;
border-right: 3px solid transparent;
}
+@-webkit-keyframes spin {
+ from {
+ -webkit-transform: rotate(0);
+ transform: rotate(0);
+ }
+ to {
+ -webkit-transform: rotate(1turn);
+ transform: rotate(1turn);
+ }
+}
+
@keyframes spin {
from {
- transform: rotate(0);
+ -webkit-transform: rotate(0);
+ transform: rotate(0);
}
to {
- transform: rotate(1turn);
+ -webkit-transform: rotate(1turn);
+ transform: rotate(1turn);
}
}
@@ -601,16 +632,18 @@ table:not(.rd-days) .action_cell a:last-child {
}
.toolbar {
- display: -webkit-flex;
display: -moz-flex;
display: -ms-flex;
display: -o-flex;
+ display: -webkit-box;
+ display: -ms-flexbox;
display: flex;
- -webkit-justify-content: flex-end;
-moz-justify-content: flex-end;
-ms-justify-content: flex-end;
-o-justify-content: flex-end;
- justify-content: flex-end;
+ -webkit-box-pack: end;
+ -ms-flex-pack: end;
+ justify-content: flex-end;
text-align: right;
margin-bottom: 1em;
}
@@ -632,6 +665,7 @@ table:not(.rd-days) .action_cell a:last-child {
.toolbar a + a {
border-left: none;
+ -webkit-transition: background-color 0.25s;
transition: background-color 0.25s;
}
@@ -661,16 +695,18 @@ table:not(.rd-days) .action_cell a:last-child {
width: 100%;
text-align: center;
margin: 2em 0;
- display: -webkit-flex;
display: -moz-flex;
display: -ms-flex;
display: -o-flex;
+ display: -webkit-box;
+ display: -ms-flexbox;
display: flex;
- -webkit-justify-content: center;
-moz-justify-content: center;
-ms-justify-content: center;
-o-justify-content: center;
- justify-content: center;
+ -webkit-box-pack: center;
+ -ms-flex-pack: center;
+ justify-content: center;
}
.pagination .page {
@@ -685,6 +721,7 @@ table:not(.rd-days) .action_cell a:last-child {
.pagination .page + .page {
border-left: none;
+ -webkit-transition: background-color 0.25s;
transition: background-color 0.25s;
}
@@ -724,11 +761,11 @@ table:not(.rd-days) .action_cell a:last-child {
}
.announce .details div {
- -webkit-flex: 1 1 50%;
-moz-flex: 1 1 50%;
-ms-flex: 1 1 50%;
-o-flex: 1 1 50%;
- flex: 1 1 50%;
+ -webkit-box-flex: 1;
+ flex: 1 1 50%;
border: 1px solid #eee;
padding: 1em;
}
@@ -764,16 +801,17 @@ table:not(.rd-days) .action_cell a:last-child {
}
#main_container {
- -webkit-flex: 1 1 auto;
-moz-flex: 1 1 auto;
-ms-flex: 1 1 auto;
-o-flex: 1 1 auto;
- flex: 1 1 auto;
- -webkit-order: 2;
+ -webkit-box-flex: 1;
+ flex: 1 1 auto;
-moz-order: 2;
-ms-order: 2;
-o-order: 2;
- order: 2;
+ -webkit-box-ordinal-group: 3;
+ -ms-flex-order: 2;
+ order: 2;
margin-left: 300px;
}
@@ -809,21 +847,23 @@ table:not(.rd-days) .action_cell a:last-child {
-moz-display: flex;
-ms-display: flex;
-o-display: flex;
+ display: -webkit-box;
display: flex;
width: 100%;
}
#main_header li {
- -webkit-flex: 1 1 100%;
-moz-flex: 1 1 100%;
-ms-flex: 1 1 100%;
-o-flex: 1 1 100%;
- flex: 1 1 100%;
+ -webkit-box-flex: 1;
+ flex: 1 1 100%;
-webkit-align-self: stretch;
- -moz-align-self: stretch;
-ms-align-self: stretch;
-o-align-self: stretch;
- align-self: stretch;
+ -ms-flex-item-align: stretch;
+ -ms-grid-row-align: stretch;
+ align-self: stretch;
}
#main_header li:last-child a {
@@ -841,8 +881,13 @@ table:not(.rd-days) .action_cell a:last-child {
}
#main_header a {
+ display: -webkit-box;
+ display: -ms-flexbox;
display: flex;
- flex-direction: column;
+ -webkit-box-orient: vertical;
+ -webkit-box-direction: normal;
+ -ms-flex-direction: column;
+ flex-direction: column;
text-align: center;
width: 100%;
height: 100%;
@@ -852,9 +897,13 @@ table:not(.rd-days) .action_cell a:last-child {
margin: 0 0.5em 0 0;
font-weight: bold;
cursor: pointer;
+ -webkit-transition: background-color 0.25s;
transition: background-color 0.25s;
- justify-content: center;
- align-content: center;
+ -webkit-box-pack: center;
+ -ms-flex-pack: center;
+ justify-content: center;
+ -ms-flex-line-pack: center;
+ align-content: center;
border: solid #df8a11;
border-width: 2px 0 2px 0;
}
@@ -906,16 +955,17 @@ table:not(.rd-days) .action_cell a:last-child {
@media screen and (max-width: 640px) {
#main_container {
max-width: 100%;
- -webkit-flex: 1 1 auto;
-moz-flex: 1 1 auto;
-ms-flex: 1 1 auto;
-o-flex: 1 1 auto;
- flex: 1 1 auto;
- -webkit-order: 3;
+ -webkit-box-flex: 1;
+ flex: 1 1 auto;
-moz-order: 3;
-ms-order: 3;
-o-order: 3;
- order: 3;
+ -webkit-box-ordinal-group: 4;
+ -ms-flex-order: 3;
+ order: 3;
margin-left: 0;
margin-top: 70px;
}
@@ -927,16 +977,17 @@ table:not(.rd-days) .action_cell a:last-child {
#nav_container {
width: 300px;
height: 100%;
- -webkit-flex: 0 1 300px;
-moz-flex: 0 1 300px;
-ms-flex: 0 1 300px;
-o-flex: 0 1 300px;
- flex: 0 1 300px;
- -webkit-order: 1;
+ -webkit-box-flex: 0;
+ flex: 0 1 300px;
-moz-order: 1;
-ms-order: 1;
-o-order: 1;
- order: 1;
+ -webkit-box-ordinal-group: 2;
+ -ms-flex-order: 1;
+ order: 1;
background-color: #333;
padding: 0 1.2em;
display: block;
@@ -961,31 +1012,34 @@ table:not(.rd-days) .action_cell a:last-child {
-moz-display: flex;
-ms-display: flex;
-o-display: flex;
+ display: -webkit-box;
display: flex;
- -webkit-flex-flow: row;
- -moz-flex-flow: row;
-ms-flex-flow: row;
-o-flex-flow: row;
- flex-flow: row;
- -webkit-justify-content: center;
+ -webkit-box-orient: horizontal;
+ -webkit-box-direction: normal;
+ flex-flow: row;
-moz-justify-content: center;
-ms-justify-content: center;
-o-justify-content: center;
- justify-content: center;
- -webkit-align-items: center;
+ -webkit-box-pack: center;
+ -ms-flex-pack: center;
+ justify-content: center;
-moz-align-items: center;
-ms-align-items: center;
-o-align-items: center;
- align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
height: auto;
}
#nav_container header div {
- -webkit-flex: 1 1 auto;
-moz-flex: 1 1 auto;
-ms-flex: 1 1 auto;
-o-flex: 1 1 auto;
- flex: 1 1 auto;
+ -webkit-box-flex: 1;
+ flex: 1 1 auto;
margin-top: 1em;
}
@@ -1004,6 +1058,7 @@ table:not(.rd-days) .action_cell a:last-child {
color: white;
margin: 0 0.5em;
text-shadow: 0 0 10px transparent;
+ -webkit-transition: color 0.5s, text-shadow;
transition: color 0.5s, text-shadow;
}
@@ -1017,6 +1072,7 @@ table:not(.rd-days) .action_cell a:last-child {
padding: 0.5em 1em 0.5em 1.75em;
width: 100%;
color: #CCC;
+ -webkit-transition: background-color 0.25s;
transition: background-color 0.25s;
}
@@ -1036,6 +1092,7 @@ table:not(.rd-days) .action_cell a:last-child {
#nav_container main nav a:hover, #nav_container main nav a.selected {
background-color: #2a2a2a;
+ -webkit-transition: background-color 0.5s;
transition: background-color 0.5s;
}
@@ -1046,6 +1103,7 @@ table:not(.rd-days) .action_cell a:last-child {
border-radius: 18px;
margin: 5px 0;
background-color: transparent;
+ -webkit-transition: background-color 0.5s;
transition: background-color 0.5s;
}
@@ -1059,15 +1117,8 @@ table:not(.rd-days) .action_cell a:last-child {
.avatar {
width: 60px;
height: 60px;
- -webkit-border-radius: 60px;
- -moz-border-radius: 60px;
- -ms-border-radius: 60px;
- -o-border-radius: 60px;
border-radius: 60px;
- -webkit-background-clip: padding-box;
- -moz-background-clip: padding-box;
-ms-background-clip: padding-box;
- -o-background-clip: padding-box;
background-clip: padding-box;
margin: 0 auto;
float: left;
@@ -1138,6 +1189,7 @@ table:not(.rd-days) .action_cell a:last-child {
border-radius: 36px;
margin: 5px 0;
background-color: transparent;
+ -webkit-transition: background-color 0.5s;
transition: background-color 0.5s;
}
@@ -1148,22 +1200,22 @@ table:not(.rd-days) .action_cell a:last-child {
@media screen and (max-width: 1280px) {
#nav_container {
width: 200px;
- -webkit-flex: 0 1 200px;
-moz-flex: 0 1 200px;
-ms-flex: 0 1 200px;
-o-flex: 0 1 200px;
- flex: 0 1 200px;
+ -webkit-box-flex: 0;
+ flex: 0 1 200px;
padding: 0.75em;
}
#nav_container #logo {
padding: 0 15px;
}
#nav_container header {
- -webkit-flex-flow: column;
- -moz-flex-flow: column;
-ms-flex-flow: column;
-o-flex-flow: column;
- flex-flow: column;
+ -webkit-box-orient: vertical;
+ -webkit-box-direction: normal;
+ flex-flow: column;
text-align: center;
}
#nav_container header nav ul li {
@@ -1173,16 +1225,17 @@ table:not(.rd-days) .action_cell a:last-child {
@media screen and (max-width: 640px) {
#nav_container {
- -webkit-flex: 1 1 auto;
-moz-flex: 1 1 auto;
-ms-flex: 1 1 auto;
-o-flex: 1 1 auto;
- flex: 1 1 auto;
- -webkit-order: 1;
+ -webkit-box-flex: 1;
+ flex: 1 1 auto;
-moz-order: 1;
-ms-order: 1;
-o-order: 1;
- order: 1;
+ -webkit-box-ordinal-group: 2;
+ -ms-flex-order: 1;
+ order: 1;
height: 70px;
position: fixed;
width: 100%;
@@ -1194,8 +1247,13 @@ table:not(.rd-days) .action_cell a:last-child {
padding: 0;
}
#menuToggle {
+ display: -webkit-box;
+ display: -ms-flexbox;
display: flex;
- flex-direction: column;
+ -webkit-box-orient: vertical;
+ -webkit-box-direction: normal;
+ -ms-flex-direction: column;
+ flex-direction: column;
position: fixed;
top: 28px;
left: 20px;
@@ -1203,6 +1261,8 @@ table:not(.rd-days) .action_cell a:last-child {
z-index: 2;
}
#menuToggle .menu {
+ display: -webkit-box;
+ display: -ms-flexbox;
display: flex;
width: 29px;
height: 2px;
@@ -1212,16 +1272,24 @@ table:not(.rd-days) .action_cell a:last-child {
z-index: 1;
background: white;
border-radius: 3px;
- transform-origin: 5px 0;
+ -webkit-transform-origin: 5px 0;
+ transform-origin: 5px 0;
+ -webkit-transition: background 0.5s cubic-bezier(0.77, 0.2, 0.05, 1), opacity 0.55s ease, -webkit-transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1);
+ transition: background 0.5s cubic-bezier(0.77, 0.2, 0.05, 1), opacity 0.55s ease, -webkit-transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1);
transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1), background 0.5s cubic-bezier(0.77, 0.2, 0.05, 1), opacity 0.55s ease;
+ transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1), background 0.5s cubic-bezier(0.77, 0.2, 0.05, 1), opacity 0.55s ease, -webkit-transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1);
}
#menuToggle .menu:first-child {
- transform-origin: 0 0;
+ -webkit-transform-origin: 0 0;
+ transform-origin: 0 0;
}
#menuToggle .menu:nth-last-child(2) {
- transform-origin: 0 100%;
+ -webkit-transform-origin: 0 100%;
+ transform-origin: 0 100%;
}
#menuToggle .checkbox {
+ display: -webkit-box;
+ display: -ms-flexbox;
display: flex;
height: 70px;
width: 100px;
@@ -1233,8 +1301,10 @@ table:not(.rd-days) .action_cell a:last-child {
z-index: 2;
}
#menuToggle .checkbox:checked ~ main {
- transform: none;
- box-shadow: 5px 10px 10px #2a2a2a;
+ -webkit-transform: none;
+ transform: none;
+ -webkit-box-shadow: 5px 10px 10px #2a2a2a;
+ box-shadow: 5px 10px 10px #2a2a2a;
z-index: 2;
}
#menuToggle main {
@@ -1250,15 +1320,21 @@ table:not(.rd-days) .action_cell a:last-child {
padding: 20px;
padding-top: 10px;
background-color: #333;
- box-shadow: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
-webkit-font-smoothing: antialiased;
-moz-font-smoothing: antialiased;
-ms-font-smoothing: antialiased;
-o-font-smoothing: antialiased;
font-smoothing: antialiased;
- transform-origin: 0 0;
- transform: translate(-100%, 0);
+ -webkit-transform-origin: 0 0;
+ transform-origin: 0 0;
+ -webkit-transform: translate(-100%, 0);
+ transform: translate(-100%, 0);
+ -webkit-transition: -webkit-transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1);
+ transition: -webkit-transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1);
transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1);
+ transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1), -webkit-transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1);
overflow-y: scroll;
scrollbar-width: none;
-webkit-overflow-style: none;
@@ -1272,15 +1348,18 @@ table:not(.rd-days) .action_cell a:last-child {
}
.checkbox:checked ~ .menu {
opacity: 1;
- transform: rotate(45deg) translate(-3px, -1px);
+ -webkit-transform: rotate(45deg) translate(-3px, -1px);
+ transform: rotate(45deg) translate(-3px, -1px);
background: white;
}
.checkbox:checked ~ .menu:nth-last-child(3) {
opacity: 0;
- transform: rotate(0deg) scale(0.2, 0.2);
+ -webkit-transform: rotate(0deg) scale(0.2, 0.2);
+ transform: rotate(0deg) scale(0.2, 0.2);
}
.checkbox:checked ~ .menu:nth-last-child(2) {
- transform: rotate(-45deg) translate(0, -1px);
+ -webkit-transform: rotate(-45deg) translate(0, -1px);
+ transform: rotate(-45deg) translate(0, -1px);
}
.site_nav {
padding-bottom: 0;
@@ -1294,16 +1373,17 @@ table:not(.rd-days) .action_cell a:last-child {
#user_container {
min-width: 225px;
- -webkit-flex: 0 1 225px;
-moz-flex: 0 1 225px;
-ms-flex: 0 1 225px;
-o-flex: 0 1 225px;
- flex: 0 1 225px;
- -webkit-order: 3;
+ -webkit-box-flex: 0;
+ flex: 0 1 225px;
-moz-order: 3;
-ms-order: 3;
-o-order: 3;
- order: 3;
+ -webkit-box-ordinal-group: 4;
+ -ms-flex-order: 3;
+ order: 3;
background-color: #f2f2f2;
padding: 1em;
border: 3px solid #f2f2f2;
@@ -1322,7 +1402,8 @@ table:not(.rd-days) .action_cell a:last-child {
background-color: #e2e2e2;
color: #bbb;
margin: -1em;
- padding: 0.5emF;
+ padding: 0.5em;
+ -webkit-transition: background-color 0.25s, color 0.25s;
transition: background-color 0.25s, color 0.25s;
cursor: pointer;
position: fixed;
@@ -1371,6 +1452,7 @@ table:not(.rd-days) .action_cell a:last-child {
padding: 0.5em 1em;
cursor: pointer;
margin: 0.75em 0;
+ -webkit-transition: background-color 0.25s;
transition: background-color 0.25s;
color: white;
}
@@ -1399,6 +1481,7 @@ table:not(.rd-days) .action_cell a:last-child {
color: white;
border-radius: 4px;
padding: 0.5em;
+ -webkit-transition: background-color 0.25s;
transition: background-color 0.25s;
}
@@ -1413,11 +1496,11 @@ table:not(.rd-days) .action_cell a:last-child {
}
.retracted #user_container {
- -webkit-flex: 0 1 50px;
-moz-flex: 0 1 50px;
-ms-flex: 0 1 50px;
-o-flex: 0 1 50px;
- flex: 0 1 50px;
+ -webkit-box-flex: 0;
+ flex: 0 1 50px;
min-width: 50px;
padding: 0.5em;
}
@@ -1457,16 +1540,17 @@ table:not(.rd-days) .action_cell a:last-child {
display: none;
}
.retracted #user_container {
- -webkit-flex: 1 1 auto;
-moz-flex: 1 1 auto;
-ms-flex: 1 1 auto;
-o-flex: 1 1 auto;
- flex: 1 1 auto;
- -webkit-order: 2;
+ -webkit-box-flex: 1;
+ flex: 1 1 auto;
-moz-order: 2;
-ms-order: 2;
-o-order: 2;
- order: 2;
+ -webkit-box-ordinal-group: 3;
+ -ms-flex-order: 2;
+ order: 2;
}
.retracted #user_container header {
margin: 1em 2em;
@@ -1475,17 +1559,17 @@ table:not(.rd-days) .action_cell a:last-child {
display: none;
}
.retracted #user_container ul {
- display: -webkit-flex;
- display: -webkit-flex;
display: -moz-flex;
display: -ms-flex;
display: -o-flex;
+ display: -webkit-box;
+ display: -ms-flexbox;
display: flex;
- -webkit-justify-content: space-around;
-moz-justify-content: space-around;
-ms-justify-content: space-around;
-o-justify-content: space-around;
- justify-content: space-around;
+ -ms-flex-pack: distribute;
+ justify-content: space-around;
}
.retracted #user_container ul a {
padding: 1em 2em;
@@ -1502,7 +1586,8 @@ table:not(.rd-days) .action_cell a:last-child {
vertical-align: middle;
position: relative;
left: 50%;
- transform: translate(-50%, 0);
+ -webkit-transform: translate(-50%, 0);
+ transform: translate(-50%, 0);
}
.userlist li {
@@ -1510,17 +1595,19 @@ table:not(.rd-days) .action_cell a:last-child {
-moz-display: flex;
-ms-display: flex;
-o-display: flex;
+ display: -webkit-box;
display: flex;
- -webkit-flex-flow: row;
- -moz-flex-flow: row;
-ms-flex-flow: row;
-o-flex-flow: row;
- flex-flow: row;
- -webkit-align-items: center;
+ -webkit-box-orient: horizontal;
+ -webkit-box-direction: normal;
+ flex-flow: row;
-moz-align-items: center;
-ms-align-items: center;
-o-align-items: center;
- align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
color: #333;
height: 50px;
border-radius: 50px;
@@ -1536,11 +1623,11 @@ table:not(.rd-days) .action_cell a:last-child {
}
.userlist li div:nth-child(2) {
- -webkit-flex: 1 1 auto;
-moz-flex: 1 1 auto;
-ms-flex: 1 1 auto;
-o-flex: 1 1 auto;
- flex: 1 1 auto;
+ -webkit-box-flex: 1;
+ flex: 1 1 auto;
}
.userlist li div:last-child {
@@ -1558,6 +1645,7 @@ table:not(.rd-days) .action_cell a:last-child {
.userlist li button + button {
border-left: none;
+ -webkit-transition: background-color 0.25s;
transition: background-color 0.25s;
}
@@ -1581,11 +1669,11 @@ table:not(.rd-days) .action_cell a:last-child {
}
.picture_container, .icon_container {
- -webkit-flex: 0 1 50px;
-moz-flex: 0 1 50px;
-ms-flex: 0 1 50px;
-o-flex: 0 1 50px;
- flex: 0 1 50px;
+ -webkit-box-flex: 0;
+ flex: 0 1 50px;
width: 50px;
height: 50px;
min-width: 50px;
@@ -1619,7 +1707,8 @@ table:not(.rd-days) .action_cell a:last-child {
height: auto;
padding: 1em;
text-align: center;
- box-shadow: lightgray 0px 2px 8px;
+ -webkit-box-shadow: lightgray 0px 2px 8px;
+ box-shadow: lightgray 0px 2px 8px;
margin-bottom: 15px;
border-radius: 15px;
border-bottom: 1px solid #ddd;
@@ -1635,6 +1724,15 @@ table:not(.rd-days) .action_cell a:last-child {
}
}
+@-webkit-keyframes fadeIn {
+ 0% {
+ opacity: 0;
+ }
+ 100% {
+ opacity: 1;
+ }
+}
+
@keyframes fadeIn {
0% {
opacity: 0;
@@ -1644,7 +1742,7 @@ table:not(.rd-days) .action_cell a:last-child {
}
}
-.popup, .permission_popup, .selection_popup, .user_selection_popup, .customization_popup {
+.popup, .customization_popup, .selection_popup, .user_selection_popup, .permission_popup {
background-color: rgba(0, 0, 0, 0.5);
width: 100%;
height: 100%;
@@ -1652,13 +1750,16 @@ table:not(.rd-days) .action_cell a:last-child {
z-index: 10;
display: none;
padding: 2em;
- animation-name: fadeIn;
- animation-duration: 0.5s;
+ -webkit-animation-name: fadeIn;
+ animation-name: fadeIn;
+ -webkit-animation-duration: 0.5s;
+ animation-duration: 0.5s;
}
-.popup > div, .permission_popup > div, .selection_popup > div, .user_selection_popup > div, .customization_popup > div {
+.popup > div, .customization_popup > div, .selection_popup > div, .user_selection_popup > div, .permission_popup > div {
background-color: white;
- box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
+ -webkit-box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
+ box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
min-width: 100px;
min-height: 100px;
max-height: 100%;
@@ -1666,41 +1767,46 @@ table:not(.rd-days) .action_cell a:last-child {
border-radius: 18px;
}
-.popup.pop, .pop.permission_popup, .pop.selection_popup, .pop.user_selection_popup, .pop.customization_popup {
+.popup.pop, .pop.customization_popup, .pop.selection_popup, .pop.user_selection_popup, .pop.permission_popup {
-webkit-display: flex;
-moz-display: flex;
-ms-display: flex;
-o-display: flex;
+ display: -webkit-box;
display: flex;
- -webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-o-align-items: center;
- align-items: center;
- -webkit-justify-content: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
-moz-justify-content: center;
-ms-justify-content: center;
-o-justify-content: center;
- justify-content: center;
+ -webkit-box-pack: center;
+ -ms-flex-pack: center;
+ justify-content: center;
}
-.popup header, .permission_popup header, .selection_popup header, .user_selection_popup header, .customization_popup header {
+.popup header, .customization_popup header, .selection_popup header, .user_selection_popup header, .permission_popup header {
background-color: white;
border-bottom: 1px solid #e2e2e2;
-webkit-display: flex;
-moz-display: flex;
-ms-display: flex;
-o-display: flex;
+ display: -webkit-box;
display: flex;
- -webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-o-align-items: center;
- align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
padding: 0;
}
-.popup header button, .permission_popup header button, .selection_popup header button, .user_selection_popup header button, .customization_popup header button {
+.popup header button, .customization_popup header button, .selection_popup header button, .user_selection_popup header button, .permission_popup header button {
margin: 0;
padding: 0.8em;
background: none;
@@ -1709,26 +1815,27 @@ table:not(.rd-days) .action_cell a:last-child {
border-radius: 0 !important;
font-size: 1.2em;
background-color: white;
- box-shadow: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
}
-.popup header button:hover, .permission_popup header button:hover, .selection_popup header button:hover, .user_selection_popup header button:hover, .customization_popup header button:hover {
+.popup header button:hover, .customization_popup header button:hover, .selection_popup header button:hover, .user_selection_popup header button:hover, .permission_popup header button:hover {
color: red !important;
}
-.popup header h1, .permission_popup header h1, .selection_popup header h1, .user_selection_popup header h1, .customization_popup header h1 {
+.popup header h1, .customization_popup header h1, .selection_popup header h1, .user_selection_popup header h1, .permission_popup header h1 {
font-size: 1.2em;
color: #aaa;
margin: 0;
padding: 0.8em;
- -webkit-flex: 1 1 auto;
-moz-flex: 1 1 auto;
-ms-flex: 1 1 auto;
-o-flex: 1 1 auto;
- flex: 1 1 auto;
+ -webkit-box-flex: 1;
+ flex: 1 1 auto;
}
-.popup main, .permission_popup main, .selection_popup main, .user_selection_popup main, .customization_popup main {
+.popup main, .customization_popup main, .selection_popup main, .user_selection_popup main, .permission_popup main {
padding: 1em;
background-color: white;
max-height: 100%;
@@ -1848,6 +1955,7 @@ table:not(.rd-days) .action_cell a:last-child {
-moz-display: flex;
-ms-display: flex;
-o-display: flex;
+ display: -webkit-box;
display: flex;
}
@@ -1862,7 +1970,8 @@ table:not(.rd-days) .action_cell a:last-child {
font-size: 2em;
text-align: center;
background: rgba(0, 0, 0, 0.1);
- box-shadow: rgba(0, 0, 0, 0.25);
+ -webkit-box-shadow: rgba(0, 0, 0, 0.25);
+ box-shadow: rgba(0, 0, 0, 0.25);
border-width: 0;
margin: 0;
}
@@ -1881,26 +1990,28 @@ table:not(.rd-days) .action_cell a:last-child {
-moz-display: flex;
-ms-display: flex;
-o-display: flex;
+ display: -webkit-box;
display: flex;
- -webkit-flex-flow: row;
- -moz-flex-flow: row;
-ms-flex-flow: row;
-o-flex-flow: row;
- flex-flow: row;
- -webkit-align-items: stretch;
+ -webkit-box-orient: horizontal;
+ -webkit-box-direction: normal;
+ flex-flow: row;
-moz-align-items: stretch;
-ms-align-items: stretch;
-o-align-items: stretch;
- align-items: stretch;
+ -webkit-box-align: stretch;
+ -ms-flex-align: stretch;
+ align-items: stretch;
margin-bottom: 2em;
}
.event div:nth-child(1) {
- -webkit-flex: 0 1 11.5em;
-moz-flex: 0 1 11.5em;
-ms-flex: 0 1 11.5em;
-o-flex: 0 1 11.5em;
- flex: 0 1 11.5em;
+ -webkit-box-flex: 0;
+ flex: 0 1 11.5em;
min-width: 11.5em;
height: 11.5em;
overflow: hidden;
@@ -1913,16 +2024,17 @@ table:not(.rd-days) .action_cell a:last-child {
position: relative;
top: 50%;
left: 50%;
- transform: translate(-50%, -50%);
+ -webkit-transform: translate(-50%, -50%);
+ transform: translate(-50%, -50%);
border-radius: 30px;
}
.event div:nth-child(2) {
- -webkit-flex: 1 1 auto;
-moz-flex: 1 1 auto;
-ms-flex: 1 1 auto;
-o-flex: 1 1 auto;
- flex: 1 1 auto;
+ -webkit-box-flex: 1;
+ flex: 1 1 auto;
}
.event div:nth-child(2) main p {
@@ -1956,11 +2068,11 @@ table:not(.rd-days) .action_cell a:last-child {
}
.event div:nth-child(3) {
- -webkit-flex: 0 1 200px;
-moz-flex: 0 1 200px;
-ms-flex: 0 1 200px;
-o-flex: 0 1 200px;
- flex: 0 1 200px;
+ -webkit-box-flex: 0;
+ flex: 0 1 200px;
min-width: 200px;
text-align: center;
padding: 1em;
@@ -2026,16 +2138,17 @@ table:not(.rd-days) .action_cell a:last-child {
-moz-display: flex;
-ms-display: flex;
-o-display: flex;
+ display: -webkit-box;
display: flex;
border-bottom: 1px solid #eee;
}
.comment header hgroup {
- -webkit-flex: 1 1 auto;
-moz-flex: 1 1 auto;
-ms-flex: 1 1 auto;
-o-flex: 1 1 auto;
- flex: 1 1 auto;
+ -webkit-box-flex: 1;
+ flex: 1 1 auto;
}
.comment header h4, .comment header h5 {
@@ -2047,11 +2160,11 @@ table:not(.rd-days) .action_cell a:last-child {
}
.comment .profile_picture_container {
- -webkit-flex: 0 1 150px;
-moz-flex: 0 1 150px;
-ms-flex: 0 1 150px;
-o-flex: 0 1 150px;
- flex: 0 1 150px;
+ -webkit-box-flex: 0;
+ flex: 0 1 150px;
min-width: 150px;
max-width: 150px;
}
@@ -2063,7 +2176,9 @@ table:not(.rd-days) .action_cell a:last-child {
.comment .status {
border-radius: 3px;
- align-self: center;
+ -ms-flex-item-align: center;
+ -ms-grid-row-align: center;
+ align-self: center;
display: inline-block;
padding: 0.5em 1em;
font-weight: bold;
@@ -2104,11 +2219,11 @@ table:not(.rd-days) .action_cell a:last-child {
}
.comment div:first-child {
- -webkit-flex: 1 1 auto;
-moz-flex: 1 1 auto;
-ms-flex: 1 1 auto;
-o-flex: 1 1 auto;
- flex: 1 1 auto;
+ -webkit-box-flex: 1;
+ flex: 1 1 auto;
}
.welcome {
@@ -2156,6 +2271,7 @@ table:not(.rd-days) .action_cell a:last-child {
.news img {
max-width: 100%;
+ max-height: 600px;
}
.notification {
@@ -2175,20 +2291,22 @@ table:not(.rd-days) .action_cell a:last-child {
-moz-display: flex;
-ms-display: flex;
-o-display: flex;
+ display: -webkit-box;
display: flex;
- -webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-o-align-items: center;
- align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
}
.notification h2 span:first-child {
- -webkit-flex: 1 1 auto;
-moz-flex: 1 1 auto;
-ms-flex: 1 1 auto;
-o-flex: 1 1 auto;
- flex: 1 1 auto;
+ -webkit-box-flex: 1;
+ flex: 1 1 auto;
}
.notification h2 button {
@@ -2207,9 +2325,27 @@ table:not(.rd-days) .action_cell a:last-child {
#new_notification {
position: relative;
color: orange;
- animation-name: notify_blink;
- animation-duration: 2s;
- animation-iteration-count: infinite;
+ -webkit-animation-name: notify_blink;
+ animation-name: notify_blink;
+ -webkit-animation-duration: 2s;
+ animation-duration: 2s;
+ -webkit-animation-iteration-count: infinite;
+ animation-iteration-count: infinite;
+}
+
+@-webkit-keyframes notify_blink {
+ 0% {
+ color: white;
+ text-shadow: 0 0 10px #333;
+ }
+ 50% {
+ color: orange;
+ text-shadow: 0 0 10px orange;
+ }
+ 100% {
+ color: white;
+ text-shadow: 0 0 10px #333;
+ }
}
@keyframes notify_blink {
@@ -2236,6 +2372,15 @@ table:not(.rd-days) .action_cell a:last-child {
margin-left: 0.5em;
}
+@-webkit-keyframes slideDown {
+ from {
+ height: 0;
+ }
+ to {
+ height: auto;
+ }
+}
+
@keyframes slideDown {
from {
height: 0;
@@ -2246,6 +2391,7 @@ table:not(.rd-days) .action_cell a:last-child {
}
#messages {
+ position: -webkit-sticky;
position: sticky;
top: 0;
z-index: 2;
@@ -2262,10 +2408,14 @@ table:not(.rd-days) .action_cell a:last-child {
padding: 1em 2em;
font-weight: bold;
color: white;
- animation-delay: 0.2s;
- animation-timing-function: ease-out;
- animation-duration: 5s;
- animation-iteration-count: 1;
+ -webkit-animation-delay: 0.2s;
+ animation-delay: 0.2s;
+ -webkit-animation-timing-function: ease-out;
+ animation-timing-function: ease-out;
+ -webkit-animation-duration: 5s;
+ animation-duration: 5s;
+ -webkit-animation-iteration-count: 1;
+ animation-iteration-count: 1;
}
.message i {
@@ -2317,40 +2467,42 @@ table:not(.rd-days) .action_cell a:last-child {
background-color: white;
padding: 0.5em;
border-radius: 5px;
- box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
+ -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
}
.cal .cal_title {
- display: -webkit-flex;
- display: -webkit-flex;
display: -moz-flex;
display: -ms-flex;
display: -o-flex;
+ display: -webkit-box;
+ display: -ms-flexbox;
display: flex;
- -webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-o-align-items: center;
- align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
text-align: center;
padding: 0.5em 0 1em 0;
border-bottom: 1px solid #eee;
}
.cal .cal_title span {
- -webkit-flex: 1 1 auto;
-moz-flex: 1 1 auto;
-ms-flex: 1 1 auto;
-o-flex: 1 1 auto;
- flex: 1 1 auto;
+ -webkit-box-flex: 1;
+ flex: 1 1 auto;
}
.cal .cal_title input {
- -webkit-flex: 0 1 auto;
-moz-flex: 0 1 auto;
-ms-flex: 0 1 auto;
-o-flex: 0 1 auto;
- flex: 0 1 auto;
+ -webkit-box-flex: 0;
+ flex: 0 1 auto;
background-color: white;
border: none;
width: 4em;
@@ -2440,6 +2592,79 @@ table:not(.rd-days) .action_cell a:last-child {
display: inline-block;
}
+.lg-icon {
+ border-radius: 25px !important;
+ margin: 5px !important;
+ display: -webkit-box;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-box-pack: center;
+ -ms-flex-pack: center;
+ justify-content: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+ background-color: rgba(0, 0, 0, 0.3) !important;
+}
+
+#lg-next-1 #lg-prev-1 {
+ border: 0 !important;
+ color: white !important;
+}
+
+.lg-icon:hover {
+ color: white !important;
+ background-color: rgba(0, 0, 0, 0.7) !important;
+}
+
+.lg-outer .lg-thumb-item.active, .lg-outer .lg-thumb-item:hover {
+ border-color: #df8a11 !important;
+}
+
+.lg-progress-bar .lg-progress {
+ background-color: #df8a11 !important;
+}
+
+#upload-dropzone {
+ margin: 15px 0;
+ padding: 10px 10px 50px 10px;
+ border-color: #df8a11;
+ border-radius: 15px;
+ background-color: #f1e9dc;
+}
+
+#upload-dropzone .dz-actions {
+ position: absolute;
+ bottom: 5px;
+}
+
+#upload-dropzone button {
+ border-radius: 15px;
+ padding: 5px;
+}
+
+.dropzone .dz-preview.dz-image-preview {
+ background: transparent !important;
+}
+
+.dz-message .dz-button {
+ background-color: white !important;
+}
+
+.dz-message .dz-button:hover {
+ color: #df8a11 !important;
+}
+
+#spinner {
+ display: block;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+#breadcrumb span .fa-chevron-right {
+ color: #9e9b9b;
+}
+
#note_container {
text-align: center;
font-weight: lighter;
@@ -2511,18 +2736,28 @@ table:not(.rd-days) .action_cell a:last-child {
}
.product_list {
+ display: -ms-grid;
display: grid;
grid-gap: 20px;
- grid-template-columns: repeat(auto-fill, minmax(250px, auto));
+ -ms-grid-columns: (minmax(250px, auto))[auto-fill];
+ grid-template-columns: repeat(auto-fill, minmax(250px, auto));
text-align: center;
}
.product_list .product_infos {
height: 100px;
+ display: -webkit-box;
+ display: -ms-flexbox;
display: flex;
- flex-direction: column;
- justify-content: center;
- align-content: center;
+ -webkit-box-orient: vertical;
+ -webkit-box-direction: normal;
+ -ms-flex-direction: column;
+ flex-direction: column;
+ -webkit-box-pack: center;
+ -ms-flex-pack: center;
+ justify-content: center;
+ -ms-flex-line-pack: center;
+ align-content: center;
padding: 5px 0;
}
@@ -2532,7 +2767,8 @@ table:not(.rd-days) .action_cell a:last-child {
.product_list .product_container {
border-radius: 15px;
- box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
+ -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
+ box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
-webkit-transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}
@@ -2546,7 +2782,8 @@ table:not(.rd-days) .action_cell a:last-child {
left: 0;
width: 100%;
height: 100%;
- box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
+ -webkit-box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
+ box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
opacity: 0;
-webkit-transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
@@ -2566,7 +2803,8 @@ table:not(.rd-days) .action_cell a:last-child {
border-radius: 15px;
background-size: cover;
background-position: center center;
- box-shadow: lightgray 0 3px 5px;
+ -webkit-box-shadow: lightgray 0 3px 5px;
+ box-shadow: lightgray 0 3px 5px;
}
.product_list .product_title {
@@ -2594,21 +2832,34 @@ table:not(.rd-days) .action_cell a:last-child {
}
.item-manage-list > article {
+ display: -webkit-box;
+ display: -ms-flexbox;
display: flex;
- flex-wrap: wrap;
- flex-direction: row;
+ -ms-flex-wrap: wrap;
+ flex-wrap: wrap;
+ -webkit-box-orient: horizontal;
+ -webkit-box-direction: normal;
+ -ms-flex-direction: row;
+ flex-direction: row;
margin: 10px 0;
padding: 10px;
- align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
border: 1px solid #eee;
border-radius: 15px;
- box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
- justify-content: flex-end;
+ -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
+ box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
+ -webkit-box-pack: end;
+ -ms-flex-pack: end;
+ justify-content: flex-end;
}
.item-manage-list h2 {
font-size: 1em;
- flex: 1 1 auto;
+ -webkit-box-flex: 1;
+ -ms-flex: 1 1 auto;
+ flex: 1 1 auto;
min-width: 180px;
}
@@ -2631,7 +2882,8 @@ table:not(.rd-days) .action_cell a:last-child {
border: #df8a11 1px solid;
background-color: white;
color: #df8a11;
- align-content: center;
+ -ms-flex-line-pack: center;
+ align-content: center;
padding: 8px;
margin: 5px;
}
@@ -2641,10 +2893,18 @@ table:not(.rd-days) .action_cell a:last-child {
}
.delivery form {
- align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+ display: -webkit-box;
+ display: -ms-flexbox;
display: flex;
- flex-wrap: wrap;
- flex-direction: row;
+ -ms-flex-wrap: wrap;
+ flex-wrap: wrap;
+ -webkit-box-orient: horizontal;
+ -webkit-box-direction: normal;
+ -ms-flex-direction: row;
+ flex-direction: row;
margin-bottom: 5px;
}
@@ -2704,7 +2964,9 @@ table:not(.rd-days) .action_cell a:last-child {
}
#basket_item_list .options > p {
- align-self: start;
+ -ms-flex-item-align: start;
+ -ms-grid-row-align: start;
+ align-self: start;
margin: 5px 0;
}
@@ -2736,6 +2998,8 @@ table:not(.rd-days) .action_cell a:last-child {
}
#basket_item_list #buttonswrap {
+ width: -webkit-max-content;
+ width: -moz-max-content;
width: max-content;
float: right;
margin: 20px;
@@ -2756,6 +3020,11 @@ table:not(.rd-days) .action_cell a:last-child {
color: #771100;
}
+#basket_item_list input:-moz-read-only, #basket_item_list input:-moz-read-only {
+ background: #ddd;
+ pointer-events: none;
+}
+
#basket_item_list input:read-only, #basket_item_list input:-moz-read-only {
background: #ddd;
pointer-events: none;
@@ -2777,21 +3046,28 @@ table:not(.rd-days) .action_cell a:last-child {
.item-sell-list li {
grid-column: 1/-1;
- grid-template-columns: 30% auto auto min-content;
- align-items: center;
+ -ms-grid-columns: 30% auto auto min-content;
+ grid-template-columns: 30% auto auto -webkit-min-content;
+ grid-template-columns: 30% auto auto min-content;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
}
@supports (grid-template-columns: subgrid) {
.item-sell-list li {
- grid-template-columns: subgrid;
+ -ms-grid-columns: subgrid;
+ grid-template-columns: subgrid;
}
}
@media screen and (max-width: 640px) {
.item-sell-list {
grid-row: 1/-1;
- grid-template-rows: auto auto auto auto;
- grid-template-columns: auto;
+ -ms-grid-rows: auto auto auto auto;
+ grid-template-rows: auto auto auto auto;
+ -ms-grid-columns: auto;
+ grid-template-columns: auto;
}
.item-sell-list li {
margin-bottom: 15px;
@@ -2805,7 +3081,8 @@ table:not(.rd-days) .action_cell a:last-child {
#overwrapper .order {
margin: 20px 0;
border-radius: 15px;
- box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
+ -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
#overwrapper .general {
@@ -2896,8 +3173,13 @@ table:not(.rd-days) .action_cell a:last-child {
#overwrapper .orderheader {
width: 100%;
+ display: -webkit-box;
+ display: -ms-flexbox;
display: flex;
- flex-direction: row;
+ -webkit-box-orient: horizontal;
+ -webkit-box-direction: normal;
+ -ms-flex-direction: row;
+ flex-direction: row;
}
#overwrapper .total {
@@ -2934,12 +3216,21 @@ table:not(.rd-days) .action_cell a:last-child {
}
#wrapper #gridwrapper {
+ display: -webkit-box;
+ display: -ms-flexbox;
display: flex;
- flex-wrap: wrap;
- flex-direction: row;
+ -ms-flex-wrap: wrap;
+ flex-wrap: wrap;
+ -webkit-box-orient: horizontal;
+ -webkit-box-direction: normal;
+ -ms-flex-direction: row;
+ flex-direction: row;
grid-gap: 20px;
- justify-content: left;
- grid-template-columns: repeat(3, minmax(250px, auto));
+ -webkit-box-pack: left;
+ -ms-flex-pack: left;
+ justify-content: left;
+ -ms-grid-columns: (minmax(250px, auto))[3];
+ grid-template-columns: repeat(3, minmax(250px, auto));
width: 100%;
}
@@ -2947,9 +3238,13 @@ table:not(.rd-days) .action_cell a:last-child {
border: 2px solid #FCCD76;
border-radius: 15px;
padding: 20px;
+ height: -webkit-fit-content;
+ height: -moz-fit-content;
height: fit-content;
- justify-self: center;
- box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
+ -ms-grid-column-align: center;
+ justify-self: center;
+ -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
#wrapper .product_price {
@@ -3018,7 +3313,8 @@ table:not(.rd-days) .action_cell a:last-child {
left: 0;
right: 0;
margin: auto;
- box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
+ -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
border: 15px;
}
@@ -3037,7 +3333,8 @@ table:not(.rd-days) .action_cell a:last-child {
list-style-type: none;
margin: 10px 0;
border-radius: 15px;
- box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
+ -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
-webkit-transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}
@@ -3067,8 +3364,11 @@ table:not(.rd-days) .action_cell a:last-child {
left: 50%;
margin-left: -60px;
opacity: 0;
- transition-duration: 0.3s;
- transition-delay: 0.1s;
+ -webkit-transition-duration: 0.3s;
+ transition-duration: 0.3s;
+ -webkit-transition-delay: 0.1s;
+ transition-delay: 0.1s;
+ -webkit-transition-property: visibility, opacity;
transition-property: visibility, opacity;
}
@@ -3086,9 +3386,11 @@ table:not(.rd-days) .action_cell a:last-child {
.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
- transition-duration: 0.2s;
- transition-delay: 0.1s;
+ -webkit-transition-duration: 0.2s;
+ transition-duration: 0.2s;
+ -webkit-transition-delay: 0.1s;
+ transition-delay: 0.1s;
+ -webkit-transition-property: visibility, opacity;
transition-property: visibility, opacity;
}
-
/*# sourceMappingURL=base.css.map */
\ No newline at end of file
diff --git a/static/sass/_forms.sass b/static/sass/_forms.sass
index bb5a16f263591b7f5412311976ef8d8827b4f03f..4c1219d7f025192bd20860def2d87e962c44c53d 100644
--- a/static/sass/_forms.sass
+++ b/static/sass/_forms.sass
@@ -30,11 +30,10 @@ button, .button
background-color: $yellow
color : white !important
- &[type=button]
+ &[type=button] &:not(.lg-icon)
border-radius: 0
background-color: white
color: #333
- border: 1px solid #bbb
& + button
border-left: none
@@ -63,28 +62,33 @@ form
label
@include vendor-prefix(flex, 0 1 35%)
min-width: 35%
+ max-width: 250px
display: inline-block
font-weight: bold
padding-right: 0.5em
+ input[type=checkbox]
+ width: 20px
+
input, .button, textarea
@include vendor-prefix(flex, 1 1 auto)
- min-width: 0
min-height: 30px
display: inline-block
&:last-of-type
- border-top-right-radius: $border-radius
- border-bottom-right-radius: $border-radius
+ border-radius: 0 $border-radius $border-radius 0
&:first-of-type
- border-top-left-radius: $border-radius
- border-bottom-left-radius: $border-radius
+ border-radius: $border-radius 0 0 $border-radius
+
+ &:only-of-type
+ border-radius: $border-radius
& + input
border-left: none
+
label + input
border-top-left-radius: $border-radius
border-bottom-left-radius: $border-radius
@@ -133,7 +137,7 @@ form
-input, textarea
+input:not([type=checkbox]), textarea
padding: 0.25em 0.5em
border: 1px solid #ccc
background-color: #eee
@@ -216,7 +220,8 @@ fieldset
input
padding: 0.25em 0.5em
- border-radius: 3px
+ border-radius: $border-radius !important
+
& + input
border-left: 1px solid #ccc
@@ -224,17 +229,10 @@ fieldset
input, .button, label, textarea
@include vendor-prefix(flex, 1 1 auto)
display: block
- border-radius: 3px
-
- &:last-child
- border-radius: $border-radius
& + input
border-left: 1px solid #ccc
- label + input, label + textarea
- border-top-left-radius: $border-radius
- border-bottom-left-radius: $border-radius
button, .button
padding: 0.25em 0.5em
diff --git a/static/sass/_news.sass b/static/sass/_news.sass
index a6b9c186d3ca335154e56dbcafc193c4f2dced28..adc3deaf4a12105a1a3c50154626f368cda4aa80 100644
--- a/static/sass/_news.sass
+++ b/static/sass/_news.sass
@@ -24,3 +24,4 @@
img
max-width: 100%
+ max-height: 600px
diff --git a/static/sass/_photo.sass b/static/sass/_photo.sass
index 9b0fc5d838b5bdfc494a5b8446dfe59c8837b4cd..bb47d6f3e38ce2879ecf3a0942ee8b97fd4ae594 100644
--- a/static/sass/_photo.sass
+++ b/static/sass/_photo.sass
@@ -28,3 +28,63 @@
img
display: inline-block
+
+.lg-icon
+ border-radius : 25px !important
+ margin : 5px !important
+ display: flex
+ justify-content: center
+ align-items: center
+ background-color: rgba(0, 0, 0, .3) !important
+
+#lg-next-1 #lg-prev-1
+ border: 0 !important
+ color: white !important
+
+
+.lg-icon:hover
+ color: white !important
+ background-color: rgba(0, 0, 0, .7) !important
+
+.lg-outer .lg-thumb-item.active, .lg-outer .lg-thumb-item:hover
+ border-color: $orange !important
+
+.lg-progress-bar .lg-progress
+ background-color: $orange !important
+
+#upload-dropzone
+ margin: 15px 0
+ padding: 10px 10px 50px 10px
+ border-color: $orange
+ border-radius: 15px
+ background-color: #f1e9dc
+
+ .dz-actions
+ position: absolute
+ bottom: 5px
+
+ button
+ border-radius: 15px
+ padding: 5px
+
+
+
+.dropzone .dz-preview.dz-image-preview
+ background: transparent !important
+
+.dz-message
+ .dz-button
+ background-color: white !important
+
+ .dz-button:hover
+ color: $orange !important
+
+#spinner
+ display: block
+ margin-left: auto
+ margin-right: auto
+
+#breadcrumb
+ span
+ .fa-chevron-right
+ color: #9e9b9b
\ No newline at end of file
diff --git a/static/sass/_user.sass b/static/sass/_user.sass
index 6a89a64cc3f2fa1a508ed04779773605b444d04f..5333cdb5d0aa13bc75f99d8539ad6ffa2135a922 100644
--- a/static/sass/_user.sass
+++ b/static/sass/_user.sass
@@ -20,7 +20,7 @@ $user_container_width: 225px
background-color: #e2e2e2
color: #bbb
margin: -1em
- padding: 0.5emF
+ padding: 0.5em
transition: background-color 0.25s, color 0.25s
cursor: pointer
position: fixed