Skip to content

Commit

Permalink
Layout changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jduar committed Dec 27, 2023
1 parent 204584a commit b8b397e
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 59 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pictures/
public/
images/
pages/
.src/

# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,python
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,python
Expand Down
4 changes: 3 additions & 1 deletion template/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
</head>
<body>
<script src="js/gallery.js"></script>
{% block body %}{% endblock %}
<div class="container">
{% block body %}{% endblock %}
</div>
</body>
</html>
47 changes: 16 additions & 31 deletions template/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,24 @@ body {
font-family: "Courier New", monospace, Helvetica, verdana, sans-serif;
}

.container {
padding-left: 15px;
padding-right: 15px;
}

.pages {
flex-direction: row;
padding-right: 25px;
padding-left: 25px;
}

.pages a {
padding-left: 5px;
padding-right: 5px;
padding-right: 10px;
text-decoration: none;
}

.pages ul {
padding-left: 0;
margin-top: 0;
margin-top: 20px;
margin-bottom: 0;
list-style: none;
}

Expand All @@ -39,25 +42,23 @@ body {
padding-top: 10px;
padding-bottom: 10px;
width: 100%;
color: rgb(95, 95, 95);
}

.gallery {
padding-right: 10px;
padding-left: 10px;
}

.gallery ul {
.image-gallery {
padding-left: 0;
margin-top: 0;
}

.gallery li {
.image-gallery>li {
list-style-type: none;
padding: 5px;
padding-top: 5px;
padding-bottom: 5px;
}

.title {
padding: 20px 25px 15px 25px;
padding-top: 20px;
padding-bottom: 15px;
font-size: 1.5em;
}

Expand All @@ -80,11 +81,6 @@ a:focus {
color: rgb(138, 178, 218);
}

.photo-page {
padding-right: 15px;
padding-left: 15px;
}

.small-font {
font-size: small;
}
Expand Down Expand Up @@ -114,8 +110,6 @@ a:focus {
display: flex;
flex-direction: column;
width: 20%;
padding-right: 0;
padding-left: 0;
}

.pages ul {
Expand All @@ -127,15 +121,9 @@ a:focus {
}

.content {
color: rgb(95, 95, 95);
width: 78%;
}

.gallery {
padding-right: 0px;
padding-left: 0px;
}

.image-gallery {
display: flex;
flex-wrap: wrap;
Expand All @@ -146,6 +134,7 @@ a:focus {
height: 195px;
flex: auto;
position: relative;
padding: 5px;
}

.image-gallery li a {
Expand Down Expand Up @@ -175,10 +164,6 @@ a:focus {
flex-direction: row;
}

.top-space {
margin-top: 20px;
}

.photo-page {
padding-top: 10px;
}
Expand Down
26 changes: 12 additions & 14 deletions template/gallery.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
<div class="gallery">
<ul id="gallery" class="image-gallery">
{% for photo in photos %}
<li class="image-outer">
<a href={{ photo.page }} class="mobile-lazy-loading">
<img class="photo gallery-image jsonly" loading="lazy" src={{ photo.thumbnail }} width={{ photo.width }} height={{ photo.height }} alt="{{ photo.alt }}">
<noscript>
<img class="photo gallery-image" src={{ photo.thumbnail }} alt="{{ photo.alt }}">
</noscript>
</a>
</li>
{% endfor %}
</ul>
</div>
<ul id="gallery" class="image-gallery">
{% for photo in photos %}
<li class="image-outer">
<a href={{ photo.page }} class="mobile-lazy-loading">
<img class="photo gallery-image jsonly" loading="lazy" src={{ photo.thumbnail }} width={{ photo.width }} height={{ photo.height }} alt="{{ photo.alt }}">
<noscript>
<img class="photo gallery-image" src={{ photo.thumbnail }} alt="{{ photo.alt }}">
</noscript>
</a>
</li>
{% endfor %}
</ul>
31 changes: 19 additions & 12 deletions template/main_layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,25 @@
</div>
<div class="horizontal">
<div class="pages">
<ul>
{% for text_page in text_pages %}
<li{% if loop.first %} class="top-space"{% endif %}>
<a href="{{ text_page }}">{{ text_page }}</a>
</li>
{% endfor %}
{% for photo_page in photo_pages %}
<li{% if loop.first %} class="top-space"{% endif %}>
<a href="{{ photo_page }}">{{ photo_page }}</a>
</li>
{% endfor %}
</ul>
{% if text_pages %}
<ul>
{% for text_page in text_pages %}
<li>
<a href="{{ text_page }}">{{ text_page }}</a>
</li>
{% endfor %}
</ul>
<br/>
{% endif %}
{% if photo_pages %}
<ul>
{% for photo_page in photo_pages %}
<li>
<a href="{{ photo_page }}">{{ photo_page }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</div>
<div class="content">{{ page.content }}</div>
</div>
Expand Down

0 comments on commit b8b397e

Please sign in to comment.