add support theme
@ -1,3 +1,4 @@
|
||||
recursive-include templates *
|
||||
recursive-include static *
|
||||
recursive-include themes *
|
||||
include requirements.txt
|
||||
|
@ -118,7 +118,16 @@ def main():
|
||||
# XXX recursively merge directories
|
||||
if os.path.exists(os.path.join(os.getcwd(), "build", "static")):
|
||||
shutil.rmtree(os.path.join(os.getcwd(), "build", "static"))
|
||||
if os.path.exists(os.path.join(os.getcwd(), "static")):
|
||||
if settings.get("theme"):
|
||||
if os.path.exists(os.path.join(os.getcwd(), "templates")):
|
||||
shutil.rmtree(os.path.join(os.getcwd(), "templates"))
|
||||
shutil.copytree(os.path.join(os.path.split(os.path.realpath(__file__))[0], "themes", settings.get("theme"), "static"), os.path.join(os.getcwd(), "build", "static"))
|
||||
shutil.copytree(os.path.join(os.path.split(os.path.realpath(__file__))[0], "themes", settings.get("theme"), "templates"), os.path.join(os.getcwd(), "templates"))
|
||||
templates = Environment(loader=FileSystemLoader([os.path.realpath(os.path.join(os.getcwd(), "templates")), os.path.join(os.path.split(os.path.realpath(__file__))[0], "templates")]))
|
||||
index_template = templates.get_template("index.html")
|
||||
gallery_index_template = templates.get_template("gallery-index.html")
|
||||
page_template = templates.get_template("page.html")
|
||||
elif os.path.exists(os.path.join(os.getcwd(), "static")):
|
||||
shutil.copytree(os.path.join(os.getcwd(), "static"), os.path.join(os.getcwd(), "build", "static"))
|
||||
else:
|
||||
shutil.copytree(os.path.join(os.path.split(os.path.realpath(__file__))[0], "static"), os.path.join(os.getcwd(), "build", "static"))
|
||||
|
@ -9,9 +9,10 @@ main {
|
||||
}
|
||||
|
||||
.parallax-container {
|
||||
height: 500px;
|
||||
height: 800px;
|
||||
min-height: 250px;
|
||||
margin-bottom: 20px;
|
||||
background-color: rgba(0, 0, 0, .4);
|
||||
}
|
||||
|
||||
.parallax-container h1 {
|
Before Width: | Height: | Size: 322 KiB After Width: | Height: | Size: 322 KiB |
Before Width: | Height: | Size: 211 KiB After Width: | Height: | Size: 211 KiB |
Before Width: | Height: | Size: 194 KiB After Width: | Height: | Size: 194 KiB |
Before Width: | Height: | Size: 184 KiB After Width: | Height: | Size: 184 KiB |
Before Width: | Height: | Size: 193 KiB After Width: | Height: | Size: 193 KiB |
Before Width: | Height: | Size: 187 KiB After Width: | Height: | Size: 187 KiB |
Before Width: | Height: | Size: 184 KiB After Width: | Height: | Size: 184 KiB |
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 168 KiB After Width: | Height: | Size: 168 KiB |
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 86 KiB |
@ -0,0 +1,14 @@
|
||||
<div class="container baguette hide-on-med-and-down">
|
||||
{% set image = Image(section.image) %}
|
||||
{{ image.copy()}}
|
||||
<a href="{{ image }}">
|
||||
<img class="responsive-img" src="{{ image.generate_thumbnail("x2000") }}">
|
||||
</a>
|
||||
</div>
|
||||
<div class="container baguette hide-on-large-only">
|
||||
{% set image = Image(section.image) %}
|
||||
{{ image.copy()}}
|
||||
<a href="{{ image.generate_thumbnail("x1024") }}">
|
||||
<img class="responsive-img" src="{{ image.generate_thumbnail("x600") }}">
|
||||
</a>
|
||||
</div>
|
@ -1,7 +1,8 @@
|
||||
{% set image = Image(section.image) %}
|
||||
{{ image.copy() }}
|
||||
<div class="parallax-container z-depth-1 valign-wrapper">
|
||||
<div class="parallax"><img src="{{ image }}"></div>
|
||||
<div class="parallax hide-on-med-and-down"><img src="{{ image }}"></div>
|
||||
<div class="parallax hide-on-large-only"><img src="{{ image.generate_thumbnail("x1024") }}"></div>
|
||||
{% if section.text %}
|
||||
<div class="parallax-tittle white-text">
|
||||
<h1>{{ section.text.title }}</h1>
|
@ -7,11 +7,16 @@
|
||||
{% set plop = 12 // loop.length %}
|
||||
<div class="col m{{ plop }} l{{ plop }}">
|
||||
<div class="card">
|
||||
<div class="card-image">
|
||||
<div class="card-image hide-on-med-and-down">
|
||||
<a href="{{ image }}">
|
||||
<img class="responsive-img" src="{{ image.generate_thumbnail("x600") }}">
|
||||
</a>
|
||||
</div>
|
||||
<div class="card-image hide-on-large-only">
|
||||
<a href="{{ image.generate_thumbnail("x1024") }}">
|
||||
<img class="responsive-img" src="{{ image.generate_thumbnail("x600") }}">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if not loop.last %}
|