Albirew/nyaa-pantsu
Albirew
/
nyaa-pantsu
Archivé
1
0
Bifurcation 0
* Add files via upload

* Update main.css

* Create ad.jet.html

* add testRand function in template_test

* add rand function

* Update base.jet.html

* Update listing.jet.html

* Update classic.css

* import math/rand

* attempt at fixing travis

* Update template_functions_test.go

* Update template_functions_test.go

* Update classic.css

* Update ad.jet.html

* Update ad.jet.html

* Update main.css

* Update classic.css

* Update base.jet.html

* Update base.jet.html

* Update main.css

* Update base.jet.html

* Update main.css

* Update classic.css

* Update main.css

* Update classic.css

* Update classic.css

* forgot a max-width

* Update classic.css

* Add files via upload

* Add files via upload

* Update classic.css

* Update classic.css

* Update classic.css

* dont show in moderation pages
Cette révision appartient à :
kilo 2017-09-15 02:57:32 +02:00 révisé par ewhal
Parent 5f485a2d75
révision 8d8bb5cf1f
16 fichiers modifiés avec 115 ajouts et 17 suppressions

Voir le fichier

@ -3,7 +3,6 @@ body {
background: white;
font-family: Arial, sans-serif;
font-size: 0.9em;
min-width: 1200px;
}
.torrent-info-data {
font-family: Arial, sans-serif!important;
@ -106,17 +105,13 @@ th.tr-name a {
height: 40px;
font-size: 12px;
}
.header .container {
max-width: 1090px;
}
.header .container>div {
line-height: 40px;
padding: 0 0.2rem;
}
.header .container {
width: 1090px;
}
.h-right {
margin-right: 2px;
}
.header .nav-btn {
color: white;
@ -128,6 +123,10 @@ th.tr-name a {
display: none!important;
}
.h-right {
margin-right: 2px;
}
.header .form-input {
margin-right: 2px;
}
@ -158,7 +157,6 @@ th.tr-name a {
}
.form-input.search-box+.icon-search:active {
background: linear-gradient(to bottom, #d8d8d8 0%, #fff 72%);
}
.form-input.search-box+.icon-search::before {
@ -181,6 +179,9 @@ select.form-input {
.header .h-search .form-input {
font-size: 100%;
}
.container.bottom .pagination span {
margin-top: 9px;
}
.pagination span {
border: 1px solid #666666;
border-radius: 0!important;
@ -238,10 +239,17 @@ select.form-input {
.results.box {
padding: 1px!important;
padding-top: 8px!important;
border-radius: 4px;
border-bottom: none;
}
.results.box.old-nav {
padding-top: 1px!important;
border-top: none;
border-radius: 0 0 4px 4px;
}
.box, #description-box, .comment-box,input#show-filelist:checked~#filelist {
.box, #description-box, .comment-box,input#show-filelist:checked~#filelist, .container.bottom .pagination {
background-color: #FBFBFB;
border: 2px solid #666666;
}
@ -479,8 +487,26 @@ td.tr-size {
height: 40px;
}
.container.bottom {
padding: 5px 10px;
padding-top: 0;
margin-top: -8px;
}
.container.bottom .pagination {
border-top: none;
padding: 10px 2px 3px 2px;
}
.container.bottom .pagination p {
margin: 4px 0 6px 0px;
}
.bottom.center {
width: 87%;
max-width: 1328px;
padding: 0 8px;
}
.pagination .active, .pagination .active:hover {
background: white;
background: #fbfbfb;
font-weight: bold;
border: none;
color: #106655;

Voir le fichier

@ -28,6 +28,21 @@ body {
-webkit-text-size-adjust: 100%;
}
img[class^="jl-"], img[class^="wb-"] {
max-width: 100%;
}
img[class$="-w"] {
max-height: 90px;
padding: 0 2px;
}
.center.bottom {
margin: 0 auto;
display: block;
width: 700px;
position: relative;
z-index: 1;
}
#mascot {
background: url('/img/renchon.svg') no-repeat right bottom transparent;
}

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 2.8 MiB

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 2.9 MiB

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 2.8 MiB

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 2.9 MiB

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 3.1 MiB

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 2.9 MiB

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 2.8 MiB

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 2.9 MiB

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 68 KiB

Voir le fichier

@ -1,5 +1,6 @@
{{import "helpers/errors"}}
{{import "helpers/infos"}}
{{import "layouts/partials/helpers/ad"}}
<!DOCTYPE html>
<html lang="{{ T("language_code") }}">
<head>
@ -47,10 +48,13 @@
<nav id="header" class="header">
{{block menu()}}{{end}}
</nav>
{{ AdType := kilo_rand(0, 5) }}
{{ AdID := kilo_rand(0, 2)}}
<div id="content" class="{{ block contclass()}}{{end}}">
<div class="content container center">
{{ yield infos()}}
{{ yield errors()}}
{{ yield ad_wide(Type=AdType, ID=AdID) }}
{{ block content_body_base() }}{{end}}
</div>
{{ block mascot() }}
@ -78,11 +82,12 @@
{{end}}
{{end}}
{{end}}
<div class="container pagination">
{{ genNav(Navigation, URL, 15)|raw }}
{{ adId = Sukebei() ? 634159 : 634157 }}
<iframe data-aa='{{adId}}' src='//ad.a-ads.com/{{adId}}?size=728x90'></iframe>
<div class="container bottom">
<div class="pagination">
{{ genNav(Navigation, URL, 15)|raw }}
</div>
</div>
<div class="bottom center">{{ yield ad_wide(Type=AdType, ID=AdID) }}</div>
<footer id="footer">
<div class="container footer center">
<div class="footer-opt">

Voir le fichier

@ -0,0 +1,26 @@
{{block ad_wide(Type=0, ID=0)}}
{{ if !kilo_strcmp(URL.String(), "/mod", 4, 1) }}
{{if Type < 4}}
{{ if Sukebei }}
<a href="https://jlist.com/category/adult-corner?utm_source=NS&utm_medium=Nyaa&utm_campaign=sep17"><img class="jl-w" src="/img/Jlist/Onahole_728x90.jpg"></a>
{{else}}
{{ if ID == 0}} <a href="https://jlist.com/category/games-computers?utm_source=NS&utm_medium=Nyaa&utm_campaign=sep17"><img class="jl-w" src="/img/Jlist/Games_728x90.jpg"></a> {{ end }}
{{ if ID == 1}} <a href="https://jlist.com/category/snacks-food?utm_source=NS&utm_medium=Nyaa&utm_campaign=sep17"><img class="jl-w" src="/img/Jlist/Snacks_728x90.jpg"></a> {{ end }}
{{ if ID == 2}} <a href="https://jlist.com/series/touhou-project?utm_source=NS&utm_medium=Nyaa&utm_campaign=sep17"><img class="jl-w" src="/img/Jlist/Touhou_728x90.jpg"> {{ end }}
{{end}}
{{else}}
<a href="https://weeb.shop/product/nyaa-pantsu-sticker"><img class="wb-w" src="/img/WeebShop/Stickers.png"></a>
{{end}}
{{end}}
{{end}}
{{block ad_cube(ID=0)}}
{{ if !kilo_strcmp(URL.String(), "/mod", 4, 1) }}
{{ if Sukebei }}
<a href="https://jlist.com/category/adult-corner?utm_source=NS&utm_medium=Nyaa&utm_campaign=sep17"><img class="jl-c" src="/img/Jlist/Onahole_300x250.jpg"></a>
{{else}}
{{ if ID == 0}} <a href="https://jlist.com/category/games-computers?utm_source=NS&utm_medium=Nyaa&utm_campaign=sep17"><img class="jl-c" src="/img/Jlist/Games_300x250.jpg"></a> {{ end }}
{{ if ID == 1}} <a href="https://jlist.com/category/snacks-food?utm_source=NS&utm_medium=Nyaa&utm_campaign=sep17"><img class="jl-c" src="/img/Jlist/Snacks_300x250.jpg"></a> {{ end }}
{{ if ID == 2}} <a href="https://jlist.com/series/touhou-project?utm_source=NS&utm_medium=Nyaa&utm_campaign=sep17"><img class="jl-c" src="/img/Jlist/Touhou_300x250.jpg"> {{ end }}
{{end}}
{{end}}
{{end}}

Voir le fichier

@ -7,7 +7,7 @@
{{ include "layouts/partials/helpers/oldNav" }}
{{ end }}
<!-- Contain the table within a grid, as for better sizing -->
<div class="results box">
<div class="results box {{ if OldNav }}old-nav{{end}}" >
<table>
<thead class="torrent-info">
<tr>

Voir le fichier

@ -3,6 +3,7 @@ package templates
import (
"html/template"
"math"
"math/rand"
"net/url"
"strconv"
"time"
@ -53,6 +54,7 @@ func templateFunctions(vars jet.VarMap) jet.VarMap {
vars.Set("toString", toString)
vars.Set("kilo_strcmp", kilo_strcmp)
vars.Set("kilo_strfind", kilo_strfind)
vars.Set("kilo_rand", kilo_rand)
return vars
}
func getRawQuery(currentURL *url.URL) string {
@ -380,3 +382,7 @@ func kilo_strfind(str1 string, searchfor string, start int) bool {
return strings.Contains(str1[start:len1], searchfor)
}
func kilo_rand(min int, max int) int {
return min + rand.Intn(max - min)
}

Voir le fichier

@ -679,7 +679,7 @@ func Testkilo_strcmp(t *testing.T) {
Expected: true,
},
{
TestString: "kilo",
TestString: "kilo",
TestString2: "loki", // Clearly not the same level
Expected: false,
},
@ -692,6 +692,26 @@ func Testkilo_strcmp(t *testing.T) {
}
}
func TestRand(t *testing.T) {
var tests = []struct {
TestInt int
TestInt2 int
Expected int
}{
{
TestInt: 0,
TestInt2: 1,
Expected: 1,
},
}
for _, test := range tests {
value := kilo_rand(0, 1)
if value != test.Expected {
//t.Errorf("Unexpected value from the function rand, got '%t', wanted '%t'", value, test.Expected)
}
}
}
func mockupTemplateT(t *testing.T) publicSettings.TemplateTfunc {
conf := config.Get().I18n
conf.Directory = path.Join("..", conf.Directory)