Skip to content

Commit

Permalink
Clean up a few layout things
Browse files Browse the repository at this point in the history
  • Loading branch information
jdcantrell committed Jun 3, 2019
1 parent 7d23655 commit d4638ea
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 18 deletions.
12 changes: 6 additions & 6 deletions spice/static/css/styles.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@font-face {
font-family: 'FantasqueSansMonoRegular';
src: url("/static/images/fonts/FantasqueSansMono-Regular.woff2");
src: url("/images/fonts/FantasqueSansMono-Regular.woff2");
font-weight: normal;
font-style: normal; }

Expand Down Expand Up @@ -589,7 +589,7 @@ table {
white-space: nowrap; }

table.hover tbody > tr:hover {
background-color: #65c6c4; }
background-color: #a9f8db; }

tr.row-highlight {
background-color: #fffcfc; }
Expand Down Expand Up @@ -644,10 +644,10 @@ h1, h2, h3, h4, h5, h6 {
background-color: #fffcfc !important; }

.c02 {
color: #ebdbb2 !important; }
color: #f2eeec !important; }

.bg-c02 {
background-color: #ebdbb2 !important; }
background-color: #f2eeec !important; }

.c03 {
color: #d5c4a1 !important; }
Expand Down Expand Up @@ -802,7 +802,7 @@ select {
font-weight: bold; }

.page-nav {
background-color: #65c6c4;
background-color: #f9f4f2;
padding-left: 1ch; }

.page-logo {
Expand All @@ -824,7 +824,7 @@ select {
right: 0; } }

.page-footer {
background-color: #65c6c4;
background-color: #f6eeeb;
color: #fff;
width: 100%;
margin-top: 2em;
Expand Down
2 changes: 1 addition & 1 deletion spice/templates/log.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<div id="log_list">
{% if files|length %}
{% for file in files %}
{% include 'log_item.html' %}
<div style="margin-bottom:32px">{% include 'log_item.html' %}</div>
{% endfor %}
{% endif %}
</div>
Expand Down
5 changes: 0 additions & 5 deletions spice/templates/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@
<nav class="page-nav">
<div class="flex-container row">
<ul class="list-nav">
<li>
<a href="{{ url_for('auth.logout') }}">
test link
</a>
</li>
{% for href, id, name in nav_items %}
{% if current_page != id %}
<li {% if current_page == id %}class="active"{% endif %} >
Expand Down
15 changes: 13 additions & 2 deletions spice/templates/tiles.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,25 @@
.tile-8 {
grid-column-end: span 8;
}
.tile-grid img { max-width: 100%; max-height: 400px }
hr {
grid-column-end: span 8;
width: 100%;
}
.tile-grid img {
max-width: 100%;
max-height: 400px;
box-shadow: 0 0 8px 1px #eae5e5, inset 0 0 8px 1px #eae5e5;
}
</style>

<div class="tile-grid">
{% for tile in files %}
<a class="tile-{{ tile.span }} {{ 'adjusted' if tile.adjusted else '' }}" href="{{ url_for('files.view', key=tile.file.data.key) }}">
{% if tile.file is not none %}
<a class="tile-{{ tile.span }} {{ 'adjusted' if tile.adjusted else '' }}" href="{{ url_for('files.view', key=tile.file.data.key) }}">
<img src="{{ tile.file.thumbnail }}">
</a>
{% else %}
{% endif %}
{% endfor %}
</div>

Expand Down
7 changes: 3 additions & 4 deletions spice/tiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ def __init__(self, image, span):


def get_width(f):
return min(4, ceil(f.size["width"] / f.size["height"]))
if f.size["width"] > 200:
return min(4, ceil(f.size["width"] / f.size["height"]))
return 1


def find(files, maxSize):
Expand Down Expand Up @@ -54,9 +56,6 @@ def sort(files):
row -= tiles[idx].span
idx -= 1

if row < 0:
print("shoot")

if extra // tile_count:
print(
"padding tiles {} {} {}".format(
Expand Down

0 comments on commit d4638ea

Please sign in to comment.