Compare commits
No commits in common. "bb0973917d167710c3d5f20b73d0ee93c96b8fde" and "73dfaf4622e93d377b9d88bc26ccd9c5cb386c8a" have entirely different histories.
bb0973917d
...
73dfaf4622
@ -1,44 +0,0 @@
|
|||||||
server {
|
|
||||||
listen 80;
|
|
||||||
server_name localhost;
|
|
||||||
|
|
||||||
#access_log /var/log/nginx/host.access.log main;
|
|
||||||
|
|
||||||
location / {
|
|
||||||
root /usr/share/nginx/html;
|
|
||||||
index index.html index.htm;
|
|
||||||
autoindex on;
|
|
||||||
}
|
|
||||||
|
|
||||||
#error_page 404 /404.html;
|
|
||||||
|
|
||||||
# redirect server error pages to the static page /50x.html
|
|
||||||
#
|
|
||||||
error_page 500 502 503 504 /50x.html;
|
|
||||||
location = /50x.html {
|
|
||||||
root /usr/share/nginx/html;
|
|
||||||
}
|
|
||||||
|
|
||||||
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
|
|
||||||
#
|
|
||||||
#location ~ \.php$ {
|
|
||||||
# proxy_pass http://127.0.0.1;
|
|
||||||
#}
|
|
||||||
|
|
||||||
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
|
||||||
#
|
|
||||||
#location ~ \.php$ {
|
|
||||||
# root html;
|
|
||||||
# fastcgi_pass 127.0.0.1:9000;
|
|
||||||
# fastcgi_index index.php;
|
|
||||||
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
|
|
||||||
# include fastcgi_params;
|
|
||||||
#}
|
|
||||||
|
|
||||||
# deny access to .htaccess files, if Apache's document root
|
|
||||||
# concurs with nginx's one
|
|
||||||
#
|
|
||||||
#location ~ /\.ht {
|
|
||||||
# deny all;
|
|
||||||
#}
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
version: "3.8"
|
|
||||||
services:
|
|
||||||
my-pictures:
|
|
||||||
image: nginx
|
|
||||||
volumes:
|
|
||||||
- ./test_out:/usr/share/nginx/html
|
|
||||||
- ./config:/etc/nginx/conf.d/
|
|
||||||
ports:
|
|
||||||
- 8089:80
|
|
||||||
networks: {}
|
|
@ -63,12 +63,5 @@ class Page():
|
|||||||
return None
|
return None
|
||||||
return self._exif
|
return self._exif
|
||||||
|
|
||||||
def render_exif(self):
|
|
||||||
if not self.get_exif():
|
|
||||||
return None
|
|
||||||
|
|
||||||
with open(self._exif.get_absolute_path()) as f:
|
|
||||||
return f.read()
|
|
||||||
|
|
||||||
def get_raw(self):
|
def get_raw(self):
|
||||||
return self._raw
|
return self._raw
|
@ -17,7 +17,7 @@ class Picture():
|
|||||||
def __init__(self, picture_path: Path, page = None, raw: Path|None = None, albums_name: list[str] = None, is_repertoried: bool = True):
|
def __init__(self, picture_path: Path, page = None, raw: Path|None = None, albums_name: list[str] = None, is_repertoried: bool = True):
|
||||||
self._large: Path = picture_path
|
self._large: Path = picture_path
|
||||||
self._small: Path = Path(picture_path.get_absolute_path()[:-4] + "_small.jpg")
|
self._small: Path = Path(picture_path.get_absolute_path()[:-4] + "_small.jpg")
|
||||||
self._profile_file: Path = Path(picture_path.get_absolute_path() + ".out.pp3")
|
self._export_file: Path = Path(picture_path.get_absolute_path() + ".out.pp3")
|
||||||
self._raw: Path|None = raw
|
self._raw: Path|None = raw
|
||||||
self._page: Page = page
|
self._page: Page = page
|
||||||
self._albums_name: list[str] = albums_name or []
|
self._albums_name: list[str] = albums_name or []
|
||||||
@ -39,8 +39,8 @@ class Picture():
|
|||||||
def get_large(self):
|
def get_large(self):
|
||||||
return self._large
|
return self._large
|
||||||
|
|
||||||
def get_profile_file(self):
|
def get_export_file(self):
|
||||||
return self._profile_file
|
return self._export_file
|
||||||
|
|
||||||
def gen_small(self):
|
def gen_small(self):
|
||||||
im = Image.open(self._large.get_absolute_path()).convert("RGB")
|
im = Image.open(self._large.get_absolute_path()).convert("RGB")
|
||||||
|
@ -10,74 +10,61 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: var(--bg1);
|
|
||||||
display: flex;
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
width: 50%;
|
||||||
margin: 15% 15%;
|
background-color: var(--bg1);
|
||||||
margin-top: 5%;
|
margin: auto;
|
||||||
height: auto;
|
margin-top: 10px;
|
||||||
|
margin-bottom: 50px;
|
||||||
|
color: lightgray;
|
||||||
}
|
}
|
||||||
|
|
||||||
.readme {
|
body * {
|
||||||
background-color: var(--bg2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.picture-container {
|
|
||||||
background-color: var(--bg2);
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.picture-container-item {
|
|
||||||
padding: 5px;
|
|
||||||
background-color: var(--content1);
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
max-width: 100%;
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.meta-picture, .navigation {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: space-between;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile {
|
.picture-container {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.picture-container-element {
|
||||||
|
margin-top: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.readme {
|
||||||
|
border: 1px solid;
|
||||||
|
background-color: var(--bg2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.readme-content {
|
||||||
|
margin: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.export,
|
||||||
|
.next {
|
||||||
|
margin-top: 0px;
|
||||||
|
display: block;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.download {
|
||||||
|
margin-top: 10px;
|
||||||
|
background-color: var(--bg2);
|
||||||
|
text-align: center;
|
||||||
|
padding-bottom: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navigation,
|
||||||
|
.meta-picture {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: white;
|
color: white;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-size: 1.5rem;
|
font-size: 1.5rem;
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width:767px) {
|
|
||||||
body {
|
|
||||||
margin: 0% 0%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.exif, .readme {
|
|
||||||
width: 100%;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.download {
|
|
||||||
width: 100%;
|
|
||||||
background-color: var(--bg2);
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.exif summary {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.exif details {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
background-color: var(--bg2);
|
|
||||||
}
|
}
|
@ -16,45 +16,33 @@
|
|||||||
</div>
|
</div>
|
||||||
{% if page._readme.exist() %}
|
{% if page._readme.exist() %}
|
||||||
<div class="readme">
|
<div class="readme">
|
||||||
<details>
|
|
||||||
<summary>
|
|
||||||
README
|
|
||||||
</summary>
|
|
||||||
<div class="readme-content">
|
<div class="readme-content">
|
||||||
{{page.render_readme()}}
|
{{page.render_readme()}}
|
||||||
</div>
|
</div>
|
||||||
</details>
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="picture-container">
|
|
||||||
{% for picture in page._pictures %}
|
{% for picture in page._pictures %}
|
||||||
<div class="picture-container-item">
|
<div class="picture-container">
|
||||||
<a href="{{ picture.get_small().get_url() }}">
|
<div class="picture-container-element">
|
||||||
<img src='{{ picture.get_small().get_url() }}'>
|
<img src='{{ picture.get_small().get_url() }}'>
|
||||||
</a>
|
|
||||||
<div class="meta-picture">
|
<div class="meta-picture">
|
||||||
<a href="{{ picture.get_large().get_url() }}">Large</a>
|
<a href="{{ picture.get_large().get_url() }}">Large</a>
|
||||||
{% if picture._profile_file.exist() %}
|
{% if picture._export_file.exist() %}
|
||||||
<a class="profile" href="{{ picture.get_profile_file().get_url() }}">Raw therapee profile</a>
|
<a class="export" href="{{ picture.get_export_file().get_url() }}">export file</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
{% if page.get_raw().exist() or page.get_exif() %}
|
||||||
{% if page.get_raw().exist() %}
|
|
||||||
<div class="download">
|
<div class="download">
|
||||||
<h1>Download</h1>
|
<h1>Download</h1>
|
||||||
|
{% if page.get_raw().exist() %}
|
||||||
<a href="{{ page.get_raw() }}">RAW</a>
|
<a href="{{ page.get_raw() }}">RAW</a>
|
||||||
</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if page.get_exif() %}
|
{% if page.get_exif() %}
|
||||||
<div class="exif">
|
<a href="{{ page.get_exif().get_url() }}">Exif</a>
|
||||||
<details>
|
{% endif %}
|
||||||
<summary>Exif</summary>
|
|
||||||
<pre>
|
|
||||||
{{ page.render_exif() }}
|
|
||||||
</pre>
|
|
||||||
</details>
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
Reference in New Issue
Block a user