Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
Nuovo sito
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
16
Issues
16
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gruppo Web
Nuovo sito
Commits
e8808f81
Commit
e8808f81
authored
Oct 11, 2023
by
shadMod
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added dynamism to compile all scss in build_scss()
parent
bccbbee5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
uitwww/main.py
uitwww/main.py
+13
-3
No files found.
uitwww/main.py
View file @
e8808f81
...
...
@@ -90,6 +90,16 @@ def init(data, debug):
def
build_scss
():
"""Compile the scss file"""
print
(
"Compile the scss file"
)
path
=
f"
{
BASE_DIR
}
/assets/scss/www.scss"
with
open
(
f"
{
BASE_DIR
}
/uitwww/static/website.css"
,
"w"
)
as
fn
:
fn
.
write
(
minify
(
compile_file
(
path
)))
# init list of css path
css_path
=
[
"libs/main"
,
"vendor/bootstrap_v5"
]
for
val
in
css_path
:
# init path css
path
=
f"
{
UITWWW_DIR
}
/static/assets/
{
val
}
.css"
# check and mk dir if dir_ not exists
if
not
os
.
path
.
isdir
(
os
.
path
.
dirname
(
path
)):
os
.
makedirs
(
os
.
path
.
dirname
(
path
))
# open file, compile and write css
with
open
(
path
,
"w"
)
as
fn
:
fn
.
write
(
minify
(
compile_file
(
f"
{
BASE_DIR
}
/assets/scss/
{
val
}
.scss"
)))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment