diff options
Diffstat (limited to 'views')
| -rw-r--r-- | views/index.hbs | 10 | ||||
| -rw-r--r-- | views/layouts/layout.hbs | 10 | ||||
| -rw-r--r-- | views/questions.hbs | 57 | ||||
| -rw-r--r-- | views/user_profile_alt.hbs | 30 | ||||
| -rw-r--r-- | views/user_solutions.hbs | 8 |
5 files changed, 63 insertions, 52 deletions
diff --git a/views/index.hbs b/views/index.hbs index 214695b..8025281 100644 --- a/views/index.hbs +++ b/views/index.hbs @@ -67,11 +67,11 @@ name="search" placeholder="Enter course name"> <!-- Prompt Search --> - <span class="input-group-btn"> - <button id = 'go-button' - class="btn btn-default search-button go-button" - type="submit">Go!</button> - </span> + <span class="input-group-btn"> + <button id = 'go-button' + class="btn btn-default search-button go-button" + type="submit">Go!</button> + </span> </div> </div> <!-- Site Desciprtion --> diff --git a/views/layouts/layout.hbs b/views/layouts/layout.hbs index 76dddc0..aecff1d 100644 --- a/views/layouts/layout.hbs +++ b/views/layouts/layout.hbs @@ -25,7 +25,17 @@ <!--JS--> <script src="/assets/js/jquery-2.2.4.min.js"></script> <script src="/assets/js/bootstrap.min.js"></script> + <script src="/assets/js/script.js"></script> + {{# if userProfile}} + <script src="/assets/js/user_profile.js"></script> + {{/if}} + {{# if adminPanel}} + <script src="/assets/js/admin_panel.js"></script> + {{/if}} + {{# if homePage }} + <script src="/assets/js/home_page.js"></script> + {{/if}} </head> <body> diff --git a/views/questions.hbs b/views/questions.hbs index 1d62a2b..ebbbcc5 100644 --- a/views/questions.hbs +++ b/views/questions.hbs @@ -2,33 +2,22 @@ <div class = 'search container' id = 'solutions-div'> <!-- EXAM DETAILS --> - {{# if messages.error }} - <section class="alert alert-danger custom-Alert"> - <h4>{{ messages.error }}</h4> - </section> - {{/if}} - - <form action="/user/follow_exam/{{examInfo.id}}" method = 'post'> - <input type="hidden" name="_csrf" value="{{ csrfToken }}"> - <button class="col-xs-4 col-sm-2 col-md-2 col-lg-2 - col-xs-offset-4 col-sm-offset-5 col-md-offset-2 - col-lg-offset-2 rounded" id="add-solution" type="submit"> - <h3>Follow Exam</h3> - </button> - </form> - - <!--<a href="/user/follow_exam/{{../examInfo.id}}">--> - <!--<button class="col-xs-4 col-sm-2 col-md-2 col-lg-2--> - <!--col-xs-offset-4 col-sm-offset-5 col-md-offset-2--> - <!--col-lg-offset-2 rounded" id="add-solution">--> - <!--<h3>Follow Exam</h3>--> - <!--</button>--> - <!--</a>--> - - - <a href="http://www.cs.toronto.edu/~fpitt/CSC148/20131/tests/test1-0101.pdf" target='_blank'><img src="/assets/images/exam.png" class='exam-img img-responsive exam-info'></a> - - <section class='exam-info'> + <div class="row"> + {{# if messages.success }} + <section class="alert alert-success custom-Alert"> + <!-- Change those to banners later --> + <h4>{{ messages.success }}</h4> + </section> + {{ else }} + {{# if messages.error }} + <section class="alert alert-danger custom-Alert"> + <h4>{{ messages.error }}</h4> + </section> + {{/if}} + {{/if}} + </div> + <div class="row"> + <section class='exam-info col-sm-6 col-sm-offset-3'> <h3>{{examInfo.courseCode}}</h3> <p>{{examInfo.term}} {{examInfo.year}} {{examInfo.type}}</p> <p><em>Instructor(s): </em>{{examInfo.instructors}}</p> @@ -36,11 +25,17 @@ <p><em>Uploaded by:</em> {{examInfo.uploader}}</p> <p><em>Page count:</em> {{examInfo.pageCount}}</p> <p><em>Question count:</em> {{examInfo.questionCount}}</p> + <form action="/user/follow_exam/{{examInfo.id}}" method = 'post'> + <input type="hidden" name="_csrf" value="{{ csrfToken }}"> + <button class="btn btn-primary follow-exam-btn" id="add-solution" type="submit"> + <h3>Follow Exam</h3> + </button> + </form> </section> + </div> - <!-- QUESTION LISTINGS --> - - {{#each query}} + <!-- QUESTION LISTINGS --> + {{#each query}} <a href="/solutions/{{../examInfo.id}}/{{this.q_id}}"> <section class = 'solutions-card row'> <div class='pull-left col-sm-8 col-md-8'> @@ -48,7 +43,7 @@ <p><span class='questions-sol-num'>{{this.count}} solutions, </span> <span class = 'questions-comment'>{{this.comments}} comments</span></p> </div> <div class='pull-right right-arrow'> - <img class='rounded' src="/assets/images/right-arrow.png"> + <img class='rounded questions-arrow' src="/assets/images/right-arrow.svg"> </div> </section> </a> diff --git a/views/user_profile_alt.hbs b/views/user_profile_alt.hbs index 72baa86..cf657db 100644 --- a/views/user_profile_alt.hbs +++ b/views/user_profile_alt.hbs @@ -20,7 +20,8 @@ <ul class="nav navbar-nav " > <li><a href="#" class="prf-page">General</a></li> <li><a href="#" class="prf-page">Following</a></li> - <li><a href="#" class="prf-page">Friends</a></li> + <!-- Not implemented --> + <!--<li><a href="#" class="prf-page">Friends</a></li> --> <li><a href="#" class="prf-page">Send Message</a></li> <li><a href="#" class="prf-page">Inbox</a></li> <li><a href="#" class="prf-page">Comments</a></li> @@ -37,13 +38,13 @@ <div class="panel-body"> <!--- User-Profile Pages --> <div class="row" id="profile-general"> - <!-- User Image --> - <div class="col-md-3 col-lg-3 " align="center"> + <!-- User Image Not implemented --> + <!--<div class="col-md-3 col-lg-3 " align="center"> <img alt="User Pic" src="../assets/images/avatar.png" class="img-circle img-responsive"> - </div> + </div> --> <!-- User Details --> - <div class=" col-md-9 col-lg-9 "> + <div> <table class="table table-user-information"> <tbody> <tr> @@ -87,20 +88,20 @@ </div> </div> <div class="row" id="profile-follows"> - {{# if user.followers }} - <h3>You are being followed by:</h3> + {{# if user.examfollows }} + <h4>Here are the exams you are following:</h4> <div class="col-xs-offset-1 col-sm-offset-3 col-xs-10 col-sm-6"> <table class="table-condensed"> <tbody> - {{# each user.followers}} + {{# each user.examfollows}} <tr> <th> - <img class="img-circle img-responsive" - src="../assets/images/misc/user1.jpeg" alt="avatar"> + <a href="/questions/{{this._id}}">Course Code: {{this.course_code}}</a> </th> <th> - <h4>The Dude</h4> - <p>3 comments</p> + <h4>Term: {{this.term}}</h4> + <p>Year: {{this.year}}</p> + <p>Type: {{this.type}}</p> </th> </tr> @@ -112,6 +113,9 @@ <h3>You are not following any exams.</h3> {{/if}} </div> + + <!-- Friends not implemented --> + <!-- <div class="row" id="profile-friends"> <h3>Friends</h3> <div class="col-xs-offset-1 col-sm-offset-3 col-xs-10 col-sm-6"> @@ -151,7 +155,7 @@ </table> </div> </div> - + --> <div class="row" id="profile-send-message"> {{# if messages.success }} <section class="alert alert-success"> diff --git a/views/user_solutions.hbs b/views/user_solutions.hbs index f50499f..7123533 100644 --- a/views/user_solutions.hbs +++ b/views/user_solutions.hbs @@ -37,7 +37,8 @@ <section id="sol-" class="col-md-10 col-md-offset-1 rounded"> <div class="post-info"> <div class=""> - <img class="img-responsive img-circle user-image" src="/assets/images/misc/user1.jpeg"> + <!-- Avatar code here + <img class="img-responsive img-circle user-image" src="/assets/images/misc/user1.jpeg">--> <p class="username">{{this.author}}</p> </div> @@ -78,8 +79,9 @@ <ul class="list-group"> {{#each this.comments}} <li class="list-group-item"> - <img src="/assets/images/misc/user3.jpeg" - class="img-responsive img-circle comment-user-img"> + <!-- Avatar code here for comments --> + <!-- <img src="/assets/images/misc/user3.jpeg" + class="img-responsive img-circle comment-user-img"> --> <p class="comment-username"> <a href="/user_profile"> {{this.by}} |
