Kaynağa Gözat

Add author to the templates

master
Marien Fressinaud 6 yıl önce
ebeveyn
işleme
b5a61cf93e
5 değiştirilmiş dosya ile 36 ekleme ve 4 silme
  1. 2
    0
      Herisson/gallery.html.j2
  2. 2
    0
      Herisson/index.html.j2
  3. 17
    1
      Herisson/style/main.css
  4. 13
    3
      boop.py
  5. 2
    0
      configuration.py

+ 2
- 0
Herisson/gallery.html.j2 Dosyayı Görüntüle

@@ -12,6 +12,8 @@
<h1 class="app-page-header-title">
<a href="index.html">{{ site_title }}</a>
</h1>
<div class="separator"></div>
<a href="{{ site_author_website }}">par {{ site_author }}</a>
</div>
</header>


+ 2
- 0
Herisson/index.html.j2 Dosyayı Görüntüle

@@ -12,6 +12,8 @@
<h1 class="app-page-header-title">
<a href="index.html">{{ site_title }}</a>
</h1>
<div class="separator"></div>
<a href="{{ site_author_website }}">par {{ site_author }}</a>
</div>
</header>


+ 17
- 1
Herisson/style/main.css Dosyayı Görüntüle

@@ -101,7 +101,23 @@ img {

box-shadow: 0 0 1px #313131;
}
.app-page-header a {
.app-page-header .container {
display: flex;
align-items: center;
}
.app-page-header .container > * {
flex-grow: 0;
}
.app-page-header .container > .separator {
flex-grow: 1;
}
@media(max-width: 70rem) {
.app-page-header .container {
flex-direction: column;
}
}

.app-page-header h1 a {
color: #313131;
text-decoration: none;
}

+ 13
- 3
boop.py Dosyayı Görüntüle

@@ -9,7 +9,7 @@ from operator import itemgetter
from jinja2 import Environment, PackageLoader, select_autoescape
from PIL import Image, ExifTags

from configuration import SITE_TITLE, THEME
from configuration import SITE_TITLE, SITE_AUTHOR, SITE_AUTHOR_WEBSITE, THEME


PICTURES_DIR_NAME = "photos"
@@ -78,7 +78,12 @@ def generate_index(output_path, galleries):

with open(index_path, "w") as index_file:
index_file.write(
index_template.render(galleries=galleries, site_title=SITE_TITLE)
index_template.render(
galleries=galleries,
site_title=SITE_TITLE,
site_author=SITE_AUTHOR,
site_author_website=SITE_AUTHOR_WEBSITE,
)
)


@@ -98,7 +103,12 @@ def generate_gallery_index(output_path, gallery):

with open(gallery_index_path, "w") as gallery_file:
gallery_file.write(
gallery_template.render(gallery=gallery, site_title=SITE_TITLE)
gallery_template.render(
gallery=gallery,
site_title=SITE_TITLE,
site_author=SITE_AUTHOR,
site_author_website=SITE_AUTHOR_WEBSITE,
)
)



+ 2
- 0
configuration.py Dosyayı Görüntüle

@@ -1,2 +1,4 @@
SITE_TITLE = "Balades européennes"
SITE_AUTHOR = "@marien"
SITE_AUTHOR_WEBSITE = "https://marienfressinaud.fr"
THEME = "Herisson"

Loading…
İptal
Kaydet