add more info to getUsers, move admin.html css to scss files

more deatils included in getUsers response in prep for feature request #5. bs4 and bs5 css are now compiled instead of being copied.
This commit is contained in:
Harvey Tindall
2020-09-16 21:42:22 +01:00
parent 7d84fdec96
commit a8b4842895
12 changed files with 174 additions and 126 deletions
+96
View File
@@ -0,0 +1,96 @@
.pageContainer {
margin: 5% 20% 5% 20%;
}
@media (max-width: 1100px) {
.pageContainer {
margin: 2%;
}
}
h1 {
/*margin: 20%;*/
margin-bottom: 5%;
}
.linkGroup {
/*margin: 20%;*/
margin-bottom: 5%;
margin-top: 5%;
}
.linkForm {
/*margin: 20%;*/
margin-top: 5%;
margin-bottom: 5%;
}
.contactBox {
/*margin: 20%;*/
margin-top: 5%;
color: grey;
}
.circle {
/*margin-left: 1rem;
width: 1rem;
height: 1rem;
border-radius: 50%;
z-index: 5000;*/
-webkit-transition: all 300ms cubic-bezier(0.550, 0.055, 0.675, 0.190);
-moz-transition: all 300ms cubic-bezier(0.550, 0.055, 0.675, 0.190);
-o-transition: all 300ms cubic-bezier(0.550, 0.055, 0.675, 0.190);
transition: all 300ms cubic-bezier(0.550, 0.055, 0.675, 0.190); /* easeInCubic */
}
.smooth-transition {
-webkit-transition: all 300ms cubic-bezier(0.550, 0.055, 0.675, 0.190);
-moz-transition: all 300ms cubic-bezier(0.550, 0.055, 0.675, 0.190);
-o-transition: all 300ms cubic-bezier(0.550, 0.055, 0.675, 0.190);
transition: all 300ms cubic-bezier(0.550, 0.055, 0.675, 0.190); /* easeincubic */
}
.rotated {
transform: rotate(180deg);
-webkit-transition: all 150ms cubic-bezier(0.770, 0.000, 0.175, 1.000);
-moz-transition: all 150ms cubic-bezier(0.770, 0.000, 0.175, 1.000);
-o-transition: all 150ms cubic-bezier(0.770, 0.000, 0.175, 1.000);
transition: all 150ms cubic-bezier(0.770, 0.000, 0.175, 1.000); /* easeInOutQuart */
}
.not-rotated {
transform: rotate(0deg);
-webkit-transition: all 150ms cubic-bezier(0.770, 0.000, 0.175, 1.000);
-moz-transition: all 150ms cubic-bezier(0.770, 0.000, 0.175, 1.000);
-o-transition: all 150ms cubic-bezier(0.770, 0.000, 0.175, 1.000);
transition: all 150ms cubic-bezier(0.770, 0.000, 0.175, 1.000); /* easeInOutQuart */
}
.invite-link {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: auto;
}
.settingIcon {
margin-left: 0.2rem;
}
body.modal-open {
overflow: hidden;
}
@mixin scut-link-unstyled {
&, &:visited, &:hover, &:active {
font-style: inherit;
color: inherit;
background-color: transparent;
font-size: inherit;
text-decoration: none;
font-variant: inherit;
font-weight: inherit;
line-height: inherit;
font-family: inherit;
}
}
%scut-link-unstyled {
@include scut-link-unstyled;
}
.text-button {
@extend %scut-link-unstyled;
}
+1
View File
@@ -138,3 +138,4 @@ $list-group-action-active-bg: $jf-blue-focus;
background-color: $success;
}
@import "../base.scss";
+2
View File
@@ -0,0 +1,2 @@
@import "../../node_modules/bootstrap4/scss/bootstrap";
@import "../base.scss";
+1
View File
@@ -138,3 +138,4 @@ $list-group-action-active-bg: $jf-blue-focus;
background-color: $success;
}
@import "../base.scss";
+2
View File
@@ -0,0 +1,2 @@
@import "../../node_modules/bootstrap/scss/bootstrap";
@import "../base.scss";
+40 -39
View File
@@ -39,44 +39,45 @@ if not args.yes:
node_bin = input("input bin directory: ")
for bsv in [d for d in local_path.iterdir() if "bs" in d.name]:
scss = bsv / f"{bsv.name}-jf.scss"
css = bsv / f"{bsv.name}-jf.css"
min_css = bsv.parents[1] / "data" / "static" / f"{bsv.name}-jf.css"
with open(css, "w") as f:
f.write(
sass.compile(
filename=str(scss.resolve()), output_style="expanded", precision=6
scss = [(bsv / f"{bsv.name}-jf.scss"), (bsv / f"{bsv.name}.scss")]
css = [(bsv / f"{bsv.name}-jf.css"), (bsv / f"{bsv.name}.css")]
min_css = [(bsv.parents[1] / "data" / "static" / f"{bsv.name}-jf.css"), (bsv.parents[1] / "data" / "static" / f"{bsv.name}.css")]
for i in range(2):
with open(css[i], "w") as f:
f.write(
sass.compile(
filename=str(scss[i].resolve()), output_style="expanded", precision=6
)
)
)
if css.exists():
print(f"{bsv.name}: Compiled.")
# postcss only excepts forwards slashes? weird.
cssPath = str(css.resolve())
if os.name == "nt":
cssPath = cssPath.replace("\\", "/")
runcmd(
f'{str((node_bin / "postcss").resolve())} {cssPath} --replace --use autoprefixer'
)
print(f"{bsv.name}: Prefixed.")
runcmd(
f'{str((node_bin / "cleancss").resolve())} --level 1 --format breakWith=lf --output {str(min_css.resolve())} {str(css.resolve())}'
)
if min_css.exists():
print(f"{bsv.name}: Minified and copied to {str(min_css.resolve())}.")
if css[i].exists():
print(f"{scss[i].name}: Compiled.")
# postcss only excepts forwards slashes? weird.
cssPath = str(css[i].resolve())
if os.name == "nt":
cssPath = cssPath.replace("\\", "/")
runcmd(
f'{str((node_bin / "postcss").resolve())} {cssPath} --replace --use autoprefixer'
)
print(f"{scss[i].name}: Prefixed.")
runcmd(
f'{str((node_bin / "cleancss").resolve())} --level 1 --format breakWith=lf --output {str(min_css[i].resolve())} {str(css[i].resolve())}'
)
if min_css[i].exists():
print(f"{scss[i].name}: Minified and copied to {str(min_css[i].resolve())}.")
for v in [("bootstrap", "bs5"), ("bootstrap4", "bs4")]:
new_path = str((local_path.parent / "data" / "static" / (v[1] + ".css")).resolve())
shutil.copy(
str(
(
local_path.parent
/ "node_modules"
/ v[0]
/ "dist"
/ "css"
/ "bootstrap.min.css"
).resolve()
),
new_path,
)
print(f"Copied {v[1]} to {new_path}")
# for v in [("bootstrap", "bs5"), ("bootstrap4", "bs4")]:
# new_path = str((local_path.parent / "data" / "static" / (v[1] + ".css")).resolve())
# shutil.copy(
# str(
# (
# local_path.parent
# / "node_modules"
# / v[0]
# / "dist"
# / "css"
# / "bootstrap.min.css"
# ).resolve()
# ),
# new_path,
# )
# print(f"Copied {v[1]} to {new_path}")