Change CRLF to LF.

This commit is contained in:
snowfag 2017-05-23 21:06:32 -04:00
parent 020a0871bd
commit 0770822824
1 changed files with 232 additions and 232 deletions

464
nyaa/templates/layout.html Normal file → Executable file
View File

@ -1,232 +1,232 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>{% block title %}{{ config.SITE_NAME }}{% endblock %}</title> <title>{% block title %}{{ config.SITE_NAME }}{% endblock %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="shortcut icon" type="image/png" href="/static/favicon.png"> <link rel="shortcut icon" type="image/png" href="/static/favicon.png">
<link rel="icon" type="image/png" href="/static/favicon.png"> <link rel="icon" type="image/png" href="/static/favicon.png">
<link rel="mask-icon" href="/static/pinned-tab.svg" color="#3582F7"> <link rel="mask-icon" href="/static/pinned-tab.svg" color="#3582F7">
<link rel="alternate" type="application/rss+xml" href="{% if rss_filter %}{{ url_for('home', page='rss', _external=True, **rss_filter) }}{% else %}{{ url_for('home', page='rss', _external=True) }}{% endif %}" /> <link rel="alternate" type="application/rss+xml" href="{% if rss_filter %}{{ url_for('home', page='rss', _external=True, **rss_filter) }}{% else %}{{ url_for('home', page='rss', _external=True) }}{% endif %}" />
<!-- Bootstrap core CSS --> <!-- Bootstrap core CSS -->
<!-- <!--
Note: This has been customized at http://getbootstrap.com/customize/ to Note: This has been customized at http://getbootstrap.com/customize/ to
set the column breakpoint to tablet mode, instead of mobile. This is to set the column breakpoint to tablet mode, instead of mobile. This is to
make the navbar not look awful on tablets. make the navbar not look awful on tablets.
--> -->
<link href="/static/css/bootstrap.min.css" rel="stylesheet" id="bsThemeLink"> <link href="/static/css/bootstrap.min.css" rel="stylesheet" id="bsThemeLink">
<!-- <!--
This theme changer script needs to be inline and right under the above stylesheet link to prevent FOUC (Flash Of Unstyled Content) This theme changer script needs to be inline and right under the above stylesheet link to prevent FOUC (Flash Of Unstyled Content)
Development version is commented out in static/js/main.js at the bottom of the file Development version is commented out in static/js/main.js at the bottom of the file
--> -->
<script>function toggleDarkMode(){"dark"===localStorage.getItem("theme")?setThemeLight():setThemeDark()}function setThemeDark(){bsThemeLink.href="/static/css/bootstrap-dark.min.css",localStorage.setItem("theme","dark")}function setThemeLight(){bsThemeLink.href="/static/css/bootstrap.min.css",localStorage.setItem("theme","light")}if("undefined"!=typeof Storage){var bsThemeLink=document.getElementById("bsThemeLink");"dark"===localStorage.getItem("theme")&&setThemeDark()}</script> <script>function toggleDarkMode(){"dark"===localStorage.getItem("theme")?setThemeLight():setThemeDark()}function setThemeDark(){bsThemeLink.href="/static/css/bootstrap-dark.min.css",localStorage.setItem("theme","dark")}function setThemeLight(){bsThemeLink.href="/static/css/bootstrap.min.css",localStorage.setItem("theme","light")}if("undefined"!=typeof Storage){var bsThemeLink=document.getElementById("bsThemeLink");"dark"===localStorage.getItem("theme")&&setThemeDark()}</script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.2/css/bootstrap-select.min.css" integrity="sha256-an4uqLnVJ2flr7w0U74xiF4PJjO2N5Df91R2CUmCLCA=" crossorigin="anonymous" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.2/css/bootstrap-select.min.css" integrity="sha256-an4uqLnVJ2flr7w0U74xiF4PJjO2N5Df91R2CUmCLCA=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<!-- Custom styles for this template --> <!-- Custom styles for this template -->
<link href="/static/css/main.css?v=4" rel="stylesheet"> <link href="/static/css/main.css?v=4" rel="stylesheet">
<!-- Core JavaScript --> <!-- Core JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/commonmark/0.27.0/commonmark.min.js" integrity="sha256-10JreQhQG80GtKuzsioj0K46DlaB/CK/EG+NuG0q97E=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/commonmark/0.27.0/commonmark.min.js" integrity="sha256-10JreQhQG80GtKuzsioj0K46DlaB/CK/EG+NuG0q97E=" crossorigin="anonymous"></script>
<!-- Modified to not apply border-radius to selectpickers and stuff so our navbar looks cool --> <!-- Modified to not apply border-radius to selectpickers and stuff so our navbar looks cool -->
<script src="/static/js/bootstrap-select.js"></script> <script src="/static/js/bootstrap-select.js"></script>
<script src="/static/js/main.js"></script> <script src="/static/js/main.js"></script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]> <!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]--> <![endif]-->
</head> </head>
<body> <body>
<!-- Fixed navbar --> <!-- Fixed navbar -->
<nav class="navbar navbar-default navbar-static-top navbar-inverse"> <nav class="navbar navbar-default navbar-static-top navbar-inverse">
<div class="container"> <div class="container">
<div class="navbar-header"> <div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span> <span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
<a class="navbar-brand" href="/">{{ config.SITE_NAME }}</a> <a class="navbar-brand" href="/">{{ config.SITE_NAME }}</a>
</div> </div>
<div id="navbar" class="navbar-collapse collapse"> <div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li {% if request.path == "/upload" %} class="active"{% endif %}><a href="/upload">Upload</a></li> <li {% if request.path == "/upload" %} class="active"{% endif %}><a href="/upload">Upload</a></li>
<li class="dropdown"> <li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
About About
<span class="caret"></span> <span class="caret"></span>
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li {% if request.path == "/rules" %} class="active"{% endif %}><a href="/rules">Rules</a></li> <li {% if request.path == "/rules" %} class="active"{% endif %}><a href="/rules">Rules</a></li>
<li {% if request.path == "/help" %} class="active"{% endif %}><a href="/help">Help</a></li> <li {% if request.path == "/help" %} class="active"{% endif %}><a href="/help">Help</a></li>
</ul> </ul>
</li> </li>
<li><a href="{% if rss_filter %}{{ url_for('home', page='rss', **rss_filter) }}{% else %}{{ url_for('home', page='rss') }}{% endif %}">RSS</a></li> <li><a href="{% if rss_filter %}{{ url_for('home', page='rss', **rss_filter) }}{% else %}{{ url_for('home', page='rss') }}{% endif %}">RSS</a></li>
{% if config.SITE_FLAVOR == 'nyaa' %} {% if config.SITE_FLAVOR == 'nyaa' %}
<li><a href="https://sukebei.nyaa.si/">Fap</a></li> <li><a href="https://sukebei.nyaa.si/">Fap</a></li>
{% elif config.SITE_FLAVOR == 'sukebei' %} {% elif config.SITE_FLAVOR == 'sukebei' %}
<li><a href="https://nyaa.si/">Fun</a></li> <li><a href="https://nyaa.si/">Fun</a></li>
{% endif %} {% endif %}
</ul> </ul>
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
{% if g.user %} {% if g.user %}
<li class="dropdown"> <li class="dropdown">
<a href="#" class="dropdown-toggle visible-lg visible-sm visible-xs" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> <a href="#" class="dropdown-toggle visible-lg visible-sm visible-xs" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-user fa-fw"></i> <i class="fa fa-user fa-fw"></i>
{{ g.user.username }} {{ g.user.username }}
<span class="caret"></span> <span class="caret"></span>
</a> </a>
<a href="#" class="dropdown-toggle hidden-lg hidden-sm hidden-xs" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> <a href="#" class="dropdown-toggle hidden-lg hidden-sm hidden-xs" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-user fa-fw"></i> <i class="fa fa-user fa-fw"></i>
<span class="caret"></span> <span class="caret"></span>
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li class="hidden-lg hidden-sm hidden-xs"> <li class="hidden-lg hidden-sm hidden-xs">
<a><i class="fa fa-user fa-fw"></i>Logged in as {{ g.user.username }}</a> <a><i class="fa fa-user fa-fw"></i>Logged in as {{ g.user.username }}</a>
</li> </li>
<li class="hidden-lg hidden-sm hidden-xs divider" role="separator"> <li class="hidden-lg hidden-sm hidden-xs divider" role="separator">
</li> </li>
<li> <li>
<a href="{{ url_for('view_user', user_name=g.user.username) }}"> <a href="{{ url_for('view_user', user_name=g.user.username) }}">
<i class="fa fa-user fa-fw"></i> <i class="fa fa-user fa-fw"></i>
Torrents Torrents
</a> </a>
</li> </li>
<li> <li>
<a href="/profile"> <a href="/profile">
<i class="fa fa-gear fa-fw"></i> <i class="fa fa-gear fa-fw"></i>
Profile Profile
</a> </a>
</li> </li>
<li> <li>
<a href="/logout"> <a href="/logout">
<i class="fa fa-times fa-fw"></i> <i class="fa fa-times fa-fw"></i>
Logout Logout
</a> </a>
</li> </li>
</ul> </ul>
</li> </li>
{% else %} {% else %}
<li class="dropdown"> <li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-user-times fa-fw"></i> <i class="fa fa-user-times fa-fw"></i>
Guest Guest
<span class="caret"></span> <span class="caret"></span>
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li> <li>
<a href="/login"> <a href="/login">
<i class="fa fa-sign-in fa-fw"></i> <i class="fa fa-sign-in fa-fw"></i>
Login Login
</a> </a>
</li> </li>
<li> <li>
<a href="/register"> <a href="/register">
<i class="fa fa-pencil fa-fw"></i> <i class="fa fa-pencil fa-fw"></i>
Register Register
</a> </a>
</li> </li>
</ul> </ul>
</li> </li>
{% endif %} {% endif %}
</ul> </ul>
{% if user_page %} {% if user_page %}
<form class="navbar-form navbar-right form" action="{{ url_for('view_user', user_name=user.username) }}" method="get"> <form class="navbar-form navbar-right form" action="{{ url_for('view_user', user_name=user.username) }}" method="get">
{% else %} {% else %}
<form class="navbar-form navbar-right form" action="/" method="get"> <form class="navbar-form navbar-right form" action="/" method="get">
{% endif %} {% endif %}
<div class="input-group search-container"> <div class="input-group search-container">
<input type="text" class="form-control search-bar" name="q" placeholder="Search..." value="{{ search["term"] if search is defined else '' }}"> <input type="text" class="form-control search-bar" name="q" placeholder="Search..." value="{{ search["term"] if search is defined else '' }}">
<div class="input-group-btn nav-filter" id="navFilter-criteria"> <div class="input-group-btn nav-filter" id="navFilter-criteria">
<select class="selectpicker show-tick" title="Filter" data-width="120px" name="f"> <select class="selectpicker show-tick" title="Filter" data-width="120px" name="f">
<option value="0" title="No filter" {% if search is defined and search["quality_filter"] == "0" %}selected{% else %}selected{% endif %}>No filter</option> <option value="0" title="No filter" {% if search is defined and search["quality_filter"] == "0" %}selected{% else %}selected{% endif %}>No filter</option>
<option value="1" title="No remakes" {% if search is defined and search["quality_filter"] == "1" %}selected{% endif %}>No remakes</option> <option value="1" title="No remakes" {% if search is defined and search["quality_filter"] == "1" %}selected{% endif %}>No remakes</option>
<option value="2" title="Trusted only" {% if search is defined and search["quality_filter"] == "2" %}selected{% endif %}>Trusted only</option> <option value="2" title="Trusted only" {% if search is defined and search["quality_filter"] == "2" %}selected{% endif %}>Trusted only</option>
</select> </select>
</div> </div>
<div class="input-group-btn nav-filter" id="navFilter-category"> <div class="input-group-btn nav-filter" id="navFilter-category">
{% set nyaa_cats = [('1_0', 'Anime', 'Anime'), {% set nyaa_cats = [('1_0', 'Anime', 'Anime'),
('1_1', '- Anime Music Video', 'Anime - AMV'), ('1_1', '- Anime Music Video', 'Anime - AMV'),
('1_2', '- English-translated', 'Anime - English'), ('1_2', '- English-translated', 'Anime - English'),
('1_3', '- Non-English-translated', 'Anime - Non-English'), ('1_3', '- Non-English-translated', 'Anime - Non-English'),
('1_4', '- Raw', 'Anime - Raw'), ('1_4', '- Raw', 'Anime - Raw'),
('2_0', 'Audio', 'Audio'), ('2_0', 'Audio', 'Audio'),
('2_1', '- Lossless', 'Audio - Lossless'), ('2_1', '- Lossless', 'Audio - Lossless'),
('2_2', '- Lossy', 'Audio - Lossy'), ('2_2', '- Lossy', 'Audio - Lossy'),
('3_0', 'Literature', 'Literature'), ('3_0', 'Literature', 'Literature'),
('3_1', '- English-translated', 'Literature - English'), ('3_1', '- English-translated', 'Literature - English'),
('3_2', '- Non-English-translated', 'Literature - Non-English'), ('3_2', '- Non-English-translated', 'Literature - Non-English'),
('3_3', '- Raw', 'Literature - Raw'), ('3_3', '- Raw', 'Literature - Raw'),
('4_0', 'Live Action', 'Live Action'), ('4_0', 'Live Action', 'Live Action'),
('4_1', '- English-translated', 'Live Action - English'), ('4_1', '- English-translated', 'Live Action - English'),
('4_2', '- Idol/Promotional Video', 'Live Action - Idol/PV'), ('4_2', '- Idol/Promotional Video', 'Live Action - Idol/PV'),
('4_3', '- Non-English-translated', 'Live Action - Non-English'), ('4_3', '- Non-English-translated', 'Live Action - Non-English'),
('4_4', '- Raw', 'Live Action - Raw'), ('4_4', '- Raw', 'Live Action - Raw'),
('5_0', 'Pictures', 'Pictures'), ('5_0', 'Pictures', 'Pictures'),
('5_1', '- Graphics', 'Pictures - Graphics'), ('5_1', '- Graphics', 'Pictures - Graphics'),
('5_2', '- Photos', 'Pictures - Photos'), ('5_2', '- Photos', 'Pictures - Photos'),
('6_0', 'Software', 'Software'), ('6_0', 'Software', 'Software'),
('6_1', '- Applications', 'Software - Apps'), ('6_1', '- Applications', 'Software - Apps'),
('6_2', '- Games', 'Software - Games')] %} ('6_2', '- Games', 'Software - Games')] %}
{% set suke_cats = [('1_0', 'Art', 'Art'), {% set suke_cats = [('1_0', 'Art', 'Art'),
('1_1', '- Anime', 'Art - Anime'), ('1_1', '- Anime', 'Art - Anime'),
('1_2', '- Doujinshi', 'Art - Doujinshi'), ('1_2', '- Doujinshi', 'Art - Doujinshi'),
('1_3', '- Games', 'Art - Games'), ('1_3', '- Games', 'Art - Games'),
('1_4', '- Manga', 'Art - Manga'), ('1_4', '- Manga', 'Art - Manga'),
('1_5', '- Pictures', 'Art - Pictures'), ('1_5', '- Pictures', 'Art - Pictures'),
('2_0', 'Real Life', 'Real Life'), ('2_0', 'Real Life', 'Real Life'),
('2_1', '- Photobooks and Pictures', 'Real Life - Pictures'), ('2_1', '- Photobooks and Pictures', 'Real Life - Pictures'),
('2_2', '- Videos', 'Real Life - Videos')] %} ('2_2', '- Videos', 'Real Life - Videos')] %}
{% if config.SITE_FLAVOR == 'nyaa' %} {% if config.SITE_FLAVOR == 'nyaa' %}
{% set used_cats = nyaa_cats %} {% set used_cats = nyaa_cats %}
{% elif config.SITE_FLAVOR == 'sukebei' %} {% elif config.SITE_FLAVOR == 'sukebei' %}
{% set used_cats = suke_cats %} {% set used_cats = suke_cats %}
{% endif %} {% endif %}
<select class="selectpicker show-tick" title="Category" data-width="170px" name="c"> <select class="selectpicker show-tick" title="Category" data-width="170px" name="c">
<option value="0_0" title="All categories" {% if search is defined and search["category"] == "0_0" %}selected{% else %}selected{% endif %}> <option value="0_0" title="All categories" {% if search is defined and search["category"] == "0_0" %}selected{% else %}selected{% endif %}>
All categories All categories
</option> </option>
{% for cat_id, cat_name, cat_title in used_cats %} {% for cat_id, cat_name, cat_title in used_cats %}
<option value="{{ cat_id }}" title="{{ cat_title }}" {% if search is defined and search.category == cat_id %}selected{% endif %}> <option value="{{ cat_id }}" title="{{ cat_title }}" {% if search is defined and search.category == cat_id %}selected{% endif %}>
{{ cat_name }} {{ cat_name }}
</option> </option>
{% endfor %} {% endfor %}
</select> </select>
</div> </div>
<div class="input-group-btn search-btn"> <div class="input-group-btn search-btn">
<button class="btn btn-primary" type="submit"> <button class="btn btn-primary" type="submit">
<i class="fa fa-search fa-fw"></i> <i class="fa fa-search fa-fw"></i>
</button> </button>
</div> </div>
</div> </div>
</form> </form>
</div><!--/.nav-collapse --> </div><!--/.nav-collapse -->
</div> </div>
</nav> </nav>
<div class="container"> <div class="container">
{% include "flashes.html" %} {% include "flashes.html" %}
{% block body %}{% endblock %} {% block body %}{% endblock %}
</div> <!-- /container --> </div> <!-- /container -->
<footer style="text-align: center;"> <footer style="text-align: center;">
<p>Dark Mode: <a href="#" id="themeToggle">Toggle</a></p> <p>Dark Mode: <a href="#" id="themeToggle">Toggle</a></p>
{% if config.COMMIT_HASH %} {% if config.COMMIT_HASH %}
<p>Commit: <a href="https://github.com/nyaadevs/nyaa/tree/{{ config.COMMIT_HASH }}">{{ config.COMMIT_HASH[:7] }}</a></p> <p>Commit: <a href="https://github.com/nyaadevs/nyaa/tree/{{ config.COMMIT_HASH }}">{{ config.COMMIT_HASH[:7] }}</a></p>
{% endif %} {% endif %}
</footer> </footer>
</body> </body>
</html> </html>