all repos — artbound-python @ 61c699ca6fc5947d28d19bddabb995e31c50a654

A client-server reimplementation of the administration panel for ArtBound.

artbound_python/templates/index.html (view raw)

  1<!doctype html>
  2<html lang="it">
  3
  4<head>
  5    <meta charset="utf-8">
  6    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  7    <meta name="description" content="Un modo semplice e veloce per gestire le fanart di ArtBound.">
  8    <meta name="author" content="BiRabittoh">
  9    <link rel="icon"
 10        href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>✏️</text></svg>">
 11    <title>ArtBound Panel</title>
 12    <link href="/static/ext/css/bootstrap.min.css" rel="stylesheet">
 13    <link href="/static/style.css" rel="stylesheet">
 14</head>
 15
 16<body>
 17    <a id="canvas-download" hidden></a>
 18    <main role="main">
 19        <section class="jumbotron text-center">
 20            <div class="container">
 21                <h1 class="jumbotron-heading">
 22                    <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
 23                        stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
 24                        class="feather feather-activity">
 25                        <polygon points="14 2 18 6 7 17 3 17 3 13 14 2"></polygon>
 26                        <line x1="3" y1="22" x2="21" y2="22"></line>
 27                    </svg>
 28                    ArtBound Panel</a>
 29                </h1>
 30                    <svg fill="white" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" 
 31                         width="15" height="15" viewBox="0 0 420.827 420.827"
 32                         xml:space="preserve">
 33                    <g><g><path d="M210.29,0C156,0,104.43,20.693,65.077,58.269C25.859,95.715,2.794,146.022,0.134,199.921
 34                                c-0.135,2.734,0.857,5.404,2.744,7.388c1.889,1.983,4.507,3.105,7.244,3.105h45.211c5.275,0,9.644-4.098,9.979-9.362
 35                                c4.871-76.214,68.553-135.914,144.979-135.914c80.105,0,145.275,65.171,145.275,145.276c0,80.105-65.17,145.276-145.275,145.276
 36                                c-18.109,0-35.772-3.287-52.501-9.771l17.366-15.425c2.686-2.354,3.912-5.964,3.217-9.468c-0.696-3.506-3.209-6.371-6.592-7.521
 37                                l-113-32.552c-3.387-1.149-7.122-0.407-9.81,1.948c-2.686,2.354-3.913,5.963-3.218,9.467L69.71,403.157
 38                                c0.696,3.505,3.209,6.372,6.591,7.521c3.383,1.147,7.122,0.408,9.81-1.946l18.599-16.298
 39                                c31.946,18.574,68.456,28.394,105.581,28.394c116.021,0,210.414-94.392,210.414-210.414C420.705,94.391,326.312,0,210.29,0z"/>
 40                            <path d="M195.112,237.9h118.5c2.757,0,5-2.242,5-5v-30c0-2.757-2.243-5-5-5h-83.5v-91c0-2.757-2.243-5-5-5h-30
 41                                c-2.757,0-5,2.243-5,5v126C190.112,235.658,192.355,237.9,195.112,237.9z"/></g></g></svg>
 42                    <a id="last-updated-link" href="#" class="lead" onclick="updateDb();"><?xml version="1.0" encoding="iso-8859-1"?>
 43                    {{ last_updated }}</a>
 44                <div id="month_div">
 45                    <label for="month_input" style="margin-right: 10px;">Scegli il mese: </label>
 46                    <input id="month_input" type="month" value="{{ current_month }}">
 47                    <a href="#" class="btn my-2 btn-go" onclick="handleAuthClick();" id="authorize_button" hidden>Vai</a>
 48                    <button class="btn btn-secondary my-2" onclick="getArtworks();" id="get_button">Ottieni</button>
 49                </div>
 50                <div id="controls" hidden>
 51                    <a href="#" class="btn btn-secondary my-2" onclick="selectAllNone(1);" id="selectall_button">{{ emoji["select_all"] }}</a>
 52                    <a href="#" class="btn btn-secondary my-2" onclick="selectAllNone(0);" id="selectnone_button">{{ emoji["select_none"] }}</a>
 53                    <input type="range" class="form-range" id="opacity_range" min="0" max="1" step="0.01" oninput="updateOpacity();" value="0.4">
 54                    <label for="opacity_range" class="form-label" id="opacity_label"></label>
 55                    <a href="#" class="btn btn-secondary my-2" onclick="saveAll();" id="saveall_button">{{ emoji["save"] }}</a>
 56                    <a href="#" class="btn btn-secondary my-2" onclick="saveAllIG();" id="saveallig_button">{{ emoji["save_ig"] }}</a>
 57                </div>
 58            </div>
 59        </section>
 60        <div class="album py-5" id="main_container" style="padding-bottom: 0px !important;">
 61            <div class="container">
 62                <div class="row" id="content"></div>
 63                <div class="row text-row">
 64                    <div class="col-md-12 text-center">
 65                        <a href="/help" class="btn btn-primary">Info ❔</a>
 66                    </div>
 67                </div>
 68            </div>
 69        </div>
 70    </main>
 71    <footer>
 72        <div class="container">
 73            <p>&copy; Earthbound Café, realizzato da <a href="mailto:andronacomarco@gmail.com">Marco Andronaco</a> (BiRabittoh).</p>
 74        </div>
 75    </footer>
 76    <template id="fanart-template">
 77        <div class="col-md-4 entry{| disabled |}" id="{| id |}" data-index="{| index |}">
 78            <div class="card mb-4 box-shadow my-card">
 79                <canvas class="card-img-top entry-img"
 80                    id="{| id |}" data-name="{| name |}"
 81                    data-content="{| content |}"
 82                    data-filename="{| filename |}"></canvas>
 83                <div class="card-body">
 84                    <a class="card-text" title="Clicca per copiare." onclick="navigator.clipboard.writeText(this.innerText);">{| filename |}</a>
 85                    <div class="d-flex justify-content-between align-items-center card-controls">
 86                        <div class="btn-group">
 87                            <button class="btn btn-sm btn-outline-secondary" onclick="moveUpDown('{| id |}', -1);">{{ emoji["prev"] }}</button>
 88                            <button class="btn btn-sm btn-outline-secondary" onclick="toggleEntry('{| id |}');">{{ emoji["toggle"] }}</button>
 89                            <button class="btn btn-sm btn-outline-secondary" onclick="toggleInvert('{| id |}', this);">{{ emoji["color"] }}</button>
 90                            <button class="btn btn-sm btn-outline-secondary" onclick="saveEntry('{| id |}');">{{ emoji["save"] }}</button>
 91                            <button class="btn btn-sm btn-outline-secondary" onclick="saveEntryIG('{| id |}');">{{ emoji["save_ig"] }}</button>
 92                            <button class="btn btn-sm btn-outline-secondary" onclick="moveUpDown('{| id |}', 1);">{{ emoji["next"] }}</button>
 93                        </div>
 94                    </div>
 95                </div>
 96            </div>
 97        </div>
 98    </template>
 99    <canvas width="1080" height="1920" id="instagram-canvas" hidden></canvas>
100    <script src="https://cdnjs.cloudflare.com/ajax/libs/mustache.js/2.3.0/mustache.min.js"></script>
101    <script src="/static/ext/js/jquery-3.2.1.slim.min.js"></script>
102    <script src="/static/ext/js/bootstrap.min.js"></script>
103    <script src="/static/script.js"></script>
104</body>
105
106</html>