commit eef986d77d8afb156bb66d3a8bde854fdf3a0958 Author: julien Date: Tue Jan 14 18:03:28 2025 +0100 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..592f545 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.venv/ +volumes/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..1273b0a --- /dev/null +++ b/README.md @@ -0,0 +1,89 @@ +# taal-academie.arree.bzh + +Project structure : + +``` +. +├── django +│   ├── Dockerfile +│   ├── requirements.txt +│   └── src +│   ├── config +│   ├── development.env +│   ├── home +│   ├── local.env +│   ├── manage.py +│   ├── pages +│   ├── production.env +│   └── workshops +├── compose.dev.yml +├── compose.local.yml +├── compose.prod.yml +├── compose.yml +├── nginx +│   ├── default.conf +│   └── Dockerfile +└── README.md +``` + +## Deployment with Nerdctl Compose + +Can be used as well in Nerdctl root or [rootless](https://docs.docker.com/engine/security/rootless/) mode. + +There are three profiles : + +* Development : with only the database +* Local : for local testing of the production stack +* Production : Final deployment on the server + +### Development + +To run the development profile from the project `django/src` directory : + +``` +$ ( cd ../.. && nerdctl compose -f compose.yml -f compose.dev.yml up -d postgres ) +``` + +Then when calling the `manage.py` script we need to pass `DJANGO_ENV` to load `src/dev.env`, like in the +following example to start the Django development server : + +``` +$ DJANGO_ENV=dev python manage.py runserver +``` + +To not have to pass this for each `manage.py` execution you may export `DJANGO_ENV` from your `.bashrc` : + +``` +$ echo -e "\n# Django development\nexport DJANGO_ENV=dev" >> ~/.bashrc +``` + +> Need to restart the session ! + +### Local + +To run the local profile from the project `django/src` directory : + +``` +$ ( cd ../.. && nerdctl compose -f compose.yml -f compose.local.yml up -d ) +``` + +### Production + +To run the production profile from the directory where the `compose.yml` file lives : + +``` +$ nerdctl compose -f compose.yml -f compose.prod.yml up -d +``` + +At the first launch, it is advised to run the Deployment checklist from `manage.py` to check if there are some security +improvements : + +``` +$ nerdctl exec -it django_taal-academiearreebzh python /django/manage.py check --deploy +``` + +Then create an admin user for the Django admin panel : + +``` +$ nerdctl exec -it django_taal-academiearreebzh python /django/manage.py createsuperuser +``` diff --git a/compose.dev.yml b/compose.dev.yml new file mode 100644 index 0000000..26506b1 --- /dev/null +++ b/compose.dev.yml @@ -0,0 +1,7 @@ +services: + postgres: + env_file: + - django/src/dev.env + - /srv/dwalin/passwords/taal-academiearreebzh.pass + ports: + - "127.0.0.1:5432:5432" diff --git a/compose.local.yml b/compose.local.yml new file mode 100644 index 0000000..1ffee2e --- /dev/null +++ b/compose.local.yml @@ -0,0 +1,13 @@ +services: + postgres: + env_file: + - django/src/local.env + - /srv/dwalin/passwords/taal-academiearreebzh.pass + django: + env_file: + - django/src/local.env + - /srv/dwalin/passwords/taal-academiearreebzh.pass + nginx: + ports: + - "127.0.0.1:8001:8001" + restart: unless-stopped diff --git a/compose.prod.yml b/compose.prod.yml new file mode 100644 index 0000000..940a210 --- /dev/null +++ b/compose.prod.yml @@ -0,0 +1,12 @@ +services: + postgres: + env_file: + - django/src/prod.env + - /srv/dwalin/passwords/taal-academiearreebzh.pass + django: + env_file: + - django/src/prod.env + - /srv/dwalin/passwords/taal-academiearreebzh.pass + nginx: + ports: + - "127.0.0.1:8001:8001" diff --git a/compose.yml b/compose.yml new file mode 100644 index 0000000..44b206d --- /dev/null +++ b/compose.yml @@ -0,0 +1,33 @@ +services: + postgres: + image: postgres:15-alpine + container_name: taal-academiearreebzh_postgres + volumes: + - ./volumes/postgres:/var/lib/postgresql/data:z + healthcheck: + test: [ "CMD-SHELL", "pg_isready -U postgres" ] + interval: 5s + timeout: 5s + retries: 5 + restart: unless-stopped + django: + build: ./django + container_name: taal-academiearreebzh_django + depends_on: + postgres: + condition: service_healthy + command: sh -c "python manage.py makemigrations && + python manage.py migrate && + python manage.py collectstatic --clear --noinput && + gunicorn config.wsgi --bind 0.0.0.0:8001" + volumes: + - ./volumes/static:/django/static:z + restart: unless-stopped + nginx: + build: ./nginx + container_name: taal-academiearreebzh_nginx + depends_on: + - django + volumes: + - ./volumes/static:/django/static:z + restart: unless-stopped diff --git a/django/Dockerfile b/django/Dockerfile new file mode 100644 index 0000000..92019a0 --- /dev/null +++ b/django/Dockerfile @@ -0,0 +1,32 @@ +# Fetching the base image +FROM python:3.12-alpine + +# Setting up the work directory +WORKDIR /django + +# Preventing python from writing pyc to docker container +ENV PYTHONDONTWRITEBYTECODE 1 + +# Flushing out python buffer +ENV PYTHONUNBUFFERED 1 + +# Updating the os +RUN apk update + +# Installing python3 +RUN apk add python3-dev + +# Copying requirement file +COPY ./requirements.txt ./ + +# Upgrading pip version +RUN pip install --upgrade pip + +# Installing Gunicorn +RUN pip install gunicorn + +# Installing dependencies +RUN pip install --no-cache-dir -r ./requirements.txt + +# Copying all the files in our project +COPY ./src . diff --git a/django/requirements.txt b/django/requirements.txt new file mode 100644 index 0000000..0c24bfc --- /dev/null +++ b/django/requirements.txt @@ -0,0 +1,10 @@ +asgiref==3.7.2 +Django==4.2 +django-environ==0.11.2 +django-tinymce==3.6.1 +django-widget-tweaks==1.5.0 +psycopg==3.1.16 +psycopg-binary==3.1.16 +setuptools==69.0.3 +sqlparse==0.4.4 +typing_extensions==4.9.0 diff --git a/django/src/config/__init__.py b/django/src/config/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/django/src/config/__pycache__/__init__.cpython-312.pyc b/django/src/config/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..2d824f4 Binary files /dev/null and b/django/src/config/__pycache__/__init__.cpython-312.pyc differ diff --git a/django/src/config/__pycache__/settings.cpython-312.pyc b/django/src/config/__pycache__/settings.cpython-312.pyc new file mode 100644 index 0000000..b716435 Binary files /dev/null and b/django/src/config/__pycache__/settings.cpython-312.pyc differ diff --git a/django/src/config/__pycache__/urls.cpython-312.pyc b/django/src/config/__pycache__/urls.cpython-312.pyc new file mode 100644 index 0000000..85afd42 Binary files /dev/null and b/django/src/config/__pycache__/urls.cpython-312.pyc differ diff --git a/django/src/config/__pycache__/wsgi.cpython-312.pyc b/django/src/config/__pycache__/wsgi.cpython-312.pyc new file mode 100644 index 0000000..def0e52 Binary files /dev/null and b/django/src/config/__pycache__/wsgi.cpython-312.pyc differ diff --git a/django/src/config/asgi.py b/django/src/config/asgi.py new file mode 100644 index 0000000..787b362 --- /dev/null +++ b/django/src/config/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for config project. + +It exposes the ASGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/4.2/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings') + +application = get_asgi_application() diff --git a/django/src/config/settings.py b/django/src/config/settings.py new file mode 100644 index 0000000..3aad3bf --- /dev/null +++ b/django/src/config/settings.py @@ -0,0 +1,164 @@ +import os +from pathlib import Path +import environ + +# Build paths inside the project like this: BASE_DIR / 'subdir'. +BASE_DIR = Path(__file__).resolve().parent.parent + +env = environ.Env( + # Security + DEBUG=bool, + SECRET_KEY=str, + ALLOWED_HOSTS=list, + CSRF_TRUSTED_ORIGINS=list, + + # Database + DATABASE_NAME=str, + DATABASE_USER=str, + DATABASE_PASS=str, + DATABASE_HOST=str, + DATABASE_PORT=int, + + # SMTP server + EMAIL_HOST=str, + EMAIL_HOST_USER=str, + EMAIL_HOST_PASSWORD=str, + EMAIL_PORT=int, + EMAIL_USE_SSL=bool, + EMAIL_USE_TLS=bool, +) + +# Load environment variables according the DJANGO_ENV value +if os.environ.get('DJANGO_ENV') == 'dev': + environ.Env.read_env(os.path.join(BASE_DIR, 'dev.env')) +elif os.environ.get('DJANGO_ENV') == 'local': + environ.Env.read_env(os.path.join(BASE_DIR, 'local.env')) +else: + environ.Env.read_env(os.path.join(BASE_DIR, 'prod.env')) + +# Security + +SECRET_KEY = env('SECRET_KEY') + +DEBUG = env('DEBUG') + +ALLOWED_HOSTS = env.list('ALLOWED_HOSTS') + +CSRF_TRUSTED_ORIGINS = env.list('CSRF_TRUSTED_ORIGINS') + +SESSION_COOKIE_SECURE = True + +CSRF_COOKIE_SECURE = True + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'widget_tweaks', + 'home', + 'tinymce', + 'pages', + 'workshops', +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'config.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + 'home.context_processors.current_year', + 'home.context_processors.contact', + ], + }, + }, +] + +WSGI_APPLICATION = 'config.wsgi.application' + +# Database +# https://docs.djangoproject.com/en/4.2/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': env('DATABASE_NAME'), + 'USER': env('DATABASE_USER'), + 'PASSWORD': env('DATABASE_PASS'), + 'HOST': env('DATABASE_HOST'), + 'PORT': env('DATABASE_PORT'), + } +} + +# Password validation +# https://docs.djangoproject.com/en/4.2/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + +# Internationalization +# https://docs.djangoproject.com/en/4.2/topics/i18n/ + +LANGUAGE_CODE = 'fr-FR' + +TIME_ZONE = 'Europe/Paris' + +USE_I18N = True + +USE_TZ = True + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/4.2/howto/static-files/ + +STATIC_URL = 'static/' + +STATIC_ROOT = os.path.join(BASE_DIR, 'static/') + +# Default primary key field type +# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field + +DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' + +# SMTP server + +EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' +EMAIL_HOST = env('EMAIL_HOST') +EMAIL_HOST_USER = env('EMAIL_HOST_USER') +EMAIL_HOST_PASSWORD = env('EMAIL_HOST_PASSWORD') +EMAIL_PORT = env('EMAIL_PORT') +EMAIL_USE_SSL = env('EMAIL_USE_SSL') +EMAIL_USE_TLS = env('EMAIL_USE_TLS') diff --git a/django/src/config/urls.py b/django/src/config/urls.py new file mode 100644 index 0000000..2470ba5 --- /dev/null +++ b/django/src/config/urls.py @@ -0,0 +1,28 @@ +""" +URL configuration for config project. + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/4.2/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: path('', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.urls import include, path + 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) +""" +from django.contrib import admin +from django.urls import path, include + +urlpatterns = [ + path('admin/', admin.site.urls), + path('', include('home.urls')), + path('pages/', include('pages.urls')), + path('tinymce/', include('tinymce.urls')), + path('workshops/', include('workshops.urls')), +] + +admin.site.site_header = 'Administration : taal-academie.arree.bzh' diff --git a/django/src/config/wsgi.py b/django/src/config/wsgi.py new file mode 100644 index 0000000..8ae71e3 --- /dev/null +++ b/django/src/config/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for config project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/4.2/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings') + +application = get_wsgi_application() diff --git a/django/src/dev.env b/django/src/dev.env new file mode 100644 index 0000000..a195fd4 --- /dev/null +++ b/django/src/dev.env @@ -0,0 +1,30 @@ +####################################### +### Docker + +POSTGRES_USER=postgres +POSTGRES_DB=postgres +#POSTGRES_PASSWORD= + +####################################### +### Django + +# Security +DEBUG=True +#SECRET_KEY= +ALLOWED_HOSTS=127.0.0.1,localhost +CSRF_TRUSTED_ORIGINS=http://127.0.0.1:8001,http://localhost:8001 + +# Database +DATABASE_NAME=postgres +DATABASE_USER=postgres +#DATABASE_PASS= +DATABASE_HOST=127.0.0.1 +DATABASE_PORT=5432 + +# SMTP server +EMAIL_HOST=mail.netig.net +EMAIL_HOST_USER=test@netig.net +#EMAIL_HOST_PASSWORD= +EMAIL_PORT=465 +EMAIL_USE_SSL=True +EMAIL_USE_TLS=False diff --git a/django/src/home/__init__.py b/django/src/home/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/django/src/home/__pycache__/__init__.cpython-312.pyc b/django/src/home/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..6215b1c Binary files /dev/null and b/django/src/home/__pycache__/__init__.cpython-312.pyc differ diff --git a/django/src/home/__pycache__/admin.cpython-312.pyc b/django/src/home/__pycache__/admin.cpython-312.pyc new file mode 100644 index 0000000..e213d11 Binary files /dev/null and b/django/src/home/__pycache__/admin.cpython-312.pyc differ diff --git a/django/src/home/__pycache__/apps.cpython-312.pyc b/django/src/home/__pycache__/apps.cpython-312.pyc new file mode 100644 index 0000000..ee94ee6 Binary files /dev/null and b/django/src/home/__pycache__/apps.cpython-312.pyc differ diff --git a/django/src/home/__pycache__/context_processors.cpython-312.pyc b/django/src/home/__pycache__/context_processors.cpython-312.pyc new file mode 100644 index 0000000..d3a2959 Binary files /dev/null and b/django/src/home/__pycache__/context_processors.cpython-312.pyc differ diff --git a/django/src/home/__pycache__/forms.cpython-312.pyc b/django/src/home/__pycache__/forms.cpython-312.pyc new file mode 100644 index 0000000..c131f09 Binary files /dev/null and b/django/src/home/__pycache__/forms.cpython-312.pyc differ diff --git a/django/src/home/__pycache__/models.cpython-312.pyc b/django/src/home/__pycache__/models.cpython-312.pyc new file mode 100644 index 0000000..155cb6c Binary files /dev/null and b/django/src/home/__pycache__/models.cpython-312.pyc differ diff --git a/django/src/home/__pycache__/urls.cpython-312.pyc b/django/src/home/__pycache__/urls.cpython-312.pyc new file mode 100644 index 0000000..42d4b24 Binary files /dev/null and b/django/src/home/__pycache__/urls.cpython-312.pyc differ diff --git a/django/src/home/__pycache__/views.cpython-312.pyc b/django/src/home/__pycache__/views.cpython-312.pyc new file mode 100644 index 0000000..bfa05eb Binary files /dev/null and b/django/src/home/__pycache__/views.cpython-312.pyc differ diff --git a/django/src/home/admin.py b/django/src/home/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/django/src/home/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/django/src/home/apps.py b/django/src/home/apps.py new file mode 100644 index 0000000..e5ea0af --- /dev/null +++ b/django/src/home/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class HomeConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'home' diff --git a/django/src/home/context_processors.py b/django/src/home/context_processors.py new file mode 100644 index 0000000..c6723ea --- /dev/null +++ b/django/src/home/context_processors.py @@ -0,0 +1,39 @@ +from .forms import ContactForm +from django.contrib import messages +from django.core.mail import send_mail +import datetime +from django.conf import settings + + +# Create your views here. +def current_year(request): + current_datetime = datetime.datetime.now() + return { + 'current_year': current_datetime.year + } + + +def contact(request): + # if this is a POST request we need to process the form data + if request.method == "POST": + # create a form instance and populate it with data from the request: + form = ContactForm(request.POST) + # check whether it's valid: + if form.is_valid(): + name = form.cleaned_data["name"] + mail = form.cleaned_data["mail"] + subject = form.cleaned_data["subject"] + body = form.cleaned_data["body"] + + recipients = [settings.EMAIL_HOST_USER] + body = ('Nom de l\'expéditeur :' + '\n' + name + '\n\n' + 'Objet :' + '\n' + subject + '\n\n' + 'Message :' + + '\n' + body) + send_mail(subject, body, mail, recipients) + messages.success(request, 'Votre message a bien été envoyé !') + form = ContactForm() + return {"form": form} + + # if a GET (or any other method) we'll create a blank form + else: + form = ContactForm() + return {"form": form} diff --git a/django/src/home/forms.py b/django/src/home/forms.py new file mode 100644 index 0000000..98ae265 --- /dev/null +++ b/django/src/home/forms.py @@ -0,0 +1,8 @@ +from django import forms + + +class ContactForm(forms.Form): + name = forms.CharField(max_length=128, label='Votre nom') + mail = forms.EmailField(label='Votre email') + subject = forms.CharField(max_length=256, label='Objet') + body = forms.CharField(widget=forms.Textarea, label='Votre message') diff --git a/django/src/home/migrations/__init__.py b/django/src/home/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/django/src/home/migrations/__pycache__/__init__.cpython-312.pyc b/django/src/home/migrations/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..91ed87b Binary files /dev/null and b/django/src/home/migrations/__pycache__/__init__.cpython-312.pyc differ diff --git a/django/src/home/models.py b/django/src/home/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/django/src/home/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/django/src/home/static/home/css/base.css b/django/src/home/static/home/css/base.css new file mode 100644 index 0000000..c9eaa98 --- /dev/null +++ b/django/src/home/static/home/css/base.css @@ -0,0 +1,892 @@ +/* Fonts + ------------------------------------------------------------------------ */ +@font-face { + font-family: 'Lato'; + src: url('/static/home/font/Lato-Regular.woff2') format('woff2'), + url('/static/home/font/Lato-Regular.woff') format('woff'); + font-weight: normal; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Lato'; + src: url('/static/home/font/Lato-Bold.woff2') format('woff2'), + url('/static/home/font/Lato-Bold.woff') format('woff'); + font-weight: bold; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'TeXGyreTermes'; + src: url('/static/home/font/TeXGyreTermes-Bold.woff2') format('woff2'), + url('/static/home/font/TeXGyreTermes-Bold.woff') format('woff'); + font-weight: bold; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'TeXGyreTermes'; + src: url('/static/home/font/TeXGyreTermes-Regular.woff2') format('woff2'), + url('/static/home/font/TeXGyreTermes-Regular.woff') format('woff'); + font-weight: normal; + font-style: normal; + font-display: swap; +} + +/* Reset + ------------------------------------------------------------------------ */ +body, +html { + margin: 0; +} + +p { + margin-top: 0; +} + +ul { + margin-top: 0; + +} + +/* Variables + ------------------------------------------------------------------------ */ +:root { + --cover__home: url(/static/home/media/taal.webp); + --cover__about: url(/static/home/media/about.webp); + --cover__cooking: url(/static/home/media/buffet.webp); + --cover__drums: url(/static/home/media/drums.webp); + --cover__visual: url(/static/home/media/visual.webp); + --cover__gatka: url(/static/home/media/gatka.webp); + + --color__primary: #FC970B; + --color__secondary: #641a40; + --color__ternary: #185833; + --color__neutral: #111; +} + +/* Layout + ------------------------------------------------------------------------ */ +body, +html { + font-family: Lato, sans-serif; + font-size: 20px; + line-height: 1.8rem; + scroll-behavior: smooth; +} + +article:first-child { + padding-top: 100px; +} + +article { + padding: 40px 0; +} + +article:last-child { + margin-bottom: 40px; +} + +.content--s, +.content, +.content--l { + padding: 0 40px; +} + +.flex--zz > div { + margin-bottom: 60px; +} + +.col2 > div, +.col3 > div { + margin-bottom: 60px; +} + +/* Cards + ------------------------------------------------------------------------ */ +.card { + border-radius: 20px; + box-shadow: 0 0 20px var(--color__neutral); + padding: 20px; + display: block; + min-width: 40px; + margin-bottom: 40px; +} + +/* Banners + ------------------------------------------------------------------------ */ +.banner { + background: #641a40; + color: #ffffff; + padding: 40px; + margin-bottom: 60px; + text-align: center; +} + +/* Messages + ------------------------------------------------------------------------ */ +.success { + border-radius: 5px; + padding: 15px 20px; + background: #cccccc; + text-align: center; +} + +.warning { + color: #e74c3c; + text-align: center; +} + +.error { + border-radius: 5px; + padding: 15px 10px; + background: #e74c3c; + text-align: center; +} + +/* Buttons + ------------------------------------------------------------------------ */ +.button { + background: var(--color__primary); + color: #FFF; + font-size: .8rem; + border: 0; + border-radius: 5px; + padding: 15px 20px; + margin: 20px 0; +} + +.button--rev { + background: #fff; + color: var(--color__primary); +} + +.button:hover { + text-decoration: none; + color: #FFF; + cursor: pointer; +} + +.button--rev:hover { + text-decoration: none; + color: var(--color__primary); + cursor: pointer; +} + +/* Titles + ------------------------------------------------------------------------ */ +h2 { + font-family: 'TeXGyreTermes', serif; + font-size: 2rem; + line-height: 2rem; + font-weight: bold; + text-align: center; + margin-top: 0; + margin-bottom: 100px; +} + +h3 { + font-family: 'TeXGyreTermes', serif; + font-size: 1.6rem; + line-height: 1.6rem; + font-weight: bold; + text-align: center; + margin-top: 0; + margin-bottom: 60px; +} + +h4 { + font-family: 'TeXGyreTermes', serif; + font-size: 1.4rem; + line-height: 1.2rem; + font-weight: bold; + text-align: center; + margin-top: 0; + margin-bottom: 40px; +} + +/* Links + ------------------------------------------------------------------------ */ +a { + color: var(--color__primary); + font-weight: bold; + text-decoration: none; +} + +a:hover { + color: inherit; + text-decoration: underline; +} + +.icon img { + opacity: 0.6; + width: 46px; + height: 46px; + transition: opacity 0.3s; +} + +.icon:hover img { + opacity: 1; +} + +/* Header + ------------------------------------------------------------------------ */ +header { + position: relative; + height: 100vh; + display: flex; + flex-direction: column; + justify-content: space-evenly; + align-items: center; +} + +header::before { + content: ""; + position: absolute; + top: 0px; + right: 0px; + bottom: 0px; + left: 0px; + background: no-repeat center center / cover fixed var(--cover__home); + filter: brightness(20%); + z-index: -1; +} + +header a:hover { + text-decoration: none; +} + +header h1 { + font-family: 'TeXGyreTermes', serif; + display: block; + font-size: 4rem; + font-weight: bold; + text-align: center; + color: var(--color__primary); + margin: 0; +} + +header h2 { + font-family: 'TeXGyreTermes', serif; + display: block; + font-size: 2rem; + font-weight: normal; + text-align: center; + color: var(--color__primary); + margin: 0; +} + +/* Topnav + ------------------------------------------------------------------------ */ +.topnav { + background: var(--color__primary); + text-align: center; + box-shadow: 0 0 10px #222; + position: sticky; + display: none; + top: 0px; + z-index: 3; + width: 100%; +} + +.topnav a { + display: inline-block; + font-size: 1.2rem; + font-weight: bold; + color: #FFF; + opacity: .75; + padding: 10px 10px; + transition: opacity 0.3s; +} + +.topnav a:hover { + text-decoration: none; + opacity: 1; +} + +/* Sidenav + ------------------------------------------------------------------------ */ +.menu_icon_sidenav { + z-index: 2; + width: fit-content; + height: auto; + background-color: var(--color__primary); + padding: 10px; + margin: 10px; + cursor: pointer; + position: fixed; + top: 0; + box-shadow: 0 0 10px #222; + border-radius: 100%; +} + +.line1, +.line2, +.line3 { + width: 40px; + height: 4px; + margin: 10px 8px; + background-color: #fff; + border-radius: 50px; + transition: 0.2s; +} + +.active .line1 { + transform: translate(0px, 15px) rotate(45deg); +} + +.active .line2 { + opacity: 0; +} + +.active .line3 { + transform: translate(0px, -15px) rotate(-45deg); +} + +.sidenav { + width: fit-content; + background-color: #fff; + position: fixed; + text-align: left; + z-index: 1; + opacity: 0; + left: -500px; + pointer-events: none; + transition: 0.3s; + top: 0; + box-shadow: 0 0 10px #222; + overflow: scroll; +} + +.active_sidenav { + opacity: .8; + left: 0px; + pointer-events: fill; + position: fixed; + top: 0; + height: 100vh; +} + +.sidenav nav { + padding-top: 80px; + margin-right: 40px; +} + +.sidenav nav ul li { + list-style: none; + margin-bottom: 20px; + transition: 0.2s; +} + +.sidenav nav ul li:hover { + background-color: #c6c6c66f; + border-radius: 8px; +} + +.sidenav nav ul li a { + color: #000; + font-size: 1.2rem; + padding: 10px 30px; + display: block; + text-decoration: none; +} + +.sidenav nav ul li a:hover { + text-decoration: none; +} + +/* Cover + ------------------------------------------------------------------------ */ +.cover__home { + height: 400px; + background: no-repeat top center / cover var(--cover__home); +} + +.cover__about { + height: 400px; + background: no-repeat top center / cover var(--cover__about); + background-attachment: fixed; +} + +.cover__cooking { + height: 400px; + background: no-repeat top center / cover var(--cover__cooking); + background-attachment: fixed; +} + +.cover__drums { + height: 400px; + background: no-repeat center center / cover var(--cover__drums); + background-attachment: fixed; +} + +.cover__visual { + height: 400px; + background: no-repeat top center / cover var(--cover__visual); + background-attachment: fixed; +} + +.cover__gatka { + height: 400px; + background: no-repeat top center / cover var(--cover__gatka); + background-attachment: fixed; +} + +/* Media + ------------------------------------------------------------------------ */ +.media { + margin: 20px auto; + border-radius: 10px; + width: 100%; +} + +.flex--zz .media { + + width: 100%; +} + +/* youtube-video-container + ------------------------------------------------------------------------ */ +.youtube-video-container { + position: relative; + overflow: hidden; + width: 100%; +} + +.youtube-video-container::after { + display: block; + content: ""; + padding-top: 56.25%; +} + +.youtube-video-container iframe { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + +/* About article + ------------------------------------------------------------------------ */ +.about { + text-align: center; +} + +.slogan { + margin: 40px 0 80px 0; +} + +.slogan::before, +.slogan::after { + text-align: center; + display: inline-block; + padding: 10px; + position: relative; + top: -10px; +} + +.slogan::before { + content: url(/static/home/media/quotes-left.svg); +} + +.slogan::after { + content: url(/static/home/media/quotes-right.svg); + +} + +/* Cooking article + ------------------------------------------------------------------------ */ + +.cooking { + position: relative; + color: #FFF; + text-align: center; +} + +.cooking::before { + content: ""; + position: absolute; + top: 0px; + right: 0px; + bottom: 0px; + left: 0px; + background: no-repeat center center / cover fixed var(--cover__cooking); + filter: brightness(30%); + z-index: -1; +} + +/* Drums article + ------------------------------------------------------------------------ */ +.drums { + text-align: center; +} + +/* Gatka article + ------------------------------------------------------------------------ */ +.gatka { + position: relative; + text-align: center; +} + +.gatka p { + text-align: center; +} + +.gatka::before { + content: ""; + position: absolute; + top: 0px; + right: 0px; + bottom: 0px; + left: 0px; + background: no-repeat center center / cover fixed var(--cover__gatka); + filter: brightness(30%); + z-index: -1; +} + +.gatka h2, +.gatka .content--s { + position: relative; + color: #FFF; +} + +/* Visual article + ------------------------------------------------------------------------ */ +.visual { + text-align: center; +} + + +/* workshops article + ------------------------------------------------------------------------ */ +.workshops { + position: relative; + color: #FFF; +} + +.workshops p { + text-align: center; +} + +.workshops::before { + content: ""; + position: absolute; + top: 0px; + right: 0px; + bottom: 0px; + left: 0px; + background: var(--color__secondary); + z-index: -1; +} + +.workshops h2, +.workshops .content--l { + position: relative; +} + +.workshops ul { + margin-bottom: 80px; +} + +.workshops .card { + background: #fff; + color: #222; +} + +/* Events article + ------------------------------------------------------------------------ */ +.events p { + text-align: center; +} + +.events h4 { + text-decoration: none; + font-weight: bold; +} + +/* Contact + ------------------------------------------------------------------------ */ +.contact p { + font-size: 1.2rem; +} + +.contact h2, +.contact .content { + position: relative; + color: var(--color__neutral); +} + +.contact-form { + position: relative; + top: -200px; + margin-right: auto; + min-width: 50%; + font-size: 0.8rem; + font-weight: bold; +} + +.contact-form input, +select, +textarea { + font-size: 1rem; + padding: 10px; + border-radius: 5px; + border: 1px solid #fff; + flex: 1 1 auto; + margin: 10px 0; +} + +input:focus, +textarea:focus { + outline: none; +} + +.contact .button { + color: #fff; +} + +.contact .button:hover { + color: #fff; +} + +.contact-form > * { + display: flex; +} + +.contact-form textarea { + min-height: 150px; + max-width: 100%; + box-shadow: 0 0 10px #222; +} + +.map { + margin-bottom: 80px; +} + +.map iframe { + display: block; + border: 0px; + width: 100%; + height: 400px; +} + +.contact .card { + position: relative; + top: -200px; + background: var(--color__ternary); +} + +.contact .card h2, +.contact .card h3, +.contact .card p { + color: #fff; +} + +.contact .card h3, +.contact .card p { + text-align: left; +} + +.contact .card h3 { + font-size: 1.2rem; + line-height: normal; + margin: 0; +} + +.contact .card p { + font-size: 0.8rem; + line-height: normal; +} + +svg { + display: flex; + align-items: center; + justify-content: left; + height: 64px; + width: auto; +} + +.contact-info > div { + display: flex; + gap: 40px; + margin: 60px 0; + align-items: flex-start; +} + +/* Press + ------------------------------------------------------------------------ */ +.press iframe { + width: 100%; + height: 50vw; +} + +/* Bottom Bar + ------------------------------------------------------------------------ */ +.botbar { + display: flex; + background: #000; + color: var(--color__primary); + font-size: 1rem; + justify-content: space-between; + flex-wrap: wrap; + text-align: center; +} + +.botbar p { + padding: 10px 20px; + margin-left: auto; + margin-right: auto; +} + +/* For more than 680px screens and normal DPI + ------------------------------------------------------------------------ */ +@media screen and (min-width: 680px) and (max-resolution: 1x) { + + h2 { + font-size: 3.2rem; + line-height: 3.2rem; + } + + h3 { + font-size: 2rem; + line-height: 2rem; + } + + h4 { + font-size: 1.2rem; + line-height: 1.2rem; + } +} + +/* For highter resolution screens and normal DPI + ------------------------------------------------------------------------ */ +@media screen and (min-width: 950px) and (max-resolution: 1x) { + + .col2 { + display: grid; + grid-column-gap: 80px; + grid-template-columns: repeat(2, 1fr); + } + + .col3 { + display: grid; + grid-column-gap: 80px; + grid-template-columns: repeat(3, 1fr); + } + + .col2--1-3 { + display: grid; + grid-column-gap: 80px; + grid-template-columns: 1fr 2fr; + } + + header h1 { + font-size: 5rem; + } + + header h2 { + font-size: 3rem; + } + + .content--s { + max-width: 750px; + margin-left: auto; + margin-right: auto; + } + + .cover__home { + height: 689px; + } + + .flex--zz { + display: flex; + gap: 40px; + align-items: center; + justify-content: center; + text-align: left; + } + + .flex--zz > * { + flex: 1; + } + + .flex--zz h3, + .flex--zz h4, + .flex--zz p { + text-align: left; + } + + .flex--zz:nth-child(odd) { + flex-direction: row-reverse; + text-align: right; + } + + .flex--zz:nth-child(odd) h3, + .flex--zz:nth-child(odd) h4, + .flex--zz:nth-child(odd) p { + text-align: right; + } + + .contact-form { + position: relative; + top: -60px; + margin-top: 0; + } + + .map iframe { + min-width: 400px; + } + +} + +@media screen and (min-width: 1250px) and (max-resolution: 1x) { + + header h1 { + font-size: 6rem; + } + + header h2 { + font-size: 4rem; + } + + .menu_icon_sidenav { + display: none; + } + + .topnav { + display: block; + } + + article { + padding: 60px 0; + } + + footer article { + padding: 50px 0; + } + + .content { + max-width: 1050px; + margin-left: auto; + margin-right: auto; + } + + .col--zz { + gap: 80px; + } + +} + +@media screen and (min-width: 1600px) and (max-resolution: 1x) { + + .content--l { + max-width: 1400px; + margin-left: auto; + margin-right: auto; + } + +} \ No newline at end of file diff --git a/django/src/home/static/home/font/Lato-Bold.woff b/django/src/home/static/home/font/Lato-Bold.woff new file mode 100644 index 0000000..44455ec Binary files /dev/null and b/django/src/home/static/home/font/Lato-Bold.woff differ diff --git a/django/src/home/static/home/font/Lato-Bold.woff2 b/django/src/home/static/home/font/Lato-Bold.woff2 new file mode 100644 index 0000000..b18912e Binary files /dev/null and b/django/src/home/static/home/font/Lato-Bold.woff2 differ diff --git a/django/src/home/static/home/font/Lato-Regular.woff b/django/src/home/static/home/font/Lato-Regular.woff new file mode 100644 index 0000000..ce7994c Binary files /dev/null and b/django/src/home/static/home/font/Lato-Regular.woff differ diff --git a/django/src/home/static/home/font/Lato-Regular.woff2 b/django/src/home/static/home/font/Lato-Regular.woff2 new file mode 100644 index 0000000..cc40990 Binary files /dev/null and b/django/src/home/static/home/font/Lato-Regular.woff2 differ diff --git a/django/src/home/static/home/font/TeXGyreTermes-Bold.woff b/django/src/home/static/home/font/TeXGyreTermes-Bold.woff new file mode 100644 index 0000000..eebfb13 Binary files /dev/null and b/django/src/home/static/home/font/TeXGyreTermes-Bold.woff differ diff --git a/django/src/home/static/home/font/TeXGyreTermes-Bold.woff2 b/django/src/home/static/home/font/TeXGyreTermes-Bold.woff2 new file mode 100644 index 0000000..52de029 Binary files /dev/null and b/django/src/home/static/home/font/TeXGyreTermes-Bold.woff2 differ diff --git a/django/src/home/static/home/font/TeXGyreTermes-Regular.woff b/django/src/home/static/home/font/TeXGyreTermes-Regular.woff new file mode 100644 index 0000000..fbba9cf Binary files /dev/null and b/django/src/home/static/home/font/TeXGyreTermes-Regular.woff differ diff --git a/django/src/home/static/home/font/TeXGyreTermes-Regular.woff2 b/django/src/home/static/home/font/TeXGyreTermes-Regular.woff2 new file mode 100644 index 0000000..fe4b9e3 Binary files /dev/null and b/django/src/home/static/home/font/TeXGyreTermes-Regular.woff2 differ diff --git a/django/src/home/static/home/js/jquery-3.7.0.min.js b/django/src/home/static/home/js/jquery-3.7.0.min.js new file mode 100644 index 0000000..e7e29d5 --- /dev/null +++ b/django/src/home/static/home/js/jquery-3.7.0.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.7.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(ie,e){"use strict";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue.toString,a=o.call(Object),le={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},C=ie.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in u)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e}var t="3.7.0",l=/HTML$/i,ce=function(e,t){return new ce.fn.init(e,t)};function c(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+ge+")"+ge+"*"),x=new RegExp(ge+"|>"),j=new RegExp(g),A=new RegExp("^"+t+"$"),D={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+p),PSEUDO:new RegExp("^"+g),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ge+"*(even|odd|(([+-]|)(\\d*)n|)"+ge+"*(?:([+-]|)"+ge+"*(\\d+)|))"+ge+"*\\)|)","i"),bool:new RegExp("^(?:"+f+")$","i"),needsContext:new RegExp("^"+ge+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ge+"*((?:-\\d)?\\d*)"+ge+"*\\)|)(?=[^-]|$)","i")},N=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,L=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\([^\\r\\n\\f])","g"),P=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},R=function(){V()},M=J(function(e){return!0===e.disabled&&fe(e,"fieldset")},{dir:"parentNode",next:"legend"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+" "]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&z(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute("id"))?s=ce.escapeSelector(s):e.setAttribute("id",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);c=l.join(",")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return re(t.replace(ve,"$1"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,"input")&&e.type===t}}function _(t){return function(e){return(fe(e,"input")||fe(e,"button"))&&e.type===t}}function X(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&M(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function U(a){return F(function(o){return o=+o,F(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function z(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",R),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,"*")}),le.scope=$(function(){return T.querySelectorAll(":scope")}),le.cssHas=$(function(){try{return T.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML="",e.querySelectorAll("[selected]").length||d.push("\\["+ge+"*(?:value|"+f+")"),e.querySelectorAll("[id~="+S+"-]").length||d.push("~="),e.querySelectorAll("a#"+S+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=T.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+ge+"*name"+ge+"*="+ge+"*(?:''|\"\")")}),le.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+" "]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,P),e[3]=(e[3]||e[4]||e[5]||"").replace(O,P),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||I.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&j.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,P).toLowerCase();return"*"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+" "];return t||(t=new RegExp("(^|"+ge+")"+e+"("+ge+"|$)"))&&s(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=I.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):"string"!=typeof n?ce.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement("div")),(be=C.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="",le.option=!!xe.lastChild;var ke={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function Se(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n",""]);var je=/<|&#?\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function Me(e,t){return fe(e,"table")&&fe(11!==t.nodeType?t:t.firstChild,"tr")&&ce(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="
",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return R(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return R(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){ce.fn[n]=function(e,t){return 0 x.length) {slideIndex = 1} + x[slideIndex-1].style.display = "block"; + setTimeout(carousel, 5000); // Change image every 2 seconds +} \ No newline at end of file diff --git a/django/src/home/static/home/media/about.webp b/django/src/home/static/home/media/about.webp new file mode 100644 index 0000000..18cc74c Binary files /dev/null and b/django/src/home/static/home/media/about.webp differ diff --git a/django/src/home/static/home/media/affiche_2023-08-23.webp b/django/src/home/static/home/media/affiche_2023-08-23.webp new file mode 100644 index 0000000..a000094 Binary files /dev/null and b/django/src/home/static/home/media/affiche_2023-08-23.webp differ diff --git a/django/src/home/static/home/media/affiche_2023-08-27.webp b/django/src/home/static/home/media/affiche_2023-08-27.webp new file mode 100644 index 0000000..8d3d07c Binary files /dev/null and b/django/src/home/static/home/media/affiche_2023-08-27.webp differ diff --git a/django/src/home/static/home/media/buffet.webp b/django/src/home/static/home/media/buffet.webp new file mode 100644 index 0000000..322f70a Binary files /dev/null and b/django/src/home/static/home/media/buffet.webp differ diff --git a/django/src/home/static/home/media/calligraphy.webp b/django/src/home/static/home/media/calligraphy.webp new file mode 100644 index 0000000..dbd91ba Binary files /dev/null and b/django/src/home/static/home/media/calligraphy.webp differ diff --git a/django/src/home/static/home/media/daf.webp b/django/src/home/static/home/media/daf.webp new file mode 100644 index 0000000..9d628bf Binary files /dev/null and b/django/src/home/static/home/media/daf.webp differ diff --git a/django/src/home/static/home/media/dhadh.webp b/django/src/home/static/home/media/dhadh.webp new file mode 100644 index 0000000..95d814c Binary files /dev/null and b/django/src/home/static/home/media/dhadh.webp differ diff --git a/django/src/home/static/home/media/dhol.webp b/django/src/home/static/home/media/dhol.webp new file mode 100644 index 0000000..fd78700 Binary files /dev/null and b/django/src/home/static/home/media/dhol.webp differ diff --git a/django/src/home/static/home/media/dholak.webp b/django/src/home/static/home/media/dholak.webp new file mode 100644 index 0000000..3ef15a3 Binary files /dev/null and b/django/src/home/static/home/media/dholak.webp differ diff --git a/django/src/home/static/home/media/drums.webp b/django/src/home/static/home/media/drums.webp new file mode 100644 index 0000000..449e6a8 Binary files /dev/null and b/django/src/home/static/home/media/drums.webp differ diff --git a/django/src/home/static/home/media/entrelac.webp b/django/src/home/static/home/media/entrelac.webp new file mode 100644 index 0000000..5efd319 Binary files /dev/null and b/django/src/home/static/home/media/entrelac.webp differ diff --git a/django/src/home/static/home/media/facebook.svg b/django/src/home/static/home/media/facebook.svg new file mode 100644 index 0000000..024dbc1 --- /dev/null +++ b/django/src/home/static/home/media/facebook.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/django/src/home/static/home/media/favicon.png b/django/src/home/static/home/media/favicon.png new file mode 100644 index 0000000..500886d Binary files /dev/null and b/django/src/home/static/home/media/favicon.png differ diff --git a/django/src/home/static/home/media/gajar_ka_halwa.webp b/django/src/home/static/home/media/gajar_ka_halwa.webp new file mode 100644 index 0000000..3ec928a Binary files /dev/null and b/django/src/home/static/home/media/gajar_ka_halwa.webp differ diff --git a/django/src/home/static/home/media/gatka.webp b/django/src/home/static/home/media/gatka.webp new file mode 100644 index 0000000..2dfa3ab Binary files /dev/null and b/django/src/home/static/home/media/gatka.webp differ diff --git a/django/src/home/static/home/media/khartal.webp b/django/src/home/static/home/media/khartal.webp new file mode 100644 index 0000000..c187b29 Binary files /dev/null and b/django/src/home/static/home/media/khartal.webp differ diff --git a/django/src/home/static/home/media/kheer_kesar.webp b/django/src/home/static/home/media/kheer_kesar.webp new file mode 100644 index 0000000..8c545b7 Binary files /dev/null and b/django/src/home/static/home/media/kheer_kesar.webp differ diff --git a/django/src/home/static/home/media/kolam.webp b/django/src/home/static/home/media/kolam.webp new file mode 100644 index 0000000..77c8cd6 Binary files /dev/null and b/django/src/home/static/home/media/kolam.webp differ diff --git a/django/src/home/static/home/media/konnakol.webp b/django/src/home/static/home/media/konnakol.webp new file mode 100644 index 0000000..c81fa4c Binary files /dev/null and b/django/src/home/static/home/media/konnakol.webp differ diff --git a/django/src/home/static/home/media/pakhawaj.webp b/django/src/home/static/home/media/pakhawaj.webp new file mode 100644 index 0000000..56e757b Binary files /dev/null and b/django/src/home/static/home/media/pakhawaj.webp differ diff --git a/django/src/home/static/home/media/portrait.webp b/django/src/home/static/home/media/portrait.webp new file mode 100644 index 0000000..0937010 Binary files /dev/null and b/django/src/home/static/home/media/portrait.webp differ diff --git a/django/src/home/static/home/media/quotes-left.svg b/django/src/home/static/home/media/quotes-left.svg new file mode 100644 index 0000000..3bb13ca --- /dev/null +++ b/django/src/home/static/home/media/quotes-left.svg @@ -0,0 +1,5 @@ + + +quotes-left + + diff --git a/django/src/home/static/home/media/quotes-right.svg b/django/src/home/static/home/media/quotes-right.svg new file mode 100644 index 0000000..87d35a2 --- /dev/null +++ b/django/src/home/static/home/media/quotes-right.svg @@ -0,0 +1,5 @@ + + +quotes-right + + diff --git a/django/src/home/static/home/media/taal.webp b/django/src/home/static/home/media/taal.webp new file mode 100644 index 0000000..8757c98 Binary files /dev/null and b/django/src/home/static/home/media/taal.webp differ diff --git a/django/src/home/static/home/media/tabla.webp b/django/src/home/static/home/media/tabla.webp new file mode 100644 index 0000000..9b74f18 Binary files /dev/null and b/django/src/home/static/home/media/tabla.webp differ diff --git a/django/src/home/static/home/media/thali.webp b/django/src/home/static/home/media/thali.webp new file mode 100644 index 0000000..1a5759b Binary files /dev/null and b/django/src/home/static/home/media/thali.webp differ diff --git a/django/src/home/static/home/media/visual.webp b/django/src/home/static/home/media/visual.webp new file mode 100644 index 0000000..f004e23 Binary files /dev/null and b/django/src/home/static/home/media/visual.webp differ diff --git a/django/src/home/templates/home/base.html b/django/src/home/templates/home/base.html new file mode 100644 index 0000000..fde2a62 --- /dev/null +++ b/django/src/home/templates/home/base.html @@ -0,0 +1,199 @@ + +{% load static %} +{% load widget_tweaks %} + + + + + + {% block title %}{% endblock %} + + + + + + +{% if request.path == '/' %} +
+ +

TAAL

+
+ +

Académie des Arts Traditionnels de l'Inde

+
+ + + + + + + + + + +
+{% endif %} + + + +
+ {% block content %}{% endblock %} +
+
+
+
+ +
+
+
+

Contact

+
+ + + + + + + + + + +
+

Adresse

+

+ 24, Prat ar Veguerez
+ Route de Lannedern
+ 29190 BRASPARTS +

+
+ +
+
+ + + + + + + +
+

Téléphone

+

06 24 20 76 09

+
+ +
+
+ + + + + mail + Created with Sketch Beta. + + + + + + + + + +
+
+
+
+ {% csrf_token %} + {% render_field form.name class="contact-form-input" placeholder=form.name.label type="text" %} + {% render_field form.mail class="contact-form-input" placeholder=form.mail.label type="email" %} + {% render_field form.subject class="contact-form-input" placeholder=form.subject.label type="text" %} + {% render_field form.body class="contact-form-input" placeholder=form.body.label type="text" %} + + {% if messages %} + {% for message in messages %} +
+ {{ message }} +
+ {% endfor %} + {% endif %} +
+
+
+
+
+

+ © {{ current_year }} Académie + des Arts Traditionnels de l’Inde +

+

+ Mentions Légales +

+

+ Créé et hébergé par NETig ! +

+
+ + + +
+ + diff --git a/django/src/home/templates/home/index.html b/django/src/home/templates/home/index.html new file mode 100644 index 0000000..8816643 --- /dev/null +++ b/django/src/home/templates/home/index.html @@ -0,0 +1,250 @@ +{% extends 'home/base.html' %} +{% load static %} + +{% block title %}TAAL - Académie des Arts Traditionnels de l'Inde{% endblock %} + +{% block content %} + +
+
+ Portrait +
+

Apprenez les Arts Traditionnels de l'Inde avec TAAL Académie

+

+ TAAL Académie est engagée depuis 2013 dans la promotion des Arts Traditionnels (classiques et folks) de + l'Inde et du Pakistan, à travers l'enseignement de l'Art Musical (tabla, pakhawaj, + srikhol, dhol, dholak, dhadh, daf, khartal du Rajasthan, naqqara, konnakol...Sargam), l'Art Martial (Gatka), les Arts Visuels (Rangoli/Kollam), la + Spiritualité (Naad Yoga, Surat Shabad Yoga, Méditation), la Cuisine (indienne, + végétalienne et végétarienne), et bien plus encore... +

+ Plus d'infos → +
+
+
+
+

Cuisines

+
+
+ Kheer Kesar + Thali + Gajar ka Halwa +
+ +
+

+ Dans ces ateliers de cuisine authentique indienne et végétarienne/végétalienne, + je vous propose d'apprendre à réaliser un Thali du Nord comme du Sud de l'Inde (repas complet et + traditionnel de recettes de tout les jours, faciles à réaliser avec des légumes de saison et locaux, + servis sur le Thali). +

+

+ Des ateliers spécifiques sur la présentation des épices et de leurs vertus, les + différents pains indiens (chapati, paratha, laccha paratha, etc), les crêpes dosa (lacto fermentées) + et + idli (pains cuit à la vapeur) du Sud de l'Inde, les différents condiments (chutney, pickles, acchar) + et + les desserts, avec toujours une option sans lactose, sans gluten, sans sucre sur demande. +

+

+ Nous terminons toujours ces ateliers par la dégustation des recettes réalisées ensemble et + présentées + dans la vaisselle indienne traditionnelle en inox (bartan). +

+ Plus d'infos → +
+
+
+
+
+

Percussions

+
+ Tabla +
+

Tabla

+

+ Percussion classique de l'Inde du Nord +

+ Plus d'infos → +
+
+
+ Pakhawaj +
+

Pakhawaj

+

+ Percussion Sacrée des Temples et de la musique Dhrupad +

+ Plus d'infos → +
+
+
+ Khartal +
+

Khartal

+

+ Castagnettes virtuoses du Rajasthan +

+ Plus d'infos → +
+
+
+ Dholak +
+

Dholak

+

+ Percussion digitale folk bi–faces +

+ Plus d'infos → +
+
+
+ Dhol +
+

Dhol

+

+ Percussion baguettes du Panjab +

+ Plus d'infos → +
+
+
+ Dhadh +
+

Dhadh

+

+ Percussion digitale des Bardes du Panjab +

+ Plus d'infos → +
+
+
+ Daf +
+

Daf

+

+ Tambour digital sur cadre +

+ Plus d'infos → +
+
+
+ Konnakol +
+

Konnakol

+

+ Percussion vocale de l'Inde du Sud +

+ Plus d'infos → +
+
+
+
+
+

Gatka & Shakti Yoga

+
+
+

Le Gatka... pour faire l'expérience de la Grâce

+

+ Le Gatka est un art martial ancien qui a fait ses preuves à travers de nombreuses batailles et + existe + dans le Nord de l'Inde depuis des milliers d'années. +

+

+ Exercice autant spirituel que physique, le Gatka est basé sur le principe d'unification de l'esprit, de + l'âme et du corps, par le rythme de la vie, nous entraînant à être capable de se défendre nous-mêmes. +

+

+ En plus de donner à l'élève des talents défensifs, il permet également à l'individu, de garder l'esprit + alerte et réactif, de maintenir le corps dans des conditions presque parfaites et rendre l'âme sans + aucune peur, compatissante et tranquille. +

+

+ Gatka signifie « Grâce » et « arrêt de la pensée », ou encore « état d'extase ». Ceci est rendu possible + grâce à l'ensemble des mouvements du Gatka, basés sur le « 8 »; le signe de l'infini. +

+

+ Nous pratiquerons le Shakti Yoga qui a le pouvoir d'éveiller et renforcer la lionne et le lion + intérieur, aidant à maîtriser nos peurs et notre destin, et ainsi devenir Un avec Tout. +

+ Plus d'infos → +
+
+
+ +
+
+
+

Cours & Stages

+

Des Cours et Ateliers sont proposés à Brasparts, dans le Finistère et les départements voisins :

+
+
    +
  • Rythmes indiens et Konnakol (percussion vocale du Sud de l'Inde)
  • +
  • Percussions folks et classiques du Nord de l'Inde
  • +
  • Chant indien (Sargam)
  • +
  • Arts visuels (Kollam/Rangoli)
  • +
  • Art Martial indien (Gatka)
  • +
  • Cuisine indienne végétarienne et vegan
  • +
  • Alimentation Vivante et Consciente
  • +
  • Yoga et méditation (Shakti yoga, Naad yoga, Surat Shabad yoga)
  • +
  • Vaastu (géobiologie indienne/Feng Shui sacré de l'Inde)
  • +
+
+
+ {% block workshops %}{% endblock %} +
+
+

→ Si vous êtes intéréssé(e) par un cours ou atelier non programmé n'hésitez pas à nous contacter.

+
+
+
+
+

Évenements à venir

+
+ Affiche +
+

Telenn ar Sterennoù, le 27 août 2023

+

Andrea Seki

+

Compositions originales et inédites pour Harpe Néo Celtique Fx Loop Chants

+

Harjit Singh

+

Percussions Indiennes

+
+
+
+ Affiche +
+

Telenn ar Sterennoù, le 23 août 2023

+

Andrea Seki

+

Compositions originales et inédites pour Harpe Néo Celtique Fx Loop Chants

+

Harjit Singh

+

Percussions Indiennes

+
+
+
+
+{% endblock %} \ No newline at end of file diff --git a/django/src/home/tests.py b/django/src/home/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/django/src/home/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/django/src/home/urls.py b/django/src/home/urls.py new file mode 100644 index 0000000..6e21aeb --- /dev/null +++ b/django/src/home/urls.py @@ -0,0 +1,6 @@ +from django.urls import path +from . import views + +urlpatterns = [ + path('', views.index, name='index'), +] diff --git a/django/src/home/views.py b/django/src/home/views.py new file mode 100644 index 0000000..0eae12d --- /dev/null +++ b/django/src/home/views.py @@ -0,0 +1,9 @@ +from django.shortcuts import render +from workshops.models import Workshop + + +# Create your views here. +def index(request): + workshops = Workshop.objects.all() + data = {'workshops': workshops} + return render(request, 'workshops/index.html', data) diff --git a/django/src/local.env b/django/src/local.env new file mode 100644 index 0000000..800c54d --- /dev/null +++ b/django/src/local.env @@ -0,0 +1,32 @@ +####################################### +### Docker + +POSTGRES_USER=postgres +POSTGRES_DB=postgres +#POSTGRES_PASSWORD= + +DJANGO_ENV=local + +####################################### +### Django + +# Security +DEBUG=False +#SECRET_KEY= +ALLOWED_HOSTS=127.0.0.1,localhost +CSRF_TRUSTED_ORIGINS=http://127.0.0.1:8001,http://localhost:8001 + +# Database +DATABASE_NAME=postgres +DATABASE_USER=postgres +#DATABASE_PASS= +DATABASE_HOST=taal-academiearreebzh_postgres +DATABASE_PORT=5432 + +# SMTP server +EMAIL_HOST=mail.netig.net +EMAIL_HOST_USER=test@netig.net +#EMAIL_HOST_PASSWORD= +EMAIL_PORT=465 +EMAIL_USE_SSL=True +EMAIL_USE_TLS=False diff --git a/django/src/manage.py b/django/src/manage.py new file mode 100755 index 0000000..8e7ac79 --- /dev/null +++ b/django/src/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +"""Django's command-line utility for administrative tasks.""" +import os +import sys + + +def main(): + """Run administrative tasks.""" + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings') + try: + from django.core.management import execute_from_command_line + except ImportError as exc: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) from exc + execute_from_command_line(sys.argv) + + +if __name__ == '__main__': + main() diff --git a/django/src/pages/__init__.py b/django/src/pages/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/django/src/pages/__pycache__/__init__.cpython-312.pyc b/django/src/pages/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..f9714ac Binary files /dev/null and b/django/src/pages/__pycache__/__init__.cpython-312.pyc differ diff --git a/django/src/pages/__pycache__/admin.cpython-312.pyc b/django/src/pages/__pycache__/admin.cpython-312.pyc new file mode 100644 index 0000000..7d353a9 Binary files /dev/null and b/django/src/pages/__pycache__/admin.cpython-312.pyc differ diff --git a/django/src/pages/__pycache__/apps.cpython-312.pyc b/django/src/pages/__pycache__/apps.cpython-312.pyc new file mode 100644 index 0000000..3162b1a Binary files /dev/null and b/django/src/pages/__pycache__/apps.cpython-312.pyc differ diff --git a/django/src/pages/__pycache__/models.cpython-312.pyc b/django/src/pages/__pycache__/models.cpython-312.pyc new file mode 100644 index 0000000..52c12e1 Binary files /dev/null and b/django/src/pages/__pycache__/models.cpython-312.pyc differ diff --git a/django/src/pages/__pycache__/urls.cpython-312.pyc b/django/src/pages/__pycache__/urls.cpython-312.pyc new file mode 100644 index 0000000..86b376d Binary files /dev/null and b/django/src/pages/__pycache__/urls.cpython-312.pyc differ diff --git a/django/src/pages/__pycache__/views.cpython-312.pyc b/django/src/pages/__pycache__/views.cpython-312.pyc new file mode 100644 index 0000000..6861a16 Binary files /dev/null and b/django/src/pages/__pycache__/views.cpython-312.pyc differ diff --git a/django/src/pages/admin.py b/django/src/pages/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/django/src/pages/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/django/src/pages/apps.py b/django/src/pages/apps.py new file mode 100644 index 0000000..cdd024b --- /dev/null +++ b/django/src/pages/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class PagesConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'pages' diff --git a/django/src/pages/migrations/__init__.py b/django/src/pages/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/django/src/pages/migrations/__pycache__/__init__.cpython-312.pyc b/django/src/pages/migrations/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..5448ada Binary files /dev/null and b/django/src/pages/migrations/__pycache__/__init__.cpython-312.pyc differ diff --git a/django/src/pages/models.py b/django/src/pages/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/django/src/pages/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/django/src/pages/templates/pages/about.html b/django/src/pages/templates/pages/about.html new file mode 100644 index 0000000..a3877f8 --- /dev/null +++ b/django/src/pages/templates/pages/about.html @@ -0,0 +1,30 @@ +{% extends 'home/base.html' %} +{% load static %} + +{% block title %}TAAL : Présentation{% endblock %} + +{% block content %} +
+
+

Bio

+
+

+ Diplômé des Arts Graphiques et des Arts Plastiques, Harjit Singh commence ses études de batterie en + 1984, et + étudie le tabla, dès 1993 en Inde auprès des plus grands maîtres de la tradition classique, puis toutes + les + percussions folks et classiques du Nord de l'Inde (pakhawaj et jorhi, dholak, dhol, naqara, khartals du + Rajasthan), ainsi que le chant indien, la vièle sarangi et le Gatka (Art Martial indien) en 1999, qu'il + enseigne depuis à tout les publics, en Bretagne, en France et en Europe. Il anime pendant dix ans, à la + Cité + de la musique, des ateliers pédagogiques. +

+

+ Il accompagne régulièrement la danse indienne et récitals de musique hindustani, ainsi que des créations + plus contemporaines et transversales, compose pour le cinéma et la télévision et anime également des + stages + de cuisine indienne et alimentation vivante. +

+
+
+{% endblock %} \ No newline at end of file diff --git a/django/src/pages/templates/pages/cooking.html b/django/src/pages/templates/pages/cooking.html new file mode 100644 index 0000000..382510b --- /dev/null +++ b/django/src/pages/templates/pages/cooking.html @@ -0,0 +1,127 @@ +{% extends 'home/base.html' %} +{% load static %} + +{% block title %}TAAL : Cuisines{% endblock %} + +{% block content %} +
+
+

Cuisines

+ +
+

Atelier de Cuisine Indienne Végéta*ienne

+

+ Lieu : Cuisine de la salle des fêtes
+ 362 Impasse de la Salle des Fêtes, 29190 Brasparts +

+

+ Durée : 4 h (+ temps du repas) +

+

+ Langue : Français, Anglais +

+

Venez apprendre à cuisiner avec les épices de l'Inde

+

+ Dans cet atelier de cuisine authentique indienne et végétarienne/végétalienne*, je vous propose + d'apprendre + à réaliser un thali du Nord ou du Sud de l'Inde (repas complet et traditionnel de recettes de tout les + jours, faciles à réaliser avec des légumes de saison et locaux, servi sur le thali) comprenant : +

+
    +
  • 1 entrée
  • +
  • 1 plat de légumineuses (dal) ou 1 plat de légumes
  • +
  • 1 accompagnement (pains indiens/chapati/paratha)
  • +
  • 1 dessert
  • +
+

+ Tout les ingrédients sont issus de l'agriculture biologique (sauf quelques épices indiennes que je + commande + en Inde) +

+

+ Déroulement de l'atelier : +

+
    +
  • Présentation des épices et de leurs vertus.
  • +
  • Confection des plats et des galettes de pains.
  • +
  • Nous terminerons cet atelier par la dégustation des recettes réalisées ensemble et présentées dans + la + vaisselle indienne traditionnelle en inox (bartan) +
  • +
+

Prévoir :

+
    +
  • un tablier
  • +
  • un rouleau à pâtisserie pour la confection des pains
  • +
  • un couteau de cuisine
  • +
  • une planche à découper
  • +
  • de quoi noter les recettes
  • +
  • le temps de repas au delà de 19h
  • +
+

+ Tarif : 40 euros par participant-e +

+

+ Informations et inscription via taal.academie@gmail.com ou taal-academie@arree.bzh + 06 24 20 76 09 taal-academie.arree.bzh > pour découvrir les autres dates d'atelier (1 à 2 fois par mois)
+

+

+ *(précisez-moi vos intolérances et allergies – lactose, gluten, sucre, oignon, piment, ...) +

+

+ Au plaisir de partager avec vous ces saveurs de l'Inde, qui enchantent mon quotidien depuis 30 ans, dans + la + joie et la bonne humeur !
+

+

+ Harjit +

+

+ Ces ateliers peuvent se dérouler chez vous, dès que vous avez un groupe de personnes intéressées + (15 + maximum) et l'espace (une cuisine équipée ou non) pour accueillir un atelier (9H -13H ou 15h - 19h + + temps + du repas) +

+


Chef à domicile

+

+ Pour vos déjeuner ou dîner entre amis, fêtes, anniversaires, ... je me déplace dans le Finistère et + proche + Cotes d'Armor, Morbihan pour vous faire découvrir la gastronomie de la cuisine indienne authentique et + vous + proposer un menu complet végétarien ou végétalien/vegan*, servi dans la vaisselle indienne (thali en + inox), + cuisiné au feu de bois et livré chez vous ou cuisiné sur place (les dernières préparations seront + cuisinées + sur place - chapati, paratha,...) pour une fraîcheur optimale. +

+

+ *(précisez-moi vos intolérances et allergies – lactose, gluten, sucre, oignon, piment, ...) +

+

+ Menus au choix : +

+
    +
  • Inde du nord (Cachemire, Panjab, Rajasthan, Gujarat, ...)
  • +
  • Inde de l'Est (Bengal, Orissa)
  • +
  • Inde du Sud (Maharastra, Kerala, Tamil Nadu, ...)
  • +
+
+
+ +
+
+
+{% endblock %} \ No newline at end of file diff --git a/django/src/pages/templates/pages/drums.html b/django/src/pages/templates/pages/drums.html new file mode 100644 index 0000000..88e3e96 --- /dev/null +++ b/django/src/pages/templates/pages/drums.html @@ -0,0 +1,16 @@ +{% extends 'home/base.html' %} +{% load static %} + +{% block title %}TAAL : Percussions{% endblock %} + +{% block content %} +
+
+

Percussions

+
+

+ En cours de rédaction... +

+
+
+{% endblock %} \ No newline at end of file diff --git a/django/src/pages/templates/pages/gatka.html b/django/src/pages/templates/pages/gatka.html new file mode 100644 index 0000000..53666d3 --- /dev/null +++ b/django/src/pages/templates/pages/gatka.html @@ -0,0 +1,66 @@ +{% extends 'home/base.html' %} +{% load static %} + +{% block title %}TAAL : Gatka{% endblock %} + +{% block content %} +
+
+

Gatka

+
+
+

Harjit Singh

+

+ Après avoir senti très tôt l'appel de l'Épée, et dédié sa vie à la musique et à l'art, Harjit Singh + commence + par pratiquer l'escrime dans ses jeunes années, avec un Maître d'Arme, en France. +

+

+ Ses études de graphisme et d'arts plastiques terminées, il débute dès 1993, le long apprentissage + traditionnel des rythmes et percussions classiques et folks Hindustani (tabla, pakhawaj, naqara, + dhol et + dholak...), auprès de différents Maîtres, en Inde du Nord. +

+ +

+ Il y découvre les traditions du Panjab dès 1999, là où naît son amour pour le Gatka, et le Dharma + Sikh. +

+

+ Il rejoint depuis le premier Akharaa (espace d'entraînement) de Gatka, dans le premier Gurdwara + (lieu de + culte Sikh) près de Paris et se produit dans toute l'Europe au sein du groupe 'Miri Piri Gatka + Akharaa'. + Aujourd'hui, Harjit Singh ouvre au grand public pour la première fois en Bretagne l'enseignement du + Gatka + associé au Shakti Yoga. +

+

+ Longtemps enseigné dans l'enceinte des temples Sikhs, et transmis aux seuls initiés baptisés par + l'Amrit + et + adoubés par l'épée, le Gatka est un art martial que les Sikhs ont développé au plus haut niveau. +

+

+ En rendant le Gatka accessible à tous, Harjit Singh souhaite offrir à chacun-e l'expérience de la + Grâce, + la + rencontre avec sa dimension divine et son guerrier intérieur. +

+
+
+
+ +
+

Démonstration de Gatka au 33ème festival des arts martiaux
+ Tradition : Shastar Vidya / Gatka / Raj Yoga

+ Facebook + +
+
+
+{% endblock %} \ No newline at end of file diff --git a/django/src/pages/templates/pages/legal.html b/django/src/pages/templates/pages/legal.html new file mode 100644 index 0000000..c8c2913 --- /dev/null +++ b/django/src/pages/templates/pages/legal.html @@ -0,0 +1,27 @@ +{% extends 'home/base.html' %} +{% load static %} + +{% block title %}TAAL : Mentions légales{% endblock %} + +{% block content %} +
+

Mentions Légales

+
+
+ Siret : 815 370 952 00013
+ RNA : W931011248
+ Création : 15/02/2013
+ Publication : 02/03/2013
+ +
+
+

+ Harjit Singh
+ 24 Prat ar Veguerez
+ Route de Lannedern
+ 29190 BRASPARTS
+

+
+
+
+{% endblock %} \ No newline at end of file diff --git a/django/src/pages/templates/pages/visual.html b/django/src/pages/templates/pages/visual.html new file mode 100644 index 0000000..f12620a --- /dev/null +++ b/django/src/pages/templates/pages/visual.html @@ -0,0 +1,44 @@ +{% extends 'home/base.html' %} +{% load static %} + +{% block title %}TAAL : Arts visuels{% endblock %} + +{% block content %} +
+
+

Arts Visuels

+
+

Rangoli & Kolam

+

+ En Inde, perdure malgré la mondialisation, une tradition ancestrale transmise de générations en + générations, bien souvent féminines. +

+

+ L'art des Rangoli (Nord de l'Inde) ou Kolam (Sud de l'Inde), englobe le réalisation de mandalas + éphémères car réalisés à la poudre de riz, tracés à même le sol devant les maisons. Les couleurs + sont + utilisées pour les grandes occasions. +

+

+ Un art quotidien pour célébrer la vie, le vivant, la Nature et accueillir le Divin dans sa demeure + pour + protéger ses habitants. +

+

+ Un art accessible à tous et à tout age +

+
+
+

Calligraphie

+

+ En cours de rédaction... +

+
+
+

Entrelacs Celtiques

+

+ En cours de rédaction... +

+
+
+{% endblock %} \ No newline at end of file diff --git a/django/src/pages/tests.py b/django/src/pages/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/django/src/pages/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/django/src/pages/urls.py b/django/src/pages/urls.py new file mode 100644 index 0000000..f7e2556 --- /dev/null +++ b/django/src/pages/urls.py @@ -0,0 +1,11 @@ +from django.urls import path +from . import views + +urlpatterns = [ + path('about/', views.about, name='about'), + path('cooking/', views.cooking, name='cooking'), + path('drums/', views.drums, name='drums'), + path('gatka/', views.gatka, name='gatka'), + path('visual/', views.visual, name='visual'), + path('legal/', views.legal, name='legal'), +] diff --git a/django/src/pages/views.py b/django/src/pages/views.py new file mode 100644 index 0000000..46995e6 --- /dev/null +++ b/django/src/pages/views.py @@ -0,0 +1,26 @@ +from django.shortcuts import render + + +# Create your views here. +def about(request): + return render(request, 'pages/about.html') + + +def cooking(request): + return render(request, 'pages/cooking.html') + + +def drums(request): + return render(request, 'pages/drums.html') + + +def gatka(request): + return render(request, 'pages/gatka.html') + + +def visual(request): + return render(request, 'pages/visual.html') + + +def legal(request): + return render(request, 'pages/legal.html') diff --git a/django/src/prod.env b/django/src/prod.env new file mode 100644 index 0000000..4bbeec6 --- /dev/null +++ b/django/src/prod.env @@ -0,0 +1,32 @@ +####################################### +### Docker + +POSTGRES_USER=postgres +POSTGRES_DB=postgres +#POSTGRES_PASSWORD= + +DJANGO_ENV=prod + +####################################### +### Django + +# Security +DEBUG=False +#SECRET_KEY= +ALLOWED_HOSTS=taal-academie.arree.bzh +CSRF_TRUSTED_ORIGINS=https://taal-academie.arree.bzh + +# Database +DATABASE_NAME=postgres +DATABASE_USER=postgres +#DATABASE_PASS= +DATABASE_HOST=taal-academiearreebzh_postgres +DATABASE_PORT=5432 + +# SMTP server +EMAIL_HOST=smtpauth.infini.fr +EMAIL_HOST_USER=taal-academie@arree.bzh +#EMAIL_HOST_PASSWORD= +EMAIL_PORT=587 +EMAIL_USE_SSL=False +EMAIL_USE_TLS=False diff --git a/django/src/workshops/__init__.py b/django/src/workshops/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/django/src/workshops/__pycache__/__init__.cpython-312.pyc b/django/src/workshops/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..f05ed77 Binary files /dev/null and b/django/src/workshops/__pycache__/__init__.cpython-312.pyc differ diff --git a/django/src/workshops/__pycache__/admin.cpython-312.pyc b/django/src/workshops/__pycache__/admin.cpython-312.pyc new file mode 100644 index 0000000..0718572 Binary files /dev/null and b/django/src/workshops/__pycache__/admin.cpython-312.pyc differ diff --git a/django/src/workshops/__pycache__/apps.cpython-312.pyc b/django/src/workshops/__pycache__/apps.cpython-312.pyc new file mode 100644 index 0000000..8799be2 Binary files /dev/null and b/django/src/workshops/__pycache__/apps.cpython-312.pyc differ diff --git a/django/src/workshops/__pycache__/models.cpython-312.pyc b/django/src/workshops/__pycache__/models.cpython-312.pyc new file mode 100644 index 0000000..57be895 Binary files /dev/null and b/django/src/workshops/__pycache__/models.cpython-312.pyc differ diff --git a/django/src/workshops/__pycache__/urls.cpython-312.pyc b/django/src/workshops/__pycache__/urls.cpython-312.pyc new file mode 100644 index 0000000..b1c85c1 Binary files /dev/null and b/django/src/workshops/__pycache__/urls.cpython-312.pyc differ diff --git a/django/src/workshops/__pycache__/views.cpython-312.pyc b/django/src/workshops/__pycache__/views.cpython-312.pyc new file mode 100644 index 0000000..4c51a91 Binary files /dev/null and b/django/src/workshops/__pycache__/views.cpython-312.pyc differ diff --git a/django/src/workshops/admin.py b/django/src/workshops/admin.py new file mode 100644 index 0000000..f574887 --- /dev/null +++ b/django/src/workshops/admin.py @@ -0,0 +1,5 @@ +from django.contrib import admin +from .models import Workshop + +# Register your models here. +admin.site.register(Workshop) diff --git a/django/src/workshops/apps.py b/django/src/workshops/apps.py new file mode 100644 index 0000000..06eedb0 --- /dev/null +++ b/django/src/workshops/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class WorkshopsConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'workshops' diff --git a/django/src/workshops/migrations/0001_initial.py b/django/src/workshops/migrations/0001_initial.py new file mode 100644 index 0000000..f50c48b --- /dev/null +++ b/django/src/workshops/migrations/0001_initial.py @@ -0,0 +1,23 @@ +# Generated by Django 4.2 on 2024-01-08 10:37 + +from django.db import migrations, models +import tinymce.models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Workshop', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=512)), + ('body', tinymce.models.HTMLField()), + ], + ), + ] diff --git a/django/src/workshops/migrations/__init__.py b/django/src/workshops/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/django/src/workshops/migrations/__pycache__/0001_initial.cpython-312.pyc b/django/src/workshops/migrations/__pycache__/0001_initial.cpython-312.pyc new file mode 100644 index 0000000..62ee895 Binary files /dev/null and b/django/src/workshops/migrations/__pycache__/0001_initial.cpython-312.pyc differ diff --git a/django/src/workshops/migrations/__pycache__/__init__.cpython-312.pyc b/django/src/workshops/migrations/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..fdf4245 Binary files /dev/null and b/django/src/workshops/migrations/__pycache__/__init__.cpython-312.pyc differ diff --git a/django/src/workshops/models.py b/django/src/workshops/models.py new file mode 100644 index 0000000..ba7b085 --- /dev/null +++ b/django/src/workshops/models.py @@ -0,0 +1,11 @@ +from django.db import models +from tinymce.models import HTMLField + + +# Create your models here. +class Workshop(models.Model): + title = models.CharField(max_length=512) + body = HTMLField() + + def __str__(self): + return self.title diff --git a/django/src/workshops/templates/workshops/index.html b/django/src/workshops/templates/workshops/index.html new file mode 100644 index 0000000..75cf0d4 --- /dev/null +++ b/django/src/workshops/templates/workshops/index.html @@ -0,0 +1,11 @@ +{% extends 'home/index.html' %} +{% load static %} + +{% block workshops %} + {% for workshop in workshops %} +
+

{{ workshop.title }}

+

{{ workshop.body|safe }}

+
+ {% endfor %} +{% endblock %} \ No newline at end of file diff --git a/django/src/workshops/tests.py b/django/src/workshops/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/django/src/workshops/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/django/src/workshops/urls.py b/django/src/workshops/urls.py new file mode 100644 index 0000000..4977f0e --- /dev/null +++ b/django/src/workshops/urls.py @@ -0,0 +1,6 @@ +from django.urls import path +from . import views + +urlpatterns = [ + path('', views.index, name='workshops'), +] diff --git a/django/src/workshops/views.py b/django/src/workshops/views.py new file mode 100644 index 0000000..e384ca3 --- /dev/null +++ b/django/src/workshops/views.py @@ -0,0 +1,9 @@ +from django.shortcuts import render +from .models import Workshop + + +# Create your views here. +def index(request): + workshops = Workshop.objects.all() + data = {'workshops': workshops} + return render(request, 'workshops/index.html', data) diff --git a/nginx/Dockerfile b/nginx/Dockerfile new file mode 100644 index 0000000..1e87912 --- /dev/null +++ b/nginx/Dockerfile @@ -0,0 +1,8 @@ +# Fetching the base image +FROM nginx:1.25.3-alpine + +# Copying configuration file +COPY ./default.conf /etc/nginx/conf.d/default.conf + +# Exposing port +EXPOSE 8001 diff --git a/nginx/default.conf b/nginx/default.conf new file mode 100644 index 0000000..83e7b56 --- /dev/null +++ b/nginx/default.conf @@ -0,0 +1,20 @@ +upstream django { + server django:8001; +} + +server { + + listen 8001; + + location / { + proxy_pass http://django; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $host; + proxy_redirect off; + } + location /static/ { + autoindex on; + alias /django/static/; + } + +}