SCSS structure
We have used 7-1 tire scss folder structure in our
template
And to compile the scss files we have used libsass.
Follow the below given steps if you want to use scss for styling you site.
Step 1: Install Libsass
Install libsass by using the below given command.
pip install libsass
step 2: Check Libsass
Make sure that it is installed using this command:
pip show libsass
Step 3: Configuration in __init__.py
Now that we have install libsass, we need to configure it to access the scss files and convert and paste it in some destination file. To do that , add these code in __init__.py file.
from sassutils.wsgi import SassMiddleware
app = Flask(__name__)
app.wsgi_app = SassMiddleware(app.wsgi_app, {
'cuba': ('static/assets/scss', 'static/assets/css', '/static/assets/css')
})
Here Cuba is the name of the folder containing __init__.py file. static/assets/scss being the
path of the folder that contains the scss files and static/assets/css and
/static/assets/css being the path of the file where the compiled css will be pasted.
Step 4: Using Scss Files in html
We have now configured our project to use scss files, now where we add the link in html file, we have to add it in this way:
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='assets/css/style.scss.css')}}" />
- scss
- base
- components // all
components scss
- layout
- pages
- themes
- utils
- vendors // All plugins scss
folder and files here
- animate
- aos
- bootstrap
- button-builder
- calendar
- chartist
- data-table
- datatable-extension
- date-picker
- daterange-picker
- date-time-picker
- dropzone
- echart
- feather-icon
- flag-icon
- icoicon
- image-cropper
- jsgrid
- owltheme
- page-builder
- photoswipe
- prism
- range-slider
- rating
- scrollable
- scrollbar
- select2
- simple-mde
- sticky
- summernote
- svg-icon
- sweetalert2-master
- themify
- time-picker
- todo
- tour
- tree
- vector-map
- whether-icon
- animate
- base
If you want to add new scss so you can add in _custom.scss file
because when we update this template in the future, at that time you can take
updated template and easily use it.
So we advice that you create your own _custom.scss file and add your additional code in it.
Intelligent customization using scss
You can change in assets/scss/utils/_variables.scss file
Common settings
| Variables set | Content |
|---|---|
$theme-body-font-color: #404040; |
whole template body font color set here |
$theme-font-color: #242934; |
whole template body font color set here |
For font family
$font-rubik: Rubik; |
set Body font family |
$font-roboto: Roboto; |
set second font family |
For main color settings
$primary-color: #7366ff; |
All color template settings |
$secondary-color: #838383; |
|
$success-color: #65c15c; |
|
$info-color: #40b8f5; |
|
$warning-color: #ffb829; |
|
$danger-color: #fc564a; |
|
$light-color: #f4f4f4; |
|
For sidebar settings
$sidebar-width: 255px; |
set sidebar width |
$sidebar-background-color: $white; |
set sidebar background color |
$sidebar-shadow: 0 0 11px rgba(69, 110, 243, 0.13); |
set sidebar shadow color |
$sidebar-overflow: auto; |
set sidebar overflow scroll |
$sidebar-z-index: 9; |
set sidebar z index |
For card settings
$card-padding: 20px; |
set common card spacing |
$card-margin-bottom: 20px; |
set common card outside spacing |
$card-border-color: 1px solid $light-gray; |
set card border |
$card-border-radius: 15px; |
set card border radius |
$card-box-shadow: 0px 9px 20px rgba(46, 35, 94, 0.07); |
set card box shadow |