Compare commits

..

2 commits

Author SHA1 Message Date
456837aa45 Base scaffold 2024-11-13 12:19:06 +01:00
a86535257b Init project 2024-11-13 12:18:55 +01:00
23 changed files with 569 additions and 0 deletions

2
.gitignore vendored
View file

@ -162,3 +162,5 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
settings.py
public

0
mainsite/__init__.py Normal file
View file

3
mainsite/admin.py Normal file
View file

@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.

6
mainsite/apps.py Normal file
View file

@ -0,0 +1,6 @@
from django.apps import AppConfig
class MainsiteConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'mainsite'

View file

3
mainsite/models.py Normal file
View file

@ -0,0 +1,3 @@
from django.db import models
# Create your models here.

10
mainsite/scss/Makefile Normal file
View file

@ -0,0 +1,10 @@
STYLES=style.scss
IMPORTS=$(shell ls -1 _*.scss)
OUTDIR=../static/css
SASS=sassc
all: $(addprefix $(OUTDIR)/,$(STYLES:.scss=.css))
$(OUTDIR)/%.css: %.scss $(IMPORTS)
$(SASS) "$<" "$@"

View file

@ -0,0 +1,14 @@
// vim: tabstop=2 shiftwidth=2 expandtab
$bg_color: white;
$link_color: #07a;
$fg_color: #555;
$fg_color_light: #555555bb;
$head_bg_color: #060033;
$resp_small: 1350px;
$resp_vsmall: 1000px;
$profile_pic_wid: 350px;
$profile_pic_wid_small: 180px;
$profile_pic_wid_vsmall: 250px;

141
mainsite/scss/style.scss Normal file
View file

@ -0,0 +1,141 @@
// vim: tabstop=2 shiftwidth=2 expandtab
@import url('fonts.css');
@import 'params';
html {
background-color: $bg_color;
}
body {
font-family:Open Sans,Arial;
color:#555;
font-size:16px;
line-height:1.4;
text-align:justify;
margin: 0;
padding: 0;
}
header {
background-color: $head_bg_color;
display: flex;
flex-flow: row wrap;
justify-content: space-between;
align-items: center;
margin: 0;
padding: 30px 60px;
color: $bg_color;
@media (max-width: $resp_vsmall) {
padding: 20px;
}
.title, .whoami {
font-size: 1.4em;
font-weight: bold;
}
a, a:visited {
color: $bg_color;
}
}
#content {
display: flex;
justify-content: space-between;
@media (max-width: $resp_vsmall) {
flex-wrap: wrap;
}
main {
margin:2em auto;
max-width:800px;
padding:1em;
flex-basis: 800px;
}
}
.items {
display: grid;
grid-template-columns: 100px auto;
.head {
grid-column: 1/span 1;
font-weight: bold;
}
}
.phdtitle {
font-size: 1.1em;
text-align: center;
font-weight: bold;
}
a, a:visited {
color: $link_color;
text-decoration:none;
}
.fa {
color:#555
}
h1 {
margin-left:-10px;
}
h2 {
margin-top: 30px;
margin-left:20px;
.fa {
margin-right: 10px;
}
}
#whoami {
text-align: right;
font-size: 1.2em;
font-style: italic;
}
ul.docsline {
list-style: none;
text-align: center;
margin-top: 30px;
font-size: 1.1em;
li {
display: inline-block;
a {
display: inline-block;
padding: 0 15px;
}
}
}
dl {
list-style: none;
display: grid;
grid-template-columns: 1fr 3fr;
dt {
grid-column: 1 / span 1;
justify-self: end;
text-align: right;
margin-right: 20px;
font-weight: bold;
}
dd {
margin-left: 20px;
justify-self: start;
text-align: left;
}
}
.antispam {
unicode-bidi: bidi-override;
direction: rtl;
}

View file

@ -0,0 +1,105 @@
@import url("fonts.css");
html {
background-color: white; }
body {
font-family: Open Sans,Arial;
color: #555;
font-size: 16px;
line-height: 1.4;
text-align: justify;
margin: 0;
padding: 0; }
header {
background-color: #060033;
display: flex;
flex-flow: row wrap;
justify-content: space-between;
align-items: center;
margin: 0;
padding: 30px 60px;
color: white; }
@media (max-width: 1000px) {
header {
padding: 20px; } }
header .title, header .whoami {
font-size: 1.4em;
font-weight: bold; }
header a, header a:visited {
color: white; }
#content {
display: flex;
justify-content: space-between; }
@media (max-width: 1000px) {
#content {
flex-wrap: wrap; } }
#content main {
margin: 2em auto;
max-width: 800px;
padding: 1em;
flex-basis: 800px; }
.items {
display: grid;
grid-template-columns: 100px auto; }
.items .head {
grid-column: 1/span 1;
font-weight: bold; }
.phdtitle {
font-size: 1.1em;
text-align: center;
font-weight: bold; }
a, a:visited {
color: #07a;
text-decoration: none; }
.fa {
color: #555; }
h1 {
margin-left: -10px; }
h2 {
margin-top: 30px;
margin-left: 20px; }
h2 .fa {
margin-right: 10px; }
#whoami {
text-align: right;
font-size: 1.2em;
font-style: italic; }
ul.docsline {
list-style: none;
text-align: center;
margin-top: 30px;
font-size: 1.1em; }
ul.docsline li {
display: inline-block; }
ul.docsline li a {
display: inline-block;
padding: 0 15px; }
dl {
list-style: none;
display: grid;
grid-template-columns: 1fr 3fr; }
dl dt {
grid-column: 1 / span 1;
justify-self: end;
text-align: right;
margin-right: 20px;
font-weight: bold; }
dl dd {
margin-left: 20px;
justify-self: start;
text-align: left; }
.antispam {
unicode-bidi: bidi-override;
direction: rtl; }

View file

@ -0,0 +1,25 @@
{% load static %}
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Soutenance de thèse — Théophile Bastian</title>
<link rel="stylesheet" href="{% static "css/style.css" %}">
</head>
<body>
<header>
{% include "navbar.html" %}
</header>
<div id="content">
<main>
{% block content %}
{% endblock content %}
<main>
</div>
</body>
</html>

View file

@ -0,0 +1,2 @@
<div class="title"><a href="/">Théophile Bastian</a></div>
<div class="whoami">Soutenance de thèse</div>

View file

@ -0,0 +1,44 @@
{% extends "base.html" %}
{% load lucide %}
{% block content %}
<h1>Soutenance de thèse</h1>
<p>
Le <b>lundi 9 décembre 2024</b> prochain, je vais soutenir ma thèse de doctorat
d'informatique à l'Université Grenoble Alpes, intitulée
</p>
<div class="phdtitle">
Étude de performance&nbsp;: identification de bottlenecks par analyse de
sensitivité
</div>
<p>La soutenance sera <b>en anglais</b>, et retransmise en visio (lien
prochainement disponible), une partie du jury étant à distance.</p>
<p>Toute personne qui le souhaite est bienvenue pour y assister !</p>
<h2>Détails pratiques</h2>
<dl>
<dt>{% lucide "calendar" %}</dt>
<dd>Lundi 9 décembre 2024</dd>
<dt>{% lucide "clock" %}</dt>
<dd>14h</dd>
<dt>{% lucide "map-pin" %}</dt>
<dd>Salle Séminaire 2, RDC, bâtiment IMAG<br/>
Campus universitaire, Université Grenoble Alpes<br/>
<a href="https://osm.org/go/0CASk7WTo--?relation=6158280">Voir sur une carte</a></dd>
</dd>
<dt>{% lucide "tram-front" %}</dt>
<dd>B/C Gabriel Fauré<br/>
C5/C8 Université Bibliothèques</dd>
</dl>
{% endblock content %}

4
mainsite/urls.py Normal file
View file

@ -0,0 +1,4 @@
from django.urls import path
from . import views
urlpatterns = [path("", views.HomeView.as_view(), name="home")]

8
mainsite/views.py Normal file
View file

@ -0,0 +1,8 @@
from django.shortcuts import render
from django.views.generic import TemplateView
class HomeView(TemplateView):
"""Home page"""
template_name = "phd/home.html"

22
manage.py Executable file
View file

@ -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', 'phd_site.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()

0
phd_site/__init__.py Normal file
View file

16
phd_site/asgi.py Normal file
View file

@ -0,0 +1,16 @@
"""
ASGI config for phd_site 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/5.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'phd_site.settings')
application = get_asgi_application()

22
phd_site/settings.prod.py Normal file
View file

@ -0,0 +1,22 @@
from pathlib import Path
from .settings_base import *
BASE_DIR = Path(__file__).resolve().parent.parent
SECRET_KEY = "blah" # FIXME
DEBUG = True # FIXME
ALLOWED_HOSTS = []
# Database
# https://docs.djangoproject.com/en/5.1/ref/settings/#databases
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": BASE_DIR / "db.sqlite3",
}
}
PUBLIC_ROOT: Path = Path(__file__).absolute().parent.parent.parent
STATIC_ROOT = (PUBLIC_ROOT / "static").as_posix()

98
phd_site/settings_base.py Normal file
View file

@ -0,0 +1,98 @@
"""
Django settings for phd_site project.
Generated by 'django-admin startproject' using Django 5.1.3.
For more information on this file, see
https://docs.djangoproject.com/en/5.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/5.1/ref/settings/
"""
from pathlib import Path
# Application definition
INSTALLED_APPS = [
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"lucide",
"mainsite",
]
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 = "phd_site.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",
],
},
},
]
WSGI_APPLICATION = "phd_site.wsgi.application"
# Password validation
# https://docs.djangoproject.com/en/5.1/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/5.1/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/5.1/howto/static-files/
STATIC_URL = "static/"
# Default primary key field type
# https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"

26
phd_site/urls.py Normal file
View file

@ -0,0 +1,26 @@
"""
URL configuration for phd_site project.
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/5.1/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
import mainsite.urls
urlpatterns = [
path("admin/", admin.site.urls),
path("", include(mainsite.urls)),
]

16
phd_site/wsgi.py Normal file
View file

@ -0,0 +1,16 @@
"""
WSGI config for phd_site 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/5.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'phd_site.settings')
application = get_wsgi_application()

2
requirements.txt Normal file
View file

@ -0,0 +1,2 @@
Django==5.1.*
lucide