Changeset 47 in code


Ignore:
Timestamp:
Oct 20, 2021, 4:09:09 PM (4 years ago)
Author:
dev
Message:

Improve interface with simple drag and drop capability

Location:
trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/static/partage.css

    r18 r47  
    33        margin: auto;
    44        max-width: 540px;
    5         text-align: center;
    65        font-family: serif;
    76        font-size: 1.5rem;
     7        text-align: center;
    88        background-color: #eeeeee;
    99        color: #222222;
     
    1818}
    1919
     20section {
     21        display: flex;
     22        justify-content: flex-end;
     23        font-size: initial;
     24}
    2025
    21 img#logo { height: 100%; max-height: 30vh; }
    22 h1 { font-size: 4.5rem; }
    23 ul { list-style: none; padding: 0; }
     26section#formsettings > * {
     27        margin-top: 20px;
     28        margin-left: 20px;
     29}
     30
     31img#logo {
     32        height: 100%;
     33        max-height: 30vh;
     34}
     35
     36h1 {
     37        font-size: 4.0rem;
     38}
     39
     40ul {
     41        list-style: none;
     42        text-align: left;
     43        display: inline-block;
     44}
     45
     46.dropzone {
     47        padding-top: 60px;
     48        padding-bottom: 60px;
     49        border: 2px dashed #888888;
     50        border-radius: 8px;
     51        text-align: center;
     52        margin: auto;
     53        color: #888888;
     54}
     55
     56.dropzone.dragover {
     57        color: #222222;
     58        border-color: #222222;
     59}
    2460
    2561/* font attributes are not inherited by default */
     
    5793        }
    5894}
    59 
  • trunk/templates/index.html

    r17 r47  
    1515                <h1>partage</h1>
    1616        </header>
    17         <p>
    18                 Use the box below to upload and share files. File size is
    19                 limited to {{.Maxsize}}.
    20         </p>
    2117        <form enctype="multipart/form-data" method="post">
    22                 <input id="uck" name="uck" type="file" multiple/>
    23                 <input id="output" name="output" type="hidden" value='html' />
    24                 <input type="submit" value="...Share"/>
     18                <div id="dropzone"></div>
     19                <div id="fallbackform" class="dropzone">
     20                        <input id="filebox" name="file" type="file" multiple/>
     21                        <input id="output" name="output" type="hidden" value='html' />
     22                        <input type="submit" value="Upload"/>
     23                </div>
     24                <section id="formsettings">
     25                        <label for="expiry"> Destroy after </label>
     26                        <select id="expiry" name="expiry">
     27                                <option value="900"> 15 minutes </option>
     28                                <option value="3600"> 1 hour </option>
     29                                <option value="28800"> 8 hours </option>
     30                                <option value="86400" selected> 1 day </option>
     31                                <option value="604800"> 1 week </option>
     32                        </select>
     33                </section>
    2534        </form>
     35        <p>File size limited to {{.Maxsize}}.</p>
     36        <div id="uploads"></div>
     37        <script src="/dz.js"></script>
    2638</body>
    2739</html>
Note: See TracChangeset for help on using the changeset viewer.