grid push

small-nav
chimchooree 2 years ago
parent 35b8d6e233
commit 1c8c4a72c5

@ -2,10 +2,10 @@ import datetime, os, re
from bottle import error, response, route, run, static_file, template, TEMPLATE_PATH from bottle import error, response, route, run, static_file, template, TEMPLATE_PATH
def find_gallery(name): def find_gallery(name):
gal = [name]
if name == "Aristen": if name == "Aristen":
return ["Aristen", [["menu.jpg","Aristen's fancy set with bright colors and an obi belt"], ["scarf.jpg", "Newbie Aristen with her orange scarf"], ["marine.jpg","Aristen in the Epheria Marine Classic Set, a goofy marine pinup costume."]]] gal.append([["menu.jpg","Aristen's fancy set with bright colors and an obi belt"], ["scarf.jpg", "Newbie Aristen with her orange scarf"], ["marine.jpg","Aristen in the Epheria Marine Classic Set, a goofy marine pinup costume."]])
else: return gal
return []
def prepare_profile(loc, char_name): def prepare_profile(loc, char_name):
@ -79,7 +79,7 @@ def home():
def me(): def me():
"""me""" """me"""
#"Abbey", "Aloin", "Amarr", "Angel", "Aries", "Aristen", "Bijoux", "Bell", "Bless", "Calder", "Cass", "Chandrakant", "Chloe", "Customs", "Dagmar", "Dia", "Eden", "Fifi", "Flambebe", "Freya", "Funwa", "Futura", "Havelock", "Heath", "Heather", "Helia", "Intern", "Juno", "Katherine", "Laguna", "Lise", "Lune", "Moonstone", "Nephele", "Night", "Nymph", "Rune", "Silke", "Tessa", "Una", "Winter", "WISE", "Abbey", "Aloin", "Aristen", "Bell", "Bijoux", "Bless", "Calder", "Cass", "Eponnin", "Faber", "Fifi", "Freya", "Gundrune", "Heather", "Helia", "Leslie", "Lune", "Night", "Rodolphe", "Rune", "Ryada", "Silke", "Tessa", "Tilly", "WISE" #"Abbey", "Aloin", "Amarr", "Angel", "Aries", "Aristen", "Bijoux", "Bell", "Bless", "Calder", "Cass", "Chandrakant", "Chloe", "Customs", "Dagmar", "Dia", "Eden", "Fifi", "Flambebe", "Freya", "Funwa", "Futura", "Havelock", "Heath", "Heather", "Helia", "Intern", "Juno", "Katherine", "Laguna", "Lise", "Lune", "Moonstone", "Nephele", "Night", "Nymph", "Rune", "Silke", "Tessa", "Una", "Winter", "WISE", "Abbey", "Aloin", "Aristen", "Bell", "Bijoux", "Bless", "Calder", "Cass", "Eponnin", "Faber", "Fifi", "Freya", "Gundrune", "Heather", "Helia", "Leslie", "Lune", "Night", "Rodolphe", "Rune", "Ryada", "Silke", "Tessa", "Tilly", "WISE"
info = {'css': 'me', 'title': 'about me', 'year': find_year(), 'chars': ["Aristen"]} info = {'css': 'me', 'title': 'about me', 'year': find_year(), 'chars': ["Helia", "Rune", "Tessa", "WISE", "Silke", "Calder", "Aloin", "Fifi", "Lune", "Aristen"]}
return template('me.tpl', info) return template('me.tpl', info)

@ -1,15 +1,18 @@
.content-grid { .content-grid {
margin: auto; width: 1fr;
color: white; color: white;
margin: auto;
} }
.gallery { .gallery {
display: grid; display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); grid-template-columns: repeat(auto-fit, 200px);
grid-column-gap: 0px; grid-column-gap: 0px;
grid-row-gap: 0px; grid-row-gap: 0px;
margin: auto; border: 2px solid #C0AAC0;
} }
.gallery img { .gallery img {
height: 200px;} height: 200px;
border-radius: 5%;
}

@ -35,15 +35,14 @@
.ocs { grid-area: 4 / 1 / 5 / 3; text-align:left;} .ocs { grid-area: 4 / 1 / 5 / 3; text-align:left;}
.ocs-nav { .ocs-nav {
display: grid; display: grid;
grid-template-columns: repeat(auto-fit, minmax(10em, 1fr)); grid-template-columns: repeat(auto-fit, 150px);
background-color: #C0AAC0; background-color: #C0AAC0;
} }
.ocs-btn { .ocs-btn {
background-color: #C0AAC0; background-color: #C0AAC0;
} }
.ocs img { .ocs img {
width: 10em; width: 150px;
border-radius: 5%;
} }
.content-right h1, h2, ul, li, b, i, p, img, a { .content-right h1, h2, ul, li, b, i, p, img, a {

@ -1,7 +1,10 @@
% rebase('frame.tpl') % rebase('frame.tpl')
% import random % import random
<div class="content-grid"> <div class="content-grid">
<h1>{{gallery[0]}}</h1>
<div class="gallery"> <div class="gallery">
% if len(gallery) >=2:
% for g in gallery[1]: % for g in gallery[1]:
% i = g[0].index('.') % i = g[0].index('.')
% thumb = g[0][:i] + 'thumb' + g[0][i:] % thumb = g[0][:i] + 'thumb' + g[0][i:]
@ -9,6 +12,7 @@
<img src="/static/img/char/{{gallery[0]}}/{{thumb}}" alt="Image: {{g[1]}}"> <img src="/static/img/char/{{gallery[0]}}/{{thumb}}" alt="Image: {{g[1]}}">
</a> </a>
% end % end
% end
</div> </div>
<div class="center"> <div class="center">
{{!profile}} {{!profile}}

Loading…
Cancel
Save