Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
徐佩楠 authored Dec 26, 2017
1 parent 04b3f28 commit 6d4709b
Show file tree
Hide file tree
Showing 37 changed files with 6,424 additions and 2 deletions.
24 changes: 24 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
source "https://rubygems.org"
ruby RUBY_VERSION

# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "3.2.1"

# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima"

# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins

# If you have any plugins, put them here!
# group :jekyll_plugins do
# gem "jekyll-github-metadata", "~> 1.0"
# end
48 changes: 48 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
GEM
remote: https://rubygems.org/
specs:
colorator (1.1.0)
ffi (1.9.14)
forwardable-extended (2.6.0)
jekyll (3.2.1)
colorator (~> 1.0)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.1)
kramdown (~> 1.3)
liquid (~> 3.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (~> 1.7)
safe_yaml (~> 1.0)
jekyll-sass-converter (1.4.0)
sass (~> 3.4)
jekyll-watch (1.5.0)
listen (~> 3.0, < 3.1)
kramdown (1.12.0)
liquid (3.0.6)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
mercenary (0.3.6)
minima (1.2.0)
pathutil (0.14.0)
forwardable-extended (~> 2.6)
rb-fsevent (0.9.7)
rb-inotify (0.9.7)
ffi (>= 0.5.0)
rouge (1.11.1)
safe_yaml (1.0.4)
sass (3.4.22)

PLATFORMS
ruby

DEPENDENCIES
jekyll (= 3.2.1)
minima

RUBY VERSION
ruby 2.3.1p112

BUNDLED WITH
1.13.1
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2016 Henrique Ferrolho

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,25 @@
# magnet-player
在线磁力链接,种子文件播放
# Magnet Player

**Magnet Player** is a site where anyone can stream torrents directly from their browser.

It uses **[WebTorrent](https://webtorrent.io/)** - the first torrent client that works in the browser. **WebTorrent** uses **[WebRTC](https://webrtc.org/)** for true peer-to-peer transport. No browser plugin, extension, or installation is required.

---

### Note

*In the browser, WebTorrent can only download torrents that are seeded by a WebRTC-capable torrent client.*

> What does that mean?
It means that, for now, not every torrent will work on this site.

> Why??
Because most people use native torrent clients like *BitTorrent*, *Transmission*, *μTorrent*, etc. which do not use the [WebRTC](https://en.wikipedia.org/wiki/WebRTC) transport protocol, but the [TCP](https://en.wikipedia.org/wiki/Transmission_Control_Protocol)/[uTP](https://en.wikipedia.org/wiki/Micro_Transport_Protocol).

> Will I be able to stream more torrents in the future?
**Yes!** It is just a matter of time until developers add WebTorrent support for the most popular native torrent clients. **[Vuze](http://www.vuze.com/)** [already has support](https://wiki.vuze.com/w/WebTorrent) for WebTorrent!

You can subscribe to [this issue](https://github.com/feross/webtorrent/issues/369) for updates on this matter.
28 changes: 28 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Welcome to Jekyll!
#
# This config file is meant for settings that affect your whole blog, values
# which you are expected to set up once and rarely edit after that. If you find
# yourself editing these this file very often, consider using Jekyll's data files
# feature for the data you need to update frequently.
#
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'jekyll serve'. If you change this file, please restart the server process.

# Site settings
# These are used to personalize your new site. If you look in the HTML files,
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
# You can create any custom variable you would like, and they will be accessible
# in the templates via {{ site.myvariable }}.
title: Magnet Player
author: Henrique Ferrolho
email: [email protected]
description: > # this means to ignore newlines until "baseurl:"
A place for streaming torrents directly from your browser.
baseurl: "/magnet-player" # the subpath of your site, e.g. /blog
url: "https://www.vmgirls.com/" # the base hostname & protocol for your site
twitter_username: vmgirls
github_username: Nanpay

# Build settings
markdown: kramdown
theme: minima
25 changes: 25 additions & 0 deletions _includes/disqus_comments.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{% if page.comments != false and jekyll.environment == "production" %}
{% if site.url %}
{% assign disqus_url = page.url | prepend: site.url %}
{% elsif site.github.url %}
{% assign disqus_url = page.url | prepend: site.github.url %}
{% endif %}

<div id="disqus_thread"></div>
<script>
var disqus_config = function () {
this.page.url = '{{ disqus_url }}';
this.page.identifier = '{{ disqus_url }}';
};

(function() {
var d = document, s = d.createElement('script');

s.src = 'https://{{ site.disqus.shortname }}.disqus.com/embed.js';

s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
{% endif %}
46 changes: 46 additions & 0 deletions _includes/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<footer class="site-footer">

<div class="wrapper">

<h2 class="footer-heading">{{ site.title | escape }}</h2>

<div class="footer-col-wrapper">
<div class="footer-col footer-col-1">
<ul class="contact-list">
<li>
{% if site.author %}
© 2016 {{ site.author | escape }}
{% else %}
{{ site.title | escape }}
{% endif %}
</li>
<li><a href="mailto:{{ site.email }}">{{ site.email }}</a></li>
</ul>
</div>

<div class="footer-col footer-col-2">
<ul class="social-media-list">
{% if site.github_username %}
<li>
{% include icon-github.html username=site.github_username %}
</li>
{% endif %}

{% if site.twitter_username %}
<li>
{% include icon-twitter.html username=site.twitter_username %}
</li>
{% endif %}
</ul>
</div>

<div class="footer-col footer-col-3">
<p>{{ site.description | escape }}</p>
</div>
</div>

<p><small>Powered by <a href="http://webtorrent.io" target="_blank">WebTorrent</a>。适配 Chrome,Firefox,和 Opera 等主流浏览器。开源代码由 <a href="https://github.com/Nanpay/magnet-player" target="_blank">GitHub</a>提供。 100% 开源免费。</small></p>

</div>

</footer>
11 changes: 11 additions & 0 deletions _includes/google-analytics.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<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','https://www.google-analytics.com/analytics.js','ga');

ga('create', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview');

</script>

27 changes: 27 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="theme-color" content="#bf1717">

<meta property="og:image" content="{{ site.url }}{{ site.baseurl }}/assets/thumbnail.png">

<link rel="icon" href="{{ site.baseurl }}/favicon.png" type="image/png">

<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
<meta name="description" content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 160 | escape }}">

<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Asap:400,700">

<!-- GitHub Corner - https://github.com/simonwhitaker/github-fork-ribbon-css -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-fork-ribbon-css/0.2.0/gh-fork-ribbon.min.css" />

<link rel="stylesheet" href="{{ "/css/bootstrap.css" | prepend: site.baseurl }}">
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title | escape }}" href="{{ "/feed.xml" | prepend: site.baseurl }}">

{% if jekyll.environment == 'production' and site.google_analytics %}
{% include google-analytics.html %}
{% endif %}
</head>
32 changes: 32 additions & 0 deletions _includes/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!-- GitHub Corner - https://github.com/simonwhitaker/github-fork-ribbon-css -->
<a class="github-fork-ribbon" href="https://github.com/Nanpay/magnet-player/" title="ÔÚGitHubÉϹØ×¢ÎÒ">ÔÚGitHubÉϹØ×¢ÎÒ</a>

<header class="site-header" role="banner">

<div class="wrapper">

{% assign custom_url = site.url | append: site.baseurl %}
{% assign full_base_url = site.github.url | default: custom_url %}
<a class="site-title" href="{{ site.baseurl }}/">{{ site.title | escape }}</a>

<nav class="site-nav">
<a href="#" class="menu-icon">
<svg viewBox="0 0 18 15" width="18px" height="15px">
<path fill="#424242" d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.031C17.335,0,18,0.665,18,1.484L18,1.484z"/>
<path fill="#424242" d="M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0c0-0.82,0.665-1.484,1.484-1.484 h15.031C17.335,6.031,18,6.696,18,7.516L18,7.516z"/>
<path fill="#424242" d="M18,13.516C18,14.335,17.335,15,16.516,15H1.484C0.665,15,0,14.335,0,13.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.031C17.335,12.031,18,12.696,18,13.516L18,13.516z"/>
</svg>
</a>

<div class="trigger">
{% for my_page in site.pages %}
{% if my_page.title %}
<a class="page-link" href="{{ my_page.url | prepend: site.baseurl }}">{{ my_page.title | escape }}</a>
{% endif %}
{% endfor %}
</div>
</nav>

</div>

</header>
1 change: 1 addition & 0 deletions _includes/icon-github.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<a href="https://github.com/{{ include.username }}"><span class="icon icon--github">{% include icon-github.svg %}</span><span class="username">{{ include.username }}</span></a>
1 change: 1 addition & 0 deletions _includes/icon-github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions _includes/icon-twitter.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<a href="https://twitter.com/{{ include.username }}"><span class="icon icon--twitter">{% include icon-twitter.svg %}</span><span class="username">{{ include.username }}</span></a>
1 change: 1 addition & 0 deletions _includes/icon-twitter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="{{ page.lang | default: site.lang | default: "en" }}">

{% include head.html %}

<body>

{% include header.html %}

<main class="page-content" aria-label="Content">
<div class="wrapper">
{{ content }}
</div>
</main>

{% include footer.html %}


<!-- jQuery -->
<script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>

<script src="{{ site.baseurl }}/js/bootstrap.min.js"></script>

<!-- clipboard.js -->
<script src="{{ site.baseurl }}/js/clipboard.min.js"></script>

<!-- Include the latest version of WebTorrent -->
<script src="https://cdn.jsdelivr.net/webtorrent/latest/webtorrent.min.js"></script>

<script src="{{ site.baseurl }}/js/bundle.js"></script>

</body>

</html>
15 changes: 15 additions & 0 deletions _layouts/page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
layout: default
---

<article class="post">

<header class="post-header">
<h1 class="post-title">{{ page.title | escape }}</h1>
</header>

<div class="post-content">
{{ content }}
</div>

</article>
Loading

0 comments on commit 6d4709b

Please sign in to comment.