Skip to content

Commit e837751

Browse files
deploy: 2ba140e
0 parents  commit e837751

279 files changed

Lines changed: 60283 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: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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+
const result = [];
20+
21+
for (const file of actualFiles) {
22+
if (maxFileSize && file.size > maxFileSize) continue;
23+
const buffer = new Uint8Array(await file.arrayBuffer());
24+
result.push({
25+
name: file.name,
26+
extension: file.name.includes('.') ? file.name.split('.').pop() : '',
27+
type: file.type,
28+
size: file.size,
29+
content: buffer
30+
});
31+
}
32+
33+
if (result.length === 0) return;
34+
dotNetRef.invokeMethodAsync('ReceiveBinaryData', result);
35+
}
36+
37+
export const registerDropHandler = (dotNetRef, elementId, allowMultiple, maxFileSize, dragActiveCssClass) => {
38+
const dropper = document.getElementById(elementId);
39+
if (!dropper) return;
40+
41+
const listener = (e) => handleDrop(dotNetRef, e, allowMultiple, maxFileSize, dragActiveCssClass);
42+
_dropListeners.set(elementId, listener);
43+
dropper.addEventListener('drop', listener);
44+
}
45+
46+
export const removeEventListeners = (dotNetRef, elementId, allowMultiple) => {
47+
const dropper = document.getElementById(elementId);
48+
if (!dropper) return;
49+
50+
const listener = _dropListeners.get(elementId);
51+
if (listener) {
52+
dropper.removeEventListener('drop', listener);
53+
_dropListeners.delete(elementId);
54+
}
55+
}
56+
57+
export const clickHiddenFileInput = (fileInputId) => {
58+
const input = document.getElementById(fileInputId);
59+
if (input) {
60+
const evt = new MouseEvent('click', { bubbles: false, cancelable: true, view: window });
61+
input.dispatchEvent(evt);
62+
}
63+
}
654 Bytes
Binary file not shown.
778 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)