Remove django-bulma

This commit is contained in:
Rodolphe Breard 2020-02-28 18:46:42 +01:00
parent 85eb1ff03e
commit f1cb565b56
11 changed files with 10959 additions and 4525 deletions

5
.gitignore vendored
View file

@ -48,10 +48,5 @@ Pipfile.lock
# Shell scripts
*.sh
# Bulma computed style
style.css
style.css.map
style.min.css
# Media directory
media

View file

@ -5,7 +5,6 @@ name = "pypi"
[packages]
django = "~=3.0.3"
django-bulma = "*"
django-filebrowser-no-grappelli = "*"
django-npb = "*"
django-tinymce4-lite = "*"

View file

@ -62,8 +62,7 @@ You can set the following variables in the `.env` file:
* `KHAGANAT_LANGUAGE_CODE`: Language code, default is `fr`.
* `KHAGANAT_TIME_ZONE`: Time zone, default is `Europe/Paris`.
* `KHAGANAT_STATIC_URL`: URL for static files, default is `/static/`.
* `KHAGANAT_STATIC_ROOT`: Absolute path to the directory where static files should be collected.
* `KHAGANAT_STATIC_DIRS`: CSV list of additional locations where static files may be found, default is empty.
* `KHAGANAT_STATIC_ROOT`: Absolute path to the directory where static files should be collected. Default is `None`.
* `KHAGANAT_LOGS_MIN_DAYS`: Numbers of days before logs are hidden, default is 7.
* `KHAGANAT_LOGS_MAX_DAYS`: Number of days before logs are published, default is 0.
* `KHAGANAT_LOGIN_REDIRECT_URL`: URL to redirect after user login. Will be reversed, default is `index`.

View file

@ -40,8 +40,8 @@ INSTALLED_APPS = [
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.staticfiles",
"django.contrib.messages",
"bulma",
"filebrowser",
"tinymce",
"chat.apps.LogsConfig",
@ -52,7 +52,6 @@ INSTALLED_APPS = [
"nsfw.apps.NsfwConfig",
"pages.apps.PagesConfig",
"pwdb.apps.PwdbConfig",
"static_extra.apps.KhaganatStaticFilesConfig",
]
MIDDLEWARE = [
@ -166,8 +165,6 @@ USE_TZ = True
STATIC_URL = config("KHAGANAT_STATIC_URL", default="/static/")
STATIC_ROOT = config("KHAGANAT_STATIC_ROOT", default="") or None
STATICFILES_DIRS = [os.path.join(BASE_DIR, "static_extra")]
STATICFILES_DIRS += config("KHAGANAT_STATIC_DIRS", default="", cast=Csv()) or []
MEDIA_URL = "/media/"
MEDIA_ROOT = os.path.join(BASE_DIR, "media")
FILEBROWSER_DIRECTORY = "uploads/"

File diff suppressed because it is too large Load diff

View file

@ -3,14 +3,8 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
{% if debug %}
<link rel="stylesheet" href="{% static 'bulma/css/style.css' %}">
{% else %}
<link rel="stylesheet" href="{% static 'bulma/css/font-awesome.min.css' %}">
<link rel="stylesheet" href="{% static 'bulma/css/style.min.css' %}">
{% endif %}
<link rel="shortcut icon" href="{% static "khaganat/images/favicon.ico" %}">
<link rel="stylesheet" href="{% static "khaganat/css/khaganat.css" %}">
<link rel="stylesheet" href="{% static "khaganat/css/style.css" %}">
<script defer src="{% static "navbar/navbar.js" %}"></script>
{% block headers %}{% endblock %}
<title>Khaganat - {% block title %}{% endblock %}</title>

View file

@ -1,5 +0,0 @@
from django.contrib.staticfiles.apps import StaticFilesConfig
class KhaganatStaticFilesConfig(StaticFilesConfig):
ignore_patterns = ["CVS", ".*", "*~", "sass"]

View file

@ -1 +0,0 @@
node_modules

File diff suppressed because it is too large Load diff

View file

@ -1,31 +0,0 @@
{
"author": {
"name": "Tim Kamanin",
"email": "tim@timonweb.com",
"url": "http://timonweb.com"
},
"description": "Bulma for Django",
"dependencies": {
"bulma": "0.7.4"
},
"devDependencies": {
"autoprefixer": "^9.4.7",
"clean-css-cli": "^4.2.1",
"node-sass": "^4.11.0",
"postcss-cli": "^6.1.1",
"rimraf": "^2.6.3"
},
"license": "MIT",
"main": "style.sass",
"style": "../css/style.min.css",
"name": "django_bulma",
"scripts": {
"build": "npm run build-clean && npm run build-sass && npm run build-autoprefix && npm run build-cleancss",
"build-autoprefix": "postcss --use autoprefixer --map false --output ../css/style.css ../css/style.css",
"build-cleancss": "cleancss -o ../css/style.min.css ../css/style.css",
"build-clean": "rimraf css",
"build-sass": "node-sass --output-style expanded --source-map true style.sass ../css/style.css",
"deploy": "npm run build",
"start": "npm run build-sass -- --watch"
}
}

View file

@ -1,418 +0,0 @@
// 1. Import the initial variables
@import "./node_modules/bulma/sass/utilities/initial-variables"
// 2. Set your own initial variables
//khaganat
$primary: #9073ff
$link: #8530bf
//khanat
$info: #100873
$blue: #6359db
//couleur 3
$link-hover: #6639af
//couleur 5
$text-light: #2d1040
//couleur du fond
$background: #AFAED6
$success: turquoise
// 3. Import the rest of Bulma
@import "./node_modules/bulma/bulma"
// 4. Import your stuff here
#page_body
background-image: url("/static/khaganat/images/bg7.jpg")
//navbar
html.has-navbar-fixed-top, body.has-navbar-fixed-top
padding-top: 0rem
.title
font-family: Ubuntu
.navbar.is-light
background-color: transparent
color: $white
.navbar.is-light .navbar-brand > .navbar-item,
.navbar.is-light .navbar-brand .navbar-link
background-color: transparent
color: $white
.navbar.is-light .navbar-brand > a.navbar-item:hover, .navbar.is-light .navbar-brand > a.navbar-item.is-active,
.navbar.is-light .navbar-brand .navbar-link:hover,
.navbar.is-light .navbar-brand .navbar-link.is-active
background-color: $link-hover
.navbar.is-light .navbar-brand .navbar-link::after
border-color: white
.navbar.is-light .navbar-menu .navbar-link
background-color: $primary
.navbar.is-light .navbar-burger
background-color: $link
color: white
.navbar.is-light .navbar-burger span
height: 0.16rem
width: 1.2rem
.navbar.is-light .navbar-burger.is-active,
.navbar.is-light .navbar-item.has-dropdown:hover .navbar-link,
.navbar.is-light .navbar-item.has-dropdown .navbar-link
background-color: $link
color: white
font-weight: bold
.navbar.is-light .navbar-dropdown
border-color: $text-light
.navbar.is-light .navbar-divider
color: $text-light
//navbar pour les non-mobiles
@media screen and (min-width: 1088px)
.navbar.is-light .navbar-start > .navbar-item,
.navbar.is-light .navbar-start .navbar-link,
.navbar.is-light .navbar-end > .navbar-item,
.navbar.is-light .navbar-end .navbar-link
color: white
.navbar.is-light
background-color: $link
color: white
.navbar.is-light .navbar-brand
display: none
.navbar.is-light .navbar-brand img
display: none
.navbar.is-light .navbar-brand > a.navbar-item:hover, .navbar.is-light .navbar-brand > a.navbar-item.is-active,
.navbar.is-light .navbar-brand .navbar-link:hover,
.navbar.is-light .navbar-brand .navbar-link.is-active
background-color: $link
.navbar.is-light .navbar-start > a.navbar-item:hover, .navbar.is-light .navbar-start > a.navbar-item.is-active,
.navbar.is-light .navbar-start .navbar-link:hover,
.navbar.is-light .navbar-start .navbar-link.is-active,
.navbar.is-light .navbar-end > a.navbar-item:hover,
.navbar.is-light .navbar-end > a.navbar-item.is-active,
.navbar.is-light .navbar-end .navbar-link:hover,
.navbar.is-light .navbar-end .navbar-link.is-active
color: white
.navbar.is-light .navbar-start .navbar-link::after,
.navbar.is-light .navbar-end .navbar-link::after
border-color: white
.navbar.is-light .navbar-item.has-dropdown:hover .navbar-link,
.navbar.is-light .navbar-item.has-dropdown.is-active .navbar-link
background-color: $primary
color: white
.navbar.is-light .navbar-dropdown a.navbar-item.is-active
background-color: $link-hover
color: white
.navbar.is-light .navbar-item.is-logo
position: absolute
left: 50%
margin-left: -53px // 50% in my case
height: 100%
display: flex
align-items: center
background-color: white
padding: 0
.navbar-item.is-logo:before
border-right: 1.6rem solid white
border-bottom: 3.2rem solid $link
content: " "
width: 20%
.navbar-item.is-logo:after
border-left: 1.6rem solid white
border-bottom: 3.2rem solid $link
content: " "
width: 20%
.navbar-item.is-logo img
max-height: 2rem
height: 2rem
.navbar.is-light .navbar-item.is-logo:hover
background-color: white
//navbar pour les mobiles
.navbar-dropdown a.navbar-item:hover
background-color: $primary
color: white
.navbar-item,
.navbar-link
font-weight: bold
@media screen and (max-width: 1087px)
.navbar-item.is-logo
display: none
//bouton de la navbar
.button.is-light
background-color: $background
color: white
.button.is-light:hover
background-color: $link-hover
color: white
.button.is-link
background-color: $primary
border-color: transparent
color: white
.button.is-link:hover, .button.is-link.is-hovered
background-color: $link-hover
border-color: transparent
color: white
.button.is-white
background-color: $background
color: white
.button.is-white:hover
background-color: $link-hover
color: white
.button.is-success, .button.is-sucess:hover
color: white
//footer
@media screen and (min-width: 1088px)
.footer
width: 50%
.footer:before
border-left: 2.5rem solid transparent
border-bottom: 2.5rem solid $link
margin-left: -10%
content: " "
width: 20%
.footer:after
border-right: 2.5rem solid transparent
border-bottom: 2.5rem solid $link
margin-right: -10%
content: " "
width: 20%
//footer special mobile
@media screen and (max-width: 1087px)
.footer
width: 100%
.footer
padding: 0
display: flex
background-color: $link
margin: auto auto 0
color: white
box-sizing: unset
text-align: center
.footer ul
padding: 0.5rem 0.5rem 0.5rem 0.5rem
.footer ul li
height: 100%
flex-grow: 1
.footer ul li a
display: block
padding: 1rem 0.5rem
color: white
.footer a:link, .footer a:visited
color: white
font-weight: bold
text-decoration-style: dotted
//tile
.tile
max-width: 160ch
border-radius: 0rem
.tile a:link, .tile a:visited
text-decoration-style: dotted
.tile a:hover
color: $link-hover
//tile khaganat
.tile.is-primary
background-color: white
color: $text-light
padding: 1rem 1rem 1rem 1rem
max-width: 80ch
.tile.is-primary .title, .tile.is-primary a:link
color: $link
.tile.is-primary a:visited
color: $primary
.tile.is-primary a:hover
color: $link-hover
.tile.is-primary:before
content: ""
position: absolute
left: 0px
top: 0px
border-color: $background transparent transparent transparent
border-style: solid
border-width: 1.5rem 1.5rem 0rem 0rem
height: 0rem
width: 0rem
display: block
//tile coin droite
.tile.is-info
background-color: white
color: $text-light
padding: 1rem 1rem 1rem 1rem
max-width: 80ch
.tile.is-info .title, .tile.is-info a:link
color: $link
.tile.is-info a:visited
color: $primary
.tile.is-info a:hover
color: $link-hover
.tile.is-info:before
content: ""
position: absolute
right: 0rem
top: 0rem
border-color: transparent $background transparent transparent
border-style: solid
border-width: 0rem 1.5rem 1.5rem 0rem
height: 0rem
width: 0rem
display: block
//tile khanat
.tile.is-khanat
background-color: white
color: $text-light
padding: 1rem 1rem 1rem 1rem
max-width: 80ch
.tile.is-khanat .title, .tile.is-khanat a:link
color: $info
.tile.is-khanat a:visited
color: $blue
.tile.is-khanat a:hover
color: $link-hover
.tile.is-khanat:before
content: ""
position: absolute
right: 0rem
top: 0rem
border-color: transparent $background transparent transparent
border-style: solid
border-width: 0rem 1.5rem 1.5rem 0rem
height: 0rem
width: 0rem
display: block
//tile 4 coins
.tile.is-light
background-color: white
color: $text-light
padding: 1rem 1rem 1rem 1rem
text-align: left
max-width: 160ch
.tile.is-light .title, .tile.is-light a:link
color: $link
.tile.is-light a:visited
color: $primary
.tile.is-light a:hover
color: $link-hover
.tile.is-light:before
content: ""
position: absolute
left: 0rem
top: 0rem
border-color: $background transparent transparent transparent
border-style: solid
border-width: 1.5rem 1.5rem 0rem 0rem
height: 0rem
width: 0rem
display: block
.tile.is-light:after
content: ""
position: absolute
right: 0rem
top: 0rem
border-color: transparent $background transparent transparent
border-style: solid
border-width: 0rem 1.5rem 1.5rem 0rem
height: 0rem
width: 0rem
display: block
//tile pour le logo fixe
@media screen and (min-width: 770px)
.tile.is-fixed
position: fixed
.tile.is-fixed
background-color: transparent
.tile.is-fixed .title
color: $link
//tile pour le pastebin
.tile.is-paste
overflow: scroll hidden
background-color: white
//colonne
//colonne index et page
.column.is-primary .title, .column.is-primary .subtitle
color: $link
text-align: center
.column.is-primary, .column.is-primary .image
text-align: center
//section retreci
.section
padding: 1rem 1.5rem
//bas de page courte
html
height: 100%
body
min-height: 100%
display: grid
grid-template-rows: auto 1fr auto
grid-template-columns: 100%