diff options
| author | Jules Laplace <jules@okfoc.us> | 2014-10-08 16:11:19 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2014-10-08 16:11:19 -0400 |
| commit | 084769b40b5ab5dc8fa2f2dfa82d1ebc4ff41795 (patch) | |
| tree | 50e72f9c5e3c243bfd70f4e6f1c4794194a6330d | |
| parent | dc553c1adc365c8a6201c13ae622f7d8a3040725 (diff) | |
don't remove h1
| -rw-r--r-- | public/assets/javascripts/ui/site/LayoutsModal.js | 2 | ||||
| -rwxr-xr-x | public/assets/stylesheets/app.css | 14 | ||||
| -rw-r--r-- | views/projects/list-projects.ejs | 8 |
3 files changed, 11 insertions, 13 deletions
diff --git a/public/assets/javascripts/ui/site/LayoutsModal.js b/public/assets/javascripts/ui/site/LayoutsModal.js index 8eaf081..ef6a36c 100644 --- a/public/assets/javascripts/ui/site/LayoutsModal.js +++ b/public/assets/javascripts/ui/site/LayoutsModal.js @@ -19,7 +19,7 @@ var LayoutsIndex = View.extend({ this.$form.hide() this.$noTemplates.show() } - this.$templates.empty() + this.$templates.children("span").remove() data.forEach(function(room){ var $span = $("<span>") $span.data("slug", room.slug) diff --git a/public/assets/stylesheets/app.css b/public/assets/stylesheets/app.css index f320db7..a8f8e51 100755 --- a/public/assets/stylesheets/app.css +++ b/public/assets/stylesheets/app.css @@ -361,29 +361,28 @@ iframe.embed { text-align: center; overflow: hidden; background-size: cover; - background-repeat: no-repeat; } .room .images { position: absolute; top: 0; left: 0; - z-index: -1; + z-index: 2; width: 100%; height: 100%; text-align: center; overflow: hidden; } .room .images img { - width: 50%; + width: 30%; position: absolute; } .room .images[data-mediacount='1'] img:nth-child(1) { left: 20%; top: 20%; } -.room .images[data-mediacount='2'] img:nth-child(1) { left: 51%; bottom: 0%; width: auto; height: 100%; } -.room .images[data-mediacount='2'] img:nth-child(2) { right: 51%; bottom: 0%; width: auto; height: 100%; } +.room .images[data-mediacount='2'] img:nth-child(1) { left: 51%; bottom: 0%; width: auto; height: 30%; } +.room .images[data-mediacount='2'] img:nth-child(2) { right: 51%; bottom: 0%; width: auto; height: 30%; } .room .images[data-mediacount='3'] img:nth-child(1) { right: 51%; bottom: 41%; } -.room .images[data-mediacount='3'] img:nth-child(2) { left: 51%; bottom: 0%; width:auto; height:100%;} +.room .images[data-mediacount='3'] img:nth-child(2) { left: 51%; bottom: 0%; width:auto; height:30%;} .room .images[data-mediacount='3'] img:nth-child(3) { right: 51%; top: 61%; } .room .images[data-mediacount='4'] img:nth-child(1) { right: 51%; bottom: 41%; } @@ -702,8 +701,7 @@ border-left: 1px solid black; } .templates span .image { background-position: center; - background-size: contain; - background-repeat: no-repeat; + background-size: cover; background-color: #fff; width: 20vw; height: 15vw; diff --git a/views/projects/list-projects.ejs b/views/projects/list-projects.ejs index f469f5c..45b73e2 100644 --- a/views/projects/list-projects.ejs +++ b/views/projects/list-projects.ejs @@ -11,16 +11,16 @@ [[ } ]] <span class="room" style="background-color: rgb([[- project.color ]]);"> - <span class="images" data-mediaCount="[[- Math.min(project.media.length, 1) ]]"> + <span class="mask" style="background-image: url([[- project.photo ]]);"> + </span> + <span class="images" data-mediaCount="[[- Math.min(project.media.length, 3) ]]"> [[ mediaCount = 0 ]] [[ project.media.some(function(media){ ]] [[ if (media.media.type != "image") { return false } ]] - [[ if (++mediaCount > 1) { return true } ]] + [[ if (++mediaCount > 3) { return true } ]] <img src="[[- media.media.url ]]"> [[ }) ]] </span> - <span class="mask" style="background-image: url([[- project.photo ]]);"> - </span> </span> <label> |
