Albirew/nyaa-pantsu
Albirew
/
nyaa-pantsu
Archivé
1
0
Bifurcation 0

Merge pull request #67 from sfan5/style123

Appearance changes (mostly)
Cette révision appartient à :
keo 2017-05-05 22:38:41 +03:00 révisé par GitHub
révision e270571db1
7 fichiers modifiés avec 21 ajouts et 10 suppressions

Voir le fichier

@ -1,5 +1,5 @@
package config
const (
Trackers = "&tr=udp://zer0day.to:1337/announce&tr=udp://tracker.leechers-paradise.org:6969&tr=udp://explodie.org:6969&tr=udp://tracker.opentrackr.org:1337&tr=udp://tracker.coppersurfer.tk:6969&tr=http://tracker.baka-sub.cf/announce"
)
Trackers = "&tr=udp://tracker.coppersurfer.tk:6969&tr=udp://zer0day.to:1337/announce&tr=udp://tracker.leechers-paradise.org:6969&tr=udp://explodie.org:6969&tr=udp://tracker.opentrackr.org:1337&tr=http://tracker.baka-sub.cf/announce"
)

Voir le fichier

@ -9,7 +9,6 @@
background-color: #81d3fa;
}
/* modified copy of NyaaTorrent theme */
nav#mainmenu {
background: #263238;
@ -72,11 +71,16 @@ a {
white-space: nowrap;
}
/* Styling/fixes for the table: */
.table > tbody > tr > td {
/* fix bootstrap uglyness */
vertical-align: middle;
}
.custom-table-hover > tbody > tr:hover {
opacity: 0.82;
}
div.container div.blockBody:nth-of-type(2) table{table-layout:fixed;}
div.container div.blockBody:nth-of-type(2) table tr:first-of-type th:first-of-type, div.container div.blockBody:nth-of-type(2) table tr:first-of-type th:nth-of-type(5){width:10%;}
div.container div.blockBody:nth-of-type(2) table tr:first-of-type th:nth-of-type(3){width:15%;}

Voir le fichier

@ -108,6 +108,7 @@ func searchHandler(w http.ResponseWriter, r *http.Request) {
search_param.Category,
search_param.Sort,
search_param.Order,
false,
}
htv := HomeTemplateVariables{b, torrentService.GetAllCategories(false), searchForm, navigationTorrents, r.URL, mux.CurrentRoute(r)}
@ -180,7 +181,10 @@ func searchByQuery(r *http.Request, pagenum int) (SearchParam, []model.Torrents,
func faqHandler(w http.ResponseWriter, r *http.Request) {
var templates = template.Must(template.New("FAQ").Funcs(funcMap).ParseFiles("templates/index.html", "templates/FAQ.html"))
templates.ParseGlob("templates/_*.html") // common
err := templates.ExecuteTemplate(w, "index.html", FaqTemplateVariables{Navigation{}, NewSearchForm(), r.URL, mux.CurrentRoute(r)})
searchForm := NewSearchForm()
searchForm.HideAdvancedSearch = true
err := templates.ExecuteTemplate(w, "index.html", FaqTemplateVariables{Navigation{}, searchForm, r.URL, mux.CurrentRoute(r)})
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
}
@ -206,8 +210,7 @@ func rssHandler(w http.ResponseWriter, r *http.Request) {
timestamp_as_time := time.Unix(torrents[0].Date, 0)
torrent_json := torrents[i].ToJson()
feed.Items[i] = &feeds.Item{
// need a torrent view first
//Id: URL + torrents[i].Hash,
Id: "https://nyaa.pantsu.cat/view/" + strconv.Itoa(torrents[i].Id),
Title: torrents[i].Name,
Link: &feeds.Link{Href: string(torrent_json.Magnet)},
Description: "",

Voir le fichier

@ -53,6 +53,7 @@ type SearchForm struct {
Category string
Sort string
Order string
HideAdvancedSearch bool
}
// Some Default Values to ease things out
@ -74,4 +75,4 @@ func NewSearchForm(params ...string) SearchForm {
searchForm.Order = "DESC"
}
return searchForm
}
}

Voir le fichier

@ -43,7 +43,7 @@
<option value="desc" {{if eq .Search.Order "desc"}}selected{{end}}>Descending</option>
<option value="asc" {{if eq .Search.Order "asc"}}selected{{end}}>Ascending</option>
</select>
<select name="max" class="form-control input-sm" value>
<select name="max" class="form-control input-sm">
<option value="5" {{if eq .Navigation.MaxItemPerPage 5}}selected{{end}}>5</option>
<option value="10" {{if eq .Navigation.MaxItemPerPage 10}}selected{{end}}>10</option>
<option value="15" {{if eq .Navigation.MaxItemPerPage 15}}selected{{end}}>15</option>

Voir le fichier

@ -8,7 +8,7 @@
</nav>
<div class="table-responsive">
<table class="table table-hover">
<table class="table custom-table-hover">
<tr>
<th>Category</th>
<th>Name</th>
@ -34,7 +34,7 @@
<td class="date date-short">{{.Date}}</td>
<td class="filesize">{{.Filesize}}</td>
<td>
<a href="{{.Magnet}}" target="_blank" title="Magnet link">
<a href="{{.Magnet}}" title="Magnet link">
<span class="glyphicon glyphicon-magnet" aria-hidden="true"></span>
</a>
<!-- <a href="https://itorrents.org/torrent/{{.Hash}}.torrent" title="Torrent file">

Voir le fichier

@ -54,6 +54,7 @@
<div style="padding-top: 10rem"></div>
<div class="container" id="container">
{{if not .Search.HideAdvancedSearch}}
<div class="blockBody" style="text-align:center">
<font size="4.5">Advanced Search</font><br />
<form class="navbar-form" role="search" action="/search" method="get">
@ -66,6 +67,8 @@
<div style="clear:both"></div>
</div>
<div style="margin:0.5em"></div>
{{end}}
{{block "content" .}}Nothing Here.{{end}}
</div>