Skip to content

Commit 8c0aca0

Browse files
deploy: dd35720
0 parents  commit 8c0aca0

279 files changed

Lines changed: 60272 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.nojekyll

Whitespace-only changes.
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
@import '_content/SuperSimpleBlazorDropzone/SuperSimpleBlazorDropzone.zpypzmmwo0.bundle.scp.css';
2+
3+
/* /Layout/MainLayout.razor.rz.scp.css */
4+
.page[b-rjkdr0auvo] {
5+
position: relative;
6+
display: flex;
7+
flex-direction: column;
8+
}
9+
10+
main[b-rjkdr0auvo] {
11+
flex: 1;
12+
}
13+
14+
.sidebar[b-rjkdr0auvo] {
15+
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
16+
}
17+
18+
.top-row[b-rjkdr0auvo] {
19+
background-color: #f7f7f7;
20+
border-bottom: 1px solid #d6d5d5;
21+
justify-content: flex-end;
22+
height: 3.5rem;
23+
display: flex;
24+
align-items: center;
25+
}
26+
27+
.top-row[b-rjkdr0auvo] a, .top-row[b-rjkdr0auvo] .btn-link {
28+
white-space: nowrap;
29+
margin-left: 1.5rem;
30+
text-decoration: none;
31+
}
32+
33+
.top-row[b-rjkdr0auvo] a:hover, .top-row[b-rjkdr0auvo] .btn-link:hover {
34+
text-decoration: underline;
35+
}
36+
37+
.top-row[b-rjkdr0auvo] a:first-child {
38+
overflow: hidden;
39+
text-overflow: ellipsis;
40+
}
41+
42+
@media (max-width: 640.98px) {
43+
.top-row[b-rjkdr0auvo] {
44+
justify-content: space-between;
45+
}
46+
47+
.top-row[b-rjkdr0auvo] a, .top-row[b-rjkdr0auvo] .btn-link {
48+
margin-left: 0;
49+
}
50+
}
51+
52+
@media (min-width: 641px) {
53+
.page[b-rjkdr0auvo] {
54+
flex-direction: row;
55+
}
56+
57+
.sidebar[b-rjkdr0auvo] {
58+
width: 250px;
59+
height: 100vh;
60+
position: sticky;
61+
top: 0;
62+
}
63+
64+
.top-row[b-rjkdr0auvo] {
65+
position: sticky;
66+
top: 0;
67+
z-index: 1;
68+
}
69+
70+
.top-row.auth[b-rjkdr0auvo] a:first-child {
71+
flex: 1;
72+
text-align: right;
73+
width: 0;
74+
}
75+
76+
.top-row[b-rjkdr0auvo], article[b-rjkdr0auvo] {
77+
padding-left: 2rem !important;
78+
padding-right: 1.5rem !important;
79+
}
80+
}
535 Bytes
Binary file not shown.
643 Bytes
Binary file not shown.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
const _dropListeners = new Map();
2+
3+
export const setDragActive = (elementId, active, cssClass) => {
4+
const dropper = document.getElementById(elementId);
5+
if (dropper) {
6+
if (active) dropper.classList.add(cssClass);
7+
else dropper.classList.remove(cssClass);
8+
}
9+
}
10+
11+
export const handleDrop = async (dotNetRef, event, allowMultiple, maxFileSize, dragActiveCssClass) => {
12+
event.preventDefault();
13+
const elementId = event.currentTarget.id;
14+
setDragActive(elementId, false, dragActiveCssClass);
15+
const files = event.dataTransfer.files;
16+
if (files.length < 1) return;
17+
18+
const actualFiles = allowMultiple ? files : [files[0]];
19+
20+
for (const file of actualFiles) {
21+
if (maxFileSize && file.size > maxFileSize) continue;
22+
await dotNetRef.invokeMethodAsync('ReceiveData', DotNet.createJSStreamReference(file), file.name, file.type, file.size);
23+
}
24+
}
25+
26+
export const registerDropHandler = (dotNetRef, elementId, allowMultiple, maxFileSize, dragActiveCssClass) => {
27+
const dropper = document.getElementById(elementId);
28+
if (!dropper) return;
29+
30+
const listener = (e) => handleDrop(dotNetRef, e, allowMultiple, maxFileSize, dragActiveCssClass);
31+
_dropListeners.set(elementId, listener);
32+
dropper.addEventListener('drop', listener);
33+
}
34+
35+
export const removeEventListeners = (dotNetRef, elementId, allowMultiple) => {
36+
const dropper = document.getElementById(elementId);
37+
if (!dropper) return;
38+
39+
const listener = _dropListeners.get(elementId);
40+
if (listener) {
41+
dropper.removeEventListener('drop', listener);
42+
_dropListeners.delete(elementId);
43+
}
44+
}
45+
46+
export const clickHiddenFileInput = (fileInputId) => {
47+
const input = document.getElementById(fileInputId);
48+
if (input) {
49+
const evt = new MouseEvent('click', { bubbles: false, cancelable: true, view: window });
50+
input.dispatchEvent(evt);
51+
}
52+
}
541 Bytes
Binary file not shown.
668 Bytes
Binary file not shown.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/* _content/SuperSimpleBlazorDropzone/SimpleDropzone.razor.rz.scp.css */
2+
.file-dropper[b-4txvihedx8] {
3+
border: 2px dashed #aaa;
4+
border-radius: 8px;
5+
padding: 32px;
6+
text-align: center;
7+
cursor: pointer;
8+
transition: border-color 0.2s;
9+
position: relative;
10+
min-height: 180px;
11+
background: #fafafa;
12+
}
13+
.file-dropper.drag-active[b-4txvihedx8] {
14+
border-color: #0078d7;
15+
background: #e6f7ff;
16+
}
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)