driver: overlay
services:
navigator:
- image: cjpalmer/gallery-navigator:1.3.0
+ image: cjpalmer/gallery-navigator:1.4.0
volumes:
- gallery_data:/app/gallery
networks:
- backend
server:
- image: cjpalmer/gallery-server:1.3.0
+ image: cjpalmer/gallery-server:1.4.0
volumes:
- gallery_data:/data/images
depends_on:
services:
navigator:
build: ./navigator
- image: cjpalmer/gallery-navigator:1.3.0
+ image: cjpalmer/gallery-navigator:1.4.0
volumes:
+# - ./navigator/app:/app # dev testing
- gallery_data_dev:/app/gallery
environment:
FLASK_DEBUG: 1
server:
build: ./server
- image: cjpalmer/gallery-server:1.3.0
+ image: cjpalmer/gallery-server:1.4.0
volumes:
- gallery_data_dev:/data/images
ports:
COPY ./app/app.py /app
COPY ./app/templates/ /app/templates/
+COPY ./app/static/ /app/static/
CMD ["flask", "run"]
if not gallery.is_file():
gallery_names.append(gallery.name)
gallery_names.sort()
- return render_template( 'gallery.html', galleries=gallery_names )
+ return render_template( 'gallery.html',
+ title="My Comics",
+ galleries=gallery_names
+ )
def get_page_number_from_name(name):
try:
# render!
return render_template( 'pages.html',
+ title=gallery,
gallery=gallery,
description=description,
pages=template_pages
return render_template( 'page.html',
gallery=gallery, page_num=page_num,
- title=page_name, src=src, alt=page_name,
+ title='{} {}'.format(gallery, page_num), src=src, alt=page_name,
prev_page_url=prev_page_url,
next_page_url=next_page_url )
else:
--- /dev/null
+.first-color {
+ background: #defcf9;
+}
+
+.second-color {
+ background: #cadefc;
+}
+
+.third-color {
+ background: #c3bef0;
+}
+
+.fourth-color {
+ background: #cca8e9;
+}
--- /dev/null
+.first-color {
+ background: #8ef6e4;
+}
+
+.second-color {
+ background: #9896f1;
+}
+
+.third-color {
+ background: #d59bf6;
+}
+
+.fourth-color {
+ background: #edb1f1;
+}
--- /dev/null
+.first-color {
+ background: #87e5da;
+}
+
+.second-color {
+ background: #92a4c0;
+}
+
+.third-color {
+ background: #f4adad;
+}
+
+.fourth-color {
+ background: #e58cdb;
+}
--- /dev/null
+.first-color {
+ background: #d5def5;
+}
+
+.second-color {
+ background: #8594e4;
+}
+
+.third-color {
+ background: #6643b5;
+}
+
+.fourth-color {
+ background: #430f58;
+}
--- /dev/null
+.first-color {
+ background: #f8b595;
+}
+
+.second-color {
+ background: #f67280;
+}
+
+.third-color {
+ background: #c06c84;
+}
+
+.fourth-color {
+ background: #6c5b7c;
+}
--- /dev/null
+.first-color {
+ background: #8aacff;
+}
+
+.second-color {
+ background: #626fe6;
+}
+
+.third-color {
+ background: #6d42c7;
+}
+
+.fourth-color {
+ background: #e85b48;
+}
--- /dev/null
+.first-color {
+ background: #87e5da;
+}
+
+.second-color {
+ background: #92a4c0;
+}
+
+.third-color {
+ background: #f4adad;
+}
+
+.fourth-color {
+ background: #e58cdb;
+}
--- /dev/null
+.first-color {
+ background: #e7759a;
+}
+
+.second-color {
+ background: #ffa35f;
+}
+
+.third-color {
+ background: #ba78cd;
+}
+
+.fourth-color {
+ background: #755da3;
+}
--- /dev/null
+colors-1.css
\ No newline at end of file
--- /dev/null
+a, p, li, h1, h2, h3, h4, h5, h6 {
+ font-family: "Monospace", sans-serif;
+ font-size: 18;
+ color: purple;
+}
+
+a {
+ font-size: 24;
+}
+
+li {
+ list-style-type: none;
+}
+
+#title {
+ font-weight: 700;
+ font-size: 70;
+}
+
+.titlecard {
+ width: 512px;
+ border-radius: 16px;
+ padding: 32px;
+ margin:0 auto;
+}
+
+.card {
+ border-radius: 16px;
+ padding: 32px;
+}
+
+.link {
+ border-radius: 8px;
+ padding: 16px;
+ margin: 16px;
+}
--- /dev/null
+index-1.css
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
- <title>Gallery</title>
+ <title>{{ title }}</title>
+ <link rel="stylesheet" type="text/css" href="static/css/colors.css" />
+ <link rel="stylesheet" type="text/css" href="static/css/index.css" />
</head>
-<body>
- <h1>Gallery</h1>
+<body class="first-color">
+ <div class="titlecard second-color">
+ <h1>{{ title }}</h1>
- <ul id="navigation">
+ <ul class="card" id="navigation">
{% for gallery in galleries %}
- <li><a href="{{ gallery }}">{{ gallery }}</a></li>
+ <li class="link third-color"><a href="{{ gallery }}">{{ gallery }}</a></li>
{% endfor %}
</ul>
+ </div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
- <title>Pages</title>
+ <title>{{ title }}</title>
+ <link rel="stylesheet" type="text/css" href="static/css/colors.css" />
+ <link rel="stylesheet" type="text/css" href="static/css/index.css" />
</head>
-<body>
- <h1>Pages</h1>
+<body class="first-color">
+ <div class="titlecard second-color">
+ <h1>{{ title }}</h1>
{% if description %}
- <p>
+ <p class="card second-color">
{% autoescape false %}
{{ description }}
{% endautoescape %}
</p>
{% endif %}
- <ul id="navigation">
+ <ul class="card second-color" id="navigation">
{% for page in pages %}
- <li><a href="{{ gallery }}/{{ page.number }}">{{ page.number }}</a></li>
+ <li class="link third-color"><a href="{{ gallery }}/{{ page.number }}">{{ page.number }}</a></li>
{% endfor %}
</ul>
+ </div>
</body>
</html>