Explorar o código

docker, previews, tor, bugfixes

* implemented docker
* added previews (markdown, html, text, video, audio)
* added tor support
* several bugfixes
Remco %!s(int64=11) %!d(string=hai) anos
pai
achega
6b251ec7a8
Modificáronse 63 ficheiros con 4395 adicións e 302 borrados
  1. 16 0
      .dockerignore
  2. 6 0
      .ebextensions/01config_nginx.config
  3. 1 0
      .gitignore
  4. 1 1
      Dockerfile
  5. 33 3
      Gruntfile.js
  6. 10 0
      README.md
  7. 2 0
      package.json
  8. 110 36
      transfersh-server/handlers.go
  9. 23 15
      transfersh-server/main.go
  10. 1 1
      transfersh-server/static/404.html
  11. 132 0
      transfersh-server/static/download.audio.html
  12. 134 0
      transfersh-server/static/download.code.html
  13. 116 0
      transfersh-server/static/download.html
  14. 126 0
      transfersh-server/static/download.image.html
  15. 124 0
      transfersh-server/static/download.markdown.html
  16. 129 0
      transfersh-server/static/download.video.html
  17. BIN=BIN
      transfersh-server/static/images/bitcoin.png
  18. 5 5
      transfersh-server/static/images/terminal-top.svg
  19. 5 0
      transfersh-server/static/images/tor.svg
  20. 5 0
      transfersh-server/static/includes/download-bottom.html
  21. 10 0
      transfersh-server/static/includes/download-btn.html
  22. 6 0
      transfersh-server/static/includes/download-top.html
  23. 36 0
      transfersh-server/static/includes/footer.html
  24. 15 0
      transfersh-server/static/includes/ga.html
  25. 12 0
      transfersh-server/static/includes/head.html
  26. 2 0
      transfersh-server/static/includes/js.html
  27. 15 0
      transfersh-server/static/includes/navigation.html
  28. 132 94
      transfersh-server/static/index.html
  29. 0 0
      transfersh-server/static/scripts/main.js
  30. 0 0
      transfersh-server/static/styles/main.css
  31. 46 2
      transfersh-server/storage.go
  32. 172 0
      transfersh-server/utils.go
  33. 47 0
      transfersh-web/download.audio.html
  34. 143 0
      transfersh-web/download.code.html
  35. 31 0
      transfersh-web/download.html
  36. 41 0
      transfersh-web/download.image.html
  37. 39 0
      transfersh-web/download.markdown.html
  38. 44 0
      transfersh-web/download.video.html
  39. BIN=BIN
      transfersh-web/images/bitcoin.png
  40. 5 5
      transfersh-web/images/terminal-top.svg
  41. 5 0
      transfersh-web/images/tor.svg
  42. 5 0
      transfersh-web/includes/download-bottom.html
  43. 10 0
      transfersh-web/includes/download-btn.html
  44. 6 0
      transfersh-web/includes/download-top.html
  45. 36 0
      transfersh-web/includes/footer.html
  46. 15 0
      transfersh-web/includes/ga.html
  47. 14 0
      transfersh-web/includes/head.html
  48. 9 0
      transfersh-web/includes/js.html
  49. 15 0
      transfersh-web/includes/navigation.html
  50. 54 92
      transfersh-web/index.html
  51. 61 0
      transfersh-web/scripts/clipboard.js
  52. 86 8
      transfersh-web/scripts/main.js
  53. 1296 0
      transfersh-web/scripts/showdown.js
  54. 0 0
      transfersh-web/scripts/typewriter-bundle.min.js
  55. 3 3
      transfersh-web/styles/bootstrap.less
  56. 8 6
      transfersh-web/styles/includes/global.less
  57. 9 3
      transfersh-web/styles/includes/home.less
  58. 21 1
      transfersh-web/styles/includes/pages.less
  59. 200 0
      transfersh-web/styles/includes/preview.less
  60. 16 14
      transfersh-web/styles/includes/reviews.less
  61. 750 13
      transfersh-web/styles/main.css
  62. 0 0
      transfersh-web/styles/main.css.map
  63. 1 0
      transfersh-web/styles/main.less

+ 16 - 0
.dockerignore

@@ -0,0 +1,16 @@
+build
+pkg
+dist
+src
+bin
+*.pyc
+*.egg-info
+.vagrant
+.git
+.tmp
+bower_components
+node_modules
+extras
+build
+transfersh-server/run.sh
+.elasticbeanstalk

+ 6 - 0
.ebextensions/01config_nginx.config

@@ -0,0 +1,6 @@
+files:
+  "/etc/nginx/conf.d/client_max_body_size.conf":
+    mode: "000644"
+    owner: root
+    group: root
+    content: "client_max_body_size 0;"

+ 1 - 0
.gitignore

@@ -13,3 +13,4 @@ bower_components/
 node_modules/
 
 transfersh-server/run.sh
+.elasticbeanstalk/

+ 1 - 1
transfersh-server/Dockerfile → Dockerfile

@@ -5,7 +5,7 @@ RUN mkdir -p /go/src/app
 WORKDIR /go/src/app
 
 # Copy the local package files to the container's workspace.
-ADD . /go/src/app
+ADD ./transfersh-server /go/src/app
 
 # install dependencies
 RUN go get ./

+ 33 - 3
Gruntfile.js

@@ -28,6 +28,10 @@ module.exports = function (grunt) {
             gruntfile: {
                 files: ['Gruntfile.js']
             },
+            includes: {
+                files: ['<%= yeoman.app %>/*.html', '.tmp/*.html'],
+                tasks: ['includes:server']
+            },
             livereload: {
                 options: {
                     livereload: '<%= connect.options.livereload %>'
@@ -37,7 +41,8 @@ module.exports = function (grunt) {
           '{.tmp,<%= yeoman.app %>}/styles/{,*/}*.css',
           '{.tmp,<%= yeoman.app %>}/scripts/{,*/}*.js',
           '<%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}'
-        ]
+        ],
+                tasks: ['includes:server']
             }
         },
         connect: {
@@ -112,6 +117,27 @@ module.exports = function (grunt) {
                 }
             }
         },
+
+        includes: {
+            build: {
+                cwd: '<%= yeoman.app %>',
+                src: ['*.html', 'includes/*.html'],
+                dest: '<%= yeoman.dist %>',
+                options: {
+                    flatten: true,
+                    banner: ''
+                }
+            },
+            server: {
+                cwd: '<%= yeoman.app %>',
+                src: ['*.html', 'includes/*.html'],
+                dest: '.tmp/',
+                options: {
+                    flatten: true,
+                    banner: ''
+                }
+            }
+        },
         // not used since Uglify task does concat,
         // but still available if needed
         /*concat: {
@@ -240,6 +266,7 @@ module.exports = function (grunt) {
         grunt.task.run([
       'clean:server',
       'less',
+                'includes:server',
       'copy:server',
       'connect:livereload',
       'watch'
@@ -260,14 +287,17 @@ module.exports = function (grunt) {
 
     grunt.registerTask('build', [
     'clean:dist',
+
     'copy:server',
     'useminPrepare',
     'concurrent',
     'cssmin',
     'concat',
+            'includes:build',
     'uglify',
     'copy',
-    'usemin'
+    'usemin',
+
   ]);
 
     grunt.registerTask('default', [
@@ -275,4 +305,4 @@ module.exports = function (grunt) {
     'test',
     'build'
   ]);
-};
+};

+ 10 - 0
README.md

@@ -62,6 +62,16 @@ go run transfersh-server/*.go -provider=local --port 8080 --temp=/tmp/ --basedir
 go build -o transfersh-server *.go
 ```
 
+## Docker
+
+For easy deployment we've enabled Docker deployment.
+
+```
+cd ./transfer-server/
+docker build -t transfersh .
+docker run --publish 8080:8080 --rm transfersh --provider local --basedir /tmp/
+```
+
 ## Contributions
 
 Contributions are welcome.

+ 2 - 0
package.json

@@ -18,6 +18,8 @@
     "grunt-contrib-less": "~0.11.4",
     "grunt-contrib-uglify": "~0.6.0",
     "grunt-contrib-watch": "~0.6.1",
+    "grunt-include-replace": "^2.0.0",
+    "grunt-includes": "^0.4.5",
     "grunt-rev": "~0.1.0",
     "grunt-svgmin": "1.0.0",
     "grunt-usemin": "~2.4.0",

+ 110 - 36
transfersh-server/handlers.go

@@ -35,9 +35,9 @@ import (
 	"errors"
 	"fmt"
 	"github.com/dutchcoders/go-clamd"
-	"github.com/golang/gddo/httputil/header"
 	"github.com/gorilla/mux"
 	"github.com/kennygrant/sanitize"
+	"github.com/russross/blackfriday"
 	html_template "html/template"
 	"io"
 	"io/ioutil"
@@ -57,23 +57,94 @@ func healthHandler(w http.ResponseWriter, r *http.Request) {
 	fmt.Fprintf(w, "Approaching Neutral Zone, all systems normal and functioning.")
 }
 
-// this handler will output html or text, depending on the
-// support of the client (Accept header).
+/* The preview handler will show a preview of the content for browsers (accept type text/html), and referer is not transfer.sh */
+func previewHandler(w http.ResponseWriter, r *http.Request) {
 
-func viewHandler(w http.ResponseWriter, r *http.Request) {
-	// vars := mux.Vars(r)
+	vars := mux.Vars(r)
+
+	token := vars["token"]
+	filename := vars["filename"]
+
+	contentType, contentLength, err := storage.Head(token, filename)
+	if err != nil {
+		http.Error(w, http.StatusText(404), 404)
+		return
+	}
 
-	actual := header.ParseAccept(r.Header, "Accept")
+	var templatePath string
+	var content html_template.HTML
 
-	html := false
+	switch {
+	case strings.HasPrefix(contentType, "image/"):
+		templatePath = "download.image.html"
+	case strings.HasPrefix(contentType, "video/"):
+		templatePath = "download.video.html"
+	case strings.HasPrefix(contentType, "audio/"):
+		templatePath = "download.audio.html"
+	case strings.HasPrefix(contentType, "text/"):
+		templatePath = "download.markdown.html"
+
+		var reader io.ReadCloser
+		if reader, _, _, err = storage.Get(token, filename); err != nil {
+			http.Error(w, err.Error(), http.StatusInternalServerError)
+			return
+		}
 
-	for _, s := range actual {
-		if s.Value == "text/html" {
-			html = true
+		var data []byte
+		if data, err = ioutil.ReadAll(reader); err != nil {
+			http.Error(w, err.Error(), http.StatusInternalServerError)
+			return
 		}
+
+		if strings.HasPrefix(contentType, "text/x-markdown") || strings.HasPrefix(contentType, "text/markdown") {
+			output := blackfriday.MarkdownCommon(data)
+			content = html_template.HTML(output)
+		} else if strings.HasPrefix(contentType, "text/plain") {
+			content = html_template.HTML(fmt.Sprintf("<pre>%s</pre>", data))
+		} else {
+			content = html_template.HTML(data)
+		}
+
+		templatePath = "download.markdown.html"
+	default:
+		templatePath = "download.html"
 	}
 
-	if html {
+	tmpl, err := html_template.New(templatePath).Funcs(html_template.FuncMap{"format": formatNumber}).ParseFiles("static/" + templatePath)
+
+	if err != nil {
+		http.Error(w, err.Error(), http.StatusInternalServerError)
+		return
+	}
+
+	data := struct {
+		ContentType   string
+		Content       html_template.HTML
+		Filename      string
+		Url           string
+		ContentLength uint64
+	}{
+		contentType,
+		content,
+		filename,
+		r.URL.String(),
+		contentLength,
+	}
+
+	if err := tmpl.ExecuteTemplate(w, templatePath, data); err != nil {
+		http.Error(w, err.Error(), http.StatusInternalServerError)
+		return
+	}
+
+}
+
+// this handler will output html or text, depending on the
+// support of the client (Accept header).
+
+func viewHandler(w http.ResponseWriter, r *http.Request) {
+	// vars := mux.Vars(r)
+
+	if acceptsHtml(r.Header) {
 		tmpl, err := html_template.ParseFiles("static/index.html")
 
 		if err != nil {
@@ -106,7 +177,7 @@ func notFoundHandler(w http.ResponseWriter, r *http.Request) {
 
 func postHandler(w http.ResponseWriter, r *http.Request) {
 	if err := r.ParseMultipartForm(_24K); nil != err {
-		log.Println(err)
+		log.Printf("%s", err.Error())
 		http.Error(w, "Error occured copying to output stream", 500)
 		return
 	}
@@ -128,7 +199,7 @@ func postHandler(w http.ResponseWriter, r *http.Request) {
 			var err error
 
 			if f, err = fheader.Open(); err != nil {
-				log.Print(err)
+				log.Printf("%s", err.Error())
 				http.Error(w, err.Error(), 500)
 				return
 			}
@@ -137,7 +208,7 @@ func postHandler(w http.ResponseWriter, r *http.Request) {
 
 			n, err := io.CopyN(&b, f, _24K+1)
 			if err != nil && err != io.EOF {
-				log.Print(err)
+				log.Printf("%s", err.Error())
 				http.Error(w, err.Error(), 500)
 				return
 			}
@@ -155,7 +226,7 @@ func postHandler(w http.ResponseWriter, r *http.Request) {
 				if err != nil {
 					os.Remove(file.Name())
 
-					log.Print(err)
+					log.Printf("%s", err.Error())
 					http.Error(w, err.Error(), 500)
 					return
 				}
@@ -170,7 +241,7 @@ func postHandler(w http.ResponseWriter, r *http.Request) {
 			log.Printf("Uploading %s %s %d %s", token, filename, contentLength, contentType)
 
 			if err = storage.Put(token, filename, reader, contentType, uint64(contentLength)); err != nil {
-				log.Print(err)
+				log.Printf("%s", err.Error())
 				http.Error(w, err.Error(), 500)
 				return
 
@@ -199,7 +270,9 @@ func scanHandler(w http.ResponseWriter, r *http.Request) {
 
 	response, err := c.ScanStream(reader)
 	if err != nil {
+		log.Printf("%s", err.Error())
 		http.Error(w, err.Error(), 500)
+		return
 	}
 
 	var b string
@@ -237,7 +310,7 @@ func putHandler(w http.ResponseWriter, r *http.Request) {
 
 		n, err := io.CopyN(&b, f, _24K+1)
 		if err != nil && err != io.EOF {
-			log.Print(err)
+			log.Printf("%s", err.Error())
 			http.Error(w, err.Error(), 500)
 			return
 		}
@@ -245,7 +318,7 @@ func putHandler(w http.ResponseWriter, r *http.Request) {
 		if n > _24K {
 			file, err := ioutil.TempFile(config.Temp, "transfer-")
 			if err != nil {
-				log.Print(err)
+				log.Printf("%s", err.Error())
 				http.Error(w, err.Error(), 500)
 				return
 			}
@@ -255,8 +328,7 @@ func putHandler(w http.ResponseWriter, r *http.Request) {
 			n, err = io.Copy(file, io.MultiReader(&b, f))
 			if err != nil {
 				os.Remove(file.Name())
-
-				log.Print(err)
+				log.Printf("%s", err.Error())
 				http.Error(w, err.Error(), 500)
 				return
 			}
@@ -282,6 +354,7 @@ func putHandler(w http.ResponseWriter, r *http.Request) {
 	var err error
 
 	if err = storage.Put(token, filename, reader, contentType, uint64(contentLength)); err != nil {
+		log.Printf("%s", err.Error())
 		http.Error(w, errors.New("Could not save file").Error(), 500)
 		return
 	}
@@ -307,10 +380,17 @@ func zipHandler(w http.ResponseWriter, r *http.Request) {
 	zw := zip.NewWriter(w)
 
 	for _, key := range strings.Split(files, ",") {
-		token := sanitize.Path(strings.Split(key, "/")[0])
+		if strings.HasPrefix(key, "/") {
+			key = key[1:]
+		}
+
+		key = strings.Replace(key, "\\", "/", -1)
+
+		token := strings.Split(key, "/")[0]
 		filename := sanitize.Path(strings.Split(key, "/")[1])
 
 		reader, _, _, err := storage.Get(token, filename)
+
 		if err != nil {
 			if err.Error() == "The specified key does not exist." {
 				http.Error(w, "File not found", 404)
@@ -371,8 +451,14 @@ func tarGzHandler(w http.ResponseWriter, r *http.Request) {
 	defer zw.Close()
 
 	for _, key := range strings.Split(files, ",") {
+		if strings.HasPrefix(key, "/") {
+			key = key[1:]
+		}
+
+		key = strings.Replace(key, "\\", "/", -1)
+
 		token := strings.Split(key, "/")[0]
-		filename := strings.Split(key, "/")[1]
+		filename := sanitize.Path(strings.Split(key, "/")[1])
 
 		reader, _, contentLength, err := storage.Get(token, filename)
 		if err != nil {
@@ -482,23 +568,11 @@ func getHandler(w http.ResponseWriter, r *http.Request) {
 
 	w.Header().Set("Content-Type", contentType)
 	w.Header().Set("Content-Length", strconv.FormatUint(contentLength, 10))
-
-	mediaType, _, _ := mime.ParseMediaType(contentType)
-
-	switch {
-	case mediaType == "text/html":
-		w.Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=\"%s\"", filename))
-		break
-	case strings.HasPrefix(mediaType, "text"):
-	case mediaType == "":
-		break
-	default:
-		w.Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=\"%s\"", filename))
-	}
-
+	w.Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=\"%s\"", filename))
 	w.Header().Set("Connection", "close")
 
 	if _, err = io.Copy(w, reader); err != nil {
+		log.Printf("%s", err.Error())
 		http.Error(w, "Error occured copying to output stream", 500)
 		return
 	}

+ 23 - 15
transfersh-server/main.go

@@ -33,7 +33,9 @@ import (
 	"github.com/gorilla/mux"
 	"log"
 	"math/rand"
+	"mime"
 	"net/http"
+	"net/url"
 	"os"
 	"time"
 )
@@ -86,23 +88,27 @@ func main() {
 	r.HandleFunc("/({files:.*}).tar.gz", tarGzHandler).Methods("GET")
 	r.HandleFunc("/download/{token}/{filename}", getHandler).Methods("GET")
 
-	/*r.HandleFunc("/{token}/{filename}", viewHandler).MatcherFunc(func(r *http.Request, rm *mux.RouteMatch) bool {
-	    u, err := url.Parse(r.Referer())
-	    if err != nil {
-	        log.Fatal(err)
-	        return true
-	    }
+	r.HandleFunc("/{token}/{filename}", previewHandler).MatcherFunc(func(r *http.Request, rm *mux.RouteMatch) (match bool) {
+		match = false
 
-	    if u.Host == "transfer.sh" {
-	        return false
-	    }
+		// The file will show a preview page when opening the link in browser directly or
+		// from external link. If the referer url path and current path are the same it will be
+		// downloaded.
+		if !acceptsHtml(r.Header) {
+			return false
+		}
 
-	    if u.Host == "" {
-	        return false
-	    }
+		match = (r.Referer() == "")
 
-	    return true
-	}).Methods("GET")*/
+		u, err := url.Parse(r.Referer())
+		if err != nil {
+			log.Fatal(err)
+			return
+		}
+
+		match = match || (u.Path != r.URL.Path)
+		return
+	}).Methods("GET")
 
 	r.HandleFunc("/{token}/{filename}", getHandler).Methods("GET")
 	r.HandleFunc("/get/{token}/{filename}", getHandler).Methods("GET")
@@ -156,7 +162,9 @@ func main() {
 		log.Panic("Error while creating storage.")
 	}
 
-	log.Printf("Transfer.sh server started. :%v using temp folder: %s", *port, config.Temp)
+	mime.AddExtensionType(".md", "text/x-markdown")
+
+	log.Printf("Transfer.sh server started. :\nlistening on port: %v\nusing temp folder: %s\nusing storage provider: %s", *port, config.Temp, *provider)
 	log.Printf("---------------------------")
 
 	s := &http.Server{

+ 1 - 1
transfersh-server/static/404.html

@@ -154,4 +154,4 @@
             <script src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>
         </div>
     </body>
-</html>
+</html>

+ 132 - 0
transfersh-server/static/download.audio.html

@@ -0,0 +1,132 @@
+
+
+</html>
+<!doctype html>
+<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
+<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
+<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
+<!--[if gt IE 8]><!-->
+<html class="no-js">
+<!--<![endif]-->
+
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <title>transfer.sh - Easy and fast file sharing from the command-line.</title>
+    <meta name="description" content="Easy and fast file sharing from the command-line.">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
+    <link rel="stylesheet" href="/styles/main.css">
+    <link href='//fonts.googleapis.com/css?family=Source+Sans+Pro:100,200,300' rel='stylesheet' type='text/css'>
+    <link href='//fonts.googleapis.com/css?family=Droid+Sans+Mono' rel='stylesheet' type='text/css'>
+    <script src="/scripts/vendor/modernizr.js"></script>
+</head>
+
+
+<body  id="download">
+
+        <script>
+        (function(i, s, o, g, r, a, m) {
+            i['GoogleAnalyticsObject'] = r;
+            i[r] = i[r] || function() {
+                (i[r].q = i[r].q || []).push(arguments)
+            }, i[r].l = 1 * new Date();
+            a = s.createElement(o),
+                m = s.getElementsByTagName(o)[0];
+            a.async = 1;
+            a.src = g;
+            m.parentNode.insertBefore(a, m)
+        })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
+        ga('create', 'UA-40833733-1', 'transfer.sh');
+        ga('send', 'pageview');
+        </script>
+
+        <div id="navigation">
+            <div class="wrapper">
+                <a href="/">
+                    <h1>transfer.sh</h1>
+                </a>
+                <ul class="hidden-xs">
+                    <li><a href="/">home</a>
+                    </li>
+                    <li><a href="/#samples">sample use cases</a>
+                    </li>
+                    <li><a href="/#contact">contact us</a>
+                    </li>
+                </ul>
+            </div>
+        </div>
+    
+
+    <section id="home">
+        <div class="wrapper">
+    
+                    <br/>
+                    <h2 class="page-title">{{.Filename}}</h2>
+                    <h4>type: <b>{{.ContentType}}</b></h4>
+                    <h4>size: <b>{{.ContentLength | format "#,###."}}</b> bytes</h4>
+
+                    <a href="{{.Url}}" class="btn-cta btn"> download</i> </a> <br/><br/>
+
+
+            <div class="row animated fadeInDown">
+                <div id="from-terminal" class=" box col-md-8  col-md-offset-2 col-xs-12">
+                    <div class="terminal-top">
+
+                    </div>
+                    <div id="terminal" class="terminal preview-image">
+                            <audio controls>
+                        <source src="{{.Url}}" type="{{.ContentType}}">
+                    </audio>
+                    </div>
+                </div>
+            </div>
+            <br/>
+            <div>
+
+    </section>
+
+    <footer>
+        <div class="wrapper">
+            <div style="">
+                <a href="bitcoin:164ybRMLbg1dhhWWiUkXtiNr7jUhMKdJqH" label="Bitcoin+Donation" style="word-wrap: break-word;">
+                    <img border="0" src=" /images/bitcoin.png" style="margin: 0 auto;;">
+                </a>
+            </div>
+            <br/>
+                    <br/>
+            <img src="/images/Logo-orange.png" alt="Founded in Holland">
+            <p>Made with <i class="icon-heart"></i> by <a href="http://blog.dutchcoders.io/" title="Dutch Coders">Dutch Coders</a>
+            </p>
+        </div>
+
+    </footer>
+
+
+    <a href="https://github.com/you"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
+
+        <script>
+        (function() {
+            var uv = document.createElement('script');
+            uv.type = 'text/javascript';
+            uv.async = true;
+            uv.src = '//widget.uservoice.com/5rkATbLIm8ClJQeOirOhFg.js';
+            var s = document.getElementsByTagName('script')[0];
+            s.parentNode.insertBefore(uv, s)
+        })()
+        </script>
+
+        <!--[if lt IE 7]>
+          <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
+        <![endif]-->
+
+       
+      
+
+        <script src="/scripts/main.js"></script>
+          
+
+
+</body>
+
+</html>

+ 134 - 0
transfersh-server/static/download.code.html

@@ -0,0 +1,134 @@
+<!doctype html>
+<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
+<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
+<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
+<!--[if gt IE 8]><!-->
+<html class="no-js">
+<!--<![endif]-->
+
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <title>{{.Filename}} - transfer.sh</title>
+    <meta name="description" content="Easy and fast file sharing from the command-line.">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
+    <link rel="stylesheet" href="styles/main.css">
+
+    <link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:100,200,300' rel='stylesheet' type='text/css'>
+    <link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400' rel='stylesheet' type='text/css'>
+    <link href='http://fonts.googleapis.com/css?family=Droid+Sans+Mono' rel='stylesheet' type='text/css'>
+    <script src="scripts/vendor/modernizr.js"></script>
+</head>
+
+<body  id="download">
+    <script>
+    (function(i, s, o, g, r, a, m) {
+        i['GoogleAnalyticsObject'] = r;
+        i[r] = i[r] || function() {
+            (i[r].q = i[r].q || []).push(arguments)
+        }, i[r].l = 1 * new Date();
+        a = s.createElement(o),
+            m = s.getElementsByTagName(o)[0];
+        a.async = 1;
+        a.src = g;
+        m.parentNode.insertBefore(a, m)
+    })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
+    ga('create', 'UA-40833733-1', 'transfer.sh');
+    ga('send', 'pageview');
+    </script>
+
+    <div id="navigation">
+        <div class="wrapper">
+            <h1>transfer.sh</h1>
+            <ul class="hidden-xs">
+                <li><a href="#samples">sample use cases</a>
+                </li>
+                <li><a href="#contact">contact us</a>
+                </li>
+            </ul>
+        </div>
+    </div>
+
+<section id="home">
+    <div class="wrapper">
+        <h2>
+            {{.Filename}}</h2>
+        <a href="{{.Url}}"></a>
+        <div class="row animated fadeInDown">
+            <div id="from-terminal" class=" box col-md-8  col-md-offset-2 col-xs-12">
+                <div class="terminal-top">
+
+                </div>
+                <div id="terminal" class="terminal">
+                    <div id="code"></div>
+                </div>
+
+
+
+            </div>
+
+        </div>
+
+    <div>
+        <a href="#" id="copy-link-btn" class="btn-cta btn">copy link</a> &nbsp;&nbsp;
+        <a href="{{.Url}}" class="btn-cta btn"> download</i> </a>
+        <div id="copy-link-wrapper" class="copy-link-wrapper">
+            <p>Press Ctrl / CMD + C to copy link to your clipboard.</p>
+            <input readonly="readonly" type="text" value="{{.Url}}" />
+        </div>
+        <div id="overlay" class="overlay"></div>
+    </div>
+        <script src="scripts/clipboard.js"></script>
+
+</section>
+
+
+    <script>
+    (function() {
+        var uv = document.createElement('script');
+        uv.type = 'text/javascript';
+        uv.async = true;
+        uv.src = '//widget.uservoice.com/5rkATbLIm8ClJQeOirOhFg.js';
+        var s = document.getElementsByTagName('script')[0];
+        s.parentNode.insertBefore(uv, s)
+    })()
+    </script>
+
+    <!--[if lt IE 7]>
+      <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
+    <![endif]-->
+
+    <script>
+    (function(b, o, i, l, e, r) {
+        b.GoogleAnalyticsObject = l;
+        b[l] || (b[l] =
+            function() {
+                (b[l].q = b[l].q || []).push(arguments)
+            });
+        b[l].l = +new Date;
+        e = o.createElement(i);
+        r = o.getElementsByTagName(i)[0];
+        e.src = '//www.google-analytics.com/analytics.js';
+        r.parentNode.insertBefore(e, r)
+    }(window, document, 'script', 'ga'));
+    ga('create', 'UA-40833733-1', 'transfer.sh');
+    ga('send', 'pageview');
+    </script>
+
+        <script src="scripts/main.js"></script>
+        
+    <script>
+
+    var text = "# Markdown *works*.";
+
+    var converter = new Showdown.converter();
+    var html = converter.makeHtml(text);
+    $('#md-preview').append(html);
+
+    </script>
+
+
+</body>
+
+</html>

+ 116 - 0
transfersh-server/static/download.html

@@ -0,0 +1,116 @@
+<!doctype html>
+<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
+<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
+<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
+<!--[if gt IE 8]><!-->
+<html class="no-js">
+<!--<![endif]-->
+
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <title>transfer.sh - Easy and fast file sharing from the command-line.</title>
+    <meta name="description" content="Easy and fast file sharing from the command-line.">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
+    <link rel="stylesheet" href="/styles/main.css">
+    <link href='//fonts.googleapis.com/css?family=Source+Sans+Pro:100,200,300' rel='stylesheet' type='text/css'>
+    <link href='//fonts.googleapis.com/css?family=Droid+Sans+Mono' rel='stylesheet' type='text/css'>
+    <script src="/scripts/vendor/modernizr.js"></script>
+</head>
+
+
+<body  id="download">
+
+        <script>
+        (function(i, s, o, g, r, a, m) {
+            i['GoogleAnalyticsObject'] = r;
+            i[r] = i[r] || function() {
+                (i[r].q = i[r].q || []).push(arguments)
+            }, i[r].l = 1 * new Date();
+            a = s.createElement(o),
+                m = s.getElementsByTagName(o)[0];
+            a.async = 1;
+            a.src = g;
+            m.parentNode.insertBefore(a, m)
+        })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
+        ga('create', 'UA-40833733-1', 'transfer.sh');
+        ga('send', 'pageview');
+        </script>
+
+        <div id="navigation">
+            <div class="wrapper">
+                <a href="/">
+                    <h1>transfer.sh</h1>
+                </a>
+                <ul class="hidden-xs">
+                    <li><a href="/">home</a>
+                    </li>
+                    <li><a href="/#samples">sample use cases</a>
+                    </li>
+                    <li><a href="/#contact">contact us</a>
+                    </li>
+                </ul>
+            </div>
+        </div>
+
+   
+<section id="home">
+    <div class="wrapper">
+    
+              <br/>
+              <h2 class="page-title">{{.Filename}}</h2>
+              <h4>type: <b>{{.ContentType}}</b></h4>
+              <h4>size: <b>{{.ContentLength | format "#,###."}}</b> bytes</h4>
+
+              <a href="{{.Url}}" class="btn-cta btn"> download</i> </a> <br/><br/>
+
+    </div>
+</section>
+    
+    <footer>
+        <div class="wrapper">
+            <div style="">
+                <a href="bitcoin:164ybRMLbg1dhhWWiUkXtiNr7jUhMKdJqH" label="Bitcoin+Donation" style="word-wrap: break-word;">
+                    <img border="0" src=" /images/bitcoin.png" style="margin: 0 auto;;">
+                </a>
+            </div>
+            <br/>
+                    <br/>
+            <img src="/images/Logo-orange.png" alt="Founded in Holland">
+            <p>Made with <i class="icon-heart"></i> by <a href="http://blog.dutchcoders.io/" title="Dutch Coders">Dutch Coders</a>
+            </p>
+        </div>
+
+    </footer>
+
+
+    <a href="https://github.com/you"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
+
+        <script>
+        (function() {
+            var uv = document.createElement('script');
+            uv.type = 'text/javascript';
+            uv.async = true;
+            uv.src = '//widget.uservoice.com/5rkATbLIm8ClJQeOirOhFg.js';
+            var s = document.getElementsByTagName('script')[0];
+            s.parentNode.insertBefore(uv, s)
+        })()
+        </script>
+
+        <!--[if lt IE 7]>
+          <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
+        <![endif]-->
+
+       
+      
+
+       <script src="/scripts/main.js"></script>
+         
+
+    
+
+
+</body>
+
+</html>

+ 126 - 0
transfersh-server/static/download.image.html

@@ -0,0 +1,126 @@
+<!doctype html>
+<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
+<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
+<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
+<!--[if gt IE 8]><!-->
+<html class="no-js">
+<!--<![endif]-->
+
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <title>transfer.sh - Easy and fast file sharing from the command-line.</title>
+    <meta name="description" content="Easy and fast file sharing from the command-line.">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
+    <link rel="stylesheet" href="/styles/main.css">
+    <link href='//fonts.googleapis.com/css?family=Source+Sans+Pro:100,200,300' rel='stylesheet' type='text/css'>
+    <link href='//fonts.googleapis.com/css?family=Droid+Sans+Mono' rel='stylesheet' type='text/css'>
+    <script src="/scripts/vendor/modernizr.js"></script>
+</head>
+
+
+<body  id="download">
+
+        <script>
+        (function(i, s, o, g, r, a, m) {
+            i['GoogleAnalyticsObject'] = r;
+            i[r] = i[r] || function() {
+                (i[r].q = i[r].q || []).push(arguments)
+            }, i[r].l = 1 * new Date();
+            a = s.createElement(o),
+                m = s.getElementsByTagName(o)[0];
+            a.async = 1;
+            a.src = g;
+            m.parentNode.insertBefore(a, m)
+        })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
+        ga('create', 'UA-40833733-1', 'transfer.sh');
+        ga('send', 'pageview');
+        </script>
+
+        <div id="navigation">
+            <div class="wrapper">
+                <a href="/">
+                    <h1>transfer.sh</h1>
+                </a>
+                <ul class="hidden-xs">
+                    <li><a href="/">home</a>
+                    </li>
+                    <li><a href="/#samples">sample use cases</a>
+                    </li>
+                    <li><a href="/#contact">contact us</a>
+                    </li>
+                </ul>
+            </div>
+        </div>
+
+    <section id="home">
+        <div class="wrapper">
+
+            <br/>
+            <h2 class="page-title">{{.Filename}}</h2>
+            <h4>type: <b>{{.ContentType}}</b></h4>
+            <h4>size: <b>{{.ContentLength | format "#,###."}}</b> bytes</h4>
+
+            <a href="{{.Url}}" class="btn-cta btn"> download</i> </a> <br/><br/>
+
+
+            <div class="row animated fadeInDown">
+                <div id="from-terminal" class=" box col-md-8  col-md-offset-2 col-xs-12">
+                    <div class="terminal-top">
+
+                    </div>
+                    <div id="terminal" class="terminal preview-image">
+                        <img src="{{.Url}}"  alt="">
+                    </div>
+                </div>
+            </div>
+            <br/>
+            <div>
+    <div>
+    </section>
+
+    <footer>
+        <div class="wrapper">
+            <div style="">
+                <a href="bitcoin:164ybRMLbg1dhhWWiUkXtiNr7jUhMKdJqH" label="Bitcoin+Donation" style="word-wrap: break-word;">
+                    <img border="0" src=" /images/bitcoin.png" style="margin: 0 auto;;">
+                </a>
+            </div>
+            <br/>
+                    <br/>
+            <img src="/images/Logo-orange.png" alt="Founded in Holland">
+            <p>Made with <i class="icon-heart"></i> by <a href="http://blog.dutchcoders.io/" title="Dutch Coders">Dutch Coders</a>
+            </p>
+        </div>
+
+    </footer>
+
+
+    <a href="https://github.com/you"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
+
+        <script>
+        (function() {
+            var uv = document.createElement('script');
+            uv.type = 'text/javascript';
+            uv.async = true;
+            uv.src = '//widget.uservoice.com/5rkATbLIm8ClJQeOirOhFg.js';
+            var s = document.getElementsByTagName('script')[0];
+            s.parentNode.insertBefore(uv, s)
+        })()
+        </script>
+
+        <!--[if lt IE 7]>
+          <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
+        <![endif]-->
+
+       
+      
+
+        <script src="/scripts/main.js"></script>
+          
+
+
+</body>
+
+</html>

+ 124 - 0
transfersh-server/static/download.markdown.html

@@ -0,0 +1,124 @@
+<!doctype html>
+<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
+<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
+<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
+<!--[if gt IE 8]><!-->
+<html class="no-js">
+<!--<![endif]-->
+
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <title>transfer.sh - Easy and fast file sharing from the command-line.</title>
+    <meta name="description" content="Easy and fast file sharing from the command-line.">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
+    <link rel="stylesheet" href="/styles/main.css">
+    <link href='//fonts.googleapis.com/css?family=Source+Sans+Pro:100,200,300' rel='stylesheet' type='text/css'>
+    <link href='//fonts.googleapis.com/css?family=Droid+Sans+Mono' rel='stylesheet' type='text/css'>
+    <script src="/scripts/vendor/modernizr.js"></script>
+</head>
+
+
+<body  id="download">
+
+        <script>
+        (function(i, s, o, g, r, a, m) {
+            i['GoogleAnalyticsObject'] = r;
+            i[r] = i[r] || function() {
+                (i[r].q = i[r].q || []).push(arguments)
+            }, i[r].l = 1 * new Date();
+            a = s.createElement(o),
+                m = s.getElementsByTagName(o)[0];
+            a.async = 1;
+            a.src = g;
+            m.parentNode.insertBefore(a, m)
+        })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
+        ga('create', 'UA-40833733-1', 'transfer.sh');
+        ga('send', 'pageview');
+        </script>
+
+        <div id="navigation">
+            <div class="wrapper">
+                <a href="/">
+                    <h1>transfer.sh</h1>
+                </a>
+                <ul class="hidden-xs">
+                    <li><a href="/">home</a>
+                    </li>
+                    <li><a href="/#samples">sample use cases</a>
+                    </li>
+                    <li><a href="/#contact">contact us</a>
+                    </li>
+                </ul>
+            </div>
+        </div>
+
+<section id="home">
+    <div class="wrapper">
+
+                <br/>
+                <h2 class="page-title">{{.Filename}}</h2>
+                <h4>type: <b>{{.ContentType}}</b></h4>
+                <h4>size: <b>{{.ContentLength | format "#,###."}}</b> bytes</h4>
+
+                <a href="{{.Url}}" class="btn-cta btn"> download</i> </a> <br/><br/>
+
+
+        <div class="row animated fadeInDown">
+            <div id="from-terminal" class=" box col-md-8  col-md-offset-2 col-xs-12">
+                <div class="terminal-top">
+                </div>
+                <div id="terminal" class="terminal">
+                    <div id="md-preview">{{.Content}}</div>
+                </div>
+            </div>
+        </div>
+    <br/>
+
+</section>
+
+
+    <footer>
+        <div class="wrapper">
+            <div style="">
+                <a href="bitcoin:164ybRMLbg1dhhWWiUkXtiNr7jUhMKdJqH" label="Bitcoin+Donation" style="word-wrap: break-word;">
+                    <img border="0" src=" /images/bitcoin.png" style="margin: 0 auto;;">
+                </a>
+            </div>
+            <br/>
+                    <br/>
+            <img src="/images/Logo-orange.png" alt="Founded in Holland">
+            <p>Made with <i class="icon-heart"></i> by <a href="http://blog.dutchcoders.io/" title="Dutch Coders">Dutch Coders</a>
+            </p>
+        </div>
+
+    </footer>
+
+
+    <a href="https://github.com/you"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
+
+        <script>
+        (function() {
+            var uv = document.createElement('script');
+            uv.type = 'text/javascript';
+            uv.async = true;
+            uv.src = '//widget.uservoice.com/5rkATbLIm8ClJQeOirOhFg.js';
+            var s = document.getElementsByTagName('script')[0];
+            s.parentNode.insertBefore(uv, s)
+        })()
+        </script>
+
+        <!--[if lt IE 7]>
+          <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
+        <![endif]-->
+
+       
+      
+
+        <script src="/scripts/main.js"></script>
+          
+
+</body>
+
+</html>

+ 129 - 0
transfersh-server/static/download.video.html

@@ -0,0 +1,129 @@
+<!doctype html>
+<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
+<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
+<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
+<!--[if gt IE 8]><!-->
+<html class="no-js">
+<!--<![endif]-->
+
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <title>transfer.sh - Easy and fast file sharing from the command-line.</title>
+    <meta name="description" content="Easy and fast file sharing from the command-line.">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
+    <link rel="stylesheet" href="/styles/main.css">
+    <link href='//fonts.googleapis.com/css?family=Source+Sans+Pro:100,200,300' rel='stylesheet' type='text/css'>
+    <link href='//fonts.googleapis.com/css?family=Droid+Sans+Mono' rel='stylesheet' type='text/css'>
+    <script src="/scripts/vendor/modernizr.js"></script>
+</head>
+
+
+<body  id="download">
+
+        <script>
+        (function(i, s, o, g, r, a, m) {
+            i['GoogleAnalyticsObject'] = r;
+            i[r] = i[r] || function() {
+                (i[r].q = i[r].q || []).push(arguments)
+            }, i[r].l = 1 * new Date();
+            a = s.createElement(o),
+                m = s.getElementsByTagName(o)[0];
+            a.async = 1;
+            a.src = g;
+            m.parentNode.insertBefore(a, m)
+        })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
+        ga('create', 'UA-40833733-1', 'transfer.sh');
+        ga('send', 'pageview');
+        </script>
+
+        <div id="navigation">
+            <div class="wrapper">
+                <a href="/">
+                    <h1>transfer.sh</h1>
+                </a>
+                <ul class="hidden-xs">
+                    <li><a href="/">home</a>
+                    </li>
+                    <li><a href="/#samples">sample use cases</a>
+                    </li>
+                    <li><a href="/#contact">contact us</a>
+                    </li>
+                </ul>
+            </div>
+        </div>
+    
+
+    <section id="home">
+        <div class="wrapper">
+    
+                    <br/>
+                    <h2 class="page-title">{{.Filename}}</h2>
+                    <h4>type: <b>{{.ContentType}}</b></h4>
+                    <h4>size: <b>{{.ContentLength | format "#,###."}}</b> bytes</h4>
+
+                    <a href="{{.Url}}" class="btn-cta btn"> download</i> </a> <br/><br/>
+
+
+            <div class="row animated fadeInDown">
+                <div id="from-terminal" class=" box col-md-8  col-md-offset-2 col-xs-12">
+                    <div class="terminal-top">
+
+                    </div>
+                    <div id="terminal" class="terminal preview-image">
+                        <video  controls>
+                            <source src="{{.Url}}" type="{{.ContentType}}">
+                        </video>
+                    </div>
+                </div>
+            </div>
+            <br/>
+            <div>
+
+    </section>
+
+    <footer>
+        <div class="wrapper">
+            <div style="">
+                <a href="bitcoin:164ybRMLbg1dhhWWiUkXtiNr7jUhMKdJqH" label="Bitcoin+Donation" style="word-wrap: break-word;">
+                    <img border="0" src=" /images/bitcoin.png" style="margin: 0 auto;;">
+                </a>
+            </div>
+            <br/>
+                    <br/>
+            <img src="/images/Logo-orange.png" alt="Founded in Holland">
+            <p>Made with <i class="icon-heart"></i> by <a href="http://blog.dutchcoders.io/" title="Dutch Coders">Dutch Coders</a>
+            </p>
+        </div>
+
+    </footer>
+
+
+    <a href="https://github.com/you"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
+
+        <script>
+        (function() {
+            var uv = document.createElement('script');
+            uv.type = 'text/javascript';
+            uv.async = true;
+            uv.src = '//widget.uservoice.com/5rkATbLIm8ClJQeOirOhFg.js';
+            var s = document.getElementsByTagName('script')[0];
+            s.parentNode.insertBefore(uv, s)
+        })()
+        </script>
+
+        <!--[if lt IE 7]>
+          <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
+        <![endif]-->
+
+       
+      
+
+        <script src="/scripts/main.js"></script>
+          
+
+
+</body>
+
+</html>

BIN=BIN
transfersh-server/static/images/bitcoin.png


+ 5 - 5
transfersh-server/static/images/terminal-top.svg

@@ -45,14 +45,14 @@
     </rdf:RDF>
   </metadata>
   <g
-     transform="translate(-93.957497,-365.26607)"
+     transform="matrix(1,0,0,0.94456233,-93.957497,-345.57658)"
      id="layer1">
     <path
-       d="m 85.371201,355.16455 789.901059,0 0,49.98291 -789.901059,0 z"
+       d="m 93.957497,365.85895 750.000003,0 0,31.76074 -750.000003,0 z"
        id="rect4487"
        style="fill:#85b5bb;fill-opacity:1;stroke:none" />
     <g
-       transform="matrix(1.4512649,0,0,-1.4512649,-114.5591,1453.446)"
+       transform="matrix(1.4512649,0,0,-1.4512649,-114.5591,1454.9192)"
        id="g24"
        style="fill:#ff7050">
       <g
@@ -78,7 +78,7 @@
       </g>
     </g>
     <g
-       transform="matrix(1.4512649,0,0,-1.4512649,-114.5591,1453.507)"
+       transform="matrix(1.4512649,0,0,-1.4512649,-114.5591,1454.9802)"
        id="g40"
        style="fill:#ffed5d">
       <g
@@ -104,7 +104,7 @@
       </g>
     </g>
     <g
-       transform="matrix(1.4512649,0,0,-1.4512649,-115.0147,1453.4765)"
+       transform="matrix(1.4512649,0,0,-1.4512649,-115.0147,1454.9497)"
        id="g56"
        style="fill:#93de7f">
       <g

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 5 - 0
transfersh-server/static/images/tor.svg


+ 5 - 0
transfersh-server/static/includes/download-bottom.html

@@ -0,0 +1,5 @@
+                </div>
+            </div>
+        </div>
+    <br/>
+</section>

+ 10 - 0
transfersh-server/static/includes/download-btn.html

@@ -0,0 +1,10 @@
+<div>
+    <a href="#" id="copy-link-btn" class="btn-cta btn">copy link</a> &nbsp;&nbsp;
+    <a href="{{.Url}}" class="btn-cta btn"> download</i> </a>
+    <div id="copy-link-wrapper" class="copy-link-wrapper">
+        <p>Press Ctrl / CMD + C to copy link to your clipboard.</p>
+        <input readonly="readonly" type="text" value="{{.Url}}" />
+    </div>
+    <div id="overlay" class="overlay"></div>
+</div>
+    <script src="scripts/clipboard.js"></script>

+ 6 - 0
transfersh-server/static/includes/download-top.html

@@ -0,0 +1,6 @@
+        <br/>
+        <h2 class="page-title">{{.Filename}}</h2>
+        <h4>type: <b>{{.ContentType}}</b></h4>
+        <h4>size: <b>{{.ContentLength | format "#,###."}}</b> bytes</h4>
+
+        <a href="{{.Url}}" class="btn-cta btn"> download</i> </a> <br/><br/>

+ 36 - 0
transfersh-server/static/includes/footer.html

@@ -0,0 +1,36 @@
+<footer>
+    <div class="wrapper">
+        <div style="">
+            <a href="bitcoin:164ybRMLbg1dhhWWiUkXtiNr7jUhMKdJqH" label="Bitcoin+Donation" style="word-wrap: break-word;">
+                <img border="0" src=" /images/bitcoin.png" style="margin: 0 auto;;">
+            </a>
+        </div>
+        <br/>
+                <br/>
+        <img src="/images/Logo-orange.png" alt="Founded in Holland">
+        <p>Made with <i class="icon-heart"></i> by <a href="http://blog.dutchcoders.io/" title="Dutch Coders">Dutch Coders</a>
+        </p>
+    </div>
+
+</footer>
+
+
+<a href="https://github.com/you"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
+
+    <script>
+    (function() {
+        var uv = document.createElement('script');
+        uv.type = 'text/javascript';
+        uv.async = true;
+        uv.src = '//widget.uservoice.com/5rkATbLIm8ClJQeOirOhFg.js';
+        var s = document.getElementsByTagName('script')[0];
+        s.parentNode.insertBefore(uv, s)
+    })()
+    </script>
+
+    <!--[if lt IE 7]>
+      <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
+    <![endif]-->
+
+   
+  

+ 15 - 0
transfersh-server/static/includes/ga.html

@@ -0,0 +1,15 @@
+    <script>
+    (function(i, s, o, g, r, a, m) {
+        i['GoogleAnalyticsObject'] = r;
+        i[r] = i[r] || function() {
+            (i[r].q = i[r].q || []).push(arguments)
+        }, i[r].l = 1 * new Date();
+        a = s.createElement(o),
+            m = s.getElementsByTagName(o)[0];
+        a.async = 1;
+        a.src = g;
+        m.parentNode.insertBefore(a, m)
+    })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
+    ga('create', 'UA-40833733-1', 'transfer.sh');
+    ga('send', 'pageview');
+    </script>

+ 12 - 0
transfersh-server/static/includes/head.html

@@ -0,0 +1,12 @@
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <title>transfer.sh - Easy and fast file sharing from the command-line.</title>
+    <meta name="description" content="Easy and fast file sharing from the command-line.">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
+    <link rel="stylesheet" href="/styles/main.css">
+    <link href='//fonts.googleapis.com/css?family=Source+Sans+Pro:100,200,300' rel='stylesheet' type='text/css'>
+    <link href='//fonts.googleapis.com/css?family=Droid+Sans+Mono' rel='stylesheet' type='text/css'>
+    <script src="/scripts/vendor/modernizr.js"></script>
+</head>

+ 2 - 0
transfersh-server/static/includes/js.html

@@ -0,0 +1,2 @@
+    <script src="/scripts/main.js"></script>
+      

+ 15 - 0
transfersh-server/static/includes/navigation.html

@@ -0,0 +1,15 @@
+    <div id="navigation">
+        <div class="wrapper">
+            <a href="/">
+                <h1>transfer.sh</h1>
+            </a>
+            <ul class="hidden-xs">
+                <li><a href="/">home</a>
+                </li>
+                <li><a href="/#samples">sample use cases</a>
+                </li>
+                <li><a href="/#contact">contact us</a>
+                </li>
+            </ul>
+        </div>
+    </div>

+ 132 - 94
transfersh-server/static/index.html

@@ -11,16 +11,16 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <title>transfer.sh - Easy and fast file sharing from the command-line.</title>
     <meta name="description" content="Easy and fast file sharing from the command-line.">
-    <meta name="viewport" content="width=device-width,initial-scale=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
-    <link rel="stylesheet" href="styles/main.css">
-
-    <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:100,200,300" rel="stylesheet" type="text/css">
-    <link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:400" rel="stylesheet" type="text/css">
-    <link href="http://fonts.googleapis.com/css?family=Droid+Sans+Mono" rel="stylesheet" type="text/css">
-    <script src="scripts/vendor/modernizr.js"></script>
+    <link rel="stylesheet" href="/styles/main.css">
+    <link href='//fonts.googleapis.com/css?family=Source+Sans+Pro:100,200,300' rel='stylesheet' type='text/css'>
+    <link href='//fonts.googleapis.com/css?family=Droid+Sans+Mono' rel='stylesheet' type='text/css'>
+    <script src="/scripts/vendor/modernizr.js"></script>
 </head>
 
+
+
 <body>
 
     <script>
@@ -39,21 +39,25 @@
     ga('send', 'pageview');
     </script>
 
-    <div id="navigation">
-        <div class="wrapper">
-            <h1>transfer.sh</h1>
-            <ul class="hidden-xs">
-                <li><a href="#samples">sample use cases</a>
-                </li>
-                <li><a href="#contact">contact us</a>
-                </li>
-            </ul>
+        <div id="navigation">
+            <div class="wrapper">
+                <a href="/">
+                    <h1>transfer.sh</h1>
+                </a>
+                <ul class="hidden-xs">
+                    <li><a href="/">home</a>
+                    </li>
+                    <li><a href="/#samples">sample use cases</a>
+                    </li>
+                    <li><a href="/#contact">contact us</a>
+                    </li>
+                </ul>
+            </div>
         </div>
-    </div>
 
     <section id="home">
         <div class="wrapper">
-            <h2>
+            <h2 class="page-title">
                 Easy file sharing from the command line</h2>
             <div class="row animated fadeInDown">
                 <div id="from-terminal" class="box col-md-8 col-md-offset-2 col-xs-12">
@@ -75,19 +79,20 @@
                         <code>
                             <br>
                             <span class="code-title"># Upload from web</span>
-                            <br>Drag your files here, or <a class="browse" href="#"> click to browse.</a>
+                            <br>Drag your files here, or <a class="browse" href="#"> click to browse. <br/></a>
+                           
                         </code>
-                        <input type="file" multiple="multiple" style="display: none">
-                        <ul class="queue">
+                        <input type="file" multiple="multiple" style='display: none;' />
+                        <ul class='queue'>
                             <li>
                             </li>
                         </ul>
-                        <div class="all-files">
+                        <div class='all-files'>
                             <br>
                             <div>
                                 <span class="code-title"># Download all your files</span>
-                                <br>
-                                <br>
+                                <br/>
+                                <br/>
                                 <a class="download-zip btn-cta" href="#">zip</a>  <a class="download-tar btn-cta" href="#">tar.gz</a>
                             </div>
                         </div>
@@ -95,16 +100,16 @@
                 </div>
 
                 <div>
-                    <a href="#features" class="btn-cta btn-home">learn more </a>
+                    <a href="#features" class="btn-cta btn-home">learn more</i> </a>
                 </div>
             </div>
-    </div></section>
+    </section>
 
 
 
     <section id="features">
         <div class="wrapper container">
-            <div class="row animated fadeInDown">
+            <div class="row  animated fadeInDown ">
                 <div class="col-md-3 col-xs-6">
                     <i class="icon-terminal"></i>
                     <h3>Made for use with shell</h3>
@@ -122,7 +127,7 @@
                     <h3>Files stored for 14 days</h3>
                 </div>
             </div>
-            <div class="row animated fadeInDown">
+            <div class="row  animated fadeInDown">
                 <div class="col-md-offset-3 col-md-3 col-xs-6">
                     <i class="icon-tag"></i>
                     <h3>For free</h3>
@@ -139,11 +144,11 @@
 
     <section id="samples">
         <div class="wrapper">
-            <h2>
+            <h2 class="page-title">
                 Sample use cases
             </h2>
             <div class="row">
-                <div class="col-md-6">
+                <div class="col-md-6 ">
                     <h3>How to upload</h3>
                     <div class="terminal-top">
 
@@ -159,20 +164,21 @@
                         </code>
                     </div>
                 </div>
-                <div class="col-md-6">
+                <div class="col-md-6 ">
                     <h3>Create an alias and add it to .bashrc or .zshrc</h3>
                     <div class="terminal-top">
                     </div>
                     <div class="terminal">
                         <code>
                             <span class="code-title"># Add this to .bashrc or its equivalent</span>
-                            <br>transfer() { 
-                            <br># write to output to tmpfile because of progress bar 
-                            <br>tmpfile=$( mktemp -t transferXXX ); curl --progress-bar --upload-file $1 https://transfer.sh/$(basename $1) >> $tmpfile; cat $tmpfile; rm -f $tmpfile; }
-                            <br>
-                            <br>alias transfer=transfer
-                            <br>
-                            <br>
+                            <br/>transfer() {
+                            <br># write to output to tmpfile because of progress bar
+                            <br>tmpfile=$( mktemp -t transferXXX ); basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9]/-/g'); curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; cat $tmpfile; rm -f $tmpfile; 
+                            <br/>}
+                            <br/>
+                            <br/>alias transfer=transfer
+                            <br/>
+                            <br/>
                             <span class="code-title"># Now you can use transfer command</span>
                             <br>$ transfer hello.txt
                         </code>
@@ -183,9 +189,9 @@
 
             <a class="btn-cta" data-target="#coll" data-toggle="collapse">More examples</a>
 
-            <div class="collapse" id="coll">
+            <div class="collapse " id="coll">
                 <div class="row">
-                    <div class="col-md-6">
+                    <div class="col-md-6 ">
                         <h3>Upload multiple files at once</h3>
                         <div class="terminal-top">
                         </div>
@@ -196,13 +202,13 @@
                                 <br>
                                 <span class="code-title"># Combining downloads as zip or tar archive</span>
                                 <br>$ curl https://transfer.sh/(15HKz/hello.txt,15HKz/hello.txt).tar.gz
-                                <br>$ curl https://transfer.sh/(15HKz/hello.txt,15HKz/hello.txt).zip
+                                <br/>$ curl https://transfer.sh/(15HKz/hello.txt,15HKz/hello.txt).zip
                             </code>
                         </div>
 
 
                     </div>
-                    <div class="col-md-6">
+                    <div class="col-md-6 ">
                         <h3>Encrypt your files before the transfer</h3>
                         <div class="terminal-top">
                         </div>
@@ -229,7 +235,8 @@
                                 <span class="code-title"># Scan for malware or viruses using Clamav</span>
                                 <br>$ wget http://www.eicar.org/download/eicar.com
                                 <br>$ curl -X PUT --upload-file ./eicar.com https://transfer.sh/eicar.com/scan
-                                <br><br>
+                                <br>
+                                <br>
                                 <span class="code-title"># Upload malware to VirusTotal, get a permalink in return</span>
                                 <br>$ curl -X PUT --upload-file nhgbhhj https://transfer.sh/test.txt/virustotal
                                 <br>
@@ -243,7 +250,7 @@
                         <div class="terminal">
                             <code>
                                 <span class="code-title"># Backup, encrypt and transfer</span>
-                                <br>$ mysqldump --all-databases|gzip|gpg -ac -o-|curl -X PUT --upload-file "-" https://transfer.sh/test.txt </code>
+                                <br/>$ mysqldump --all-databases|gzip|gpg -ac -o-|curl -X PUT --upload-file "-" https://transfer.sh/test.txt</code>
                         </div>
                     </div>
                 </div>
@@ -255,7 +262,7 @@
                         <div class="terminal">
                             <code>
                                 <span class="code-title"># Transfer and send email with link (uses alias)</span>
-                                <br>$ transfer /tmp/hello.txt | mail -s "Hello World" user@yourmaildomain.com
+                                <br/>$ transfer /tmp/hello.txt | mail -s "Hello World" user@yourmaildomain.com
                             </code>
                         </div>
                     </div>
@@ -274,28 +281,45 @@
         </div>
     </section>
 
+    <section id="share">
+        <div class="wrapper">
+            <h2 class="page-title">Follow on GitHub</h2>
+            <br>
+            <br>
+
+            <iframe src="//ghbtns.com/github-btn.html?user=dutchcoders&repo=transfer.sh&type=follow&count=true&size=large" allowtransparency="true" frameborder="0" scrolling="0" width="250" height="50"></iframe>
+            <iframe src="//ghbtns.com/github-btn.html?user=dutchcoders&repo=transfer.sh&type=watch&count=true&size=large" allowtransparency="true" frameborder="0" scrolling="0" width="200" height="50"></iframe>
+        </div>
+    </section>
+
     <section id="reviews">
         <div class="wrapper">
             <div class="row">
                 <div class="col-md-8 col-md-offset-2 col-xs-12">
                     <blockquote class="twitter-tweet tweet-xl" lang="en">
-                        <img class="twitter-profile" src="images/reviews/dave.jpg" alt="">
+                        <a href="https://twitter.com/FloifyDave/status/517383101425516544">
+                            <img class="twitter-profile" src="images/reviews/dave.jpg" alt="">
+                        </a>
                         <p><a href="https://twitter.com/dutchcoders">@dutchcoders</a> Thanks for transfer.sh. Just used it for a production purpose for a customer. So great, so easy, so https. :)</p>
                         <a href="https://twitter.com/FloifyDave/status/517383101425516544">
-                            &mdash; Dave Sims (@FloifyDave)</a>
+                                &mdash; Dave Sims (@FloifyDave)</a>
                     </blockquote>
                 </div>
             </div>
             <div class="row">
                 <div class="col-md-6 col-xs-12">
                     <blockquote class="twitter-tweet" lang="en">
-                        <img class="twitter-profile" src="images/reviews/kareem.jpg" alt="">
+                        <a href="https://twitter.com/kareemk/status/517029789191118849">
+                            <img class="twitter-profile" src="images/reviews/kareem.jpg" alt="">
+                        </a>
                         <p><a href="https://twitter.com/dutchcoders">@dutchcoders</a> love transfer.sh! any change we can *pay* for a self-hosted version?</p><a href="https://twitter.com/kareemk/status/517029789191118849">&mdash; Kareem Kouddous (@kareemk) </a>
                     </blockquote>
                 </div>
                 <div class="col-md-6 col-xs-12">
                     <blockquote class="twitter-tweet" lang="en">
-                        <img class="twitter-profile" src="images/reviews/pg.jpeg" alt="">
+                        <a href="https://twitter.com/drakpz/status/517008058841829376">
+                            <img class="twitter-profile" src="images/reviews/pg.jpeg" alt="">
+                        </a>
                         <p><a href="http://t.co/JomAmqWYEB">http://t.co/JomAmqWYEB</a> by <a href="https://twitter.com/dutchcoders">@dutchcoders</a> is pure awesomeness! any chance of source on github? :-)</p><a href="https://twitter.com/drakpz/status/517008058841829376">&mdash; PJ Spagnolatti (@drakpz)</a>
                     </blockquote>
                 </div>
@@ -303,14 +327,18 @@
             <div class="row">
                 <div class="col-md-6 col-xs-12">
                     <blockquote class="twitter-tweet" lang="en">
-                        <img class="twitter-profile" src="images/reviews/jacob.jpg" alt="">
+                        <a href="https://twitter.com/jacoblindgren11/status/516975006501203968">
+                            <img class="twitter-profile" src="images/reviews/jacob.jpg" alt="">
+                        </a>
                         <p>Love transfer.sh! Will be using it from now on! Thanks for the amazing service we can use from the CLI <a href="https://twitter.com/dutchcoders">@dutchcoders</a>
                         </p><a href="https://twitter.com/jacoblindgren11/status/516975006501203968">&mdash; Jacob Lindgren (@jacoblindgren11) </a>
                     </blockquote>
                 </div>
                 <div class="col-md-6 col-xs-12">
                     <blockquote class="twitter-tweet" lang="en">
-                        <img class="twitter-profile" src="images/reviews/lars.jpg" alt="">
+                        <a href="https://twitter.com/arvestad/status/519507976491499521">
+                            <img class="twitter-profile" src="images/reviews/lars.jpg" alt="">
+                        </a>
                         <p>transfer.sh is my latest fav service! Try simple command-line and web file sharing! <a href="https://t.co/FSrsb1JKJd">https://t.co/FSrsb1JKJd</a>&#10;Thanks <a href="https://twitter.com/dutchcoders">@dutchcoders</a> !</p> <a href="https://twitter.com/arvestad/status/519507976491499521">&mdash; Lars Arvestad (@arvestad)</a>
                     </blockquote>
                 </div>
@@ -320,83 +348,93 @@
 
     <section id="share">
         <div class="wrapper">
-            <h2>Share the love</h2>
+            <h2 class="page-title">Share the love</h2>
             <ul class="share-buttons">
                 <li>
-                    <a href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Ftransfer.sh&t=" target="_blank" onclick="window.open('https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(document.URL) + '&t=' + encodeURIComponent(document.URL)); return false"> <i class="icon-facebook"></i> 
+                    <a href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Ftransfer.sh&t=" target="_blank" onclick="window.open('https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(document.URL) + '&t=' + encodeURIComponent(document.URL)); return false;"> <i class="icon-facebook"></i> 
                     </a>
                 </li>
                 <li>
-                    <a href="https://twitter.com/intent/tweet?source=http%3A%2F%2Ftransfer.sh&text=:%20http%3A%2F%2Ftransfer.sh" target="_blank" title="Tweet" onclick="window.open('https://twitter.com/intent/tweet?text=' + encodeURIComponent(document.title) + ':%20'  + encodeURIComponent(document.URL)); return false"> <i class="icon-twitter"></i>
-                </a></li>
+                    <a href="https://twitter.com/intent/tweet?source=http%3A%2F%2Ftransfer.sh&text=:%20http%3A%2F%2Ftransfer.sh" target="_blank" title="Tweet" onclick="window.open('https://twitter.com/intent/tweet?text=' + encodeURIComponent(document.title) + ':%20'  + encodeURIComponent(document.URL)); return false;"> <i class="icon-twitter"></i>
+                </li>
                 <li>
-                    <a href="https://plus.google.com/share?url=http%3A%2F%2Ftransfer.sh" target="_blank" title="Share on Google+" onclick="window.open('https://plus.google.com/share?url=' + encodeURIComponent(document.URL)); return false"> <i class="icon-gplus"></i> 
+                    <a href="https://plus.google.com/share?url=http%3A%2F%2Ftransfer.sh" target="_blank" title="Share on Google+" onclick="window.open('https://plus.google.com/share?url=' + encodeURIComponent(document.URL)); return false;"> <i class="icon-gplus"></i> 
                     </a>
                 </li>
                 <li>
-                    <a href="http://www.linkedin.com/shareArticle?mini=true&url=http%3A%2F%2Ftransfer.sh&title=&summary=&source=http%3A%2F%2Ftransfer.sh" target="_blank" title="Share on LinkedIn" onclick="window.open('http://www.linkedin.com/shareArticle?mini=true&url=' + encodeURIComponent(document.URL) + '&title=' +  encodeURIComponent(document.title)); return false"> <i class="icon-linkedin"></i>
+                    <a href="http://www.linkedin.com/shareArticle?mini=true&url=http%3A%2F%2Ftransfer.sh&title=&summary=&source=http%3A%2F%2Ftransfer.sh" target="_blank" title="Share on LinkedIn" onclick="window.open('http://www.linkedin.com/shareArticle?mini=true&url=' + encodeURIComponent(document.URL) + '&title=' +  encodeURIComponent(document.title)); return false;"> <i class="icon-linkedin"></i>
                     </a>
                 </li>
             </ul>
         </div>
     </section>
 
+
     <section id="contact">
         <div class="wrapper">
             <i class="icon-mail"></i>
-            <h2>
+            <h2 class="page-title">
                 Any questions?
             </h2>
             <a href="#" data-uv-trigger class="btn-cta">contact us</a>
         </div>
     </section>
 
+
+    <section id="tor">
+        <div class="wrapper">
+            <a href="https://torproject.com"><img src="images/tor.svg" alt=""></a><br/>
+            <a href="https://jxm5d6emw5rknovg.onion/">https://jxm5d6emw5rknovg.onion/</a>
+        </div>
+    </section>
+
+
     <footer>
         <div class="wrapper">
-            <img src="images/Logo-orange.png" alt="Founded in Holland">
-            <p>Made with <i class="icon-heart"></i> by <a href="http://dutchcoders.io/" title="Dutch Coders">Dutch Coders</a>
+            <div style="">
+                <a href="bitcoin:164ybRMLbg1dhhWWiUkXtiNr7jUhMKdJqH" label="Bitcoin+Donation" style="word-wrap: break-word;">
+                    <img border="0" src=" /images/bitcoin.png" style="margin: 0 auto;;">
+                </a>
+            </div>
+            <br/>
+                    <br/>
+            <img src="/images/Logo-orange.png" alt="Founded in Holland">
+            <p>Made with <i class="icon-heart"></i> by <a href="http://blog.dutchcoders.io/" title="Dutch Coders">Dutch Coders</a>
             </p>
         </div>
+
     </footer>
 
-    <a href="https://github.com/dutchcoders/transfer.sh/">
-        <img style="position: absolute; top: 0; right: 0; border: 0" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png">
-    </a>
 
-    <script>
-    (function() {
-        var uv = document.createElement('script');
-        uv.type = 'text/javascript';
-        uv.async = true;
-        uv.src = '//widget.uservoice.com/5rkATbLIm8ClJQeOirOhFg.js';
-        var s = document.getElementsByTagName('script')[0];
-        s.parentNode.insertBefore(uv, s)
-    })()
-    </script>
+    <a href="https://github.com/you"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
+
+        <script>
+        (function() {
+            var uv = document.createElement('script');
+            uv.type = 'text/javascript';
+            uv.async = true;
+            uv.src = '//widget.uservoice.com/5rkATbLIm8ClJQeOirOhFg.js';
+            var s = document.getElementsByTagName('script')[0];
+            s.parentNode.insertBefore(uv, s)
+        })()
+        </script>
+
+        <!--[if lt IE 7]>
+          <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
+        <![endif]-->
+
+       
+      
+
+
+        <script src="/scripts/main.js"></script>
+          
+
 
-    <!--[if lt IE 7]>
-      <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
-    <![endif]-->
 
-    <script>
-    (function(b, o, i, l, e, r) {
-        b.GoogleAnalyticsObject = l;
-        b[l] || (b[l] =
-            function() {
-                (b[l].q = b[l].q || []).push(arguments)
-            });
-        b[l].l = +new Date;
-        e = o.createElement(i);
-        r = o.getElementsByTagName(i)[0];
-        e.src = '//www.google-analytics.com/analytics.js';
-        r.parentNode.insertBefore(e, r)
-    }(window, document, 'script', 'ga'));
-    ga('create', 'UA-40833733-1', 'transfer.sh');
-    ga('send', 'pageview');
-    </script>
 
-    <script src="scripts/main.js"></script>
+    
 
 </body>
 
-</html>
+</html>

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
transfersh-server/static/scripts/main.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
transfersh-server/static/styles/main.css


+ 46 - 2
transfersh-server/storage.go

@@ -4,6 +4,7 @@ import (
 	"fmt"
 	"github.com/goamz/goamz/s3"
 	"io"
+	"mime"
 	"os"
 	"path/filepath"
 	"strconv"
@@ -11,6 +12,7 @@ import (
 
 type Storage interface {
 	Get(token string, filename string) (reader io.ReadCloser, contentType string, contentLength uint64, err error)
+	Head(token string, filename string) (contentType string, contentLength uint64, err error)
 	Put(token string, filename string, reader io.Reader, contentType string, contentLength uint64) error
 }
 
@@ -23,6 +25,21 @@ func NewLocalStorage(basedir string) (*LocalStorage, error) {
 	return &LocalStorage{basedir: basedir}, nil
 }
 
+func (s *LocalStorage) Head(token string, filename string) (contentType string, contentLength uint64, err error) {
+	path := filepath.Join(s.basedir, token, filename)
+
+	var fi os.FileInfo
+	if fi, err = os.Lstat(path); err != nil {
+		return
+	}
+
+	contentLength = uint64(fi.Size())
+
+	contentType = mime.TypeByExtension(filepath.Ext(filename))
+
+	return
+}
+
 func (s *LocalStorage) Get(token string, filename string) (reader io.ReadCloser, contentType string, contentLength uint64, err error) {
 	path := filepath.Join(s.basedir, token, filename)
 
@@ -33,11 +50,12 @@ func (s *LocalStorage) Get(token string, filename string) (reader io.ReadCloser,
 
 	var fi os.FileInfo
 	if fi, err = os.Lstat(path); err != nil {
+		return
 	}
 
 	contentLength = uint64(fi.Size())
 
-	contentType = ""
+	contentType = mime.TypeByExtension(filepath.Ext(filename))
 
 	return
 }
@@ -80,13 +98,39 @@ func NewS3Storage() (*S3Storage, error) {
 	return &S3Storage{bucket: bucket}, nil
 }
 
+func (s *S3Storage) Head(token string, filename string) (contentType string, contentLength uint64, err error) {
+	key := fmt.Sprintf("%s/%s", token, filename)
+
+	// content type , content length
+	response, err := s.bucket.Head(key, map[string][]string{})
+	if err != nil {
+		return
+	}
+
+	contentType = response.Header.Get("Content-Type")
+
+	contentLength, err = strconv.ParseUint(response.Header.Get("Content-Length"), 10, 0)
+	if err != nil {
+		return
+	}
+
+	return
+}
+
 func (s *S3Storage) Get(token string, filename string) (reader io.ReadCloser, contentType string, contentLength uint64, err error) {
 	key := fmt.Sprintf("%s/%s", token, filename)
 
 	// content type , content length
 	response, err := s.bucket.GetResponse(key)
-	contentType = ""
+	if err != nil {
+		return
+	}
+
+	contentType = response.Header.Get("Content-Type")
 	contentLength, err = strconv.ParseUint(response.Header.Get("Content-Length"), 10, 0)
+	if err != nil {
+		return
+	}
 
 	reader = response.Body
 	return

+ 172 - 0
transfersh-server/utils.go

@@ -27,8 +27,11 @@ package main
 import (
 	"github.com/goamz/goamz/aws"
 	"github.com/goamz/goamz/s3"
+	"github.com/golang/gddo/httputil/header"
+	"math"
 	"net/http"
 	"net/mail"
+	"strconv"
 	"strings"
 	"time"
 )
@@ -44,6 +47,163 @@ func getBucket() (*s3.Bucket, error) {
 	return b, nil
 }
 
+func formatNumber(format string, s uint64) string {
+
+	return RenderFloat(format, float64(s))
+}
+
+var renderFloatPrecisionMultipliers = [10]float64{
+	1,
+	10,
+	100,
+	1000,
+	10000,
+	100000,
+	1000000,
+	10000000,
+	100000000,
+	1000000000,
+}
+
+var renderFloatPrecisionRounders = [10]float64{
+	0.5,
+	0.05,
+	0.005,
+	0.0005,
+	0.00005,
+	0.000005,
+	0.0000005,
+	0.00000005,
+	0.000000005,
+	0.0000000005,
+}
+
+func RenderFloat(format string, n float64) string {
+	// Special cases:
+	// NaN = "NaN"
+	// +Inf = "+Infinity"
+	// -Inf = "-Infinity"
+	if math.IsNaN(n) {
+		return "NaN"
+	}
+	if n > math.MaxFloat64 {
+		return "Infinity"
+	}
+	if n < -math.MaxFloat64 {
+		return "-Infinity"
+	}
+
+	// default format
+	precision := 2
+	decimalStr := "."
+	thousandStr := ","
+	positiveStr := ""
+	negativeStr := "-"
+
+	if len(format) > 0 {
+		// If there is an explicit format directive,
+		// then default values are these:
+		precision = 9
+		thousandStr = ""
+
+		// collect indices of meaningful formatting directives
+		formatDirectiveChars := []rune(format)
+		formatDirectiveIndices := make([]int, 0)
+		for i, char := range formatDirectiveChars {
+			if char != '#' && char != '0' {
+				formatDirectiveIndices = append(formatDirectiveIndices, i)
+			}
+		}
+
+		if len(formatDirectiveIndices) > 0 {
+			// Directive at index 0:
+			// Must be a '+'
+			// Raise an error if not the case
+			// index: 0123456789
+			// +0.000,000
+			// +000,000.0
+			// +0000.00
+			// +0000
+			if formatDirectiveIndices[0] == 0 {
+				if formatDirectiveChars[formatDirectiveIndices[0]] != '+' {
+					panic("RenderFloat(): invalid positive sign directive")
+				}
+				positiveStr = "+"
+				formatDirectiveIndices = formatDirectiveIndices[1:]
+			}
+
+			// Two directives:
+			// First is thousands separator
+			// Raise an error if not followed by 3-digit
+			// 0123456789
+			// 0.000,000
+			// 000,000.00
+			if len(formatDirectiveIndices) == 2 {
+				if (formatDirectiveIndices[1] - formatDirectiveIndices[0]) != 4 {
+					panic("RenderFloat(): thousands separator directive must be followed by 3 digit-specifiers")
+				}
+				thousandStr = string(formatDirectiveChars[formatDirectiveIndices[0]])
+				formatDirectiveIndices = formatDirectiveIndices[1:]
+			}
+
+			// One directive:
+			// Directive is decimal separator
+			// The number of digit-specifier following the separator indicates wanted precision
+			// 0123456789
+			// 0.00
+			// 000,0000
+			if len(formatDirectiveIndices) == 1 {
+				decimalStr = string(formatDirectiveChars[formatDirectiveIndices[0]])
+				precision = len(formatDirectiveChars) - formatDirectiveIndices[0] - 1
+			}
+		}
+	}
+
+	// generate sign part
+	var signStr string
+	if n >= 0.000000001 {
+		signStr = positiveStr
+	} else if n <= -0.000000001 {
+		signStr = negativeStr
+		n = -n
+	} else {
+		signStr = ""
+		n = 0.0
+	}
+
+	// split number into integer and fractional parts
+	intf, fracf := math.Modf(n + renderFloatPrecisionRounders[precision])
+
+	// generate integer part string
+	intStr := strconv.Itoa(int(intf))
+
+	// add thousand separator if required
+	if len(thousandStr) > 0 {
+		for i := len(intStr); i > 3; {
+			i -= 3
+			intStr = intStr[:i] + thousandStr + intStr[i:]
+		}
+	}
+
+	// no fractional part, we can leave now
+	if precision == 0 {
+		return signStr + intStr
+	}
+
+	// generate fractional part
+	fracStr := strconv.Itoa(int(fracf * renderFloatPrecisionMultipliers[precision]))
+	// may need padding
+	if len(fracStr) < precision {
+		fracStr = "000000000000000"[:precision-len(fracStr)] + fracStr
+	}
+
+	return signStr + intStr + decimalStr + fracStr
+}
+
+func RenderInteger(format string, n int) string {
+	return RenderFloat(format, float64(n))
+}
+
 // Request.RemoteAddress contains port, which we want to remove i.e.:
 // "[::1]:58292" => "[::1]"
 func ipAddrFromRemoteAddr(s string) string {
@@ -78,3 +238,15 @@ func encodeRFC2047(String string) string {
 	addr := mail.Address{String, ""}
 	return strings.Trim(addr.String(), " <>")
 }
+
+func acceptsHtml(hdr http.Header) bool {
+	actual := header.ParseAccept(hdr, "Accept")
+
+	for _, s := range actual {
+		if s.Value == "text/html" {
+			return (true)
+		}
+	}
+
+	return (false)
+}

+ 47 - 0
transfersh-web/download.audio.html

@@ -0,0 +1,47 @@
+
+
+</html>
+<!doctype html>
+<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
+<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
+<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
+<!--[if gt IE 8]><!-->
+<html class="no-js">
+<!--<![endif]-->
+
+include "includes/head.html"
+
+<body  id="download">
+
+    include "includes/ga.html"
+    include "includes/navigation.html"
+    
+
+    <section id="home">
+        <div class="wrapper">
+    
+            include "includes/download-top.html"
+
+            <div class="row animated fadeInDown">
+                <div id="from-terminal" class=" box col-md-8  col-md-offset-2 col-xs-12">
+                    <div class="terminal-top">
+
+                    </div>
+                    <div id="terminal" class="terminal preview-image">
+                            <audio controls>
+                        <source src="{{.Url}}" type="{{.ContentType}}">
+                    </audio>
+                    </div>
+                </div>
+            </div>
+            <br/>
+            <div>
+
+    </section>
+
+    include "includes/footer.html" 
+    include "includes/js.html"
+
+</body>
+
+</html>

+ 143 - 0
transfersh-web/download.code.html

@@ -0,0 +1,143 @@
+<!doctype html>
+<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
+<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
+<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
+<!--[if gt IE 8]><!-->
+<html class="no-js">
+<!--<![endif]-->
+
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <title>{{.Filename}} - transfer.sh</title>
+    <meta name="description" content="Easy and fast file sharing from the command-line.">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
+    <link rel="stylesheet" href="styles/main.css">
+
+    <link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:100,200,300' rel='stylesheet' type='text/css'>
+    <link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400' rel='stylesheet' type='text/css'>
+    <link href='http://fonts.googleapis.com/css?family=Droid+Sans+Mono' rel='stylesheet' type='text/css'>
+    <!-- build:js scripts/vendor/modernizr.js -->
+    <script src="bower_components/modernizr/modernizr.js"></script>
+    <!-- endbuild -->
+</head>
+
+<body  id="download">
+    <script>
+    (function(i, s, o, g, r, a, m) {
+        i['GoogleAnalyticsObject'] = r;
+        i[r] = i[r] || function() {
+            (i[r].q = i[r].q || []).push(arguments)
+        }, i[r].l = 1 * new Date();
+        a = s.createElement(o),
+            m = s.getElementsByTagName(o)[0];
+        a.async = 1;
+        a.src = g;
+        m.parentNode.insertBefore(a, m)
+    })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
+    ga('create', 'UA-40833733-1', 'transfer.sh');
+    ga('send', 'pageview');
+    </script>
+
+    <div id="navigation">
+        <div class="wrapper">
+            <h1>transfer.sh</h1>
+            <ul class="hidden-xs">
+                <li><a href="#samples">sample use cases</a>
+                </li>
+                <li><a href="#contact">contact us</a>
+                </li>
+            </ul>
+        </div>
+    </div>
+
+<section id="home">
+    <div class="wrapper">
+        <h2>
+            {{.Filename}}</h2>
+        <a href="{{.Url}}"></a>
+        <div class="row animated fadeInDown">
+            <div id="from-terminal" class=" box col-md-8  col-md-offset-2 col-xs-12">
+                <div class="terminal-top">
+
+                </div>
+                <div id="terminal" class="terminal">
+                    <div id="code"></div>
+                </div>
+
+
+
+            </div>
+
+        </div>
+
+    <div>
+        <a href="#" id="copy-link-btn" class="btn-cta btn">copy link</a> &nbsp;&nbsp;
+        <a href="{{.Url}}" class="btn-cta btn"> download</i> </a>
+        <div id="copy-link-wrapper" class="copy-link-wrapper">
+            <p>Press Ctrl / CMD + C to copy link to your clipboard.</p>
+            <input readonly="readonly" type="text" value="{{.Url}}" />
+        </div>
+        <div id="overlay" class="overlay"></div>
+    </div>
+        <script src="scripts/clipboard.js"></script>
+
+</section>
+
+
+    <script>
+    (function() {
+        var uv = document.createElement('script');
+        uv.type = 'text/javascript';
+        uv.async = true;
+        uv.src = '//widget.uservoice.com/5rkATbLIm8ClJQeOirOhFg.js';
+        var s = document.getElementsByTagName('script')[0];
+        s.parentNode.insertBefore(uv, s)
+    })()
+    </script>
+
+    <!--[if lt IE 7]>
+      <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
+    <![endif]-->
+
+    <script>
+    (function(b, o, i, l, e, r) {
+        b.GoogleAnalyticsObject = l;
+        b[l] || (b[l] =
+            function() {
+                (b[l].q = b[l].q || []).push(arguments)
+            });
+        b[l].l = +new Date;
+        e = o.createElement(i);
+        r = o.getElementsByTagName(i)[0];
+        e.src = '//www.google-analytics.com/analytics.js';
+        r.parentNode.insertBefore(e, r)
+    }(window, document, 'script', 'ga'));
+    ga('create', 'UA-40833733-1', 'transfer.sh');
+    ga('send', 'pageview');
+    </script>
+
+        <!-- build:js scripts/main.js -->
+        <script src="bower_components/jquery/dist/jquery.js"></script>
+        <script src="bower_components/uri.js/src/URI.min.js"></script>
+        <script src="bower_components/bootstrap/js/transition.js"></script>
+        <script src="bower_components/bootstrap/js/collapse.js"></script>
+        <script src="/scripts/showdown.js"></script>
+        <script src="/scripts/main.js"></script>
+        <!-- endbuild -->
+        
+    <script>
+
+    var text = "# Markdown *works*.";
+
+    var converter = new Showdown.converter();
+    var html = converter.makeHtml(text);
+    $('#md-preview').append(html);
+
+    </script>
+
+
+</body>
+
+</html>

+ 31 - 0
transfersh-web/download.html

@@ -0,0 +1,31 @@
+<!doctype html>
+<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
+<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
+<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
+<!--[if gt IE 8]><!-->
+<html class="no-js">
+<!--<![endif]-->
+
+include "includes/head.html"
+
+<body  id="download">
+
+    include "includes/ga.html"
+    include "includes/navigation.html"
+
+   
+<section id="home">
+    <div class="wrapper">
+    
+      include "includes/download-top.html"
+    </div>
+</section>
+    
+    include "includes/footer.html" 
+   include "includes/js.html"
+    
+
+
+</body>
+
+</html>

+ 41 - 0
transfersh-web/download.image.html

@@ -0,0 +1,41 @@
+<!doctype html>
+<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
+<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
+<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
+<!--[if gt IE 8]><!-->
+<html class="no-js">
+<!--<![endif]-->
+
+include "includes/head.html"
+
+<body  id="download">
+
+    include "includes/ga.html"
+    include "includes/navigation.html"
+
+    <section id="home">
+        <div class="wrapper">
+
+    include "includes/download-top.html"
+
+            <div class="row animated fadeInDown">
+                <div id="from-terminal" class=" box col-md-8  col-md-offset-2 col-xs-12">
+                    <div class="terminal-top">
+
+                    </div>
+                    <div id="terminal" class="terminal preview-image">
+                        <img src="{{.Url}}"  alt="">
+                    </div>
+                </div>
+            </div>
+            <br/>
+            <div>
+    <div>
+    </section>
+
+    include "includes/footer.html" 
+    include "includes/js.html"
+
+</body>
+
+</html>

+ 39 - 0
transfersh-web/download.markdown.html

@@ -0,0 +1,39 @@
+<!doctype html>
+<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
+<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
+<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
+<!--[if gt IE 8]><!-->
+<html class="no-js">
+<!--<![endif]-->
+
+include "includes/head.html"
+
+<body  id="download">
+
+    include "includes/ga.html"
+    include "includes/navigation.html"
+
+<section id="home">
+    <div class="wrapper">
+
+        include "includes/download-top.html"
+
+        <div class="row animated fadeInDown">
+            <div id="from-terminal" class=" box col-md-8  col-md-offset-2 col-xs-12">
+                <div class="terminal-top">
+                </div>
+                <div id="terminal" class="terminal">
+                    <div id="md-preview">{{.Content}}</div>
+                </div>
+            </div>
+        </div>
+    <br/>
+
+</section>
+
+
+    include "includes/footer.html" 
+    include "includes/js.html"
+</body>
+
+</html>

+ 44 - 0
transfersh-web/download.video.html

@@ -0,0 +1,44 @@
+<!doctype html>
+<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
+<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
+<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
+<!--[if gt IE 8]><!-->
+<html class="no-js">
+<!--<![endif]-->
+
+include "includes/head.html"
+
+<body  id="download">
+
+    include "includes/ga.html"
+    include "includes/navigation.html"
+    
+
+    <section id="home">
+        <div class="wrapper">
+    
+            include "includes/download-top.html"
+
+            <div class="row animated fadeInDown">
+                <div id="from-terminal" class=" box col-md-8  col-md-offset-2 col-xs-12">
+                    <div class="terminal-top">
+
+                    </div>
+                    <div id="terminal" class="terminal preview-image">
+                        <video  controls>
+                            <source src="{{.Url}}" type="{{.ContentType}}">
+                        </video>
+                    </div>
+                </div>
+            </div>
+            <br/>
+            <div>
+
+    </section>
+
+    include "includes/footer.html" 
+    include "includes/js.html"
+
+</body>
+
+</html>

BIN=BIN
transfersh-web/images/bitcoin.png


+ 5 - 5
transfersh-web/images/terminal-top.svg

@@ -45,14 +45,14 @@
     </rdf:RDF>
   </metadata>
   <g
-     transform="translate(-93.957497,-365.26607)"
+     transform="matrix(1,0,0,0.94456233,-93.957497,-345.57658)"
      id="layer1">
     <path
-       d="m 85.371201,355.16455 789.901059,0 0,49.98291 -789.901059,0 z"
+       d="m 93.957497,365.85895 750.000003,0 0,31.76074 -750.000003,0 z"
        id="rect4487"
        style="fill:#85b5bb;fill-opacity:1;stroke:none" />
     <g
-       transform="matrix(1.4512649,0,0,-1.4512649,-114.5591,1453.446)"
+       transform="matrix(1.4512649,0,0,-1.4512649,-114.5591,1454.9192)"
        id="g24"
        style="fill:#ff7050">
       <g
@@ -78,7 +78,7 @@
       </g>
     </g>
     <g
-       transform="matrix(1.4512649,0,0,-1.4512649,-114.5591,1453.507)"
+       transform="matrix(1.4512649,0,0,-1.4512649,-114.5591,1454.9802)"
        id="g40"
        style="fill:#ffed5d">
       <g
@@ -104,7 +104,7 @@
       </g>
     </g>
     <g
-       transform="matrix(1.4512649,0,0,-1.4512649,-115.0147,1453.4765)"
+       transform="matrix(1.4512649,0,0,-1.4512649,-115.0147,1454.9497)"
        id="g56"
        style="fill:#93de7f">
       <g

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 5 - 0
transfersh-web/images/tor.svg


+ 5 - 0
transfersh-web/includes/download-bottom.html

@@ -0,0 +1,5 @@
+                </div>
+            </div>
+        </div>
+    <br/>
+</section>

+ 10 - 0
transfersh-web/includes/download-btn.html

@@ -0,0 +1,10 @@
+<div>
+    <a href="#" id="copy-link-btn" class="btn-cta btn">copy link</a> &nbsp;&nbsp;
+    <a href="{{.Url}}" class="btn-cta btn"> download</i> </a>
+    <div id="copy-link-wrapper" class="copy-link-wrapper">
+        <p>Press Ctrl / CMD + C to copy link to your clipboard.</p>
+        <input readonly="readonly" type="text" value="{{.Url}}" />
+    </div>
+    <div id="overlay" class="overlay"></div>
+</div>
+    <script src="scripts/clipboard.js"></script>

+ 6 - 0
transfersh-web/includes/download-top.html

@@ -0,0 +1,6 @@
+        <br/>
+        <h2 class="page-title">{{.Filename}}</h2>
+        <h4>type: <b>{{.ContentType}}</b></h4>
+        <h4>size: <b>{{.ContentLength | format "#,###."}}</b> bytes</h4>
+
+        <a href="{{.Url}}" class="btn-cta btn"> download</i> </a> <br/><br/>

+ 36 - 0
transfersh-web/includes/footer.html

@@ -0,0 +1,36 @@
+<footer>
+    <div class="wrapper">
+        <div style="">
+            <a href="bitcoin:164ybRMLbg1dhhWWiUkXtiNr7jUhMKdJqH" label="Bitcoin+Donation" style="word-wrap: break-word;">
+                <img border="0" src=" /images/bitcoin.png" style="margin: 0 auto;;">
+            </a>
+        </div>
+        <br/>
+                <br/>
+        <img src="/images/Logo-orange.png" alt="Founded in Holland">
+        <p>Made with <i class="icon-heart"></i> by <a href="http://blog.dutchcoders.io/" title="Dutch Coders">Dutch Coders</a>
+        </p>
+    </div>
+
+</footer>
+
+
+<a href="https://github.com/you"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
+
+    <script>
+    (function() {
+        var uv = document.createElement('script');
+        uv.type = 'text/javascript';
+        uv.async = true;
+        uv.src = '//widget.uservoice.com/5rkATbLIm8ClJQeOirOhFg.js';
+        var s = document.getElementsByTagName('script')[0];
+        s.parentNode.insertBefore(uv, s)
+    })()
+    </script>
+
+    <!--[if lt IE 7]>
+      <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
+    <![endif]-->
+
+   
+  

+ 15 - 0
transfersh-web/includes/ga.html

@@ -0,0 +1,15 @@
+    <script>
+    (function(i, s, o, g, r, a, m) {
+        i['GoogleAnalyticsObject'] = r;
+        i[r] = i[r] || function() {
+            (i[r].q = i[r].q || []).push(arguments)
+        }, i[r].l = 1 * new Date();
+        a = s.createElement(o),
+            m = s.getElementsByTagName(o)[0];
+        a.async = 1;
+        a.src = g;
+        m.parentNode.insertBefore(a, m)
+    })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
+    ga('create', 'UA-40833733-1', 'transfer.sh');
+    ga('send', 'pageview');
+    </script>

+ 14 - 0
transfersh-web/includes/head.html

@@ -0,0 +1,14 @@
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <title>transfer.sh - Easy and fast file sharing from the command-line.</title>
+    <meta name="description" content="Easy and fast file sharing from the command-line.">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
+    <link rel="stylesheet" href="/styles/main.css">
+    <link href='//fonts.googleapis.com/css?family=Source+Sans+Pro:100,200,300' rel='stylesheet' type='text/css'>
+    <link href='//fonts.googleapis.com/css?family=Droid+Sans+Mono' rel='stylesheet' type='text/css'>
+    <!-- build:js /scripts/vendor/modernizr.js -->
+    <script src="bower_components/modernizr/modernizr.js"></script>
+    <!-- endbuild -->
+</head>

+ 9 - 0
transfersh-web/includes/js.html

@@ -0,0 +1,9 @@
+    <!-- build:js /scripts/main.js -->
+    <script src="bower_components/jquery/dist/jquery.js"></script>
+    <script src="bower_components/uri.js/src/URI.min.js"></script>
+    <script src="bower_components/bootstrap/js/transition.js"></script>
+    <script src="bower_components/bootstrap/js/collapse.js"></script>
+    <script src="/scripts/showdown.js"></script>
+    <script src="/scripts/main.js"></script>
+    <!-- endbuild -->
+      

+ 15 - 0
transfersh-web/includes/navigation.html

@@ -0,0 +1,15 @@
+    <div id="navigation">
+        <div class="wrapper">
+            <a href="/">
+                <h1>transfer.sh</h1>
+            </a>
+            <ul class="hidden-xs">
+                <li><a href="/">home</a>
+                </li>
+                <li><a href="/#samples">sample use cases</a>
+                </li>
+                <li><a href="/#contact">contact us</a>
+                </li>
+            </ul>
+        </div>
+    </div>

+ 54 - 92
transfersh-web/index.html

@@ -6,22 +6,8 @@
 <html class="no-js">
 <!--<![endif]-->
 
-<head>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
-    <title>transfer.sh - Easy and fast file sharing from the command-line.</title>
-    <meta name="description" content="Easy and fast file sharing from the command-line.">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
-    <link rel="stylesheet" href="styles/main.css">
-
-    <link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:100,200,300' rel='stylesheet' type='text/css'>
-    <link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400' rel='stylesheet' type='text/css'>
-    <link href='http://fonts.googleapis.com/css?family=Droid+Sans+Mono' rel='stylesheet' type='text/css'>
-    <!-- build:js scripts/vendor/modernizr.js -->
-    <script src="bower_components/modernizr/modernizr.js"></script>
-    <!-- endbuild -->
-</head>
+include "includes/head.html"
+
 
 <body>
 
@@ -41,24 +27,14 @@
     ga('send', 'pageview');
     </script>
 
-    <div id="navigation">
-        <div class="wrapper">
-            <h1>transfer.sh</h1>
-            <ul class="hidden-xs">
-                <li><a href="#samples">sample use cases</a>
-                </li>
-                <li><a href="#contact">contact us</a>
-                </li>
-            </ul>
-        </div>
-    </div>
+    include "includes/navigation.html"
 
     <section id="home">
         <div class="wrapper">
-            <h2>
+            <h2 class="page-title">
                 Easy file sharing from the command line</h2>
             <div class="row animated fadeInDown">
-                <div id="from-terminal" class=" box col-md-8  col-md-offset-2 col-xs-12">
+                <div id="from-terminal" class="box col-md-8 col-md-offset-2 col-xs-12">
                     <div class="terminal-top">
 
                     </div>
@@ -77,7 +53,8 @@
                         <code>
                             <br>
                             <span class="code-title"># Upload from web</span>
-                            <br>Drag your files here, or <a class="browse" href="#"> click to browse.</a>
+                            <br>Drag your files here, or <a class="browse" href="#"> click to browse. <br/></a>
+                           
                         </code>
                         <input type="file" multiple="multiple" style='display: none;' />
                         <ul class='queue'>
@@ -141,7 +118,7 @@
 
     <section id="samples">
         <div class="wrapper">
-            <h2>
+            <h2 class="page-title">
                 Sample use cases
             </h2>
             <div class="row">
@@ -168,9 +145,10 @@
                     <div class="terminal">
                         <code>
                             <span class="code-title"># Add this to .bashrc or its equivalent</span>
-                            <br/>transfer() { 
-                            <br># write to output to tmpfile because of progress bar 
-                            <br>tmpfile=$( mktemp -t transferXXX ); curl --progress-bar --upload-file $1 https://transfer.sh/$(basename $1) >> $tmpfile; cat $tmpfile; rm -f $tmpfile; }
+                            <br/>transfer() {
+                            <br># write to output to tmpfile because of progress bar
+                            <br>tmpfile=$( mktemp -t transferXXX ); basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9]/-/g'); curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; cat $tmpfile; rm -f $tmpfile; 
+                            <br/>}
                             <br/>
                             <br/>alias transfer=transfer
                             <br/>
@@ -231,7 +209,8 @@
                                 <span class="code-title"># Scan for malware or viruses using Clamav</span>
                                 <br>$ wget http://www.eicar.org/download/eicar.com
                                 <br>$ curl -X PUT --upload-file ./eicar.com https://transfer.sh/eicar.com/scan
-                                <br><br>
+                                <br>
+                                <br>
                                 <span class="code-title"># Upload malware to VirusTotal, get a permalink in return</span>
                                 <br>$ curl -X PUT --upload-file nhgbhhj https://transfer.sh/test.txt/virustotal
                                 <br>
@@ -245,7 +224,7 @@
                         <div class="terminal">
                             <code>
                                 <span class="code-title"># Backup, encrypt and transfer</span>
-                                <br/>$ mysqldump --all-databases|gzip|gpg -ac -o-|curl -X PUT --upload-file "-" https://transfer.sh/test.txt </code>
+                                <br/>$ mysqldump --all-databases|gzip|gpg -ac -o-|curl -X PUT --upload-file "-" https://transfer.sh/test.txt</code>
                         </div>
                     </div>
                 </div>
@@ -276,28 +255,45 @@
         </div>
     </section>
 
+    <section id="share">
+        <div class="wrapper">
+            <h2 class="page-title">Follow on GitHub</h2>
+            <br>
+            <br>
+
+            <iframe src="//ghbtns.com/github-btn.html?user=dutchcoders&repo=transfer.sh&type=follow&count=true&size=large" allowtransparency="true" frameborder="0" scrolling="0" width="250" height="50"></iframe>
+            <iframe src="//ghbtns.com/github-btn.html?user=dutchcoders&repo=transfer.sh&type=watch&count=true&size=large" allowtransparency="true" frameborder="0" scrolling="0" width="200" height="50"></iframe>
+        </div>
+    </section>
+
     <section id="reviews">
         <div class="wrapper">
             <div class="row">
                 <div class="col-md-8 col-md-offset-2 col-xs-12">
                     <blockquote class="twitter-tweet tweet-xl" lang="en">
-                        <img class="twitter-profile" src="images/reviews/dave.jpg" alt="">
+                        <a href="https://twitter.com/FloifyDave/status/517383101425516544">
+                            <img class="twitter-profile" src="images/reviews/dave.jpg" alt="">
+                        </a>
                         <p><a href="https://twitter.com/dutchcoders">@dutchcoders</a> Thanks for transfer.sh. Just used it for a production purpose for a customer. So great, so easy, so https. :)</p>
                         <a href="https://twitter.com/FloifyDave/status/517383101425516544">
-                            &mdash; Dave Sims (@FloifyDave)</a>
+                                &mdash; Dave Sims (@FloifyDave)</a>
                     </blockquote>
                 </div>
             </div>
             <div class="row">
                 <div class="col-md-6 col-xs-12">
                     <blockquote class="twitter-tweet" lang="en">
-                        <img class="twitter-profile" src="images/reviews/kareem.jpg" alt="">
+                        <a href="https://twitter.com/kareemk/status/517029789191118849">
+                            <img class="twitter-profile" src="images/reviews/kareem.jpg" alt="">
+                        </a>
                         <p><a href="https://twitter.com/dutchcoders">@dutchcoders</a> love transfer.sh! any change we can *pay* for a self-hosted version?</p><a href="https://twitter.com/kareemk/status/517029789191118849">&mdash; Kareem Kouddous (@kareemk) </a>
                     </blockquote>
                 </div>
                 <div class="col-md-6 col-xs-12">
                     <blockquote class="twitter-tweet" lang="en">
-                        <img class="twitter-profile" src="images/reviews/pg.jpeg" alt="">
+                        <a href="https://twitter.com/drakpz/status/517008058841829376">
+                            <img class="twitter-profile" src="images/reviews/pg.jpeg" alt="">
+                        </a>
                         <p><a href="http://t.co/JomAmqWYEB">http://t.co/JomAmqWYEB</a> by <a href="https://twitter.com/dutchcoders">@dutchcoders</a> is pure awesomeness! any chance of source on github? :-)</p><a href="https://twitter.com/drakpz/status/517008058841829376">&mdash; PJ Spagnolatti (@drakpz)</a>
                     </blockquote>
                 </div>
@@ -305,14 +301,18 @@
             <div class="row">
                 <div class="col-md-6 col-xs-12">
                     <blockquote class="twitter-tweet" lang="en">
-                        <img class="twitter-profile" src="images/reviews/jacob.jpg" alt="">
+                        <a href="https://twitter.com/jacoblindgren11/status/516975006501203968">
+                            <img class="twitter-profile" src="images/reviews/jacob.jpg" alt="">
+                        </a>
                         <p>Love transfer.sh! Will be using it from now on! Thanks for the amazing service we can use from the CLI <a href="https://twitter.com/dutchcoders">@dutchcoders</a>
                         </p><a href="https://twitter.com/jacoblindgren11/status/516975006501203968">&mdash; Jacob Lindgren (@jacoblindgren11) </a>
                     </blockquote>
                 </div>
                 <div class="col-md-6 col-xs-12">
                     <blockquote class="twitter-tweet" lang="en">
-                        <img class="twitter-profile" src="images/reviews/lars.jpg" alt="">
+                        <a href="https://twitter.com/arvestad/status/519507976491499521">
+                            <img class="twitter-profile" src="images/reviews/lars.jpg" alt="">
+                        </a>
                         <p>transfer.sh is my latest fav service! Try simple command-line and web file sharing! <a href="https://t.co/FSrsb1JKJd">https://t.co/FSrsb1JKJd</a>&#10;Thanks <a href="https://twitter.com/dutchcoders">@dutchcoders</a> !</p> <a href="https://twitter.com/arvestad/status/519507976491499521">&mdash; Lars Arvestad (@arvestad)</a>
                     </blockquote>
                 </div>
@@ -322,7 +322,7 @@
 
     <section id="share">
         <div class="wrapper">
-            <h2>Share the love</h2>
+            <h2 class="page-title">Share the love</h2>
             <ul class="share-buttons">
                 <li>
                     <a href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Ftransfer.sh&t=" target="_blank" onclick="window.open('https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(document.URL) + '&t=' + encodeURIComponent(document.URL)); return false;"> <i class="icon-facebook"></i> 
@@ -343,71 +343,33 @@
         </div>
     </section>
 
+
     <section id="contact">
         <div class="wrapper">
             <i class="icon-mail"></i>
-            <h2>
+            <h2 class="page-title">
                 Any questions?
             </h2>
             <a href="#" data-uv-trigger class="btn-cta">contact us</a>
         </div>
     </section>
 
-    <footer>
+
+    <section id="tor">
         <div class="wrapper">
-            <img src="images/Logo-orange.png" alt="Founded in Holland">
-            <p>Made with <i class="icon-heart"></i> by <a href="http://dutchcoders.io/" title="Dutch Coders">Dutch Coders</a>
-            </p>
+            <a href="https://torproject.com"><img src="images/tor.svg" alt=""></a><br/>
+            <a href="https://jxm5d6emw5rknovg.onion/">https://jxm5d6emw5rknovg.onion/</a>
         </div>
-    </footer>
+    </section>
 
-    <a href="https://github.com/dutchcoders/transfer.sh/">
-        <img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png">
-    </a>
 
-    <script>
-    (function() {
-        var uv = document.createElement('script');
-        uv.type = 'text/javascript';
-        uv.async = true;
-        uv.src = '//widget.uservoice.com/5rkATbLIm8ClJQeOirOhFg.js';
-        var s = document.getElementsByTagName('script')[0];
-        s.parentNode.insertBefore(uv, s)
-    })()
-    </script>
+    include "includes/footer.html" 
+
+    include "includes/js.html"
 
-    <!--[if lt IE 7]>
-      <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
-    <![endif]-->
 
-    <script>
-    (function(b, o, i, l, e, r) {
-        b.GoogleAnalyticsObject = l;
-        b[l] || (b[l] =
-            function() {
-                (b[l].q = b[l].q || []).push(arguments)
-            });
-        b[l].l = +new Date;
-        e = o.createElement(i);
-        r = o.getElementsByTagName(i)[0];
-        e.src = '//www.google-analytics.com/analytics.js';
-        r.parentNode.insertBefore(e, r)
-    }(window, document, 'script', 'ga'));
-    ga('create', 'UA-40833733-1', 'transfer.sh');
-    ga('send', 'pageview');
-    </script>
 
-    <!-- build:js scripts/main.js -->
-    <script src="bower_components/jquery/dist/jquery.js"></script>
-    <script src="bower_components/highlightjs/highlight.pack.js"></script>
-    <!--         </*script*/ src="bower_components/typed.js/js/typed.js"></script> -->
-    <script src="bower_components/uri.js/src/URI.min.js"></script>
-    <script src="bower_components/bootstrap/js/transition.js"></script>
-    <script src="bower_components/bootstrap/js/collapse.js"></script>
-
-    <script src="scripts/typewriter-bundle.js"></script>
-    <script src="scripts/main.js"></script>
-    <!-- endbuild -->
+    
 
 </body>
 

+ 61 - 0
transfersh-web/scripts/clipboard.js

@@ -0,0 +1,61 @@
+(function() {
+  var copylinkbtn = document.getElementById("copy-link-btn"),
+      copylink = document.getElementById("copy-link-wrapper"),
+      overlay = document.getElementById("overlay");
+
+    var url = "http://url"
+  copylinkbtn.addEventListener("click", function(e) {
+    e.preventDefault();
+    
+    var error = document.getElementsByClassName('error');
+      
+    while (error[0]) {
+      error[0].parentNode.removeChild(error[0]);
+    }
+
+    document.body.className += ' active';
+    
+    copylink.children[1].value = url;
+    copylink.children[1].focus();
+    copylink.children[1].select();
+    return (false);
+  }, false);
+
+  overlay.addEventListener("click", function(e) {
+    e.preventDefault();
+    document.body.className = '';
+    return (false);
+  }, false);
+
+  copylink.children[2].addEventListener("keydown", function(e) {
+
+    var error = document.getElementsByClassName('error');
+
+    while (error[0]) {
+      error[0].parentNode.removeChild(error[0]);
+    }
+
+    setTimeout(function() {
+
+      if((e.metaKey || e.ctrlKey) && e.keyCode === 67 && isTextSelected(copylink.children[2])) {
+        document.body.className = '';
+      } else if((e.metaKey || e.ctrlKey) && e.keyCode === 67 && isTextSelected(copylink.children[2]) === false) {
+        var error = document.createElement('span');
+        error.className = 'error';
+        var errortext = document.createTextNode('The link was not copied, make sure the entire text is selected.');
+        
+        error.appendChild(errortext);
+        copylink.appendChild(error);
+      }
+    }, 100);
+
+    function isTextSelected(input) {
+      if (typeof input.selectionStart == "number") {
+        return input.selectionStart == 0 && input.selectionEnd == input.value.length;
+      } else if (typeof document.selection != "undefined") {
+        input.focus();
+        return document.selection.createRange().text == input.value;
+      }
+    }
+  }, false);
+})();

+ 86 - 8
transfersh-web/scripts/main.js

@@ -18,10 +18,18 @@ $(document).ready(function() {
 
 (function() {
     var files = Array()
+    var queue = Array()
 
-    function upload(file) {
+    $(window).bind('beforeunload', function(){
+        if (queue.length==0) 
+            return;
+
+        return 'There are still ' + queue.length + ' files being uploaded.';
+    });
 
+    function upload(file) {
         $('.browse').addClass('uploading');
+
         var li = $('<li style="clear:both;"/>');
 
         li.append($('<div><div class="upload-progress"><span></span><div class="bar" style="width:0%;">####################################################</div></div><p>Uploading... ' + file.name + '</p></div>'));
@@ -33,7 +41,8 @@ $(document).ready(function() {
             var pc = parseInt((e.loaded / e.total * 100));
             $('.upload-progress', $(li)).show();
             $('.upload-progress .bar', $(li)).css('width', pc + "%");
-            $('.upload-progress span  ').empty().append(pc + "%");
+            $('.upload-progress span  ', $(li)).empty().append(pc + "%");
+
         }, false);
 
         xhr.onreadystatechange = function(e) {
@@ -47,8 +56,13 @@ $(document).ready(function() {
                     $(li).html('<span>Error (' + xhr.status + ') during upload of file ' + file.name + '</span>');
                 }
 
-                files.push(xhr.responseText.replace("https://transfer.sh/", "").replace("\n", ""));
-                // files.push(URI(xhr.responseText).absoluteTo(location.href).toString());
+                // file uploaded successfully, remove from queue
+                var index = queue.indexOf(xhr);
+                if (index > -1) {
+                    queue.splice(index, 1);
+                }
+
+                files.push(URI(xhr.responseText.replace("\n", "")).path());
 
                 $(".download-zip").attr("href", URI("(" + files.join(",") + ").zip").absoluteTo(location.href).toString());
                 $(".download-tar").attr("href", URI("(" + files.join(",") + ").tar.gz").absoluteTo(location.href).toString());
@@ -56,7 +70,9 @@ $(document).ready(function() {
                 $(".all-files").addClass('show');
             }
         };
+
         // should queue all uploads. 
+        queue.push(xhr);
 
         // start upload
         xhr.open("PUT", '/' + file.name, true);
@@ -73,13 +89,12 @@ $(document).ready(function() {
         $('#web').addClass('dragged');
     }).bind("dragleave", function(event) {
         $('#terminal').removeClass('dragged');
-        $('#web').removeClass('dragged');        
+        $('#web').removeClass('dragged');
 
     }).bind("drop dragdrop", function(event) {
         var files = event.originalEvent.target.files || event.originalEvent.dataTransfer.files;
 
         $.each(files, function(index, file) {
-            console.debug(file);
             upload(file);
         });
 
@@ -93,12 +108,75 @@ $(document).ready(function() {
     });
 
 
-
     $('input[type=file]').on('change', function(event) {
         $.each(this.files, function(index, file) {
             if (file instanceof Blob) {
                 upload(file);
             }
         });
-    });
+    });   
+
+    // clipboard 
+    if (window.location.href.indexOf("download") > -1 ) {
+
+
+        (function() {
+            var copylinkbtn = document.getElementById("copy-link-btn"),
+                copylink = document.getElementById("copy-link-wrapper"),
+                overlay = document.getElementById("overlay");
+
+            var url = "http://url"
+            copylinkbtn.addEventListener("click", function() {
+
+                var error = document.getElementsByClassName('error');
+
+                while (error[0]) {
+                    error[0].parentNode.removeChild(error[0]);
+                }
+
+                document.body.className += ' active';
+
+                copylink.children[1].value = url;
+                copylink.children[1].focus();
+                copylink.children[1].select();
+            }, false);
+
+            overlay.addEventListener("click", function() {
+                document.body.className = '';
+            }, false);
+
+            copylink.children[1].addEventListener("keydown", function(e) {
+
+                var error = document.getElementsByClassName('error');
+
+                while (error[0]) {
+                    error[0].parentNode.removeChild(error[0]);
+                }
+
+                setTimeout(function() {
+
+                    if ((e.metaKey || e.ctrlKey) && e.keyCode === 67 && isTextSelected(copylink.children[2])) {
+                        document.body.className = '';
+                    } else if ((e.metaKey || e.ctrlKey) && e.keyCode === 67 && isTextSelected(copylink.children[2]) === false) {
+                        var error = document.createElement('span');
+                        error.className = 'error';
+                        var errortext = document.createTextNode('The link was not copied, make sure the entire text is selected.');
+
+                        error.appendChild(errortext);
+                        copylink.appendChild(error);
+                    }
+                }, 100);
+
+                function isTextSelected(input) {
+                    if (typeof input.selectionStart == "number") {
+                        return input.selectionStart == 0 && input.selectionEnd == input.value.length;
+                    } else if (typeof document.selection != "undefined") {
+                        input.focus();
+                        return document.selection.createRange().text == input.value;
+                    }
+                }
+            }, false);
+        })();
+    };
+
 })();

+ 1296 - 0
transfersh-web/scripts/showdown.js

@@ -0,0 +1,1296 @@
+//
+// showdown.js -- A javascript port of Markdown.
+//
+// Copyright (c) 2007 John Fraser.
+//
+// Original Markdown Copyright (c) 2004-2005 John Gruber
+//   <http://daringfireball.net/projects/markdown/>
+//
+// Redistributable under a BSD-style open source license.
+// See license.txt for more information.
+//
+// The full source distribution is at:
+//
+//				A A L
+//				T C A
+//				T K B
+//
+//   <http://www.attacklab.net/>
+//
+
+//
+// Wherever possible, Showdown is a straight, line-by-line port
+// of the Perl version of Markdown.
+//
+// This is not a normal parser design; it's basically just a
+// series of string substitutions.  It's hard to read and
+// maintain this way,  but keeping Showdown close to the original
+// design makes it easier to port new features.
+//
+// More importantly, Showdown behaves like markdown.pl in most
+// edge cases.  So web applications can do client-side preview
+// in Javascript, and then build identical HTML on the server.
+//
+// This port needs the new RegExp functionality of ECMA 262,
+// 3rd Edition (i.e. Javascript 1.5).  Most modern web browsers
+// should do fine.  Even with the new regular expression features,
+// We do a lot of work to emulate Perl's regex functionality.
+// The tricky changes in this file mostly have the "attacklab:"
+// label.  Major or self-explanatory changes don't.
+//
+// Smart diff tools like Araxis Merge will be able to match up
+// this file with markdown.pl in a useful way.  A little tweaking
+// helps: in a copy of markdown.pl, replace "#" with "//" and
+// replace "$text" with "text".  Be sure to ignore whitespace
+// and line endings.
+//
+
+
+//
+// Showdown usage:
+//
+//   var text = "Markdown *rocks*.";
+//
+//   var converter = new Showdown.converter();
+//   var html = converter.makeHtml(text);
+//
+//   alert(html);
+//
+// Note: move the sample code to the bottom of this
+// file before uncommenting it.
+//
+
+
+//
+// Showdown namespace
+//
+var Showdown = {};
+
+//
+// converter
+//
+// Wraps all "globals" so that the only thing
+// exposed is makeHtml().
+//
+Showdown.converter = function() {
+
+//
+// Globals:
+//
+
+// Global hashes, used by various utility routines
+var g_urls;
+var g_titles;
+var g_html_blocks;
+
+// Used to track when we're inside an ordered or unordered list
+// (see _ProcessListItems() for details):
+var g_list_level = 0;
+
+
+this.makeHtml = function(text) {
+//
+// Main function. The order in which other subs are called here is
+// essential. Link and image substitutions need to happen before
+// _EscapeSpecialCharsWithinTagAttributes(), so that any *'s or _'s in the <a>
+// and <img> tags get encoded.
+//
+
+	// Clear the global hashes. If we don't clear these, you get conflicts
+	// from other articles when generating a page which contains more than
+	// one article (e.g. an index page that shows the N most recent
+	// articles):
+	g_urls = new Array();
+	g_titles = new Array();
+	g_html_blocks = new Array();
+
+	// attacklab: Replace ~ with ~T
+	// This lets us use tilde as an escape char to avoid md5 hashes
+	// The choice of character is arbitray; anything that isn't
+    // magic in Markdown will work.
+	text = text.replace(/~/g,"~T");
+
+	// attacklab: Replace $ with ~D
+	// RegExp interprets $ as a special character
+	// when it's in a replacement string
+	text = text.replace(/\$/g,"~D");
+
+	// Standardize line endings
+	text = text.replace(/\r\n/g,"\n"); // DOS to Unix
+	text = text.replace(/\r/g,"\n"); // Mac to Unix
+
+	// Make sure text begins and ends with a couple of newlines:
+	text = "\n\n" + text + "\n\n";
+
+	// Convert all tabs to spaces.
+	text = _Detab(text);
+
+	// Strip any lines consisting only of spaces and tabs.
+	// This makes subsequent regexen easier to write, because we can
+	// match consecutive blank lines with /\n+/ instead of something
+	// contorted like /[ \t]*\n+/ .
+	text = text.replace(/^[ \t]+$/mg,"");
+
+	// Turn block-level HTML blocks into hash entries
+	text = _HashHTMLBlocks(text);
+
+	// Strip link definitions, store in hashes.
+	text = _StripLinkDefinitions(text);
+
+	text = _RunBlockGamut(text);
+
+	text = _UnescapeSpecialChars(text);
+
+	// attacklab: Restore dollar signs
+	text = text.replace(/~D/g,"$$");
+
+	// attacklab: Restore tildes
+	text = text.replace(/~T/g,"~");
+
+	return text;
+}
+
+
+var _StripLinkDefinitions = function(text) {
+//
+// Strips link definitions from text, stores the URLs and titles in
+// hash references.
+//
+
+	// Link defs are in the form: ^[id]: url "optional title"
+
+	/*
+		var text = text.replace(/
+				^[ ]{0,3}\[(.+)\]:  // id = $1  attacklab: g_tab_width - 1
+				  [ \t]*
+				  \n?				// maybe *one* newline
+				  [ \t]*
+				<?(\S+?)>?			// url = $2
+				  [ \t]*
+				  \n?				// maybe one newline
+				  [ \t]*
+				(?:
+				  (\n*)				// any lines skipped = $3 attacklab: lookbehind removed
+				  ["(]
+				  (.+?)				// title = $4
+				  [")]
+				  [ \t]*
+				)?					// title is optional
+				(?:\n+|$)
+			  /gm,
+			  function(){...});
+	*/
+	var text = text.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|\Z)/gm,
+		function (wholeMatch,m1,m2,m3,m4) {
+			m1 = m1.toLowerCase();
+			g_urls[m1] = _EncodeAmpsAndAngles(m2);  // Link IDs are case-insensitive
+			if (m3) {
+				// Oops, found blank lines, so it's not a title.
+				// Put back the parenthetical statement we stole.
+				return m3+m4;
+			} else if (m4) {
+				g_titles[m1] = m4.replace(/"/g,"&quot;");
+			}
+			
+			// Completely remove the definition from the text
+			return "";
+		}
+	);
+
+	return text;
+}
+
+
+var _HashHTMLBlocks = function(text) {
+	// attacklab: Double up blank lines to reduce lookaround
+	text = text.replace(/\n/g,"\n\n");
+
+	// Hashify HTML blocks:
+	// We only want to do this for block-level HTML tags, such as headers,
+	// lists, and tables. That's because we still want to wrap <p>s around
+	// "paragraphs" that are wrapped in non-block-level tags, such as anchors,
+	// phrase emphasis, and spans. The list of tags we're looking for is
+	// hard-coded:
+	var block_tags_a = "p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del"
+	var block_tags_b = "p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math"
+
+	// First, look for nested blocks, e.g.:
+	//   <div>
+	//     <div>
+	//     tags for inner block must be indented.
+	//     </div>
+	//   </div>
+	//
+	// The outermost tags must start at the left margin for this to match, and
+	// the inner nested divs must be indented.
+	// We need to do this before the next, more liberal match, because the next
+	// match will start at the first `<div>` and stop at the first `</div>`.
+
+	// attacklab: This regex can be expensive when it fails.
+	/*
+		var text = text.replace(/
+		(						// save in $1
+			^					// start of line  (with /m)
+			<($block_tags_a)	// start tag = $2
+			\b					// word break
+								// attacklab: hack around khtml/pcre bug...
+			[^\r]*?\n			// any number of lines, minimally matching
+			</\2>				// the matching end tag
+			[ \t]*				// trailing spaces/tabs
+			(?=\n+)				// followed by a newline
+		)						// attacklab: there are sentinel newlines at end of document
+		/gm,function(){...}};
+	*/
+	text = text.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm,hashElement);
+
+	//
+	// Now match more liberally, simply from `\n<tag>` to `</tag>\n`
+	//
+
+	/*
+		var text = text.replace(/
+		(						// save in $1
+			^					// start of line  (with /m)
+			<($block_tags_b)	// start tag = $2
+			\b					// word break
+								// attacklab: hack around khtml/pcre bug...
+			[^\r]*?				// any number of lines, minimally matching
+			.*</\2>				// the matching end tag
+			[ \t]*				// trailing spaces/tabs
+			(?=\n+)				// followed by a newline
+		)						// attacklab: there are sentinel newlines at end of document
+		/gm,function(){...}};
+	*/
+	text = text.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?.*<\/\2>[ \t]*(?=\n+)\n)/gm,hashElement);
+
+	// Special case just for <hr />. It was easier to make a special case than
+	// to make the other regex more complicated.  
+
+	/*
+		text = text.replace(/
+		(						// save in $1
+			\n\n				// Starting after a blank line
+			[ ]{0,3}
+			(<(hr)				// start tag = $2
+			\b					// word break
+			([^<>])*?			// 
+			\/?>)				// the matching end tag
+			[ \t]*
+			(?=\n{2,})			// followed by a blank line
+		)
+		/g,hashElement);
+	*/
+	text = text.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,hashElement);
+
+	// Special case for standalone HTML comments:
+
+	/*
+		text = text.replace(/
+		(						// save in $1
+			\n\n				// Starting after a blank line
+			[ ]{0,3}			// attacklab: g_tab_width - 1
+			<!
+			(--[^\r]*?--\s*)+
+			>
+			[ \t]*
+			(?=\n{2,})			// followed by a blank line
+		)
+		/g,hashElement);
+	*/
+	text = text.replace(/(\n\n[ ]{0,3}<!(--[^\r]*?--\s*)+>[ \t]*(?=\n{2,}))/g,hashElement);
+
+	// PHP and ASP-style processor instructions (<?...?> and <%...%>)
+
+	/*
+		text = text.replace(/
+		(?:
+			\n\n				// Starting after a blank line
+		)
+		(						// save in $1
+			[ ]{0,3}			// attacklab: g_tab_width - 1
+			(?:
+				<([?%])			// $2
+				[^\r]*?
+				\2>
+			)
+			[ \t]*
+			(?=\n{2,})			// followed by a blank line
+		)
+		/g,hashElement);
+	*/
+	text = text.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,hashElement);
+
+	// attacklab: Undo double lines (see comment at top of this function)
+	text = text.replace(/\n\n/g,"\n");
+	return text;
+}
+
+var hashElement = function(wholeMatch,m1) {
+	var blockText = m1;
+
+	// Undo double lines
+	blockText = blockText.replace(/\n\n/g,"\n");
+	blockText = blockText.replace(/^\n/,"");
+	
+	// strip trailing blank lines
+	blockText = blockText.replace(/\n+$/g,"");
+	
+	// Replace the element text with a marker ("~KxK" where x is its key)
+	blockText = "\n\n~K" + (g_html_blocks.push(blockText)-1) + "K\n\n";
+	
+	return blockText;
+};
+
+var _RunBlockGamut = function(text) {
+//
+// These are all the transformations that form block-level
+// tags like paragraphs, headers, and list items.
+//
+	text = _DoHeaders(text);
+
+	// Do Horizontal Rules:
+	var key = hashBlock("<hr />");
+	text = text.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm,key);
+	text = text.replace(/^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$/gm,key);
+	text = text.replace(/^[ ]{0,2}([ ]?\_[ ]?){3,}[ \t]*$/gm,key);
+
+	text = _DoLists(text);
+	text = _DoCodeBlocks(text);
+	text = _DoBlockQuotes(text);
+
+	// We already ran _HashHTMLBlocks() before, in Markdown(), but that
+	// was to escape raw HTML in the original Markdown source. This time,
+	// we're escaping the markup we've just created, so that we don't wrap
+	// <p> tags around block-level tags.
+	text = _HashHTMLBlocks(text);
+	text = _FormParagraphs(text);
+
+	return text;
+}
+
+
+var _RunSpanGamut = function(text) {
+//
+// These are all the transformations that occur *within* block-level
+// tags like paragraphs, headers, and list items.
+//
+
+	text = _DoCodeSpans(text);
+	text = _EscapeSpecialCharsWithinTagAttributes(text);
+	text = _EncodeBackslashEscapes(text);
+
+	// Process anchor and image tags. Images must come first,
+	// because ![foo][f] looks like an anchor.
+	text = _DoImages(text);
+	text = _DoAnchors(text);
+
+	// Make links out of things like `<http://example.com/>`
+	// Must come after _DoAnchors(), because you can use < and >
+	// delimiters in inline links like [this](<url>).
+	text = _DoAutoLinks(text);
+	text = _EncodeAmpsAndAngles(text);
+	text = _DoItalicsAndBold(text);
+
+	// Do hard breaks:
+	text = text.replace(/  +\n/g," <br />\n");
+
+	return text;
+}
+
+var _EscapeSpecialCharsWithinTagAttributes = function(text) {
+//
+// Within tags -- meaning between < and > -- encode [\ ` * _] so they
+// don't conflict with their use in Markdown for code, italics and strong.
+//
+
+	// Build a regex to find HTML tags and comments.  See Friedl's 
+	// "Mastering Regular Expressions", 2nd Ed., pp. 200-201.
+	var regex = /(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|<!(--.*?--\s*)+>)/gi;
+
+	text = text.replace(regex, function(wholeMatch) {
+		var tag = wholeMatch.replace(/(.)<\/?code>(?=.)/g,"$1`");
+		tag = escapeCharacters(tag,"\\`*_");
+		return tag;
+	});
+
+	return text;
+}
+
+var _DoAnchors = function(text) {
+//
+// Turn Markdown link shortcuts into XHTML <a> tags.
+//
+	//
+	// First, handle reference-style links: [link text] [id]
+	//
+
+	/*
+		text = text.replace(/
+		(							// wrap whole match in $1
+			\[
+			(
+				(?:
+					\[[^\]]*\]		// allow brackets nested one level
+					|
+					[^\[]			// or anything else
+				)*
+			)
+			\]
+
+			[ ]?					// one optional space
+			(?:\n[ ]*)?				// one optional newline followed by spaces
+
+			\[
+			(.*?)					// id = $3
+			\]
+		)()()()()					// pad remaining backreferences
+		/g,_DoAnchors_callback);
+	*/
+	text = text.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,writeAnchorTag);
+
+	//
+	// Next, inline-style links: [link text](url "optional title")
+	//
+
+	/*
+		text = text.replace(/
+			(						// wrap whole match in $1
+				\[
+				(
+					(?:
+						\[[^\]]*\]	// allow brackets nested one level
+					|
+					[^\[\]]			// or anything else
+				)
+			)
+			\]
+			\(						// literal paren
+			[ \t]*
+			()						// no id, so leave $3 empty
+			<?(.*?)>?				// href = $4
+			[ \t]*
+			(						// $5
+				(['"])				// quote char = $6
+				(.*?)				// Title = $7
+				\6					// matching quote
+				[ \t]*				// ignore any spaces/tabs between closing quote and )
+			)?						// title is optional
+			\)
+		)
+		/g,writeAnchorTag);
+	*/
+	text = text.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()<?(.*?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,writeAnchorTag);
+
+	//
+	// Last, handle reference-style shortcuts: [link text]
+	// These must come last in case you've also got [link test][1]
+	// or [link test](/foo)
+	//
+
+	/*
+		text = text.replace(/
+		(		 					// wrap whole match in $1
+			\[
+			([^\[\]]+)				// link text = $2; can't contain '[' or ']'
+			\]
+		)()()()()()					// pad rest of backreferences
+		/g, writeAnchorTag);
+	*/
+	text = text.replace(/(\[([^\[\]]+)\])()()()()()/g, writeAnchorTag);
+
+	return text;
+}
+
+var writeAnchorTag = function(wholeMatch,m1,m2,m3,m4,m5,m6,m7) {
+	if (m7 == undefined) m7 = "";
+	var whole_match = m1;
+	var link_text   = m2;
+	var link_id	 = m3.toLowerCase();
+	var url		= m4;
+	var title	= m7;
+	
+	if (url == "") {
+		if (link_id == "") {
+			// lower-case and turn embedded newlines into spaces
+			link_id = link_text.toLowerCase().replace(/ ?\n/g," ");
+		}
+		url = "#"+link_id;
+		
+		if (g_urls[link_id] != undefined) {
+			url = g_urls[link_id];
+			if (g_titles[link_id] != undefined) {
+				title = g_titles[link_id];
+			}
+		}
+		else {
+			if (whole_match.search(/\(\s*\)$/m)>-1) {
+				// Special case for explicit empty url
+				url = "";
+			} else {
+				return whole_match;
+			}
+		}
+	}	
+	
+	url = escapeCharacters(url,"*_");
+	var result = "<a href=\"" + url + "\"";
+	
+	if (title != "") {
+		title = title.replace(/"/g,"&quot;");
+		title = escapeCharacters(title,"*_");
+		result +=  " title=\"" + title + "\"";
+	}
+	
+	result += ">" + link_text + "</a>";
+	
+	return result;
+}
+
+
+var _DoImages = function(text) {
+//
+// Turn Markdown image shortcuts into <img> tags.
+//
+
+	//
+	// First, handle reference-style labeled images: ![alt text][id]
+	//
+
+	/*
+		text = text.replace(/
+		(						// wrap whole match in $1
+			!\[
+			(.*?)				// alt text = $2
+			\]
+
+			[ ]?				// one optional space
+			(?:\n[ ]*)?			// one optional newline followed by spaces
+
+			\[
+			(.*?)				// id = $3
+			\]
+		)()()()()				// pad rest of backreferences
+		/g,writeImageTag);
+	*/
+	text = text.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,writeImageTag);
+
+	//
+	// Next, handle inline images:  ![alt text](url "optional title")
+	// Don't forget: encode * and _
+
+	/*
+		text = text.replace(/
+		(						// wrap whole match in $1
+			!\[
+			(.*?)				// alt text = $2
+			\]
+			\s?					// One optional whitespace character
+			\(					// literal paren
+			[ \t]*
+			()					// no id, so leave $3 empty
+			<?(\S+?)>?			// src url = $4
+			[ \t]*
+			(					// $5
+				(['"])			// quote char = $6
+				(.*?)			// title = $7
+				\6				// matching quote
+				[ \t]*
+			)?					// title is optional
+		\)
+		)
+		/g,writeImageTag);
+	*/
+	text = text.replace(/(!\[(.*?)\]\s?\([ \t]*()<?(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,writeImageTag);
+
+	return text;
+}
+
+var writeImageTag = function(wholeMatch,m1,m2,m3,m4,m5,m6,m7) {
+	var whole_match = m1;
+	var alt_text   = m2;
+	var link_id	 = m3.toLowerCase();
+	var url		= m4;
+	var title	= m7;
+
+	if (!title) title = "";
+	
+	if (url == "") {
+		if (link_id == "") {
+			// lower-case and turn embedded newlines into spaces
+			link_id = alt_text.toLowerCase().replace(/ ?\n/g," ");
+		}
+		url = "#"+link_id;
+		
+		if (g_urls[link_id] != undefined) {
+			url = g_urls[link_id];
+			if (g_titles[link_id] != undefined) {
+				title = g_titles[link_id];
+			}
+		}
+		else {
+			return whole_match;
+		}
+	}	
+	
+	alt_text = alt_text.replace(/"/g,"&quot;");
+	url = escapeCharacters(url,"*_");
+	var result = "<img src=\"" + url + "\" alt=\"" + alt_text + "\"";
+
+	// attacklab: Markdown.pl adds empty title attributes to images.
+	// Replicate this bug.
+
+	//if (title != "") {
+		title = title.replace(/"/g,"&quot;");
+		title = escapeCharacters(title,"*_");
+		result +=  " title=\"" + title + "\"";
+	//}
+	
+	result += " />";
+	
+	return result;
+}
+
+
+var _DoHeaders = function(text) {
+
+	// Setext-style headers:
+	//	Header 1
+	//	========
+	//  
+	//	Header 2
+	//	--------
+	//
+	text = text.replace(/^(.+)[ \t]*\n=+[ \t]*\n+/gm,
+		function(wholeMatch,m1){return hashBlock("<h1>" + _RunSpanGamut(m1) + "</h1>");});
+
+	text = text.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm,
+		function(matchFound,m1){return hashBlock("<h2>" + _RunSpanGamut(m1) + "</h2>");});
+
+	// atx-style headers:
+	//  # Header 1
+	//  ## Header 2
+	//  ## Header 2 with closing hashes ##
+	//  ...
+	//  ###### Header 6
+	//
+
+	/*
+		text = text.replace(/
+			^(\#{1,6})				// $1 = string of #'s
+			[ \t]*
+			(.+?)					// $2 = Header text
+			[ \t]*
+			\#*						// optional closing #'s (not counted)
+			\n+
+		/gm, function() {...});
+	*/
+
+	text = text.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm,
+		function(wholeMatch,m1,m2) {
+			var h_level = m1.length;
+			return hashBlock("<h" + h_level + ">" + _RunSpanGamut(m2) + "</h" + h_level + ">");
+		});
+
+	return text;
+}
+
+// This declaration keeps Dojo compressor from outputting garbage:
+var _ProcessListItems;
+
+var _DoLists = function(text) {
+//
+// Form HTML ordered (numbered) and unordered (bulleted) lists.
+//
+
+	// attacklab: add sentinel to hack around khtml/safari bug:
+	// http://bugs.webkit.org/show_bug.cgi?id=11231
+	text += "~0";
+
+	// Re-usable pattern to match any entirel ul or ol list:
+
+	/*
+		var whole_list = /
+		(									// $1 = whole list
+			(								// $2
+				[ ]{0,3}					// attacklab: g_tab_width - 1
+				([*+-]|\d+[.])				// $3 = first list item marker
+				[ \t]+
+			)
+			[^\r]+?
+			(								// $4
+				~0							// sentinel for workaround; should be $
+			|
+				\n{2,}
+				(?=\S)
+				(?!							// Negative lookahead for another list item marker
+					[ \t]*
+					(?:[*+-]|\d+[.])[ \t]+
+				)
+			)
+		)/g
+	*/
+	var whole_list = /^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;
+
+	if (g_list_level) {
+		text = text.replace(whole_list,function(wholeMatch,m1,m2) {
+			var list = m1;
+			var list_type = (m2.search(/[*+-]/g)>-1) ? "ul" : "ol";
+
+			// Turn double returns into triple returns, so that we can make a
+			// paragraph for the last item in a list, if necessary:
+			list = list.replace(/\n{2,}/g,"\n\n\n");;
+			var result = _ProcessListItems(list);
+	
+			// Trim any trailing whitespace, to put the closing `</$list_type>`
+			// up on the preceding line, to get it past the current stupid
+			// HTML block parser. This is a hack to work around the terrible
+			// hack that is the HTML block parser.
+			result = result.replace(/\s+$/,"");
+			result = "<"+list_type+">" + result + "</"+list_type+">\n";
+			return result;
+		});
+	} else {
+		whole_list = /(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g;
+		text = text.replace(whole_list,function(wholeMatch,m1,m2,m3) {
+			var runup = m1;
+			var list = m2;
+
+			var list_type = (m3.search(/[*+-]/g)>-1) ? "ul" : "ol";
+			// Turn double returns into triple returns, so that we can make a
+			// paragraph for the last item in a list, if necessary:
+			var list = list.replace(/\n{2,}/g,"\n\n\n");;
+			var result = _ProcessListItems(list);
+			result = runup + "<"+list_type+">\n" + result + "</"+list_type+">\n";	
+			return result;
+		});
+	}
+
+	// attacklab: strip sentinel
+	text = text.replace(/~0/,"");
+
+	return text;
+}
+
+_ProcessListItems = function(list_str) {
+//
+//  Process the contents of a single ordered or unordered list, splitting it
+//  into individual list items.
+//
+	// The $g_list_level global keeps track of when we're inside a list.
+	// Each time we enter a list, we increment it; when we leave a list,
+	// we decrement. If it's zero, we're not in a list anymore.
+	//
+	// We do this because when we're not inside a list, we want to treat
+	// something like this:
+	//
+	//    I recommend upgrading to version
+	//    8. Oops, now this line is treated
+	//    as a sub-list.
+	//
+	// As a single paragraph, despite the fact that the second line starts
+	// with a digit-period-space sequence.
+	//
+	// Whereas when we're inside a list (or sub-list), that line will be
+	// treated as the start of a sub-list. What a kludge, huh? This is
+	// an aspect of Markdown's syntax that's hard to parse perfectly
+	// without resorting to mind-reading. Perhaps the solution is to
+	// change the syntax rules such that sub-lists must start with a
+	// starting cardinal number; e.g. "1." or "a.".
+
+	g_list_level++;
+
+	// trim trailing blank lines:
+	list_str = list_str.replace(/\n{2,}$/,"\n");
+
+	// attacklab: add sentinel to emulate \z
+	list_str += "~0";
+
+	/*
+		list_str = list_str.replace(/
+			(\n)?							// leading line = $1
+			(^[ \t]*)						// leading whitespace = $2
+			([*+-]|\d+[.]) [ \t]+			// list marker = $3
+			([^\r]+?						// list item text   = $4
+			(\n{1,2}))
+			(?= \n* (~0 | \2 ([*+-]|\d+[.]) [ \t]+))
+		/gm, function(){...});
+	*/
+	list_str = list_str.replace(/(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+([^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm,
+		function(wholeMatch,m1,m2,m3,m4){
+			var item = m4;
+			var leading_line = m1;
+			var leading_space = m2;
+
+			if (leading_line || (item.search(/\n{2,}/)>-1)) {
+				item = _RunBlockGamut(_Outdent(item));
+			}
+			else {
+				// Recursion for sub-lists:
+				item = _DoLists(_Outdent(item));
+				item = item.replace(/\n$/,""); // chomp(item)
+				item = _RunSpanGamut(item);
+			}
+
+			return  "<li>" + item + "</li>\n";
+		}
+	);
+
+	// attacklab: strip sentinel
+	list_str = list_str.replace(/~0/g,"");
+
+	g_list_level--;
+	return list_str;
+}
+
+
+var _DoCodeBlocks = function(text) {
+//
+//  Process Markdown `<pre><code>` blocks.
+//  
+
+	/*
+		text = text.replace(text,
+			/(?:\n\n|^)
+			(								// $1 = the code block -- one or more lines, starting with a space/tab
+				(?:
+					(?:[ ]{4}|\t)			// Lines must start with a tab or a tab-width of spaces - attacklab: g_tab_width
+					.*\n+
+				)+
+			)
+			(\n*[ ]{0,3}[^ \t\n]|(?=~0))	// attacklab: g_tab_width
+		/g,function(){...});
+	*/
+
+	// attacklab: sentinel workarounds for lack of \A and \Z, safari\khtml bug
+	text += "~0";
+	
+	text = text.replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g,
+		function(wholeMatch,m1,m2) {
+			var codeblock = m1;
+			var nextChar = m2;
+		
+			codeblock = _EncodeCode( _Outdent(codeblock));
+			codeblock = _Detab(codeblock);
+			codeblock = codeblock.replace(/^\n+/g,""); // trim leading newlines
+			codeblock = codeblock.replace(/\n+$/g,""); // trim trailing whitespace
+
+			codeblock = "<pre><code>" + codeblock + "\n</code></pre>";
+
+			return hashBlock(codeblock) + nextChar;
+		}
+	);
+
+	// attacklab: strip sentinel
+	text = text.replace(/~0/,"");
+
+	return text;
+}
+
+var hashBlock = function(text) {
+	text = text.replace(/(^\n+|\n+$)/g,"");
+	return "\n\n~K" + (g_html_blocks.push(text)-1) + "K\n\n";
+}
+
+
+var _DoCodeSpans = function(text) {
+//
+//   *  Backtick quotes are used for <code></code> spans.
+// 
+//   *  You can use multiple backticks as the delimiters if you want to
+//	 include literal backticks in the code span. So, this input:
+//	 
+//		 Just type ``foo `bar` baz`` at the prompt.
+//	 
+//	   Will translate to:
+//	 
+//		 <p>Just type <code>foo `bar` baz</code> at the prompt.</p>
+//	 
+//	There's no arbitrary limit to the number of backticks you
+//	can use as delimters. If you need three consecutive backticks
+//	in your code, use four for delimiters, etc.
+//
+//  *  You can use spaces to get literal backticks at the edges:
+//	 
+//		 ... type `` `bar` `` ...
+//	 
+//	   Turns to:
+//	 
+//		 ... type <code>`bar`</code> ...
+//
+
+	/*
+		text = text.replace(/
+			(^|[^\\])					// Character before opening ` can't be a backslash
+			(`+)						// $2 = Opening run of `
+			(							// $3 = The code block
+				[^\r]*?
+				[^`]					// attacklab: work around lack of lookbehind
+			)
+			\2							// Matching closer
+			(?!`)
+		/gm, function(){...});
+	*/
+
+	text = text.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,
+		function(wholeMatch,m1,m2,m3,m4) {
+			var c = m3;
+			c = c.replace(/^([ \t]*)/g,"");	// leading whitespace
+			c = c.replace(/[ \t]*$/g,"");	// trailing whitespace
+			c = _EncodeCode(c);
+			return m1+"<code>"+c+"</code>";
+		});
+
+	return text;
+}
+
+
+var _EncodeCode = function(text) {
+//
+// Encode/escape certain characters inside Markdown code runs.
+// The point is that in code, these characters are literals,
+// and lose their special Markdown meanings.
+//
+	// Encode all ampersands; HTML entities are not
+	// entities within a Markdown code span.
+	text = text.replace(/&/g,"&amp;");
+
+	// Do the angle bracket song and dance:
+	text = text.replace(/</g,"&lt;");
+	text = text.replace(/>/g,"&gt;");
+
+	// Now, escape characters that are magic in Markdown:
+	text = escapeCharacters(text,"\*_{}[]\\",false);
+
+// jj the line above breaks this:
+//---
+
+//* Item
+
+//   1. Subitem
+
+//            special char: *
+//---
+
+	return text;
+}
+
+
+var _DoItalicsAndBold = function(text) {
+
+	// <strong> must go first:
+	text = text.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g,
+		"<strong>$2</strong>");
+
+	text = text.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g,
+		"<em>$2</em>");
+
+	return text;
+}
+
+
+var _DoBlockQuotes = function(text) {
+
+	/*
+		text = text.replace(/
+		(								// Wrap whole match in $1
+			(
+				^[ \t]*>[ \t]?			// '>' at the start of a line
+				.+\n					// rest of the first line
+				(.+\n)*					// subsequent consecutive lines
+				\n*						// blanks
+			)+
+		)
+		/gm, function(){...});
+	*/
+
+	text = text.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm,
+		function(wholeMatch,m1) {
+			var bq = m1;
+
+			// attacklab: hack around Konqueror 3.5.4 bug:
+			// "----------bug".replace(/^-/g,"") == "bug"
+
+			bq = bq.replace(/^[ \t]*>[ \t]?/gm,"~0");	// trim one level of quoting
+
+			// attacklab: clean up hack
+			bq = bq.replace(/~0/g,"");
+
+			bq = bq.replace(/^[ \t]+$/gm,"");		// trim whitespace-only lines
+			bq = _RunBlockGamut(bq);				// recurse
+			
+			bq = bq.replace(/(^|\n)/g,"$1  ");
+			// These leading spaces screw with <pre> content, so we need to fix that:
+			bq = bq.replace(
+					/(\s*<pre>[^\r]+?<\/pre>)/gm,
+				function(wholeMatch,m1) {
+					var pre = m1;
+					// attacklab: hack around Konqueror 3.5.4 bug:
+					pre = pre.replace(/^  /mg,"~0");
+					pre = pre.replace(/~0/g,"");
+					return pre;
+				});
+			
+			return hashBlock("<blockquote>\n" + bq + "\n</blockquote>");
+		});
+	return text;
+}
+
+
+var _FormParagraphs = function(text) {
+//
+//  Params:
+//    $text - string to process with html <p> tags
+//
+
+	// Strip leading and trailing lines:
+	text = text.replace(/^\n+/g,"");
+	text = text.replace(/\n+$/g,"");
+
+	var grafs = text.split(/\n{2,}/g);
+	var grafsOut = new Array();
+
+	//
+	// Wrap <p> tags.
+	//
+	var end = grafs.length;
+	for (var i=0; i<end; i++) {
+		var str = grafs[i];
+
+		// if this is an HTML marker, copy it
+		if (str.search(/~K(\d+)K/g) >= 0) {
+			grafsOut.push(str);
+		}
+		else if (str.search(/\S/) >= 0) {
+			str = _RunSpanGamut(str);
+			str = str.replace(/^([ \t]*)/g,"<p>");
+			str += "</p>"
+			grafsOut.push(str);
+		}
+
+	}
+
+	//
+	// Unhashify HTML blocks
+	//
+	end = grafsOut.length;
+	for (var i=0; i<end; i++) {
+		// if this is a marker for an html block...
+		while (grafsOut[i].search(/~K(\d+)K/) >= 0) {
+			var blockText = g_html_blocks[RegExp.$1];
+			blockText = blockText.replace(/\$/g,"$$$$"); // Escape any dollar signs
+			grafsOut[i] = grafsOut[i].replace(/~K\d+K/,blockText);
+		}
+	}
+
+	return grafsOut.join("\n\n");
+}
+
+
+var _EncodeAmpsAndAngles = function(text) {
+// Smart processing for ampersands and angle brackets that need to be encoded.
+	
+	// Ampersand-encoding based entirely on Nat Irons's Amputator MT plugin:
+	//   http://bumppo.net/projects/amputator/
+	text = text.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&amp;");
+	
+	// Encode naked <'s
+	text = text.replace(/<(?![a-z\/?\$!])/gi,"&lt;");
+	
+	return text;
+}
+
+
+var _EncodeBackslashEscapes = function(text) {
+//
+//   Parameter:  String.
+//   Returns:	The string, with after processing the following backslash
+//			   escape sequences.
+//
+
+	// attacklab: The polite way to do this is with the new
+	// escapeCharacters() function:
+	//
+	// 	text = escapeCharacters(text,"\\",true);
+	// 	text = escapeCharacters(text,"`*_{}[]()>#+-.!",true);
+	//
+	// ...but we're sidestepping its use of the (slow) RegExp constructor
+	// as an optimization for Firefox.  This function gets called a LOT.
+
+	text = text.replace(/\\(\\)/g,escapeCharacters_callback);
+	text = text.replace(/\\([`*_{}\[\]()>#+-.!])/g,escapeCharacters_callback);
+	return text;
+}
+
+
+var _DoAutoLinks = function(text) {
+
+	text = text.replace(/<((https?|ftp|dict):[^'">\s]+)>/gi,"<a href=\"$1\">$1</a>");
+
+	// Email addresses: <address@domain.foo>
+
+	/*
+		text = text.replace(/
+			<
+			(?:mailto:)?
+			(
+				[-.\w]+
+				\@
+				[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+
+			)
+			>
+		/gi, _DoAutoLinks_callback());
+	*/
+	text = text.replace(/<(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,
+		function(wholeMatch,m1) {
+			return _EncodeEmailAddress( _UnescapeSpecialChars(m1) );
+		}
+	);
+
+	return text;
+}
+
+
+var _EncodeEmailAddress = function(addr) {
+//
+//  Input: an email address, e.g. "foo@example.com"
+//
+//  Output: the email address as a mailto link, with each character
+//	of the address encoded as either a decimal or hex entity, in
+//	the hopes of foiling most address harvesting spam bots. E.g.:
+//
+//	<a href="&#x6D;&#97;&#105;&#108;&#x74;&#111;:&#102;&#111;&#111;&#64;&#101;
+//	   x&#x61;&#109;&#x70;&#108;&#x65;&#x2E;&#99;&#111;&#109;">&#102;&#111;&#111;
+//	   &#64;&#101;x&#x61;&#109;&#x70;&#108;&#x65;&#x2E;&#99;&#111;&#109;</a>
+//
+//  Based on a filter by Matthew Wickline, posted to the BBEdit-Talk
+//  mailing list: <http://tinyurl.com/yu7ue>
+//
+
+	// attacklab: why can't javascript speak hex?
+	function char2hex(ch) {
+		var hexDigits = '0123456789ABCDEF';
+		var dec = ch.charCodeAt(0);
+		return(hexDigits.charAt(dec>>4) + hexDigits.charAt(dec&15));
+	}
+
+	var encode = [
+		function(ch){return "&#"+ch.charCodeAt(0)+";";},
+		function(ch){return "&#x"+char2hex(ch)+";";},
+		function(ch){return ch;}
+	];
+
+	addr = "mailto:" + addr;
+
+	addr = addr.replace(/./g, function(ch) {
+		if (ch == "@") {
+		   	// this *must* be encoded. I insist.
+			ch = encode[Math.floor(Math.random()*2)](ch);
+		} else if (ch !=":") {
+			// leave ':' alone (to spot mailto: later)
+			var r = Math.random();
+			// roughly 10% raw, 45% hex, 45% dec
+			ch =  (
+					r > .9  ?	encode[2](ch)   :
+					r > .45 ?	encode[1](ch)   :
+								encode[0](ch)
+				);
+		}
+		return ch;
+	});
+
+	addr = "<a href=\"" + addr + "\">" + addr + "</a>";
+	addr = addr.replace(/">.+:/g,"\">"); // strip the mailto: from the visible part
+
+	return addr;
+}
+
+
+var _UnescapeSpecialChars = function(text) {
+//
+// Swap back in all the special characters we've hidden.
+//
+	text = text.replace(/~E(\d+)E/g,
+		function(wholeMatch,m1) {
+			var charCodeToReplace = parseInt(m1);
+			return String.fromCharCode(charCodeToReplace);
+		}
+	);
+	return text;
+}
+
+
+var _Outdent = function(text) {
+//
+// Remove one level of line-leading tabs or spaces
+//
+
+	// attacklab: hack around Konqueror 3.5.4 bug:
+	// "----------bug".replace(/^-/g,"") == "bug"
+
+	text = text.replace(/^(\t|[ ]{1,4})/gm,"~0"); // attacklab: g_tab_width
+
+	// attacklab: clean up hack
+	text = text.replace(/~0/g,"")
+
+	return text;
+}
+
+var _Detab = function(text) {
+// attacklab: Detab's completely rewritten for speed.
+// In perl we could fix it by anchoring the regexp with \G.
+// In javascript we're less fortunate.
+
+	// expand first n-1 tabs
+	text = text.replace(/\t(?=\t)/g,"    "); // attacklab: g_tab_width
+
+	// replace the nth with two sentinels
+	text = text.replace(/\t/g,"~A~B");
+
+	// use the sentinel to anchor our regex so it doesn't explode
+	text = text.replace(/~B(.+?)~A/g,
+		function(wholeMatch,m1,m2) {
+			var leadingText = m1;
+			var numSpaces = 4 - leadingText.length % 4;  // attacklab: g_tab_width
+
+			// there *must* be a better way to do this:
+			for (var i=0; i<numSpaces; i++) leadingText+=" ";
+
+			return leadingText;
+		}
+	);
+
+	// clean up sentinels
+	text = text.replace(/~A/g,"    ");  // attacklab: g_tab_width
+	text = text.replace(/~B/g,"");
+
+	return text;
+}
+
+
+//
+//  attacklab: Utility functions
+//
+
+
+var escapeCharacters = function(text, charsToEscape, afterBackslash) {
+	// First we have to escape the escape characters so that
+	// we can build a character class out of them
+	var regexString = "([" + charsToEscape.replace(/([\[\]\\])/g,"\\$1") + "])";
+
+	if (afterBackslash) {
+		regexString = "\\\\" + regexString;
+	}
+
+	var regex = new RegExp(regexString,"g");
+	text = text.replace(regex,escapeCharacters_callback);
+
+	return text;
+}
+
+
+var escapeCharacters_callback = function(wholeMatch,m1) {
+	var charCodeToEscape = m1.charCodeAt(0);
+	return "~E"+charCodeToEscape+"E";
+}
+
+} // end of Showdown.converter

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
transfersh-web/scripts/typewriter-bundle.min.js


+ 3 - 3
transfersh-web/styles/bootstrap.less

@@ -9,10 +9,10 @@
 // Core CSS
 @import "../bower_components/bootstrap/less/scaffolding.less";
 @import "../bower_components/bootstrap/less/type.less";
-/* @import "../bower_components/bootstrap/less/code.less"; */
+// @import "../bower_components/bootstrap/less/code.less";
 @import "../bower_components/bootstrap/less/grid.less";
-//@import "../bower_components/bootstrap/less/tables.less";
-//@import "../bower_components/bootstrap/less/forms.less";
+@import "../bower_components/bootstrap/less/tables.less";
+@import "../bower_components/bootstrap/less/forms.less";
 //@import "../bower_components/bootstrap/less/buttons.less";
 
 // Components

+ 8 - 6
transfersh-web/styles/includes/global.less

@@ -1,4 +1,9 @@
 
+body {
+    max-width: 2000px;
+    margin: 0 auto;
+}
+
 .browsehappy {
     margin: 0.2em 0;
     background: orange;
@@ -10,8 +15,8 @@
     margin-top: 30px;
     ul {
         list-style: none;
-        max-width: 300px;
-        margin: 0 auto;
+        max-width: 400px;
+        marghomein: 0 auto;
     }
     li {
         display: inline-block;
@@ -41,8 +46,7 @@
 }
 
 
-
-h2 {
+.page-title {
     text-align: center;
     font-size: 35px;
     @media (min-width: @screen-sm-min) {
@@ -90,8 +94,6 @@ a {
     }
 }
 
-
-
 ::selection {
   background: @red;
 }

+ 9 - 3
transfersh-web/styles/includes/home.less

@@ -1,14 +1,14 @@
 #home {
     text-align: center;
-    h2 {
+    .page-title {
         font-size: 30px;
     }
     @media (min-width: @screen-sm-min) {
         padding: 50px;
-        h2 {
+        .page-title {
             font-size: 45px;
             margin-top: -20px;
-            margin-bottom: 45px;
+            margin-bottom: 20px;
         }
     }
     .btn-home {
@@ -68,7 +68,12 @@
 }
 
 .terminal {
+    a {
+        color: #fff
+    }
+
      .border-top-radius (0);
+
     .border-bottom-radius (5px);
     background: @dark-blue;
  //   background: url(../images/terminal.svg);
@@ -93,6 +98,7 @@
     span {
         float: right;
     }
+    padding-top: 4px;
 }
 
 .all-files {

+ 21 - 1
transfersh-web/styles/includes/pages.less

@@ -21,7 +21,7 @@
     h4 {
         margin-top: 30px;
     }
-    padding: 50px 0;
+    padding: 75px 0;
     text-align: center;
     .btn-cta {
         margin: 30px 0;
@@ -61,6 +61,26 @@
     }
 }
 
+#github {
+    text-align: center;
+    padding: 50px 0;
+
+}
+
+#tor {
+    text-align: center;
+    img {
+        max-width: 100px;
+        margin: 0 auto;
+        margin-bottom: 10px;
+    }
+    background: @light-gray;
+    padding: 50px 0;
+    a {
+        font-size: 20px;
+    }
+}
+
 
 footer {
     text-align: center;

+ 200 - 0
transfersh-web/styles/includes/preview.less

@@ -0,0 +1,200 @@
+.preview-wrapper {
+    padding-bottom: 30px;
+}
+
+html {
+  min-height:100%;
+}
+#download {
+position: static;
+    footer {
+        bottom: 0; 
+        left: 0;
+        width: 100%;
+        position: absolute;
+        z-index: -1;
+    }
+}
+
+.preview-image  {
+	img {
+		margin: 0 auto;
+		display:block;
+		max-width: 800px;
+		max-width: 100%;
+	}
+padding: 0;
+padding: 0px;
+}
+
+.overlay {
+  position: fixed;
+  z-index: 100;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background-color: rgba(0,0,0,0.10);
+  visibility: hidden;
+  opacity: 0;
+  transition: opacity 0.2s ease;
+  .active & {
+    visibility: visible;
+    opacity: 1;
+  }
+}
+
+.copy-link-wrapper {
+  z-index: 200;
+  padding: 2em;
+  position: fixed;
+  top: 50%;
+  left: 50%;
+  width: 50%;
+  max-width: 500px;
+  min-width: 300px;
+  background-color: @blue;
+  border-radius: 2px;
+  transform: translateX(-50%) translateY(-50%);
+  opacity: 0;
+  transition: opacity 0.2s ease;
+	clip:rect(1px 1px 1px 1px);
+	opacity: 0;
+	top: -9999999px;
+	left: -9999999px;
+  .active & {
+    clip: auto;
+	  opacity: 1;
+	  top: 50%;
+	  left: 50%;
+  }
+	p {
+		font-size: 20px;
+		color: #fff;
+	}
+  input {
+    background-color: @light-gray;
+    color: @text-color;
+    border: 0;
+    font-size: 1em;
+    padding: 1em;
+    margin: 0;
+    width: 100%;
+    border-radius: 2px;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+  }
+  .error {
+    text-align: center;
+    color: #E7483B;
+    display: block;
+    padding: 0.5em;
+  }
+}
+
+#md-preview,{
+	padding-bottom: 30px;
+}
+
+
+video {
+  margin: 0 auto;
+  width: 100%;
+}
+
+
+.wrap {
+  width: 40%;
+  height: 40%;
+  margin: 20px auto;
+}
+
+video {
+  width: 100%;
+}
+
+video::-webkit-media-controls-enclosure {
+  padding: 0px;
+  height: 50px;
+}
+
+video::-webkit-media-controls-panel {
+  opacity: 1 !important;
+  display: -webkit-flex !important;
+  margin-top: 50px;
+  height: 50px;
+  background-color: @dark-blue;
+  border-radius: 0 0 10px 10px;
+}
+
+video::-webkit-media-controls-timeline {
+  height: 12px;
+  padding: 0px; 
+  border: 0px;
+}
+
+video::-webkit-media-controls-volume-slider, video::-webkit-media-controls-timeline {
+  height: 12px;
+  border-radius: 5px;
+  min-width: 15px;
+}
+
+video::-webkit-media-controls-volume-slider::-webkit-media-slider-container, video::-webkit-media-controls-timeline::-webkit-media-slider-container {
+  border: 0px;
+  border-radius: 5px;
+  background-color: @blue;
+  cursor: pointer;
+}
+
+::-webkit-media-slider-thumb {
+  -webkit-appearance: none;
+  background: red;
+}
+
+video::-webkit-media-controls-play-button {
+  cursor: pointer;
+
+}
+
+video::-webkit-media-controls-play-button:hover {
+  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";
+  filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70);
+  opacity: 0.7;
+}
+
+video::-webkit-media-controls-fullscreen-button {
+  -webkit-appearance: none;
+  background-color: transparent;
+  cursor: pointer;
+  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAABACAYAAADF2C3zAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo2N0Q1MjA3MDc5NjYxMUUyQjQzRjk5Mjc1MTU5Qjk0NSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo2N0Q1MjA3MTc5NjYxMUUyQjQzRjk5Mjc1MTU5Qjk0NSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkQyQkE2QUZGNzkzQjExRTJCNDNGOTkyNzUxNTlCOTQ1IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkQyQkE2QjAwNzkzQjExRTJCNDNGOTkyNzUxNTlCOTQ1Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+1z7uaAAAAVhJREFUeNrsljFuAjEQRb3ACZByii2pECmgySFIGoiUGsEKiaQAimwTToCggSYSNUoJHSfgFJwhMt9oHBlj8Ga2SAqP9KQV7PPY4y1+9PDYEZ4agaHrj4Lwl5LHXFkvsOXKatt1jjykzrq2WeW+Jb6Bhp5BySOvQQLuaKEPYwYnOQLSkpTwBfbUqQam9hDVtieOyaoOGxDTAtNrV9UFqTEc/UGUQeXWmfSZB6BqXMc3aIFlFllY4hP49N2h66p2YJXly3HJ92ABihxZVRPM6BqvViSlFNwqiBwV5CAHOchBDnKQ/5/si4/iOUn5YX0+ec0X1mkBXljH1nlhncTfh3WIF2EdR/gJ677OKqwfdOqHmJ4Nsd17PwU5E/yWgJieY/Biv6MoUVjvOe61j+cGuuwpsLvDOl5KjeFkDusRtiSNKZ6FdXTlhXWIfxTWcf58YR0L3AzrRwEGAJoOgCMfh6hiAAAAAElFTkSuQmCC);
+  background-size: 16px 64px;
+  background-position: center 8px;
+  background-repeat: no-repeat;
+}
+
+video::-webkit-media-controls-mute-button {
+  -webkit-appearance: none;
+  background-color: transparent;
+  cursor: pointer;
+  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAABACAYAAAATffeWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo2N0Q1MjA3NDc5NjYxMUUyQjQzRjk5Mjc1MTU5Qjk0NSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo2N0Q1MjA3NTc5NjYxMUUyQjQzRjk5Mjc1MTU5Qjk0NSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjY3RDUyMDcyNzk2NjExRTJCNDNGOTkyNzUxNTlCOTQ1IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjY3RDUyMDczNzk2NjExRTJCNDNGOTkyNzUxNTlCOTQ1Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Gp0GRAAAATdJREFUeNpidIsuYMABwoF4BhCvB+IkXIqYcIj7APEiIBYA4jg0OREgLsJnQAgQrwJiNiifGU3eFIi7gDgPxGEBYnYg1gBiDqizQX5ixOEyCyDeC8SNQNwJxJtABuwHYksGwoAR6q3tQFwKxGlAnMtEpGYQ+A+1NROI+aDedGdiIA2sAWJWaDhcBGIVUg1ABqz4ohEXAMXQbyA+DcRaQHwHZMBxIjWDArEcmrg+AXEYEO8ExYIjUjRGQuOXEUcgghLVOahBoAQ1GWTAT2iAgMBJID4BxPOhBqIDkJwnENcDcQkQP8AWBiuAOBiIf0H5f9HkT0NdMAFfIG4D4gggfgtNPMjgDRD3wgPm////DJSAUQNGDRg1YNSAUQNGDRg1YNSA4WhAUnHraI9ltMcy2mMZDD0WgAADADYlybDQKXdAAAAAAElFTkSuQmCC);
+  background-size: 16px 64px;
+  background-position: center 8px;
+  background-repeat: no-repeat;
+}
+
+video::-webkit-media-controls-fullscreen-button:hover {
+  -webkit-appearance: none;
+  background-position: center -42px;
+}
+
+video::-webkit-media-controls-mute-button:hover {
+  -webkit-appearance: none;
+  background-position: center -43px;
+}
+
+video::-webkit-media-controls-current-time-display, video::-webkit-media-controls-time-remaining-display {
+
+  font-size: 13px;
+  font-weight: normal;
+}

+ 16 - 14
transfersh-web/styles/includes/reviews.less

@@ -23,7 +23,7 @@ blockquote.twitter-tweet {
     margin: 0 auto;
   }
     @media (max-width: @screen-xs) {
-      .twitter-profile {
+    .twitter-profile {
         display:none!important;
       }
   }
@@ -43,17 +43,19 @@ blockquote.twitter-tweet a {
   outline: 0 none;
 }
  
-blockquote.twitter-tweet a:hover,
-blockquote.twitter-tweet a:focus {
-  text-decoration: underline;
+blockquote.tweet-xl {
+   p {
+       font-size: 22px;
+       line-height: 25px;
+   }
+   a {
+       font-size: 22px;
+   }
+   @media (max-width: @screen-xs) {
+       p {
+           font-size: 17px;}
+       a {
+           font-size: 17px;
+       }
+   }
 }
- 
- blockquote.tweet-xl {
-     p {
-         font-size: 22px;
-         line-height: 25px;
-     }
-     a {
-         font-size: 22px;
-     }
- }

+ 750 - 13
transfersh-web/styles/main.css

@@ -622,7 +622,6 @@ address {
   font-style: normal;
   line-height: 1.42857143;
 }
-/* @import "../bower_components/bootstrap/less/code.less"; */
 .container {
   margin-right: auto;
   margin-left: auto;
@@ -1316,6 +1315,538 @@ address {
     margin-left: 0%;
   }
 }
+table {
+  max-width: 100%;
+  background-color: transparent;
+}
+th {
+  text-align: left;
+}
+.table {
+  width: 100%;
+  margin-bottom: 20px;
+}
+.table > thead > tr > th,
+.table > tbody > tr > th,
+.table > tfoot > tr > th,
+.table > thead > tr > td,
+.table > tbody > tr > td,
+.table > tfoot > tr > td {
+  padding: 8px;
+  line-height: 1.42857143;
+  vertical-align: top;
+  border-top: 1px solid #dddddd;
+}
+.table > thead > tr > th {
+  vertical-align: bottom;
+  border-bottom: 2px solid #dddddd;
+}
+.table > caption + thead > tr:first-child > th,
+.table > colgroup + thead > tr:first-child > th,
+.table > thead:first-child > tr:first-child > th,
+.table > caption + thead > tr:first-child > td,
+.table > colgroup + thead > tr:first-child > td,
+.table > thead:first-child > tr:first-child > td {
+  border-top: 0;
+}
+.table > tbody + tbody {
+  border-top: 2px solid #dddddd;
+}
+.table .table {
+  background-color: #ffffff;
+}
+.table-condensed > thead > tr > th,
+.table-condensed > tbody > tr > th,
+.table-condensed > tfoot > tr > th,
+.table-condensed > thead > tr > td,
+.table-condensed > tbody > tr > td,
+.table-condensed > tfoot > tr > td {
+  padding: 5px;
+}
+.table-bordered {
+  border: 1px solid #dddddd;
+}
+.table-bordered > thead > tr > th,
+.table-bordered > tbody > tr > th,
+.table-bordered > tfoot > tr > th,
+.table-bordered > thead > tr > td,
+.table-bordered > tbody > tr > td,
+.table-bordered > tfoot > tr > td {
+  border: 1px solid #dddddd;
+}
+.table-bordered > thead > tr > th,
+.table-bordered > thead > tr > td {
+  border-bottom-width: 2px;
+}
+.table-striped > tbody > tr:nth-child(odd) > td,
+.table-striped > tbody > tr:nth-child(odd) > th {
+  background-color: #f9f9f9;
+}
+.table-hover > tbody > tr:hover > td,
+.table-hover > tbody > tr:hover > th {
+  background-color: #f5f5f5;
+}
+table col[class*="col-"] {
+  position: static;
+  float: none;
+  display: table-column;
+}
+table td[class*="col-"],
+table th[class*="col-"] {
+  float: none;
+  display: table-cell;
+}
+.table > thead > tr > .active,
+.table > tbody > tr > .active,
+.table > tfoot > tr > .active,
+.table > thead > .active > td,
+.table > tbody > .active > td,
+.table > tfoot > .active > td,
+.table > thead > .active > th,
+.table > tbody > .active > th,
+.table > tfoot > .active > th {
+  background-color: #f5f5f5;
+}
+.table-hover > tbody > tr > .active:hover,
+.table-hover > tbody > .active:hover > td,
+.table-hover > tbody > .active:hover > th {
+  background-color: #e8e8e8;
+}
+.table > thead > tr > .success,
+.table > tbody > tr > .success,
+.table > tfoot > tr > .success,
+.table > thead > .success > td,
+.table > tbody > .success > td,
+.table > tfoot > .success > td,
+.table > thead > .success > th,
+.table > tbody > .success > th,
+.table > tfoot > .success > th {
+  background-color: #dff0d8;
+}
+.table-hover > tbody > tr > .success:hover,
+.table-hover > tbody > .success:hover > td,
+.table-hover > tbody > .success:hover > th {
+  background-color: #d0e9c6;
+}
+.table > thead > tr > .danger,
+.table > tbody > tr > .danger,
+.table > tfoot > tr > .danger,
+.table > thead > .danger > td,
+.table > tbody > .danger > td,
+.table > tfoot > .danger > td,
+.table > thead > .danger > th,
+.table > tbody > .danger > th,
+.table > tfoot > .danger > th {
+  background-color: #f2dede;
+}
+.table-hover > tbody > tr > .danger:hover,
+.table-hover > tbody > .danger:hover > td,
+.table-hover > tbody > .danger:hover > th {
+  background-color: #ebcccc;
+}
+.table > thead > tr > .warning,
+.table > tbody > tr > .warning,
+.table > tfoot > tr > .warning,
+.table > thead > .warning > td,
+.table > tbody > .warning > td,
+.table > tfoot > .warning > td,
+.table > thead > .warning > th,
+.table > tbody > .warning > th,
+.table > tfoot > .warning > th {
+  background-color: #fcf8e3;
+}
+.table-hover > tbody > tr > .warning:hover,
+.table-hover > tbody > .warning:hover > td,
+.table-hover > tbody > .warning:hover > th {
+  background-color: #faf2cc;
+}
+@media (max-width: 767px) {
+  .table-responsive {
+    width: 100%;
+    margin-bottom: 15px;
+    overflow-y: hidden;
+    overflow-x: scroll;
+    -ms-overflow-style: -ms-autohiding-scrollbar;
+    border: 1px solid #dddddd;
+    -webkit-overflow-scrolling: touch;
+  }
+  .table-responsive > .table {
+    margin-bottom: 0;
+  }
+  .table-responsive > .table > thead > tr > th,
+  .table-responsive > .table > tbody > tr > th,
+  .table-responsive > .table > tfoot > tr > th,
+  .table-responsive > .table > thead > tr > td,
+  .table-responsive > .table > tbody > tr > td,
+  .table-responsive > .table > tfoot > tr > td {
+    white-space: nowrap;
+  }
+  .table-responsive > .table-bordered {
+    border: 0;
+  }
+  .table-responsive > .table-bordered > thead > tr > th:first-child,
+  .table-responsive > .table-bordered > tbody > tr > th:first-child,
+  .table-responsive > .table-bordered > tfoot > tr > th:first-child,
+  .table-responsive > .table-bordered > thead > tr > td:first-child,
+  .table-responsive > .table-bordered > tbody > tr > td:first-child,
+  .table-responsive > .table-bordered > tfoot > tr > td:first-child {
+    border-left: 0;
+  }
+  .table-responsive > .table-bordered > thead > tr > th:last-child,
+  .table-responsive > .table-bordered > tbody > tr > th:last-child,
+  .table-responsive > .table-bordered > tfoot > tr > th:last-child,
+  .table-responsive > .table-bordered > thead > tr > td:last-child,
+  .table-responsive > .table-bordered > tbody > tr > td:last-child,
+  .table-responsive > .table-bordered > tfoot > tr > td:last-child {
+    border-right: 0;
+  }
+  .table-responsive > .table-bordered > tbody > tr:last-child > th,
+  .table-responsive > .table-bordered > tfoot > tr:last-child > th,
+  .table-responsive > .table-bordered > tbody > tr:last-child > td,
+  .table-responsive > .table-bordered > tfoot > tr:last-child > td {
+    border-bottom: 0;
+  }
+}
+fieldset {
+  padding: 0;
+  margin: 0;
+  border: 0;
+}
+legend {
+  display: block;
+  width: 100%;
+  padding: 0;
+  margin-bottom: 20px;
+  font-size: 21px;
+  line-height: inherit;
+  color: #333333;
+  border: 0;
+  border-bottom: 1px solid #e5e5e5;
+}
+label {
+  display: inline-block;
+  margin-bottom: 5px;
+  font-weight: bold;
+}
+input[type="search"] {
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+}
+input[type="radio"],
+input[type="checkbox"] {
+  margin: 4px 0 0;
+  margin-top: 1px \9;
+  /* IE8-9 */
+  line-height: normal;
+}
+input[type="file"] {
+  display: block;
+}
+select[multiple],
+select[size] {
+  height: auto;
+}
+select optgroup {
+  font-size: inherit;
+  font-style: inherit;
+  font-family: inherit;
+}
+input[type="file"]:focus,
+input[type="radio"]:focus,
+input[type="checkbox"]:focus {
+  outline: thin dotted;
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px;
+}
+input[type="number"]::-webkit-outer-spin-button,
+input[type="number"]::-webkit-inner-spin-button {
+  height: auto;
+}
+output {
+  display: block;
+  padding-top: 7px;
+  font-size: 14px;
+  line-height: 1.42857143;
+  color: #555555;
+  vertical-align: middle;
+}
+.form-control {
+  display: block;
+  width: 100%;
+  height: 34px;
+  padding: 6px 12px;
+  font-size: 14px;
+  line-height: 1.42857143;
+  color: #555555;
+  vertical-align: middle;
+  background-color: #ffffff;
+  background-image: none;
+  border: 1px solid #cccccc;
+  border-radius: 4px;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+  transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+}
+.form-control:focus {
+  border-color: #66afe9;
+  outline: 0;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
+  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
+}
+.form-control:-moz-placeholder {
+  color: #999999;
+}
+.form-control::-moz-placeholder {
+  color: #999999;
+  opacity: 1;
+}
+.form-control:-ms-input-placeholder {
+  color: #999999;
+}
+.form-control::-webkit-input-placeholder {
+  color: #999999;
+}
+.form-control[disabled],
+.form-control[readonly],
+fieldset[disabled] .form-control {
+  cursor: not-allowed;
+  background-color: #eeeeee;
+}
+textarea.form-control {
+  height: auto;
+}
+.form-group {
+  margin-bottom: 15px;
+}
+.radio,
+.checkbox {
+  display: block;
+  min-height: 20px;
+  margin-top: 10px;
+  margin-bottom: 10px;
+  padding-left: 20px;
+  vertical-align: middle;
+}
+.radio label,
+.checkbox label {
+  display: inline;
+  margin-bottom: 0;
+  font-weight: normal;
+  cursor: pointer;
+}
+.radio input[type="radio"],
+.radio-inline input[type="radio"],
+.checkbox input[type="checkbox"],
+.checkbox-inline input[type="checkbox"] {
+  float: left;
+  margin-left: -20px;
+}
+.radio + .radio,
+.checkbox + .checkbox {
+  margin-top: -5px;
+}
+.radio-inline,
+.checkbox-inline {
+  display: inline-block;
+  padding-left: 20px;
+  margin-bottom: 0;
+  vertical-align: middle;
+  font-weight: normal;
+  cursor: pointer;
+}
+.radio-inline + .radio-inline,
+.checkbox-inline + .checkbox-inline {
+  margin-top: 0;
+  margin-left: 10px;
+}
+input[type="radio"][disabled],
+input[type="checkbox"][disabled],
+.radio[disabled],
+.radio-inline[disabled],
+.checkbox[disabled],
+.checkbox-inline[disabled],
+fieldset[disabled] input[type="radio"],
+fieldset[disabled] input[type="checkbox"],
+fieldset[disabled] .radio,
+fieldset[disabled] .radio-inline,
+fieldset[disabled] .checkbox,
+fieldset[disabled] .checkbox-inline {
+  cursor: not-allowed;
+}
+.input-sm {
+  height: 30px;
+  padding: 5px 10px;
+  font-size: 12px;
+  line-height: 1.5;
+  border-radius: 3px;
+}
+select.input-sm {
+  height: 30px;
+  line-height: 30px;
+}
+textarea.input-sm {
+  height: auto;
+}
+.input-lg {
+  height: 46px;
+  padding: 10px 16px;
+  font-size: 18px;
+  line-height: 1.33;
+  border-radius: 6px;
+}
+select.input-lg {
+  height: 46px;
+  line-height: 46px;
+}
+textarea.input-lg {
+  height: auto;
+}
+.has-warning .help-block,
+.has-warning .control-label,
+.has-warning .radio,
+.has-warning .checkbox,
+.has-warning .radio-inline,
+.has-warning .checkbox-inline {
+  color: #8a6d3b;
+}
+.has-warning .form-control {
+  border-color: #8a6d3b;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+.has-warning .form-control:focus {
+  border-color: #66512c;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;
+}
+.has-warning .input-group-addon {
+  color: #8a6d3b;
+  border-color: #8a6d3b;
+  background-color: #fcf8e3;
+}
+.has-error .help-block,
+.has-error .control-label,
+.has-error .radio,
+.has-error .checkbox,
+.has-error .radio-inline,
+.has-error .checkbox-inline {
+  color: #a94442;
+}
+.has-error .form-control {
+  border-color: #a94442;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+.has-error .form-control:focus {
+  border-color: #843534;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
+}
+.has-error .input-group-addon {
+  color: #a94442;
+  border-color: #a94442;
+  background-color: #f2dede;
+}
+.has-success .help-block,
+.has-success .control-label,
+.has-success .radio,
+.has-success .checkbox,
+.has-success .radio-inline,
+.has-success .checkbox-inline {
+  color: #3c763d;
+}
+.has-success .form-control {
+  border-color: #3c763d;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+.has-success .form-control:focus {
+  border-color: #2b542c;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;
+}
+.has-success .input-group-addon {
+  color: #3c763d;
+  border-color: #3c763d;
+  background-color: #dff0d8;
+}
+.form-control-static {
+  margin-bottom: 0;
+}
+.help-block {
+  display: block;
+  margin-top: 5px;
+  margin-bottom: 10px;
+  color: #7b7b7b;
+}
+@media (min-width: 768px) {
+  .form-inline .form-group {
+    display: inline-block;
+    margin-bottom: 0;
+    vertical-align: middle;
+  }
+  .form-inline .form-control {
+    display: inline-block;
+  }
+  .form-inline select.form-control {
+    width: auto;
+  }
+  .form-inline .radio,
+  .form-inline .checkbox {
+    display: inline-block;
+    margin-top: 0;
+    margin-bottom: 0;
+    padding-left: 0;
+  }
+  .form-inline .radio input[type="radio"],
+  .form-inline .checkbox input[type="checkbox"] {
+    float: none;
+    margin-left: 0;
+  }
+}
+.form-horizontal .control-label,
+.form-horizontal .radio,
+.form-horizontal .checkbox,
+.form-horizontal .radio-inline,
+.form-horizontal .checkbox-inline {
+  margin-top: 0;
+  margin-bottom: 0;
+  padding-top: 7px;
+}
+.form-horizontal .radio,
+.form-horizontal .checkbox {
+  min-height: 27px;
+}
+.form-horizontal .form-group {
+  margin-left: -35px;
+  margin-right: -35px;
+}
+.form-horizontal .form-group:before,
+.form-horizontal .form-group:after {
+  content: " ";
+  display: table;
+}
+.form-horizontal .form-group:after {
+  clear: both;
+}
+.form-horizontal .form-group:before,
+.form-horizontal .form-group:after {
+  content: " ";
+  display: table;
+}
+.form-horizontal .form-group:after {
+  clear: both;
+}
+.form-horizontal .form-control-static {
+  padding-top: 7px;
+}
+@media (min-width: 768px) {
+  .form-horizontal .control-label {
+    text-align: right;
+  }
+}
 .fade {
   opacity: 0;
   -webkit-transition: opacity 0.15s linear;
@@ -5358,6 +5889,10 @@ body {
   -o-animation-duration: 0.75s;
   animation-duration: 0.75s;
 }
+body {
+  max-width: 2000px;
+  margin: 0 auto;
+}
 .browsehappy {
   margin: 0.2em 0;
   background: orange;
@@ -5369,8 +5904,8 @@ body {
 }
 #navigation ul {
   list-style: none;
-  max-width: 300px;
-  margin: 0 auto;
+  max-width: 400px;
+  marghomein: 0 auto;
 }
 #navigation li {
   display: inline-block;
@@ -5397,12 +5932,12 @@ body {
   font-size: 15px;
   color: #3b3b3b;
 }
-h2 {
+.page-title {
   text-align: center;
   font-size: 35px;
 }
 @media (min-width: 768px) {
-  h2 {
+  .page-title {
     font-size: 50px;
   }
 }
@@ -5482,17 +6017,17 @@ a:hover {
 #home {
   text-align: center;
 }
-#home h2 {
+#home .page-title {
   font-size: 30px;
 }
 @media (min-width: 768px) {
   #home {
     padding: 50px;
   }
-  #home h2 {
+  #home .page-title {
     font-size: 45px;
     margin-top: -20px;
-    margin-bottom: 45px;
+    margin-bottom: 20px;
   }
 }
 #home .btn-home {
@@ -5561,6 +6096,9 @@ a:hover {
   backbground-repeat: no-repeat;
   background-size: cover;
 }
+.terminal a {
+  color: #ffffff;
+}
 .terminal-top {
   border-top-right-radius: 5px;
   border-top-left-radius: 5px;
@@ -5571,6 +6109,7 @@ a:hover {
 }
 .upload-progress {
   max-width: 80%;
+  padding-top: 4px;
 }
 .upload-progress .bar {
   word-wrap: normal;
@@ -5603,7 +6142,7 @@ a:hover {
   font-size: 100px;
 }
 #samples {
-  padding: 50px 0;
+  padding: 75px 0;
   text-align: center;
 }
 #samples h4 {
@@ -5643,6 +6182,23 @@ a:hover {
   color: #fff;
   text-decoration: none;
 }
+#github {
+  text-align: center;
+  padding: 50px 0;
+}
+#tor {
+  text-align: center;
+  background: #f6f8f8;
+  padding: 50px 0;
+}
+#tor img {
+  max-width: 100px;
+  margin: 0 auto;
+  margin-bottom: 10px;
+}
+#tor a {
+  font-size: 20px;
+}
 footer {
   text-align: center;
   background: #36535a;
@@ -5720,10 +6276,6 @@ blockquote.twitter-tweet a {
   text-decoration: none;
   outline: 0 none;
 }
-blockquote.twitter-tweet a:hover,
-blockquote.twitter-tweet a:focus {
-  text-decoration: underline;
-}
 blockquote.tweet-xl p {
   font-size: 22px;
   line-height: 25px;
@@ -5731,6 +6283,14 @@ blockquote.tweet-xl p {
 blockquote.tweet-xl a {
   font-size: 22px;
 }
+@media (max-width: 480px) {
+  blockquote.tweet-xl p {
+    font-size: 17px;
+  }
+  blockquote.tweet-xl a {
+    font-size: 17px;
+  }
+}
 @font-face {
   font-family: "transfersh";
   src: url("../fonts/transfersh.eot");
@@ -5807,4 +6367,181 @@ blockquote.tweet-xl a {
 .icon-gplus:before {
   content: "p";
 }
+.preview-wrapper {
+  padding-bottom: 30px;
+}
+html {
+  min-height: 100%;
+}
+#download {
+  position: static;
+}
+#download footer {
+  bottom: 0;
+  left: 0;
+  width: 100%;
+  position: absolute;
+  z-index: -1;
+}
+.preview-image {
+  padding: 0;
+  padding: 0px;
+}
+.preview-image img {
+  margin: 0 auto;
+  display: block;
+  max-width: 800px;
+  max-width: 100%;
+}
+.overlay {
+  position: fixed;
+  z-index: 100;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background-color: rgba(0, 0, 0, 0.1);
+  visibility: hidden;
+  opacity: 0;
+  transition: opacity 0.2s ease;
+}
+.active .overlay {
+  visibility: visible;
+  opacity: 1;
+}
+.copy-link-wrapper {
+  z-index: 200;
+  padding: 2em;
+  position: fixed;
+  top: 50%;
+  left: 50%;
+  width: 50%;
+  max-width: 500px;
+  min-width: 300px;
+  background-color: #85b5bb;
+  border-radius: 2px;
+  transform: translateX(-50%) translateY(-50%);
+  transition: opacity 0.2s ease;
+  clip: rect(1px 1px 1px 1px);
+  opacity: 0;
+  top: -9999999px;
+  left: -9999999px;
+}
+.active .copy-link-wrapper {
+  clip: auto;
+  opacity: 1;
+  top: 50%;
+  left: 50%;
+}
+.copy-link-wrapper p {
+  font-size: 20px;
+  color: #fff;
+}
+.copy-link-wrapper input {
+  background-color: #f6f8f8;
+  color: #3b3b3b;
+  border: 0;
+  font-size: 1em;
+  padding: 1em;
+  margin: 0;
+  width: 100%;
+  border-radius: 2px;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+.copy-link-wrapper .error {
+  text-align: center;
+  color: #E7483B;
+  display: block;
+  padding: 0.5em;
+}
+#md-preview {
+  padding-bottom: 30px;
+}
+video {
+  margin: 0 auto;
+  width: 100%;
+}
+.wrap {
+  width: 40%;
+  height: 40%;
+  margin: 20px auto;
+}
+video {
+  width: 100%;
+}
+video::-webkit-media-controls-enclosure {
+  padding: 0px;
+  height: 50px;
+}
+video::-webkit-media-controls-panel {
+  opacity: 1 !important;
+  display: -webkit-flex !important;
+  margin-top: 50px;
+  height: 50px;
+  background-color: #36535a;
+  border-radius: 0 0 10px 10px;
+}
+video::-webkit-media-controls-timeline {
+  height: 12px;
+  padding: 0px;
+  border: 0px;
+}
+video::-webkit-media-controls-volume-slider,
+video::-webkit-media-controls-timeline {
+  height: 12px;
+  border-radius: 5px;
+  min-width: 15px;
+}
+video::-webkit-media-controls-volume-slider::-webkit-media-slider-container,
+video::-webkit-media-controls-timeline::-webkit-media-slider-container {
+  border: 0px;
+  border-radius: 5px;
+  background-color: #85b5bb;
+  cursor: pointer;
+}
+::-webkit-media-slider-thumb {
+  -webkit-appearance: none;
+  background: red;
+}
+video::-webkit-media-controls-play-button {
+  cursor: pointer;
+}
+video::-webkit-media-controls-play-button:hover {
+  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";
+  filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70);
+  opacity: 0.7;
+}
+video::-webkit-media-controls-fullscreen-button {
+  -webkit-appearance: none;
+  background-color: transparent;
+  cursor: pointer;
+  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAABACAYAAADF2C3zAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo2N0Q1MjA3MDc5NjYxMUUyQjQzRjk5Mjc1MTU5Qjk0NSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo2N0Q1MjA3MTc5NjYxMUUyQjQzRjk5Mjc1MTU5Qjk0NSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkQyQkE2QUZGNzkzQjExRTJCNDNGOTkyNzUxNTlCOTQ1IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkQyQkE2QjAwNzkzQjExRTJCNDNGOTkyNzUxNTlCOTQ1Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+1z7uaAAAAVhJREFUeNrsljFuAjEQRb3ACZByii2pECmgySFIGoiUGsEKiaQAimwTToCggSYSNUoJHSfgFJwhMt9oHBlj8Ga2SAqP9KQV7PPY4y1+9PDYEZ4agaHrj4Lwl5LHXFkvsOXKatt1jjykzrq2WeW+Jb6Bhp5BySOvQQLuaKEPYwYnOQLSkpTwBfbUqQam9hDVtieOyaoOGxDTAtNrV9UFqTEc/UGUQeXWmfSZB6BqXMc3aIFlFllY4hP49N2h66p2YJXly3HJ92ABihxZVRPM6BqvViSlFNwqiBwV5CAHOchBDnKQ/5/si4/iOUn5YX0+ec0X1mkBXljH1nlhncTfh3WIF2EdR/gJ677OKqwfdOqHmJ4Nsd17PwU5E/yWgJieY/Biv6MoUVjvOe61j+cGuuwpsLvDOl5KjeFkDusRtiSNKZ6FdXTlhXWIfxTWcf58YR0L3AzrRwEGAJoOgCMfh6hiAAAAAElFTkSuQmCC);
+  background-size: 16px 64px;
+  background-position: center 8px;
+  background-repeat: no-repeat;
+}
+video::-webkit-media-controls-mute-button {
+  -webkit-appearance: none;
+  background-color: transparent;
+  cursor: pointer;
+  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAABACAYAAAATffeWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo2N0Q1MjA3NDc5NjYxMUUyQjQzRjk5Mjc1MTU5Qjk0NSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo2N0Q1MjA3NTc5NjYxMUUyQjQzRjk5Mjc1MTU5Qjk0NSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjY3RDUyMDcyNzk2NjExRTJCNDNGOTkyNzUxNTlCOTQ1IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjY3RDUyMDczNzk2NjExRTJCNDNGOTkyNzUxNTlCOTQ1Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Gp0GRAAAATdJREFUeNpidIsuYMABwoF4BhCvB+IkXIqYcIj7APEiIBYA4jg0OREgLsJnQAgQrwJiNiifGU3eFIi7gDgPxGEBYnYg1gBiDqizQX5ixOEyCyDeC8SNQNwJxJtABuwHYksGwoAR6q3tQFwKxGlAnMtEpGYQ+A+1NROI+aDedGdiIA2sAWJWaDhcBGIVUg1ABqz4ohEXAMXQbyA+DcRaQHwHZMBxIjWDArEcmrg+AXEYEO8ExYIjUjRGQuOXEUcgghLVOahBoAQ1GWTAT2iAgMBJID4BxPOhBqIDkJwnENcDcQkQP8AWBiuAOBiIf0H5f9HkT0NdMAFfIG4D4gggfgtNPMjgDRD3wgPm////DJSAUQNGDRg1YNSAUQNGDRg1YNSA4WhAUnHraI9ltMcy2mMZDD0WgAADADYlybDQKXdAAAAAAElFTkSuQmCC);
+  background-size: 16px 64px;
+  background-position: center 8px;
+  background-repeat: no-repeat;
+}
+video::-webkit-media-controls-fullscreen-button:hover {
+  -webkit-appearance: none;
+  background-position: center -42px;
+}
+video::-webkit-media-controls-mute-button:hover {
+  -webkit-appearance: none;
+  background-position: center -43px;
+}
+video::-webkit-media-controls-current-time-display,
+video::-webkit-media-controls-time-remaining-display {
+  font-size: 13px;
+  font-weight: normal;
+}
 /*# sourceMappingURL=/styles/main.css.map */

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
transfersh-web/styles/main.css.map


+ 1 - 0
transfersh-web/styles/main.less

@@ -9,5 +9,6 @@
 @import "includes/pages";
 @import "includes/reviews";
 @import "includes/transfersh-icons";
+@import "includes/preview";
 
 

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio