install bulma and sass

This commit is contained in:
Laetitia Getti 2023-04-24 12:29:30 +02:00
parent 0c7f489331
commit 312d98698c
9 changed files with 10372 additions and 1 deletions

1
.gitignore vendored
View file

@ -2,3 +2,4 @@ __pycache__/
coverage.xml
.coverage
la_chariotte.egg-info/
node_modules

View file

@ -17,6 +17,24 @@ pip install -r requirements.txt
pip install -r dev-requirements.txt
```
## Travailler sur le frontend
check sass version
```bash
sass --version
# used for developement: 1.59.3 compiled with dart2js 2.19.4
```
watch for changes when updating scss files (from project root)
```bash
sass --watch --no-source-map ./la_chariotte/static/sass/style.sass:./la_chariotte/static/css/app.css
```
sass --no-source-map ./la_chariotte/static/sass/style.sass:./la_chariotte/static/css/app.css
OR compile css only once (from project root)
```bash
sass --no-source-map ./jenny/core/static/scss/core.scss:./jenny/core/static/css/core.css
```
## Lancer les tests
Lancer les tests avec pytest :

View file

@ -130,6 +130,7 @@ USE_TZ = True
# https://docs.djangoproject.com/en/4.1/howto/static-files/
STATIC_URL = "static/"
STATICFILES_DIRS = ["la_chariotte/static"]
# Default primary key field type
# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,6 @@
body
min-height: 100vh
background-color: $background
button
color: $beige

View file

@ -0,0 +1,35 @@
// colors
$betterave: #A52951
$beige: #e9b049
$bright-black: #280a13
$primary: $betterave
$info: $betterave
$text: $bright-black
// screen sizes
$max-mobile: 768px
$min-tablet: 769px
$max-tablet: 1023px
$min-desktop: 1024px
$max-desktop: 1215px
$min-widescreen: 1216px
// spacing
$super-tiny: 4px
$tiny: 8px
$small: 16px
$base: 24px
$large: 48px
$xlarge: 64px
// border
$border-radius: 2px
// font size
$font-size-desktop: 22px
$font-size-mobile: 13px
$font-size-small-desktop: 16px
$font-size-small-mobile: 11px
$font-size-large-desktop: 24px
$font-size-large-mobile: 16px

View file

@ -0,0 +1,14 @@
// 1. Import the initial variables
@import "../../node_modules/bulma/sass/utilities/initial-variables"
// 2. Set your own initial variables
@import "./base/variables"
// @import "./base/fonts"
// 3. Import the rest of Bulma
@import "../../node_modules/bulma/bulma"
// 4. Import your stuff here
@import "./base/global"
// @import "./base/navbar"
// @import "./base/footer"

View file

@ -1,8 +1,13 @@
{% load static %}
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8" />
<title>{% block title %}{% endblock %} - La Chariotte</title>
{% block css %}
<link rel="stylesheet" href="{% static 'css/app.css' %}">
{% block extra_css %}{% endblock extra_css %}
{% endblock css %}
</head>
<body>
<main>

View file

@ -13,7 +13,7 @@
</p>
{% else %}
<p>You are not logged in</p>
<a href="{% url 'accounts:login' %}">Se connecter</a>
<a class="button is-primary" href="{% url 'accounts:login' %}">Se connecter</a>
{% endif %}
{% endblock %}