Skip to content

Commit

Permalink
feat: v2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
francesco-filicetti committed Apr 11, 2023
1 parent 7130a67 commit d55fdf2
Show file tree
Hide file tree
Showing 11 changed files with 54 additions and 113 deletions.
35 changes: 2 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,9 @@ Requirements
------------

```
django-bootstrap-italia
libsass
django-compressor
django-sass-processor
design-django-theme
```

#### django-sass-processor

Compilazione di SASS 3 (file .scss) per Django.

https://pypi.org/project/django-sass-processor/


Installazione
-------------
Expand All @@ -52,39 +43,18 @@ saranno sempre ereditati da ```base-setup.html```, a meno di variazioni su
singole pagine.


Stile e CSS/SCSS
Stile e CSS
----------------

Si utilizza [django-sass-processor](https://github.com/jrief/django-sass-processor).

Per la personalizzazione dello stile del template (colori, dimensioni, sfondi)
si utilizza SASS 3 (Syntactically Awesome Style Sheets), in modo
da rispettare le caratteristiche responsive ereditate.

Il foglio di stile che ridefinisce l'aspetto del tema di default è
```static/css/unical-style.scss```.

Per la compilazione offline del file .scss in .css, generando l corrispettivo
```unical-style.css```, questi i comandi:

```
python manage.py compilescss
python manage.py collectstatic
```

Se si vuole creare il file .css compilato nella directory SASS_PROCESSOR_ROOT (se non specificata STATIC_ROOT):
```
python manage.py collectstatic --use-processor-root
```

Nel caso in cui non si volessero esporre i file SASS/SCSS in un ambiente
di produzione utilizzare:

```python manage.py collectstatic --ignore=*.scss```

Per eliminare i file css compilati nelle directory statiche:

```python manage.py compilescss --delete-files```

E' sempre possibile integrare fogli di stile o javascript
effettuando l'overload del blocco ```{% extra_head %}```.
Expand All @@ -97,7 +67,6 @@ Esempio di base-setup.html
<!-- Extends default Bootstrap Italia template -->
{% extends 'bootstrap-italia-base.html' %}
{% load sass_tags %}
{% load static %}
<!-- Page Title -->
Expand Down
3 changes: 0 additions & 3 deletions django_unical_bootstrap_italia/admin.py

This file was deleted.

Empty file.
3 changes: 0 additions & 3 deletions django_unical_bootstrap_italia/models.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,81 +6,85 @@
/**
* Università della Calabria COLORS
*/
$bordeaux_unical: #b71918;
$dark_grey_unical: #383838;
$light_grey_unical: #9d9d9c;
$white: #ffffff;

:root {
--bordeaux_unical: #b71918;
--dark_grey_unical: #383838;
--light_grey_unical: #9d9d9c;
--white: #ffffff;
}


/**
* Generic elements
*/
a {
cursor: pointer;
color: $bordeaux_unical;
color: var(--bordeaux_unical);
}
a:hover, a:active {
color: $dark_grey_unical;
color: var(--dark_grey_unical);
}
a.read-more{
color: $light_grey_unical;
color: var(--light_grey_unical);
}
.badge-primary {
background: $bordeaux_unical;
background: var(--bordeaux_unical);
}
.badge-secondary {
background: $dark_grey_unical;
background: var(--dark_grey_unical);
}
.btn-primary {
background: $dark_grey_unical;
background: var(--dark_grey_unical);
}
.btn-primary:hover {
background: $light_grey_unical;
background: var(--light_grey_unical);
}
.btn-outline-primary {
color: $dark_grey_unical;
-webkit-box-shadow: inset 0 0 0 1px $dark_grey_unical;
box-shadow: inset 0 0 0 1px $dark_grey_unical;
color: var(--dark_grey_unical);
-webkit-box-shadow: inset 0 0 0 1px var(--dark_grey_unical);
box-shadow: inset 0 0 0 1px var(--dark_grey_unical);
}
.btn-outline-primary:hover {
color: $light_grey_unical;
-webkit-box-shadow: inset 0 0 0 1px $light_grey_unical;
box-shadow: inset 0 0 0 1px $light_grey_unical;
color: var(--light_grey_unical);
-webkit-box-shadow: inset 0 0 0 1px var(--light_grey_unical);
box-shadow: inset 0 0 0 1px var(--light_grey_unical);
}
.btn-outline-primary:active,
.btn-outline-primary:focus {
color: $dark_grey_unical !important;
box-shadow: inset 0 1px 0 $light_grey_unical, 0 1px 1px $light_grey_unical, 0 0 0 0.2rem rgba(101, 101, 102, 0.5) !important;
color: var(--dark_grey_unical) !important;
box-shadow: inset 0 1px 0 var(--light_grey_unical), 0 1px 1px var(--light_grey_unical), 0 0 0 0.2rem rgba(101, 101, 102, 0.5) !important;
}
.btn-secondary {
background: $bordeaux_unical;
background: var(--bordeaux_unical);
}
.btn-secondary:hover {
background: $dark_grey_unical;
background: var(--dark_grey_unical);
}
.btn:not(.btn-outline-primary):not(.btn-outline-secondary):active,
.btn:not(.btn-outline-primary):not(.btn-outline-secondary):focus {
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 0.2rem rgba(101, 101, 102, 0.5) !important;
background-color:#475664 !important;
}
.text-primary {
color: $dark_grey_unical !important;
color: var(--dark_grey_unical) !important;
}
.text-secondary {
color: $bordeaux_unical !important;
color: var(--bordeaux_unical) !important;
}

/**
* Header Slim Wrapper
*/
.it-header-slim-wrapper{
background: $bordeaux_unical;
background: var(--bordeaux_unical);
}
.it-header-slim-wrapper .it-header-slim-wrapper-content .header-slim-right-zone button{
background: $dark_grey_unical;
background: var(--dark_grey_unical);
}
.it-header-slim-wrapper .it-header-slim-wrapper-content .header-slim-right-zone button:hover{
background: $light_grey_unical;
color: $dark_grey_unical;
background: var(--light_grey_unical);
color: var(--dark_grey_unical);
}

/**
Expand All @@ -92,16 +96,16 @@ a.read-more{
}
}
.it-header-center-wrapper{
background: $white;
background: var(--white);
}

.it-header-center-wrapper .it-header-center-content-wrapper .it-brand-wrapper a,
.it-header-center-wrapper .it-header-center-content-wrapper .it-right-zone{
color: $dark_grey_unical;
color: var(--dark_grey_unical);
}
.it-header-center-wrapper .it-header-center-content-wrapper .it-right-zone .it-socials ul .icon,
.it-header-center-wrapper .it-header-center-content-wrapper .it-search-wrapper a.rounded-icon svg{
fill: $dark_grey_unical;
fill: var(--dark_grey_unical);
}


Expand Down Expand Up @@ -136,7 +140,7 @@ a.read-more{
/* Desktops and laptops ----------- */
@media (min-width : 992px) {
.it-header-navbar-wrapper {
background: $dark_grey_unical;
background: var(--dark_grey_unical);
}
}
/* Others than desktop ----------- */
Expand All @@ -145,7 +149,7 @@ a.read-more{
background: none;
}
.custom-navbar-toggler svg{
fill: $dark_grey_unical;
fill: var(--dark_grey_unical);
}
}

Expand All @@ -157,14 +161,14 @@ a.read-more{
* Footer Main
*/
.it-footer-main{
background: $dark_grey_unical;
background: var(--dark_grey_unical);
}

/**
* Footer Small Prints
*/
.it-footer-small-prints{
background: $bordeaux_unical;
background: var(--bordeaux_unical);
}

/**
Expand All @@ -176,32 +180,32 @@ a.read-more{
* Carousel
*/
.it-carousel-wrapper .owl-dots .owl-dot{
background: $dark_grey_unical;
background: var(--dark_grey_unical);
}

/**
* Back to top
*/
.back-to-top {
background: $light_grey_unical;
background: var(--light_grey_unical);
}
.back-to-top:hover {
background: $dark_grey_unical;
background: var(--dark_grey_unical);
}

/**
* Form Bootstrap Italia
*/
.toggles label input[type="checkbox"]:checked + .lever::after {
background-color: $bordeaux_unical;
background-color: var(--bordeaux_unical);
}
.form-check [type=radio]:checked+label::after,
.form-check [type=checkbox]:checked+label::after {
background-color: $bordeaux_unical;
border-color: $bordeaux_unical;
background-color: var(--bordeaux_unical);
border-color: var(--bordeaux_unical);
}
.form-check [type=radio]:checked+label::before {
border-color: $bordeaux_unical;
border-color: var(--bordeaux_unical);
}

/**
Expand Down
5 changes: 2 additions & 3 deletions django_unical_bootstrap_italia/templates/base-setup.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<!-- Extends default Bootstrap Italia template -->
{% extends 'bootstrap-italia-base.html' %}

{% load sass_tags %}
{% load static %}

<!-- Page Title -->
Expand All @@ -12,7 +11,7 @@
<!-- My custom scss sheet -->
{% block extra_head %}
<link rel="shortcut icon" href="{% static 'images/favicon/favicon-32x32.png' %}">
<link rel="stylesheet" href="{% sass_src 'css/unical-style.scss' %}" type="text/css" />
<link rel="stylesheet" href="{% static 'css/unical-style.css' %}" type="text/css" />
{% endblock extra_head %}

<!-- URL link top left -->
Expand Down Expand Up @@ -194,7 +193,7 @@ <h4><a href="#" title="Vai alla pagina: Lorem Ipsum">Link Utili</a></h4>
<div class="col-lg-4 col-md-4 pb-2">
<div class="pb-2">
<h4><a href="#" title="Vai alla pagina: Seguici su">Seguici su</a></h4>
<ul class="list-inline text-left social">
<ul class="list-inline social">
<li class="list-inline-item">
<a class="p-2 text-white"
href="https://it-it.facebook.com/pages/Universit%C3%A0-della-Calabria/166678814380"
Expand Down
3 changes: 0 additions & 3 deletions django_unical_bootstrap_italia/tests.py

This file was deleted.

15 changes: 0 additions & 15 deletions django_unical_bootstrap_italia/urls.py

This file was deleted.

5 changes: 0 additions & 5 deletions django_unical_bootstrap_italia/views.py

This file was deleted.

5 changes: 1 addition & 4 deletions requirements
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
git+https://github.com/italia/design-django-theme
libsass
django-compressor
django-sass-processor
design-django-theme
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name='django-unical-bootstrap-italia',
version='1.0.5',
version='2.0.0',
packages=find_packages(),
include_package_data=True,
license='Apache 2.0',
Expand All @@ -24,13 +24,14 @@
'Framework :: Django',
'Framework :: Django :: 2.0',
'Framework :: Django :: 3.0',
'Framework :: Django :: 4.0',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
],
install_requires=[
'design-django-theme>=1.3.9.post3',
'design-django-theme',
]
)

0 comments on commit d55fdf2

Please sign in to comment.