Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

More fixes to testing CSS to mirror the real site

  • Loading branch information...
commit 14568ac092c29496218a62f3d20ce9f56a7435ce 1 parent 05ab8f7
@spicyj spicyj authored
View
4 build/update-khan-site.sh
@@ -3,8 +3,8 @@
PACKAGES="shared exercises"
BASE_DIR=".."
-DEV_CSS="${BASE_DIR}/khan-exercises/css/khan-exercise-dev.css"
-OUTPUT="${BASE_DIR}/khan-exercises/css/khan-site.css"
+DEV_CSS="css/khan-exercise-dev.css"
+OUTPUT="css/khan-site.css"
for package in ${PACKAGES}; do
if [ ! -f ${BASE_DIR}/stylesheets/${package}-package/combined.css ]; then
View
17 css/khan-exercise-dev.css
@@ -1,22 +1,21 @@
-#problem-and-answer {
- margin-left: 80px;
- padding: 20px;
- width: 864px;
- background-color: #f8f8f8;
+.exercises-body {
+ /* Activate GPU rendering */
+ -webkit-transform: translatez(0);
}
#workarea {
width: 514px;
}
-body.debug #workarea {
- outline: 1px dashed #ddd;
-}
-
#hintsarea {
width: 494px;
}
+body.debug #workarea,
body.debug #hintsarea {
outline: 1px dashed #ddd;
}
+
+body.debug #extras .debug-mode {
+ display: none;
+}
View
17 css/khan-site.css
@@ -7902,25 +7902,24 @@ a.big-button:active > div {
position: relative;
top: -3px;
}
-#problem-and-answer {
- margin-left: 80px;
- padding: 20px;
- width: 864px;
- background-color: #f8f8f8;
+.exercises-body {
+ /* Activate GPU rendering */
+ -webkit-transform: translatez(0);
}
#workarea {
width: 514px;
}
-body.debug #workarea {
- outline: 1px dashed #ddd;
-}
-
#hintsarea {
width: 494px;
}
+body.debug #workarea,
body.debug #hintsarea {
outline: 1px dashed #ddd;
}
+
+body.debug #extras .debug-mode {
+ display: none;
+}
View
23 exercises/khan-exercise.html
@@ -19,19 +19,20 @@
<div id="answer_area_wrap"><div id="answer_area">
<form id="answerform" action="/exercisedashboard" method="get" name="answerform">
<div id="answercontent" class="info-box fancy-scrollbar">
+ <a id="examples-show">Acceptable formats</a>
+ <ul id="examples" style="display: none"></ul>
<span class="info-box-header">Answer</span>
<div id="solutionarea"></div>
- <input type="submit" class="simple-button green" id="check-answer-button" value="Check Answer"/>
- <input type="button" class="simple-button green" id="next-question-button" style="display:none;" name="correctnextbutton" value="Correct! Next Question..."/>
- <span id="show-solution-button-container"></span>
- <div id="check-answer-results">
- <img id="sad" style="display: none;"/>
- <img id="happy" style="display: none;"/>
- <p class="check-answer-message info-box-sub-description"></p>
+ <div class="answer-buttons">
+ <input type="submit" class="simple-button green full-width" id="check-answer-button" value="Check Answer"/>
+ <input type="button" class="simple-button green full-width" id="next-question-button" style="display:none;" name="correctnextbutton" value="Correct! Next Question..."/>
+ <span id="show-solution-button-container"></span>
+ <div id="check-answer-results">
+ <img id="sad" style="display: none;"/>
+ <img id="happy" style="display: none;"/>
+ <p class="check-answer-message info-box-sub-description"></p>
+ </div>
</div>
- <a id="examples-show">Show acceptable answer formats</a>
- <ul id="examples" style="display: none">
- </ul>
</div>
<div id="readonly" class="info-box">
<span id="readonly-problem" class="info-box-header"></span>
@@ -41,7 +42,7 @@
<div class="info-box hint-box">
<span class="info-box-header">Need help? Get a hint.</span>
<div id="get-hint-button-container">
- <input id="hint" type="button" class="simple-button orange" value="I'd like a hint" name="hint"/>
+ <input id="hint" type="button" class="simple-button orange full-width" value="I'd like a hint" name="hint"/>
</div>
<span id="hint-remainder"></span>
</div>
View
40 exercises/khan-site.html
@@ -13,9 +13,9 @@
<div class="top-header-links">
<span class="page_links" id="page_auth">
<span class="achievement-badge-counts" style="left:-60px;"></span>
- <a href="http://khanacademy.org/login">Login</a>
+ <span><a href="http://khanacademy.org/login">Login</a></span>
<span class="separator"></span>
- <a href="http://khanacademy.org/contribute" id="donate-link">Donate</a>
+ <span><a href="http://khanacademy.org/contribute" id="donate-link">Donate</a></span>
</span>
<div class="clear"></div>
<div id="nav-and-search">
@@ -23,7 +23,7 @@
<nav>
<span class="links nav-subheader">
<span class="dropdown topic-browser-dropdown">
- <a href="http://khanacademy.org/#browse" class="watch-link">Watch</a>
+ <a href="http://khanacademy.org/#browse" class="watch-link dropdown-toggle">Watch <span class="caret"></span></a>
<a href="http://khanacademy.org/exercisedashboard" class="selected practice-link">Practice</a>
<a href="http://khanacademy.org/class_profile">Coach</a>
<a href="http://khanacademy.org/contribute">Volunteer</a>
@@ -34,7 +34,7 @@
</div>
<div id="search-box">
<form class="page-search" action="/search">
- <input id="search-input" type="text" placeholder="Search for a video or playlist" name="page_search_query" value="" class="ui-corner-all simple-input search-input blur-on-esc ui-autocomplete-input" autocomplete="off" role="textbox" aria-autocomplete="list" aria-haspopup="true"/><input type="submit" value=" " id="search-submit" class="search-submit" autocomplete="off" role="textbox" aria-autocomplete="list" aria-haspopup="true"/>
+ <input id="search-input" type="text" placeholder="Search for a video or topic" name="page_search_query" value="" class="ui-corner-all placeholder simple-input search-input blur-on-esc ui-autocomplete-input" autocomplete="off" role="textbox" aria-autocomplete="list" aria-haspopup="true"><input type="submit" value=" " id="search-submit" class="search-submit" autocomplete="off" role="textbox" aria-autocomplete="list" aria-haspopup="true"/>
</form>
</div>
<div class="clear"></div>
@@ -43,11 +43,35 @@
<div id="logo">
<a id="logo-image" href="http://khanacademy.org/" title="Khan Academy" name="logo-image"></a>
+ <div id="stats"><span id="page_visitors" style="display: inline;">Over 9,000 lessons delivered</span></div>
</div>
<div class="clear"></div>
</div>
</header>
- <div id="container" class="single-exercise visited-no-recolor" style="overflow: hidden; padding-top: 100px;"></div>
+ <div id="container" class="single-exercise visited-no-recolor" style="overflow: hidden;">
+ <article class="exercises-content clearfix">
+ <div class="exercises-header"><h2 class="section-headline">
+ <div class="topic-exercise-badge">&nbsp;</div>
+ <span class="practice-exercise-topic-context">Practicing</span>
+ </h2></div>
+ <div class="exercises-body">
+ <div class="exercises-stack">&nbsp;</div>
+ <div class="exercises-card current-card">
+ <div class="current-card-container card-type-problem">
+ <div class="current-card-container-inner vertical-shadow">
+ <div class="current-card-contents">
+ </div>
+ </div>
+ <div id="extras" class="single-exercise">
+ <ul>
+ <li> <a class="debug-mode" href="?debug">Debug mode</a></li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+ </article>
+ </div>
<div id="end-of-page-spacer" style="height: 38px;">&nbsp;</div>
<div id="badge-notification-container" class="badge-award-container" style="display:none;"></div>
</div>
@@ -58,17 +82,19 @@
<footer id="footer" class="short">
<div id="leaves">
<div class="inner">
- <div id="copyright">
+ <div id="copyright" class="tiny">
<small>&copy;2012 Khan Academy&#0153;</small> <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/" id="creative-commons-link" name="creative-commons-link"></a>
</div>
<span class="footer-links">
+ <a href="http://khanacademy.desk.com/">FAQ</a>
+ <span class="sep">|</span>
<a href="/reportissue?type=Defect&issue_labels=Component-Code%2CExercise-addition_1%2CProblem-1" id="report">Report a Problem</a>
<span class="sep">|</span>
<a href="/about/the-team">Contact</a><a href="/jobs">Jobs</a>
<span class="sep">|</span>
<a href="/about/tos" title="Terms of Service">ToS</a> <a href="/about/privacy-policy" title="Privacy Policy">Privacy Policy</a>
<span class="sep">|</span>
- <a href="/downloads">Downloads</a> <a href="/coaches">Add a Coach</a>
+ <a href="/downloads">Downloads</a>
<span class="sep">|</span>
<span class="small-social-links">
View
5 khan-exercise.js
@@ -2831,8 +2831,9 @@ var Khan = (function() {
function injectTestModeSite(html, htmlExercise) {
$("body").prepend(html);
- $("#container").html("<h2 style='padding-left: 20px; margin-left: 80px;'>" +
- document.title + "</h2>" + htmlExercise);
+ $("#container .exercises-header h2").append(document.title);
+ $("#container .exercises-body .current-card-contents").html(
+ htmlExercise);
if (Khan.query.layout === "lite") {
$("html").addClass("lite");
Please sign in to comment.
Something went wrong with that request. Please try again.