mirror of
https://framagit.org/la-chariotte/la-chariotte.git
synced 2025-05-02 20:01:51 +02:00
install bulma and sass
This commit is contained in:
parent
0c7f489331
commit
312d98698c
9 changed files with 10372 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,3 +2,4 @@ __pycache__/
|
|||
coverage.xml
|
||||
.coverage
|
||||
la_chariotte.egg-info/
|
||||
node_modules
|
18
README.md
18
README.md
|
@ -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 :
|
||||
|
|
|
@ -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
|
||||
|
|
10291
la_chariotte/static/css/app.css
Normal file
10291
la_chariotte/static/css/app.css
Normal file
File diff suppressed because it is too large
Load diff
6
la_chariotte/static/sass/base/_global.sass
Normal file
6
la_chariotte/static/sass/base/_global.sass
Normal file
|
@ -0,0 +1,6 @@
|
|||
body
|
||||
min-height: 100vh
|
||||
background-color: $background
|
||||
|
||||
button
|
||||
color: $beige
|
35
la_chariotte/static/sass/base/_variables.sass
Normal file
35
la_chariotte/static/sass/base/_variables.sass
Normal 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
|
14
la_chariotte/static/sass/style.sass
Normal file
14
la_chariotte/static/sass/style.sass
Normal 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"
|
|
@ -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>
|
||||
|
|
|
@ -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 %}
|
||||
|
||||
|
|
Loading…
Reference in a new issue