diff options
Diffstat (limited to 'views/projects')
| -rw-r--r-- | views/projects/layouts-modal.ejs | 26 | ||||
| -rw-r--r-- | views/projects/list-projects.ejs | 42 |
2 files changed, 49 insertions, 19 deletions
diff --git a/views/projects/layouts-modal.ejs b/views/projects/layouts-modal.ejs index 34dc9af..0d648cd 100644 --- a/views/projects/layouts-modal.ejs +++ b/views/projects/layouts-modal.ejs @@ -3,14 +3,18 @@ <div class="box"> <div class="templates"> - <h1>Edit Room Layouts</h1> + <h2>Edit Room Layouts</h2> + <div class="templates-list"> + </div> + <form> + <input data-role="create-new-blueprint" class="button_text" type="submit" value="Trace a Blueprint"> + <input data-role="create-new-layout" class="button_text" type="submit" value="Make a Standard Layout"> + </form> </div> <div class="no-templates"> There are no room layouts available. Please <a href="/layout/new">create a new one.</a> </div> - <form> - <input data-role="create-new-layout" class="button_text" type="submit" value="New Layout"> - </form> + </div> </div> @@ -19,7 +23,9 @@ <div class="box"> <div class="templates"> - <h1>Your Projects</h1> + <h2>Your Projects</h2> + <div class="templates-list"> + </div> </div> <div class="no-templates"> </div> @@ -33,8 +39,16 @@ <span class="close">X</span> <div class="box"> - <h1>Choose Room Template</h1> <div class="templates"> + <h2>Select a Room Template</h2> + + <div class="templates-list"> + </div> + + <form> + <input data-role="create-new-blueprint" class="button_text" type="submit" value="trace a blueprint"> + <input data-role="create-new-layout" class="button_text" type="submit" value="or make your own template"> + </form> </div> <div class="no-templates"> There are no room layouts available. Please <a href="/layout/new">create a new one.</a> diff --git a/views/projects/list-projects.ejs b/views/projects/list-projects.ejs index 537d409..2749b0e 100644 --- a/views/projects/list-projects.ejs +++ b/views/projects/list-projects.ejs @@ -1,23 +1,39 @@ [[ if (projects.length) { ]] - + <div class="projectList"> [[ projects.forEach(function(project, i) { ]] - - <span class="room"> - <iframe src="/project/[[- project.slug ]]/view?noui=1&mute=1" class="embed"></iframe> - [[ if (String(user._id) == String(project.user_id)) { ]] - <a href="/project/[[- project.slug ]]/edit"><div class="editBtn">edit</div></a> - [[ } ]] - <div class="holder"> - <a href="/project/[[- project.slug ]]" class="roomName"> - [[- project.name ]]<br> - [[- project.date ]] - </a> - </div> + [[ if (i > 5) { return } ]] + [[ if (String(user._id) == String(project.user_id)) { ]] + <a href="/project/[[- project.slug ]]/edit" class="projectItem" data-userid="[[- project.user_id ]]"> + [[ } else { ]] + <a href="/project/[[- project.slug ]]" class="projectItem" data-userid="[[- project.user_id ]]"> + [[ } ]] + <span class="room" style="background-color: rgb([[- project.color ]]);"> + <span class="mask" style="background-image: url([[- project.photo ]]);"> + </span> + <span class="images" data-mediaCount="[[- Math.min(project.media.length, 4) ]]"> + [[ mediaCount = 0 ]] + [[ project.media.some(function(media){ ]] + [[ if (media.media.type != "image") { return false } ]] + [[ if (++mediaCount > 4) { return true } ]] + <div style="background-image:url([[- media.media.url ]])"></div> + [[ }) ]] + </span> </span> + <label> + [[- project.name ]]<br> + Created – [[- project.date ]] + </label> + + </a> [[ }) ]] + + [[ if (projects.length > 6) { ]] + <a href="#" class="viewMore btn">view more</a> + [[ } ]] + </div> [[ } ]] |
