diff --git a/scanner/.gitignore b/scanner/.gitignore index f1f1c3e..837bdaf 100644 --- a/scanner/.gitignore +++ b/scanner/.gitignore @@ -1,3 +1,4 @@ +upload.sh *.pyc cache/* test/* diff --git a/scanner/PhotoAlbum.py b/scanner/PhotoAlbum.py index 33ea437..b5c6377 100644 --- a/scanner/PhotoAlbum.py +++ b/scanner/PhotoAlbum.py @@ -110,6 +110,7 @@ class Photo(object): self._metadata(image) self._thumbnails(image, thumb_path) def _metadata(self, image): + self._attributes["size"] = image.size try: info = image._getexif() except: @@ -125,8 +126,11 @@ class Photo(object): try: value = datetime.strptime(value, '%Y:%m:%d %H:%M:%S') except: - pass + pass self._attributes[decoded] = value + + if "Orientation" in self._attributes and self._attributes["Orientation"] in range(5, 9): + self._attributes["size"] = (self._attributes["size"][1], self._attributes["size"][0]) def _thumbnail(self, image, thumb_path, size, square=False): thumb_path = os.path.join(thumb_path, image_cache(self._path, size, square)) print "Thumbing %s" % thumb_path diff --git a/web/css/000-controls.css b/web/css/000-controls.css new file mode 100644 index 0000000..e43818e --- /dev/null +++ b/web/css/000-controls.css @@ -0,0 +1,89 @@ +body { + margin: 0; + padding: 0; + background-color: #222222; + font-family: "LM Roman", "Georgia", "Palatino Linotype", "Palatino", "Times New Roman", "Times", serif; + color: #FFFFFF; +} +a { + color: #88EE44; + text-decoration: none; +} +a:hover { + color: #DDDDDD; +} +#title { + position: absolute; + top: 0; + padding: 0.4em; + font-weight: bold; + font-size: 1.2em; +} +#loading { + display: none; +} + + +#album-view { + position: absolute; + top: 2.5em; + padding: 1em; +} +#thumbs { + line-height: 0; +} + +#thumbs img { + border: 0; + margin: 0; + padding: 0; +} +#subalbums { +} +.album-button { + float: left; + display: block; + width: 150px; + height: 150px; + margin-right: 10px; + margin-bottom: 5px; + margin-top: 5px; + text-align: center; + font-style: italic; + border: 1px #86A1B6 dotted; +} + + +#next, #back { + position: absolute; + width: auto; + font-size: 2.5em; + line-height: 0; + padding-top: 0.3em; +} +#back { + left: 0; +} +#next { + right: 0; +} +#photo { + border: 0; +} +#photo-view { + position: absolute; + bottom: 150px; + top: 2.5em; + margin: 0 auto; +} +.photo-view-container { + position: absolute; + height: 150px; + width: 100%; + bottom: 0; + top: auto !important; + overflow-x: auto; + overflow-y: hidden; + white-space: nowrap; + padding: 0 !important; +} diff --git a/web/css/000-main.css b/web/css/000-main.css deleted file mode 100644 index e69de29..0000000 diff --git a/web/css/001-fonts.css b/web/css/001-fonts.css new file mode 100644 index 0000000..20f68e3 --- /dev/null +++ b/web/css/001-fonts.css @@ -0,0 +1,24 @@ +@font-face { + font-family: "LM Roman"; + font-weight: bold; + font-style: normal; + src: url("/fonts/lmroman10-bold.otf"); +} +@font-face { + font-family: "LM Roman"; + font-weight: bold; + font-style: italic; + src: url("/fonts/lmroman10-bolditalic.otf"); +} +@font-face { + font-family: "LM Roman"; + font-weight: normal; + font-style: italic; + src: url("/fonts/lmroman10-italic.otf"); +} +@font-face { + font-family: "LM Roman"; + font-weight: normal; + font-style: normal; + src: url("/fonts/lmroman10-regular.otf"); +} \ No newline at end of file diff --git a/web/fonts/lmroman10-bold.otf b/web/fonts/lmroman10-bold.otf new file mode 100644 index 0000000..7d6afa7 Binary files /dev/null and b/web/fonts/lmroman10-bold.otf differ diff --git a/web/fonts/lmroman10-bolditalic.otf b/web/fonts/lmroman10-bolditalic.otf new file mode 100644 index 0000000..98297be Binary files /dev/null and b/web/fonts/lmroman10-bolditalic.otf differ diff --git a/web/fonts/lmroman10-italic.otf b/web/fonts/lmroman10-italic.otf new file mode 100644 index 0000000..b369873 Binary files /dev/null and b/web/fonts/lmroman10-italic.otf differ diff --git a/web/fonts/lmroman10-regular.otf b/web/fonts/lmroman10-regular.otf new file mode 100644 index 0000000..6a96b46 Binary files /dev/null and b/web/fonts/lmroman10-regular.otf differ diff --git a/web/index.html b/web/index.html index 8e97590..c96bfaa 100644 --- a/web/index.html +++ b/web/index.html @@ -3,21 +3,23 @@
-