Made it more pretty

This commit is contained in:
Benjamyn Love 2018-05-31 09:48:07 +10:00
parent 851b61359e
commit f897f3350b
6 changed files with 32 additions and 55 deletions

BIN
main.pyc Normal file

Binary file not shown.

View File

@ -1,46 +1,5 @@
.records { .wrapper {
font-size: 12px; display: grid;
padding: 30px; grid-template-columns: repeat(4, 1fr);
color: #363636; grid-auto-rows: minmax(100px, auto);
} }
.myNav {
background-color: #A4A4A4;
color: #363636;
}
.column {
width: 90%;
background-color: #B1B1B1;
padding: 2%;
float: left;
}
.row:after {
content: "";
display: table;
clear: both;
}
.buffer {
width: 2%;
background-color: #363636;
clear: both;
}
.allmostbiggertext {
font-size: 12px;
font-weight: 700;
padding-top: 10px;
}
.body {
background-color: #363636;
justify-content: center;
}
.col-centered{
float: none;
margin: 0 auto;
}

View File

@ -7,15 +7,8 @@
<!-- Bootstrap CSS --> <!-- Bootstrap CSS -->
<link rel="stylesheet" href="http://benjamyn.love/css/bootstrap.min.css"> <link rel="stylesheet" href="http://benjamyn.love/css/bootstrap.min.css">
<style> <link rel="stylesheet" href="static/css/test.css">
.test { </head>
vertical-align: bottom;
height: 100px;
width: 100px;
display: table-cell;
}
</style>
</head>
<div class="navbar h-100 d-flex justify-content-center" style="margin-bottom: 10px;"> <div class="navbar h-100 d-flex justify-content-center" style="margin-bottom: 10px;">
<div> <div>
@ -24,7 +17,7 @@
</div> </div>
<div class="container"> <div class="container">
<div class="card-group"> <div class="wrapper">
{% for x in livestreamdata %} {% for x in livestreamdata %}
<div class="card" > <div class="card" >
<img class="card-img-top" src="https://static-cdn.jtvnw.net/previews-ttv/live_user_{{ x["channel"]["name"] }}-300x200.jpg" alt="Card image cap"> <img class="card-img-top" src="https://static-cdn.jtvnw.net/previews-ttv/live_user_{{ x["channel"]["name"] }}-300x200.jpg" alt="Card image cap">

24
test.py Normal file
View File

@ -0,0 +1,24 @@
from pprint import pprint
import json
with open("test.txt") as testFile:
data = json.load(testFile)
#pprint(data)
def split_list(alist, wanted_parts=1):
length = len(alist)
return [ alist[i*length // wanted_parts: (i+1)*length // wanted_parts]
for i in range(wanted_parts) ]
A = [0,1,2,3,4,5,6,7,8,9]
print split_list(A, wanted_parts=1)
print split_list(A, wanted_parts=2)
print split_list(A, wanted_parts=8)
testing = split_list(data, wanted_parts=len(data)/4+1)
print(len(testing))

BIN
test.pyc Normal file

Binary file not shown.

1
test.txt Normal file

File diff suppressed because one or more lines are too long