Procházet zdrojové kódy

working on preview functions

tags/v1.0.0
Remco před 9 roky
rodič
revize
01f8157187
20 změnil soubory, kde provedl 109 přidání a 135 odebrání
  1. +26
    -6
      transfersh-server/handlers.go
  2. +3
    -1
      transfersh-server/main.go
  3. +5
    -19
      transfersh-server/static/download.html
  4. +3
    -16
      transfersh-server/static/download.image.html
  5. +11
    -4
      transfersh-server/static/download.md.html
  6. +3
    -3
      transfersh-server/static/includes/footer.html
  7. +2
    -2
      transfersh-server/static/includes/head.html
  8. +1
    -1
      transfersh-server/static/includes/js.html
  9. +26
    -14
      transfersh-server/static/index.html
  10. +1
    -1
      transfersh-server/static/styles/main.css
  11. +2
    -2
      transfersh-web/download.code.html
  12. +4
    -0
      transfersh-web/download.html
  13. +4
    -0
      transfersh-web/download.md.html
  14. +3
    -3
      transfersh-web/includes/footer.html
  15. +2
    -2
      transfersh-web/includes/head.html
  16. +3
    -3
      transfersh-web/includes/js.html
  17. +7
    -3
      transfersh-web/scripts/clipboard.js
  18. +1
    -54
      transfersh-web/styles/includes/home.less
  19. +1
    -0
      transfersh-web/styles/main.css
  20. +1
    -1
      transfersh-web/styles/main.css.map

+ 26
- 6
transfersh-server/handlers.go Zobrazit soubor

@@ -37,6 +37,7 @@ import (
"github.com/dutchcoders/go-clamd" "github.com/dutchcoders/go-clamd"
"github.com/gorilla/mux" "github.com/gorilla/mux"
"github.com/kennygrant/sanitize" "github.com/kennygrant/sanitize"
"github.com/russross/blackfriday"
html_template "html/template" html_template "html/template"
"io" "io"
"io/ioutil" "io/ioutil"
@@ -58,23 +59,40 @@ func healthHandler(w http.ResponseWriter, r *http.Request) {


/* The preview handler will show a preview of the content for browsers (accept type text/html), and referer is not transfer.sh */ /* 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 previewHandler(w http.ResponseWriter, r *http.Request) {
log.Printf("preview")


vars := mux.Vars(r) vars := mux.Vars(r)


token := vars["token"] token := vars["token"]
filename := vars["filename"] filename := vars["filename"]


reader, contentType, contentLength, err := storage.Get(token, filename)
contentType, contentLength, err := storage.Head(token, filename)
if err != nil { if err != nil {
http.Error(w, http.StatusText(404), 404)
} }


reader.Close()

templatePath := "static/download.html"
var templatePath string
var content html_template.HTML


if strings.HasPrefix(contentType, "image") {
switch {
case strings.HasPrefix(contentType, "image/"):
templatePath = "static/download.image.html" templatePath = "static/download.image.html"
case strings.HasPrefix(contentType, "text/x-markdown"):
templatePath = "static/download.md.html"
var reader io.ReadCloser
if reader, _, _, err = storage.Get(token, filename); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)

}
var data []byte
if data, err = ioutil.ReadAll(reader); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
}
output := blackfriday.MarkdownCommon(data)
content = html_template.HTML(output)
case strings.HasPrefix(contentType, "text/"):
templatePath = "static/download.md.html"
default:
templatePath = "static/download.html"
} }


tmpl, err := html_template.ParseFiles(templatePath) tmpl, err := html_template.ParseFiles(templatePath)
@@ -86,11 +104,13 @@ func previewHandler(w http.ResponseWriter, r *http.Request) {


data := struct { data := struct {
ContentType string ContentType string
Content html_template.HTML
Filename string Filename string
Url string Url string
ContentLength uint64 ContentLength uint64
}{ }{
contentType, contentType,
content,
filename, filename,
r.URL.String(), r.URL.String(),
contentLength, contentLength,


+ 3
- 1
transfersh-server/main.go Zobrazit soubor

@@ -33,6 +33,7 @@ import (
"github.com/gorilla/mux" "github.com/gorilla/mux"
"log" "log"
"math/rand" "math/rand"
"mime"
"net/http" "net/http"
"net/url" "net/url"
"os" "os"
@@ -97,7 +98,6 @@ func main() {


match = match || (u.Host == "127.0.0.1") match = match || (u.Host == "127.0.0.1")


log.Printf("%s %s match %s", r.Referer(), u.Host, match)
return match return match
}).Methods("GET") }).Methods("GET")


@@ -153,6 +153,8 @@ func main() {
log.Panic("Error while creating storage.") log.Panic("Error while creating storage.")
} }


mime.AddExtensionType(".md", "text/x-markdown")

log.Printf("Transfer.sh server started. :%v using temp folder: %s", *port, config.Temp) log.Printf("Transfer.sh server started. :%v using temp folder: %s", *port, config.Temp)
log.Printf("---------------------------") log.Printf("---------------------------")




+ 5
- 19
transfersh-server/static/download.html Zobrazit soubor

@@ -13,12 +13,13 @@
<meta name="description" content="Easy and fast file sharing from the command-line."> <meta name="description" content="Easy and fast file sharing from the command-line.">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory --> <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<link rel="stylesheet" href="styles/main.css">
<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=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'> <link href='//fonts.googleapis.com/css?family=Droid+Sans+Mono' rel='stylesheet' type='text/css'>
<script src="scripts/vendor/modernizr.js"></script>
<script src="/scripts/vendor/modernizr.js"></script>
</head> </head>



<body id="download"> <body id="download">
<script> <script>
(function(i, s, o, g, r, a, m) { (function(i, s, o, g, r, a, m) {
@@ -52,22 +53,6 @@
</div> </div>
</div> </div>



<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"> <section id="home">
<div class="wrapper"> <div class="wrapper">
@@ -86,8 +71,9 @@
</div> </div>
</section> </section>
<script src="scripts/main.js"></script>
<script src="/scripts/main.js"></script>







+ 3
- 16
transfersh-server/static/download.image.html Zobrazit soubor

@@ -13,12 +13,13 @@
<meta name="description" content="Easy and fast file sharing from the command-line."> <meta name="description" content="Easy and fast file sharing from the command-line.">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory --> <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<link rel="stylesheet" href="styles/main.css">
<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=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'> <link href='//fonts.googleapis.com/css?family=Droid+Sans+Mono' rel='stylesheet' type='text/css'>
<script src="scripts/vendor/modernizr.js"></script> <script src="scripts/vendor/modernizr.js"></script>
</head> </head>



<body id="download"> <body id="download">
<script> <script>
(function(i, s, o, g, r, a, m) { (function(i, s, o, g, r, a, m) {
@@ -52,21 +53,6 @@
</div> </div>
</div> </div>


<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"> <section id="home">
<div class="wrapper"> <div class="wrapper">
<br/> <br/>
@@ -105,6 +91,7 @@
<script src="scripts/main.js"></script> <script src="scripts/main.js"></script>



</body> </body>


</html> </html>

+ 11
- 4
transfersh-server/static/download.md.html Zobrazit soubor

@@ -13,12 +13,13 @@
<meta name="description" content="Easy and fast file sharing from the command-line."> <meta name="description" content="Easy and fast file sharing from the command-line.">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory --> <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<link rel="stylesheet" href="styles/main.css">
<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=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'> <link href='//fonts.googleapis.com/css?family=Droid+Sans+Mono' rel='stylesheet' type='text/css'>
<script src="scripts/vendor/modernizr.js"></script> <script src="scripts/vendor/modernizr.js"></script>
</head> </head>



<body id="download"> <body id="download">
<script> <script>
(function(i, s, o, g, r, a, m) { (function(i, s, o, g, r, a, m) {
@@ -56,13 +57,17 @@
<div class="wrapper"> <div class="wrapper">
<h2> <h2>
{{.Filename}}</h2> {{.Filename}}</h2>
<h4>
Type: <b>{{.ContentType}}</b></h4>
<h4>
Length: <b>{{.ContentLength}}</b> bytes</h4>
<a href="{{.Url}}"></a> <a href="{{.Url}}"></a>
<div class="row animated fadeInDown"> <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 class="terminal-top">
</div> </div>
<div id="terminal" class="terminal"> <div id="terminal" class="terminal">
<div id="md-preview"></div>
<div id="md-preview">{{.Content}}</div>
</div> </div>
</div> </div>
</div> </div>
@@ -113,15 +118,17 @@
</script> </script>




<script src="scripts/main.js"></script>
<script src="/scripts/main.js"></script>

<script> <script>


var text = "# Markdown *works*.";
var text = $('#md-preview').html();


var converter = new Showdown.converter(); var converter = new Showdown.converter();
var html = converter.makeHtml(text); var html = converter.makeHtml(text);
$('#md-preview').empty();
$('#md-preview').append(html); $('#md-preview').append(html);


</script> </script>


+ 3
- 3
transfersh-server/static/includes/footer.html Zobrazit soubor

@@ -1,7 +1,7 @@
<footer> <footer>
<div class="wrapper"> <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>
<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> </p>
</div> </div>
</footer> </footer>
@@ -44,4 +44,4 @@
</script> </script>



+ 2
- 2
transfersh-server/static/includes/head.html Zobrazit soubor

@@ -5,8 +5,8 @@
<meta name="description" content="Easy and fast file sharing from the command-line."> <meta name="description" content="Easy and fast file sharing from the command-line.">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory --> <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<link rel="stylesheet" href="styles/main.css">
<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=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'> <link href='//fonts.googleapis.com/css?family=Droid+Sans+Mono' rel='stylesheet' type='text/css'>
<script src="scripts/vendor/modernizr.js"></script> <script src="scripts/vendor/modernizr.js"></script>
</head>
</head>

+ 1
- 1
transfersh-server/static/includes/js.html Zobrazit soubor

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

+ 26
- 14
transfersh-server/static/index.html Zobrazit soubor

@@ -13,13 +13,14 @@
<meta name="description" content="Easy and fast file sharing from the command-line."> <meta name="description" content="Easy and fast file sharing from the command-line.">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory --> <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<link rel="stylesheet" href="styles/main.css">
<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=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'> <link href='//fonts.googleapis.com/css?family=Droid+Sans+Mono' rel='stylesheet' type='text/css'>
<script src="scripts/vendor/modernizr.js"></script> <script src="scripts/vendor/modernizr.js"></script>
</head> </head>





<body> <body>


<script> <script>
@@ -78,7 +79,8 @@
<code> <code>
<br> <br>
<span class="code-title"># Upload from web</span> <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> </code>
<input type="file" multiple="multiple" style='display: none;' /> <input type="file" multiple="multiple" style='display: none;' />
<ul class='queue'> <ul class='queue'>
@@ -284,7 +286,7 @@
<br> <br>
<br> <br>


<iframe src="http://ghbtns.com/github-btn.html?user=dutchcoders&repo=transfer.sh&type=follow&count=true&size=large" allowtransparency="true" frameborder="0" scrolling="0" width="300" height="50"></iframe>
<iframe src="http://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="http://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> <iframe src="http://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> </div>
</section> </section>
@@ -294,23 +296,29 @@
<div class="row"> <div class="row">
<div class="col-md-8 col-md-offset-2 col-xs-12"> <div class="col-md-8 col-md-offset-2 col-xs-12">
<blockquote class="twitter-tweet tweet-xl" lang="en"> <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> <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"> <a href="https://twitter.com/FloifyDave/status/517383101425516544">
&mdash; Dave Sims (@FloifyDave)</a>
&mdash; Dave Sims (@FloifyDave)</a>
</blockquote> </blockquote>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-6 col-xs-12"> <div class="col-md-6 col-xs-12">
<blockquote class="twitter-tweet" lang="en"> <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> <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> </blockquote>
</div> </div>
<div class="col-md-6 col-xs-12"> <div class="col-md-6 col-xs-12">
<blockquote class="twitter-tweet" lang="en"> <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> <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> </blockquote>
</div> </div>
@@ -318,14 +326,18 @@
<div class="row"> <div class="row">
<div class="col-md-6 col-xs-12"> <div class="col-md-6 col-xs-12">
<blockquote class="twitter-tweet" lang="en"> <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>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> </p><a href="https://twitter.com/jacoblindgren11/status/516975006501203968">&mdash; Jacob Lindgren (@jacoblindgren11) </a>
</blockquote> </blockquote>
</div> </div>
<div class="col-md-6 col-xs-12"> <div class="col-md-6 col-xs-12">
<blockquote class="twitter-tweet" lang="en"> <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> <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> </blockquote>
</div> </div>
@@ -333,8 +345,6 @@
</div> </div>
</section> </section>




<section id="share"> <section id="share">
<div class="wrapper"> <div class="wrapper">
<h2>Share the love</h2> <h2>Share the love</h2>
@@ -379,8 +389,8 @@


<footer> <footer>
<div class="wrapper"> <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>
<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> </p>
</div> </div>
</footer> </footer>
@@ -425,11 +435,13 @@


<script src="scripts/main.js"></script>

<script src="/scripts/main.js"></script>









</body> </body>


+ 1
- 1
transfersh-server/static/styles/main.css
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 2
- 2
transfersh-web/download.code.html Zobrazit soubor

@@ -123,8 +123,8 @@
<script src="bower_components/uri.js/src/URI.min.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/transition.js"></script>
<script src="bower_components/bootstrap/js/collapse.js"></script> <script src="bower_components/bootstrap/js/collapse.js"></script>
<script src="scripts/showdown.js"></script>
<script src="scripts/main.js"></script>
<script src="/scripts/showdown.js"></script>
<script src="/scripts/main.js"></script>
<!-- endbuild --> <!-- endbuild -->
<script> <script>


+ 4
- 0
transfersh-web/download.html Zobrazit soubor

@@ -33,6 +33,10 @@ include "includes/head.html"
<br/> <br/>
<h2> <h2>
{{.Filename}}</h2> {{.Filename}}</h2>
<h4>
Type: <b>{{.ContentType}}</b></h4>
<h4>
Length: <b>{{.ContentLength}}</b> bytes</h4>
<div> <div>
<a href="#" id="copy-link-btn" class="btn-cta btn">copy link</a> &nbsp;&nbsp; <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> <a href="{{.Url}}" class="btn-cta btn"> download</i> </a>


+ 4
- 0
transfersh-web/download.md.html Zobrazit soubor

@@ -31,6 +31,10 @@ include "includes/head.html"
<div class="wrapper"> <div class="wrapper">
<h2> <h2>
{{.Filename}}</h2> {{.Filename}}</h2>
<h4>
Type: <b>{{.ContentType}}</b></h4>
<h4>
Length: <b>{{.ContentLength}}</b> bytes</h4>
<a href="{{.Url}}"></a> <a href="{{.Url}}"></a>
<div class="row animated fadeInDown"> <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">


+ 3
- 3
transfersh-web/includes/footer.html Zobrazit soubor

@@ -1,7 +1,7 @@
<footer> <footer>
<div class="wrapper"> <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>
<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> </p>
</div> </div>
</footer> </footer>
@@ -44,4 +44,4 @@
</script> </script>



+ 2
- 2
transfersh-web/includes/head.html Zobrazit soubor

@@ -5,10 +5,10 @@
<meta name="description" content="Easy and fast file sharing from the command-line."> <meta name="description" content="Easy and fast file sharing from the command-line.">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory --> <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<link rel="stylesheet" href="styles/main.css">
<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=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'> <link href='//fonts.googleapis.com/css?family=Droid+Sans+Mono' rel='stylesheet' type='text/css'>
<!-- build:js scripts/vendor/modernizr.js --> <!-- build:js scripts/vendor/modernizr.js -->
<script src="bower_components/modernizr/modernizr.js"></script> <script src="bower_components/modernizr/modernizr.js"></script>
<!-- endbuild --> <!-- endbuild -->
</head>
</head>

+ 3
- 3
transfersh-web/includes/js.html Zobrazit soubor

@@ -3,7 +3,7 @@
<script src="bower_components/uri.js/src/URI.min.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/transition.js"></script>
<script src="bower_components/bootstrap/js/collapse.js"></script> <script src="bower_components/bootstrap/js/collapse.js"></script>
<script src="scripts/showdown.js"></script>
<script src="scripts/main.js"></script>
<script src="/scripts/showdown.js"></script>
<script src="/scripts/main.js"></script>
<!-- endbuild --> <!-- endbuild -->

+ 7
- 3
transfersh-web/scripts/clipboard.js Zobrazit soubor

@@ -4,7 +4,8 @@
overlay = document.getElementById("overlay"); overlay = document.getElementById("overlay");


var url = "http://url" var url = "http://url"
copylinkbtn.addEventListener("click", function() {
copylinkbtn.addEventListener("click", function(e) {
e.preventDefault();
var error = document.getElementsByClassName('error'); var error = document.getElementsByClassName('error');
@@ -17,10 +18,13 @@
copylink.children[1].value = url; copylink.children[1].value = url;
copylink.children[1].focus(); copylink.children[1].focus();
copylink.children[1].select(); copylink.children[1].select();
return (false);
}, false); }, false);


overlay.addEventListener("click", function() {
overlay.addEventListener("click", function(e) {
e.preventDefault();
document.body.className = ''; document.body.className = '';
return (false);
}, false); }, false);


copylink.children[2].addEventListener("keydown", function(e) { copylink.children[2].addEventListener("keydown", function(e) {
@@ -54,4 +58,4 @@
} }
} }
}, false); }, false);
})();
})();

+ 1
- 54
transfersh-web/styles/includes/home.less Zobrazit soubor

@@ -81,60 +81,7 @@
background: url(../images/terminal-top.svg); background: url(../images/terminal-top.svg);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
height: 30px;<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">
<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>
</blockquote>
</div>
</div>
<div class="row">
<div class="col-md-6 col-xs-12">
<blockquote class="twitter-tweet" lang="en">
<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">
<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>
</div>
<div class="row">
<div class="col-md-6 col-xs-12">
<blockquote class="twitter-tweet" lang="en">
<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">
<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>
</div>
</div>
</section>

height: 30px;
} }


.upload-progress { .upload-progress {


+ 1
- 0
transfersh-web/styles/main.css Zobrazit soubor

@@ -6106,6 +6106,7 @@ a:hover {
} }
.upload-progress { .upload-progress {
max-width: 80%; max-width: 80%;
padding-top: 4px;
} }
.upload-progress .bar { .upload-progress .bar {
word-wrap: normal; word-wrap: normal;


+ 1
- 1
transfersh-web/styles/main.css.map
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


Načítá se…
Zrušit
Uložit