Web platform for sharing free data for ML and research

By using this site, you agree to have cookies stored on your device, strictly for functional purposes, such as storing your session and preferences.

Dismiss

✨design✨

roundabout,
created on Sunday, 15 September 2024, 10:45:32 (1726397132), received on Sunday, 15 September 2024, 10:45:35 (1726397135)
Author identity: vlad <vlad.muntoiu@gmail.com>

ccc6e3fbae2d1a3b39d1a076b3bd860b0e3b0168

static/efficient-ui

@@ -1 +1 @@

                                
                                
                                
                            
                                
                                    
                                        
                                        Subproject commit de68efc82aa23ebb7a5f007af0f393167e2c4105
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        Subproject commit a98d70311f88ffc0d1551bc96a8a85c64f30fdf5
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                            
                                

static/ripples.js

@@ -0,0 +1,32 @@

                                
                                
                                
                            
                                
                                    
                                        
                                        // @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7&dn=apache-2.0.txt Apache-2.0
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        (() => {
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            const rippleHosts = document.querySelectorAll('.button, button:not(.link-button), input, select, .navbar a, .navrail a');
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            function generateRipple(rippleX, rippleY, rippleDimensions) {
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                const div = document.createElement('div');
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                div.className = 'ripple-pad';
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                div.style.width = `${rippleDimensions}px`;
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                div.style.height = `${rippleDimensions}px`;
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                div.style.left = `${rippleX}px`;
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                div.style.top = `${rippleY}px`;
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                div.style.borderRadius = `${rippleDimensions}px`;
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                return div;
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            }
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            for (const host of rippleHosts) {
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                host.addEventListener('mousedown', (event) => {
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    const rect = host.getBoundingClientRect();
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    const cursorX = event.clientX;
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    const cursorY = event.clientY;
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    const fromTop = cursorY - rect.top;
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    const fromBottom = rect.height - fromTop;
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    const fromLeft = cursorX - rect.left;
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    const fromRight = rect.width - fromLeft;
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    const requiredDimension = Math.ceil(Math.max(fromRight, fromLeft, fromTop, fromBottom));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    const ripple = generateRipple(fromLeft - requiredDimension, fromTop - requiredDimension, requiredDimension * 2);
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    host.appendChild(ripple);
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    ripple.addEventListener('animationend', ({ animationName }) => {
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                        if (animationName === 'RippleEffect') ripple.remove();
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    });
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                });
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            }
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        })()
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        // @license-end
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                            
                                

static/style.css

@@ -18,6 +18,30 @@

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                /*view-transition-name: root;*/
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        .ripple-pad {
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            background: #ffffff99;
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            position: absolute;
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            opacity: 1;
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            transform: scale(0);
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            animation: RippleEffect 375ms cubic-bezier(0, 0.55, 0.45, 1) forwards;
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        }
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        .button-flat .ripple-pad {
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            background: var(--color-primary-3);
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        }
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        @keyframes RippleEffect {
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            to {
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                transform: scale(1);
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                opacity: 0;
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            }
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        }
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        button, input, .button, select {
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            position: relative;
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            overflow: hidden;
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        }
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            nav {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                /*view-transition-name: nav;*/
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        

@@ -599,3 +623,7 @@ dd {

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                gap: 0.5rch;
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                font-weight: 400;
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        #picture-buttons {
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            padding: 0 1rem;
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        }
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                            
                                

templates/default.html

@@ -94,5 +94,6 @@

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    {% endwith %}
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    <script src="/static/efficient-ui/dialogs.js"></script>
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    <script src="/static/efficient-ui/toasts.js"></script>
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                <script src="/static/ripples.js"></script>
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                </body>
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            </html>
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                            
                                

templates/picture.html

@@ -11,27 +11,33 @@

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                <div id="picture-view">
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    <x-frame id="picture-actions">
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                        <ul class="action-list">
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                        <li><a href="{{ resource.origin_url }}">
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                            <iconify-icon icon="mdi:web"></iconify-icon>Original source
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                        </a></li>
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                        <li><a href="/raw/picture/{{ resource.id }}" target="_blank">
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                            <iconify-icon icon="mdi:image"></iconify-icon>View separately
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                        </a></li>
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                            <li><a href="/raw/picture/{{ resource.id }}" download="GigadataPicture_{{ resource.id }}{{ file_extension }}">
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                                <iconify-icon icon="mdi:download"></iconify-icon>Download
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                            </a></li>
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                            <li><a href="/picture/{{ resource.id }}/get-annotations">
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                                <iconify-icon icon="ic:baseline-account-tree"></iconify-icon>JSON annotations
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                            </a></li>
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                        <li><a href="/raw/picture/{{ resource.id }}" target="_blank">
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                            <iconify-icon icon="mdi:image"></iconify-icon>View separately
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                        </a></li>
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                            {% if have_permission %}
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                                <li><a href="/picture/{{ resource.id }}/annotate">
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                                    <iconify-icon icon="mdi:vector-point-select"></iconify-icon>Annotate
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                                </a></li>
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                            <li><a href="/picture/{{ resource.id }}/put-annotations-form">
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                                <iconify-icon icon="mdi:file-edit"></iconify-icon>Submit JSON annotations
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                        {% endif %}
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                        {% if resource.origin_url %}
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                            <li><a href="{{ resource.origin_url }}">
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                                <iconify-icon icon="mdi:web"></iconify-icon>Original source
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                                </a></li>
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                            <li><a href="/picture/{{ resource.id }}/edit-metadata">
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                                <iconify-icon icon="mdi:edit"></iconify-icon>Edit metadata
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                        {% endif %}
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                        {% if resource.replaced_by %}
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                            <li><a href="/picture/{{ resource.replaced_by.id }}">
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                                <iconify-icon icon="mdi:new-releases"></iconify-icon>Replacement
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                            </a></li>
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                        {% endif %}
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                        {% if resource.replaces %}
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                            <li><a href="/picture/{{ resource.replaces.id }}">
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                                <iconify-icon icon="mdi:archive"></iconify-icon>Old version
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                                </a></li>
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                            {% endif %}
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                            {% if current_user %}
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        

@@ -39,6 +45,14 @@

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                                    <iconify-icon icon="mdi:content-copy"></iconify-icon>Copy
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                                </a></li>
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                            {% endif %}
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                        {% if have_permission %}
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                            <li><a href="/picture/{{ resource.id }}/put-annotations-form">
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                                <iconify-icon icon="mdi:file-edit"></iconify-icon>Submit JSON annotations
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                            </a></li>
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                            <li><a href="/picture/{{ resource.id }}/edit-metadata">
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                                <iconify-icon icon="mdi:edit"></iconify-icon>Edit metadata
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                            </a></li>
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                        {% endif %}
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                            {% if have_permission %}
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                                <li><details>
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                                    <summary>