Quellcode durchsuchen

Add configurable footer

Andre D vor 8 Jahren
Ursprung
Commit
b8ce352534
4 geänderte Dateien mit 5 neuen und 8 gelöschten Zeilen
  1. 1 1
      client/config.js.example
  2. 1 0
      client/css/up1.css
  3. 1 5
      client/index.html
  4. 2 2
      client/js/main.js

+ 1 - 1
client/config.js.example

@@ -1,4 +1,4 @@
 upload.config.server = '' // Empty if the webapp is in the same place as the server
 // upload.config.server = 'https://yourserver.com/' // If the webapp is separated from the server - remember the trailing slash
 upload.config.api_key = 'c61540b5ceecd05092799f936e27755f' // Should be the same as the server, used for uploading
-upload.config.contact_link = 'mailto:someemail@email'
+upload.config.footer = '<a href="https://github.com/Upload/Up1" target="_blank">Source Code</a> - <a href="mailto:someemail@email" id="contact" target="_blank">Contact</a>'

+ 1 - 0
client/css/up1.css

@@ -203,6 +203,7 @@
   position: fixed;
   text-align: center;
   width: 100%;
+  color: #FFF;
 }
 
 .footer a {

+ 1 - 5
client/index.html

@@ -25,10 +25,6 @@
             </h2>
     </noscript>
 
-    <div id="footer" class="footer">
-        <a href="https://github.com/Upload/Up1" target="_blank">Source Code</a>
-        -
-        <a href="#" id="contact" target="_blank">Contact</a>
-    </div>
+    <div id="footer" class="footer"><a href="https://github.com/Upload/Up1" target="_blank">Source Code</div>
 </body>
 </html>

+ 2 - 2
client/js/main.js

@@ -67,9 +67,9 @@
   }
 
   upload.modules.addmodule({
-      name: 'contactlink',
+      name: 'footer',
       init: function() {
-          $('#contact').prop('href', upload.config.contact_link)
+          $('#footer').html(upload.config.footer)
       }
   })