add: css and button to home page
This commit is contained in:
parent
97f05cee5e
commit
760bd86bf0
@ -27,7 +27,7 @@ def scan_pages(folders: list[Path]) -> list[Page]:
|
|||||||
raw: Path = Path(folder, folder.get_name() + ".NEF")
|
raw: Path = Path(folder, folder.get_name() + ".NEF")
|
||||||
for file in files:
|
for file in files:
|
||||||
if file.get_name().endswith(".png"):
|
if file.get_name().endswith(".png"):
|
||||||
page.add_picture(Picture(file, page=prev, raw=raw))
|
page.add_picture(Picture(file, page=page, raw=raw))
|
||||||
|
|
||||||
if len(page.get_pictures()) == 0:
|
if len(page.get_pictures()) == 0:
|
||||||
bar.next()
|
bar.next()
|
||||||
|
@ -19,7 +19,7 @@ class Path():
|
|||||||
def get_dirpath(self):
|
def get_dirpath(self):
|
||||||
return self._dirpath
|
return self._dirpath
|
||||||
|
|
||||||
def get_site_path(self):
|
def get_url(self):
|
||||||
site_path: Path = Path(sys.argv[1])
|
site_path: Path = Path(sys.argv[1])
|
||||||
return self._absolute_path[len(site_path._absolute_path):]
|
return self._absolute_path[len(site_path._absolute_path):]
|
||||||
|
|
||||||
|
@ -25,6 +25,9 @@ class Picture():
|
|||||||
self._albums_name.append("general")
|
self._albums_name.append("general")
|
||||||
self._is_reperoried: bool = is_repertoried
|
self._is_reperoried: bool = is_repertoried
|
||||||
|
|
||||||
|
def get_page(self):
|
||||||
|
return self._page
|
||||||
|
|
||||||
def get_albums_name(self):
|
def get_albums_name(self):
|
||||||
return self._albums_name
|
return self._albums_name
|
||||||
|
|
||||||
|
@ -1,3 +1,44 @@
|
|||||||
|
:root {
|
||||||
|
--bg1: #002b36;
|
||||||
|
--bg2: #073642;
|
||||||
|
--content1: #586e75;
|
||||||
|
--content2: #657b83;
|
||||||
|
--content3: #839496;
|
||||||
|
--content4: #93a1a1;
|
||||||
|
--lbg1: #eee8d5;
|
||||||
|
--lbg2: #fdf6e3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.picture-container {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
background-color: var(--bg2);
|
||||||
|
width: auto;
|
||||||
|
padding: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: red;
|
color: white;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
|
background-color: var(--bg1);
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
background-color: var(--content1);
|
||||||
|
padding: 10px;
|
||||||
|
margin: 10px;
|
||||||
|
height: 200px;
|
||||||
|
width: 200px;
|
||||||
}
|
}
|
@ -6,12 +6,12 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
{{album.name}}
|
|
||||||
caaaa
|
|
||||||
<h1>{{ album._name }}</h1>
|
<h1>{{ album._name }}</h1>
|
||||||
<div class="picture_container">
|
<div class="picture-container">
|
||||||
{% for picture in album._pictures %}
|
{% for picture in album._pictures %}
|
||||||
<img src="{{ picture.get_small().get_absolute_path() }}">
|
<a href="{{ picture.get_page().html.get_url() }}">
|
||||||
|
<img src="{{ picture.get_small().get_absolute_path() }}">
|
||||||
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
Reference in New Issue
Block a user