summaryrefslogtreecommitdiff
path: root/imdb-lookup/index.jinja2.html
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2014-11-22 20:54:32 +0100
committerYves Fischer <yvesf-git@xapek.org>2014-11-22 20:54:32 +0100
commitc08d2b4a03f89c6fe5384474febb2e2f93a25ee2 (patch)
tree3401a9a0bc3b54c9344aab4ee60766c72c6ebe3f /imdb-lookup/index.jinja2.html
parent58d309ed92dc37670635fb7c60a37d7fdada68bf (diff)
downloadscripts-c08d2b4a03f89c6fe5384474febb2e2f93a25ee2.tar.gz
scripts-c08d2b4a03f89c6fe5384474febb2e2f93a25ee2.zip
css
Diffstat (limited to 'imdb-lookup/index.jinja2.html')
-rw-r--r--imdb-lookup/index.jinja2.html93
1 files changed, 57 insertions, 36 deletions
diff --git a/imdb-lookup/index.jinja2.html b/imdb-lookup/index.jinja2.html
index a87092e..019e937 100644
--- a/imdb-lookup/index.jinja2.html
+++ b/imdb-lookup/index.jinja2.html
@@ -5,51 +5,72 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{{title}}</title>
+ <style>
+ .box {
+ margin: 2em 5em auto;
+ border-radius: 5px;
+ border: 2px solid gray;
+ box-shadow: 0px 0px 30px 0px gray;
+ background-color: #fafafa;
+ clear: both;
+ }
+ .td1 {
+ width: 1em;
+ font-size: 18pt;
+ padding: 5px;
+ }
+ .td2 {
+ margin: 10px;
+ width: 185px;
+ float: left;
+ min-height: 200px;
+ box-shadow: 0px 0px 5px 0px gray;
+ }
+ .td3 { padding-left: 2em; }
+ .td3 table td { padding: .2em; }
+ </style>
</head>
<body>
- <h1>List of Movies</h1>
{% for (filename, imdb_id) in input %}
{% set info = tmdbcache.infos(imdb_id) %}</h2>
{% set posterBase64 = tmdbcache.poster_base64(info['poster_path']) %}
{% if info %}
- <div style="clear: left; padding-top: 3em;">
- <h2 style="">
- {% if "vote_average" in info.keys() %}
- {{ " ".join(["★"] * int(info["vote_average"])) }}
- <span style="color:gray;">
- {{ " ".join(["☆"] * (10-int(info["vote_average"]))) }}
- </span>
- {% endif %}
- {{ info.title }}
- </h2>
- <div style="width: 185px; float: left; min-height: 200px; border: 2px solid gray;">
- {% if posterBase64 %}
- <a href="{{urlencode(filename)}}">
- <img src="{{ posterBase64 }}" />
- </a>
- {% else %}
- <span> no image </span>
- {% endif %}
- </div>
- <div style="">
- <div style="font-size: 1.2em; padding: 2em;">
- {{ info.overview }}
- </div>
- <table style="padding: 2em;">
- {% for (key, value) in info.items() %}
- {% if key in ['runtime','adult','homepage','release_date','original_title'] %}
- <tr>
- <td style="padding: 0.2em; font-style: italic;">{{ key }}</td>
- <td style="padding: 0.2em;">{{ value }}</td>
- </tr>
+ <div class="box">
+ <table>
+ <tr>
+ {% if "vote_average" in info.keys() %}
+ <td class="td1">
+ <span style="color:gray;">{{ " ".join(["☆"] * (10-int(info["vote_average"]))) }}</span>
+ <span style="color: #ffd700;">{{ " ".join(["★"] * int(info["vote_average"])) }}</span>
+ </td>
{% endif %}
- {% endfor %}
- </table>
- </div>
+ <td class="td2">
+ {% if posterBase64 %}
+ <a href="{{urlencode(filename)}}"><img src="{{ posterBase64 }}" /></a>
+ {% else %}
+ <span> no image </span>
+ {% endif %}
+ </td>
+ <td class="td3">
+ <div style="font-size: 2em;">{{ info.title }}</div>
+ <div style="font-size: 1.2em;">{{ info.overview }}</div>
+ <table style="padding: 2em;">
+ {% for (key, value) in info.items() %}
+ {% if key in ['runtime','adult','homepage','release_date','original_title'] %}
+ <tr>
+ <td style="font-style: italic;">{{ key }}</td>
+ <td>{{ value }}</td>
+ </tr>
+ {% endif %}
+ {% endfor %}
+ </table>
+ </td>
+ </tr>
+ </table>
</div>
- {% else %}
+ {% else %}
<span>No infos for {{filename}} {{imdb_id}}</span>
- {% endif %}
+ {% endif %}
{% endfor %}
</body>
</html>