Commit 170f81a4 by Kyle Fiedler

More style for the textbook page and various style fixes

--HG--
branch : kf-refactor
parent b98d8337
...@@ -25,11 +25,13 @@ $('#hide_acc').click(function() { ...@@ -25,11 +25,13 @@ $('#hide_acc').click(function() {
<%include file="navigation.html" /> <%include file="navigation.html" />
<section class="main-content"> <section class="main-content">
<div id="accordion"> <div class="course-wrapper">
${accordion} <div id="accordion">
</div> ${accordion}
</div>
<section class="course-content"> <section class="course-content">
${content} ${content}
</section> </section>
</div>
</section> </section>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<%include file="navigation.html" /> <%include file="navigation.html" />
<section> <section class="main-content">
<h1>Help</h1> <h1>Help</h1>
<p> If you need help, first try <a href="discussion/questions/">asking a question in the forums</a> and in the IRC channel (irc.mitx.org, channel #6002). As the semester starts, we will add a Frequently Asked Questions section.</p> <p> If you need help, first try <a href="discussion/questions/">asking a question in the forums</a> and in the IRC channel (irc.mitx.org, channel #6002). As the semester starts, we will add a Frequently Asked Questions section.</p>
......
...@@ -68,51 +68,52 @@ $(function() { ...@@ -68,51 +68,52 @@ $(function() {
<%include file="navigation.html" /> <%include file="navigation.html" />
<section class="main-content"> <section class="main-content">
<section class="user-info"> <div class="profile-wrapper">
<section class="user-info">
<h1>${name}</h1>
<h1>${name}</h1>
<ul>
<li>Forum name: ${username}</li> <ul>
<li>E-mail: ${email}</li> <li>Forum name: ${username}</li>
<li>Location: ${location}</li> <li>E-mail: ${email}</li>
<li>Language: ${language}</li> <li>Location: ${location}</li>
<li>Password: ********</li> <li>Language: ${language}</li>
</ul> <li>Password: ********</li>
</ul>
<!-- <div><a href="#change_password_pop">Reset password</a></div> -->
<!-- hidden trigger for password --> <!-- <div><a href="#change_password_pop">Reset password</a></div> -->
<!-- hidden trigger for password -->
<div id="change_password_pop">
<h2>Password reset</h2> <div id="change_password_pop">
<h2>Password reset</h2>
<p>We'll e-mail you a password reset link at ${email}.</p>
<input id="id_email" type="hidden" name="email" maxlength="75" value="${email}" /> <p>We'll e-mail you a password reset link at ${email}.</p>
<input id="id_email" type="hidden" name="email" maxlength="75" value="${email}" />
<input type="button" id="pwd_reset_button" value="Reset Password" />
</div> <input type="button" id="pwd_reset_button" value="Reset Password" />
</div>
</section>
</section>
<section class="course-info"> <section class="course-info">
<h1>Course Progress</h1> <h1>Course Progress</h1>
<!-- <div id="description"></div> --> <!-- <div id="description"></div> -->
<ol> <ol>
% for hw in homeworks: % for hw in homeworks:
<li> <li>
<h2>${ hw['chapter'] }</h2> <h2>${ hw['chapter'] }</h2>
<h3>${ hw['section'] }</h3> <h3>${ hw['section'] }</h3>
<ul> <ul>
% for score in hw['scores']: % for score in hw['scores']:
<li>${ score[0] }/${ score[1] }</li> <li>${ score[0] }/${ score[1] }</li>
% endfor % endfor
</ul> </ul>
</li> </li>
% endfor % endfor
</ol> </ol>
</section> </section>
</div>
</section> </section>
...@@ -6,20 +6,27 @@ ...@@ -6,20 +6,27 @@
visibility: hidden; visibility: hidden;
} }
.sidebar { .wrapper {
width: grid-width(4); margin: 0 auto;
float: left; max-width: $max-width;
margin-right: $gw-gutter; width: grid-width(12);
text-align: left;
} }
.content { .button {
width: grid-width(8); @include box-shadow(inset 0 1px 0 lighten($mit-red, 10%), 0 0 3px #ccc);
float: left; @include linear-gradient(lighten($mit-red, 5%), darken($mit-red, 5%));
} @include border-radius(3px);
border: 1px solid darken($mit-red, 10%);
padding: 10px 15px;
color: #fff;
font: bold $body-font-size $body-font-family;
text-shadow: 0 1px 0 darken($mit-red, 10%);
cursor: pointer;
.wrapper { &:hover, &:focus {
margin: 0 auto; @include box-shadow(inset 0 1px 0 lighten($mit-red, 20%), 0 0 3px #ccc);
max-width: $max-width; @include linear-gradient(lighten($mit-red, 10%), darken($mit-red, 5%));
width: grid-width(12); border: 1px solid darken($mit-red, 20%);
text-align: left; }
} }
...@@ -8,11 +8,6 @@ ...@@ -8,11 +8,6 @@
@return $base-line-height * $amount; @return $base-line-height * $amount;
} }
@mixin border-box {
@include box-sizing(border-box);
}
// Variables // Variables
// ---------------------------------------- // // ---------------------------------------- //
...@@ -22,8 +17,8 @@ $body-font-size: 14px; ...@@ -22,8 +17,8 @@ $body-font-size: 14px;
// grid // grid
$columns: 12; $columns: 12;
$column-width: golden-ratio($body-font-size, 4); $column-width: 80px;
$gutter-width: golden-ratio($body-font-size, 1); $gutter-width: 25px;
$max-width: ($columns * $column-width) + (($columns - 1) * $gutter-width); $max-width: ($columns * $column-width) + (($columns - 1) * $gutter-width);
$gw-column: perc($column-width); $gw-column: perc($column-width);
...@@ -31,7 +26,7 @@ $gw-gutter: perc($gutter-width); ...@@ -31,7 +26,7 @@ $gw-gutter: perc($gutter-width);
$body-line-height: golden-ratio($body-font-size, 1); $body-line-height: golden-ratio($body-font-size, 1);
// color // color
$light-gray: #f3f3f3; $light-gray: #ddd;
$dark-gray: #333; $dark-gray: #333;
$mit-red: #993333; $mit-red: #993333;
......
h1 {
}
h2 {
}
h3 {
}
p { p {
margin-bottom: $body-line-height; margin-bottom: $body-line-height;
} }
#{$all-text-inputs}, textarea {
@include border-radius(3px);
@include box-shadow(0 -1px 0 #fff);
@include linear-gradient(#eee, #fff);
border: 1px solid #bbb;
font: $body-font-size $body-font-family;
padding: 8px;
&:focus {
border-color: $mit-red;
}
}
input[type="submit"], input[type="button"], button {
// @extend .button;
}
div#accordion { div.course-wrapper {
@include box-shadow( inset -1px 0 0 #f6f6f6); display: table;
background: #e3e3e3; width: 100%;
border-right: 1px solid #d3d3d3;
display: table-cell;
font-family: $body-font-family;
text-shadow: 0 1px 0 #f6f6f6;
vertical-align: top;
width: 280px;
h3 { div#accordion {
&.ui-accordion-header { @include box-shadow( inset -1px 0 0 #f6f6f6);
color: #000; background: #e3e3e3;
border-right: 1px solid #d3d3d3;
display: table-cell;
font-family: $body-font-family;
text-shadow: 0 1px 0 #f6f6f6;
vertical-align: top;
width: grid-width(3);
a { h3 {
font-size: $body-font-size; &.ui-accordion-header {
color: lighten($text-color, 10%); color: #000;
}
&.ui-state-default { a {
background: none; font-size: $body-font-size;
font-weight: normal; color: lighten($text-color, 10%);
border: none; }
border-bottom: 1px solid #d3d3d3;
@include box-shadow(0 1px 0 #eee);
}
&.ui-state-hover { &.ui-state-default {
border: none; background: none;
border-bottom: 1px solid #d3d3d3; font-weight: normal;
} border: none;
border-bottom: 1px solid #d3d3d3;
@include box-shadow(0 1px 0 #eee);
}
&.ui-state-active { &.ui-state-hover {
background: none; border: none;
border-bottom: 1px solid #aaa; border-bottom: 1px solid #d3d3d3;
border: 0; }
color: #000;
font-weight: bold;
@include box-shadow(none);
a { &.ui-state-active {
background: none;
border-bottom: 1px solid #aaa;
border: 0;
color: #000; color: #000;
font-weight: bold;
@include box-shadow(none);
a {
color: #000;
}
} }
} }
} }
}
ul.ui-accordion-content { ul.ui-accordion-content {
@include border-radius(0); @include border-radius(0);
@include box-shadow( inset -1px 0 0 #e6e6e6); @include box-shadow( inset -1px 0 0 #e6e6e6);
background: #d6d6d6; background: #d6d6d6;
border: none; border: none;
border-top: 1px solid #c3c3c3; border-top: 1px solid #c3c3c3;
border-bottom: 1px solid #c3c3c3; border-bottom: 1px solid #c3c3c3;
font-size: 12px; font-size: 12px;
margin: 0; margin: 0;
li {
&.active {
font-weight: bold;
}
}
}
} }
}
section.course-content { section.course-content {
@include box-sizing(border-box); @include box-sizing(border-box);
display: table-cell; display: table-cell;
padding: $gw-gutter; padding: $gw-gutter;
vertical-align: top; vertical-align: top;
width: grid-width(9);
}
} }
section.user-info { div.profile-wrapper {
width: grid-width(6); display: table;
float: left;
margin-right: $gw-gutter; section.user-info {
} @include box-sizing(border-box);
margin-right: $gw-gutter;
padding: $body-line-height;
width: grid-width(6);
background: #e3e3e3;
border-right: 1px solid #d3d3d3;
text-shadow: 0 1px 0 #f6f6f6;
display: table-cell;
}
section.course-info { section.course-info {
width: grid-width(6); @include box-sizing(border-box);
float: left; padding: $body-line-height;
width: grid-width(6);
display: table-cell;
ul { ul {
li { li {
display: inline-block; display: inline-block;
padding-right: 1em; padding-right: 1em;
}
} }
} }
} }
ul#booknav { div.book-wrapper {
@extend .sidebar; display: table;
}
ul#booknav {
@include box-shadow( inset -1px 0 0 #f6f6f6);
@include box-sizing(border-box);
background: #e3e3e3;
border-right: 1px solid #d3d3d3;
font-family: $body-font-family;
padding: $body-line-height;
text-shadow: 0 1px 0 #f6f6f6;
vertical-align: top;
width: grid-width(3);
min-width: 240px;
display: table-cell;
li {
ul {
background: none;
}
}
}
section.book {
@include box-sizing(border-box);
padding: $body-line-height;
vertical-align: top;
width: grid-width(9) + $gw-gutter;
display: table-cell;
nav {
background: #F6EFD4;
border-bottom: 1px solid darken(#F6EFD4, 10%);
margin: (-$body-line-height) (-$body-line-height) $body-line-height;
ul {
@extend .clearfix;
li {
padding: 15px;
&.last {
float: left;
}
&.next {
float: right;
}
a {
font-size: 12px;
text-transform: uppercase;
color: darken(#F6EFD4, 80%);
text-shadow: 0 1px 0 #fff;
section.book { &:hover {
@extend .content; color: darken(#F6EFD4, 60%);
}
}
}
}
}
img { section.page {
border: 1px solid $border-color; img {
border: 1px solid $border-color;
}
}
} }
} }
...@@ -37,24 +37,27 @@ function next_page() { ...@@ -37,24 +37,27 @@ function next_page() {
<%include file="navigation.html" /> <%include file="navigation.html" />
<section class="main-content"> <section class="main-content">
<ul id="booknav" class="treeview-booknav"> <div class="book-wrapper">
<%include file="book_toc.html" /> <ul id="booknav" class="treeview-booknav">
</ul> <%include file="book_toc.html" />
</ul>
<section class="book">
<nav> <section class="book">
<ol>
<li> <section class="page">
<a href="javascript:prev_page()">Last page</a> <nav>
</li> <ul>
<li> <li class="last">
<a href="javascript:next_page()">Next page</a> <a href="javascript:prev_page()">Last page</a>
</li> </li>
</ol> <li class="next">
</nav> <a href="javascript:next_page()">Next page</a>
</li>
<section class="page"> </ul>
<img id="bookpage" src="/static/book/p${ "%03i"%(page) }.jpg"> </nav>
<img id="bookpage" src="/static/book/p${ "%03i"%(page) }.jpg">
</section>
</section> </section>
</section> </div>
</section> </section>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment