mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2020-11-18 19:53:40 -08:00
highlite.js added
This commit is contained in:
parent
2d0dac5946
commit
d3e6ac8cc4
@ -62,7 +62,8 @@
|
|||||||
<div id="from-terminal" class=" box col-md-6 col-xs-12">
|
<div id="from-terminal" class=" box col-md-6 col-xs-12">
|
||||||
<h3>Share from terminal</h3>
|
<h3>Share from terminal</h3>
|
||||||
<div id="terminal">
|
<div id="terminal">
|
||||||
<p style='white-space:pre'></p>
|
<pre>
|
||||||
|
<code id="terminal-code" class="bash">ls this</code></pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="from-web" class="col-md-6 col-xs-12">
|
<div id="from-web" class="col-md-6 col-xs-12">
|
||||||
@ -148,11 +149,22 @@
|
|||||||
<h3>Make an alias</h3>
|
<h3>Make an alias</h3>
|
||||||
|
|
||||||
<h4>Create an alias, and add it to .bashrc for faster use</h4>
|
<h4>Create an alias, and add it to .bashrc for faster use</h4>
|
||||||
<code>$ transfer() { # write to output to tmpfile because of progress bar tmpfile=$( mktemp -t transfer ) curl --progress-bar --upload-file $1 https://transfer.sh/$(basename $1) >> $tmpfile; cat $tmpfile; rm -f $tmpfile; } alias transfer=transfer</code>
|
<pre>
|
||||||
|
<code id="terminal-code" class="bash">
|
||||||
|
# transfer.sh alias
|
||||||
|
# write output to tmpfile because of progress bar
|
||||||
|
$ transfer()
|
||||||
|
{
|
||||||
|
tmpfile=$( mktemp -t transfer )
|
||||||
|
curl --progress-bar --upload-file $1 https://transfer.sh/$(basename $1) >> $tmpfile; cat $tmpfile; rm -f $tmpfile; }
|
||||||
|
alias transfer=transfer
|
||||||
|
</code>
|
||||||
|
</pre>
|
||||||
|
|
||||||
<h4>Now you can just use
|
<h4>Now you can just use
|
||||||
<strong>transfer</strong>command</h4>
|
<strong>transfer</strong>command</h4>
|
||||||
<code>$transfer hello.txt</code>
|
<code>$transfer hello.txt</code>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -313,13 +325,15 @@
|
|||||||
|
|
||||||
<!-- build:js scripts/main.js -->
|
<!-- build:js scripts/main.js -->
|
||||||
<script src="bower_components/jquery/dist/jquery.js"></script>
|
<script src="bower_components/jquery/dist/jquery.js"></script>
|
||||||
<script src="bower_components/typed.js/js/typed.js"></script>
|
<script src="bower_components/highlightjs/highlight.pack.js"></script>
|
||||||
<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/typewriter-bundle.js"></script>
|
<script src="scripts/typewriter-bundle.js"></script>
|
||||||
<script src="scripts/main.js"></script>
|
<script src="scripts/main.js"></script>
|
||||||
<!-- endbuild -->
|
<!-- endbuild -->
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
hljs.initHighlightingOnLoad();
|
||||||
// Terminal typing animation
|
// Terminal typing animation
|
||||||
/* $("#from-terminal p").typed({
|
/* $("#from-terminal p").typed({
|
||||||
strings: ["curl --upload-file ./hello.txt https://transfer.sh/hello.txt\n######################################################\nhttps://transfer.sh/66nb8/hello.txt \n "],
|
strings: ["curl --upload-file ./hello.txt https://transfer.sh/hello.txt\n######################################################\nhttps://transfer.sh/66nb8/hello.txt \n "],
|
||||||
@ -16,7 +17,7 @@ $(document).ready(function() {
|
|||||||
*/
|
*/
|
||||||
var typewriter = require('typewriter');
|
var typewriter = require('typewriter');
|
||||||
|
|
||||||
var twSpan = document.getElementById('terminal');
|
var twSpan = document.getElementById('terminal-code');
|
||||||
|
|
||||||
var tw = typewriter(twSpan).withAccuracy(100)
|
var tw = typewriter(twSpan).withAccuracy(100)
|
||||||
.withMinimumSpeed(17)
|
.withMinimumSpeed(17)
|
||||||
@ -161,3 +162,5 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
@charset "UTF-8";
|
@charset "UTF-8";
|
||||||
|
@import "../bower_components/highlightjs/styles/zenburn.css";
|
||||||
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
|
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
|
||||||
article,
|
article,
|
||||||
aside,
|
aside,
|
||||||
|
File diff suppressed because one or more lines are too long
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
|
|
||||||
@import "../bower_components/animate.less/animate.less";
|
@import "../bower_components/animate.less/animate.less";
|
||||||
|
@import "../bower_components/highlightjs/styles/zenburn.css";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@import "config";
|
@import "config";
|
||||||
@import "includes/global";
|
@import "includes/global";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user