Commit c5483def by Kyle Fiedler

Added new styles for html editing and removed a bunch of unused templates

parent b049aabb
...@@ -111,3 +111,7 @@ input[type="submit"], .button { ...@@ -111,3 +111,7 @@ input[type="submit"], .button {
display: block; display: block;
float: right; float: right;
} }
textarea {
overflow: auto;
}
section.problem-new, section.problem-edit { section.problem-new,
section.problem-edit,
section.html-edit {
> header {
border-bottom: 2px solid #333;
@include clearfix();
padding: 6px 20px;
h1 {
font-size: 18px;
text-transform: uppercase;
letter-spacing: 1px;
float: left;
}
p {
float: right;
}
}
> section { > section {
padding: 20px;
textarea { textarea {
@include box-sizing(border-box); @include box-sizing(border-box);
display: block; display: block;
width: 100%; width: 100%;
} }
div.preview { div.preview {
background: #eee; background: #eee;
@include box-sizing(border-box); @include box-sizing(border-box);
height: 40px; min-height: 40px;
padding: 10px; padding: 10px;
width: 100%; width: 100%;
margin-top: 10px;
h1 {
font-size: 24px;
margin-bottom: 1em;
}
h2 {
font-size: 20px;
margin-bottom: 1em;
}
h3 {
font-size: 18;
margin-bottom: 1em;
}
ul {
padding-left: 20px;
margin-bottom: 1em;
}
p {
margin-bottom: 1em;
}
} }
a.save { a.save-update {
@extend .button; @extend .button;
@include inline-block(); @include inline-block();
margin-top: 20px; margin-top: 20px;
......
<ul class="tabs">
<li class="active">English (main)</li>
<li>French</li>
<li>English v2</li>
<li>+</li>
</ul>
<textarea class="captions">
{
"start": [
0, 2770, 5700, 7620, 10320, 12130, 13430, 15170, 17940, 20890, 22840, 26200, 28980, 30170, 32040, 33240, 36420, 37570, 41760, 44270, 48120, 50810, 52960, 54070, 56480, 58600, 59550, 62520, 67680, 69990, 74280, 77605, 81320, 85050, 88430, 92750, 96010, 99440, 103160, 106650, 110050, 114240, 118800, 120980, 122290, 125040, 127900, 130990, 133170, 134580, 139410, 143180, 144530, 147640, 150800, 153220, 156570, 161000, 162010, 162930, 164090, 165490, 167650, 170630, 172020, 174760, 178480, 181840, 185840, 188620, 194160, 196110, 199370, 201360, 204140, 209970, 211850, 215030, 218890, 221730, 225370, 228790, 231690, 234080, 236300, 237970, 240450, 244010, 247670, 251910, 253230, 260149, 263330, 266380, 269470, 273570, 278240, 280050, 282810, 288060, 292410, 297300, 298950, 300860, 302500, 304350, 309620, 312950, 318710, 322870, 323810, 328380, 332840, 334440, 338640, 341540, 345490, 348900, 350730, 354480, 357640, 362310, 365020, 366890, 368900, 373200, 374240, 379410, 381580, 381990, 385680, 389080, 390750, 393970, 395960, 397340, 401000, 403210, 405650, 408880, 411730, 415490, 421350, 425630, 427520, 430490, 435320, 436860, 439460, 443300, 447010, 450740, 453820, 456610, 460140, 463730, 466700, 471200, 472450, 475260, 476330, 480650, 483650, 486320, 489080, 491940, 496690, 501990, 502740, 507000, 511650, 513220, 517330, 519169, 524159, 528140, 529960, 531270, 535340, 541590, 543710, 545170, 550960, 551810, 555140, 556230, 557750, 560530, 564300, 566800, 567600, 569910, 573170, 578610, 580490, 585520, 586500, 589880, 591750, 596120, 597290, 600290, 602940, 606490, 608560, 610690, 612600, 613970, 616670, 621260, 622310, 624520, 626750, 629550, 632500, 635510, 637470, 638900, 640370, 644200, 647470, 648740, 652700, 653950 ],
"end": [
2770, 5700, 7620, 10320, 12130, 13430, 15170, 17940, 20890, 22840, 26200, 28980, 30170, 32040, 33240, 36420, 37570, 41760, 44269, 48120, 50809, 52960, 54070, 56480, 58599, 59550, 62519, 67680, 69990, 74280, 77605, 81320, 85050, 88429, 92750, 96010, 99440, 103160, 106649, 110050, 114240, 118800, 120980, 122290, 125040, 127900, 130990, 133170, 134579, 139410, 143180, 144530, 147640, 150799, 153220, 156570, 161000, 162010, 162929, 164090, 165490, 167650, 170630, 172019, 174760, 178480, 181840, 185840, 188620, 194160, 196109, 199370, 201360, 204140, 209970, 211850, 215030, 218890, 221730, 225369, 228790, 231690, 234079, 236300, 237970, 240450, 244010, 247670, 251910, 253230, 260149, 263330, 266380, 269469, 273570, 278240, 280050, 282810, 288060, 292410, 297300, 298950, 300860, 302500, 304350, 309620, 312950, 318710, 322870, 323810, 328380, 332840, 334440, 338640, 341539, 345490, 348900, 350729, 354480, 357640, 362310, 365020, 366890, 368900, 373200, 374240, 379410, 381580, 381990, 385680, 389080, 390750, 393970, 395960, 397340, 401000, 403210, 405650, 408880, 411730, 415490, 421350, 425630, 427520, 430490, 435320, 436860, 439460, 443299, 447010, 450740, 453820, 456610, 460140, 463729, 466700, 471200, 472450, 475260, 476330, 480650, 483650, 486320, 489080, 491940, 496690, 501990, 502740, 507000, 511650, 513220, 517330, 519169, 524159, 528140, 529960, 531270, 535340, 541590, 543710, 545170, 550959, 551810, 555140, 556230, 557750, 560530, 564300, 566800, 567599, 569910, 573170, 578610, 580490, 585520, 586500, 589880, 591750, 596120, 597290, 600290, 602939, 606490, 608560, 610689, 612600, 613970, 616670, 621260, 622310, 624520, 626750, 629550, 632500, 635510, 637470, 638900, 640370, 644200, 647470, 648740, 652700, 653950, 655050 ],
"text": [
"SUBJECT 1: The various methods\nI&#39;m going to show you--",
"in particular, the first method\none and method two for",
"solving non-linear equations--",
"are really just particular\nways of solving a pair of",
"equations where at least\none of each have some",
"non-linearity to them.",
"So let&#39;s start with the\ngraphical method.",
"And my circuit is on the\nright-hand side.",
"And I&#39;m showing you the same\nvoltage source resistor--",
"the Thevenin pattern--",
"connected to Device D. And\nbelow that, I have the",
"equation iD equals ae\nraised to bvD, which",
"is the device equation.",
"So as before, let me\ngo ahead and do all",
"the first few steps.",
"I go ahead and write the\nnode equation at vD.",
"And I got that.",
"I go in and substitute, as I\nalways do, in the node method",
"for the current, using\nthe device relation.",
"And just for fun here, let me\nkeep that separate for now.",
"In the analytical method, notice\nthat you ended up with",
"these two equations, and\nyou had to solve",
"for these two unknowns.",
"And we did that using\nanalytical methods.",
"In this video, I&#39;m going to\nsolve these using the",
"graphical method.",
"In order to do so here&#39;s what\nI&#39;m going to do I want to",
"start by rearranging the terms\nin my equation 1 to make it a",
"little bit more convenient\nto draw the graph.",
"So notice in equation 2, I\nhave iD equals something.",
"And then I have an expression\nin vD and iD.",
"So what I&#39;d like to do is let\nme start by taking this",
"equation here and expressing it\nin more of a standard form",
"so I can get something symmetric\nto equation 2.",
"So let me express this by\npulling iD to the left-hand",
"side all by itself, and so I\nget something like this.",
"So I get iD on the left-hand\nside, and then I&#39;m going to",
"move vD minus V divided by\nr do the right hand side.",
"So let&#39;s start with minus V\ndivided by R, and when I move",
"that to the right-hand side, it\nbecomes V divided by R. And",
"then when I move vD over R to\nthe right-hand side, I get",
"minus vD over R. And I&#39;ve simply\nnot done much here.",
"I just have done some\nrearranging of the terms in",
"equation 1.",
"And since I haven&#39;t done\nanything unique and different,",
"I&#39;m just going to label\nthis as 1 prime.",
"So I just got this from equation\n1, and I just labeled",
"that as 1 prime.",
"Continuing with the method--",
"and now I&#39;m summarizing for you\nequations 1 prime and 2--",
"we want both of them for iD on\nthe left-hand side expressed",
"as a function of vD.",
"And in equation 2,\nit is non-linear.",
"So the graphical method can\nbe summarized as follows.",
"To start, I want you to\nnotice something.",
"Essentially all we&#39;re trying to\ndo is find a solution, find",
"a value for vD and iD that\nsatisfies both equations, 1",
"prime and 2.",
"that&#39;s all we&#39;re trying to do.",
"It&#39;s just math here.",
"There&#39;s no circuits here.",
"We&#39;re just doing some relatively\nsimple math.",
"We just have to figure out what\niD and vD are, and we&#39;ll",
"use the graphical method.",
"So to do the graphical method,\nwhat I&#39;m going to do is I&#39;m",
"going to plot the two equations\nin a pair of graphs.",
"And let me first start by\nplotting equation 2.",
"And in equation 2, I&#39;m going\nto plot iD equals a",
"raised to ae bvD.",
"I&#39;m going to plot iD equals\na times e raised to bvD.",
"That&#39;s my equation 2.",
"And this is the plot\nthat I get for it.",
"It&#39;s a plot that I had before.",
"So that&#39;s my equation 2.",
"Notice that this plot here is\nsimply the constraint on iD",
"and vD imposed by the device.",
"This little circuit here\ncontaining the Thevenin",
"equivalent and connected to\nthe device, equation 2 is",
"simply the constraint imposed\nby the device.",
"The device properties are such\nthat it is going to constrain",
"iD and vD into some\nrelationship.",
"This constraint that I&#39;ve\nplotted here as equation 2 is",
"simply the constraint imposed\nby this device.",
"OK, next, let me\ngo to 1 prime.",
"And in 1 prime, let\nme go ahead and",
"plot the 1 prime equation.",
"And that equation, as we\nrewrite that here, is V",
"divided by R minus vD divided\nby R. So I&#39;m just going to",
"plot that equation for you\nin a second graph.",
"So how do I plot this?",
"So notice here that when vD is\n0, then iD is V divided by R.",
"So that is one point on\nthe straight line.",
"Notice that this is an equation\nfor a straight line.",
"It&#39;s a linear relationship\nbetween iD and vD.",
"Next, when iD is 0--\nso when iD is 0--",
"then notice that R and R can be\ncanceled out, and V will be",
"equal to vD.",
"So when iD is 0, V\nand vD are equal.",
"So therefore, vD equals V. So\nthis is the line when iD is 0.",
"And for that, vD equals V. So\nthen I get this [? long, ?]",
"straight line for the\nrelationship between vD and iD",
"according to 1 prime.",
"So what&#39;s the slope\nof this line here?",
"Can you tell me what the\nslope of this line is.",
"Let me give you a few seconds\nto think about it.",
null,
"OK, from the equation 1 prime--\nfrom this equation--",
"the slope is simply given by the\ncoefficient of vD, since",
"the slope is negative, which\nis why the line is inclined",
"the following way.",
"So the slope here is simply\nminus 1 divided by R.",
"So that is my constraint\nthat relates vD to iD.",
"And where did that constraint\ncome from?",
"That constraint is the\nconstraint on iD and vD that",
"has been imposed by the\nrest of the circuit.",
"So if the first constraint was\nimposed by the device, then",
"the second constraint is\nimposed by the Thevenin",
"equivalent that is connected\nto the device.",
"The Thevenin equivalent was\nthat V and R in series and",
"those two impose a Thevenin\nconstraint on the terminal",
"pair that relates vD and iD.",
"So now my next step is,\ngiven these two graphs",
"for iD versus vD--",
"and clearly those are\nmy two constraints.",
"Graph 2 says that iD and vD\nmust be somewhere on this",
"trajectory.",
"Graph 1 prime says, well, I&#39;m\nnot going to let vD and iD be",
"anywhere else but\non this curve.",
"That&#39;s it.",
"Both of them are fighting with\neach other and telling each",
"other, nope, I&#39;m not going to\nallow you to do anything.",
"You have to be on my curve.",
"So in this case, I have two\ncurves, and I need a point",
"that satisfies both curves.",
"And that is easy enough to do.",
"And I simply have to go\nand satisfy both these",
"constraints, and that will\ngive me the answer",
"for vD versus iD.",
"Before I do that, so I can go\nand solve it for you, let me",
"go and pick some values for\nthe various parameters.",
"So as before, I&#39;m going to pick\nV equals 1 volt, R equals",
"1 ohm, a, a quarter of an amp,\nand b to be one volt inverse.",
"So I&#39;ll pick the same parameters\nas I had done when",
"I did the analytical method.",
"Next, what I&#39;ll do is I&#39;ll\nsubstitute these parameters",
"into the two equations 1 prime\nand 2 and rewrite them with",
"the parameters substituted.",
"So for 1 prime, I get iD.",
"Since V is 1 and R is 1, I get\nV divided by R equals 1.",
"And then since R is\n1, I get minus vD.",
"So this is 1 prime, once I&#39;ve\nsubstituted the values.",
"And then for equation\n2, what do I get?",
"I get iD equals ae\nraised to bvD.",
"a is 1/4, so I write\nthat down.",
"b is 1, and so I\nget vD up here.",
"So I have my two equations in\nterms of the parameters I have",
"chosen, and now I can go ahead\nand plot the two equations and",
"see where they intersect.",
"I&#39;ve given you the form of the\ngraph here, and so let me go",
"ahead and plot this.",
"Let me go ahead and plot 2\nfirst. 2 looks like this,",
"where this point is 1/4.",
"That was the a point.",
"As I said before, this curve\nis simply my Equation 2.",
"Then let me go ahead and\nplot equation 1 prime.",
"And as you recall, that looked\nsomething like this where the",
"vD intercept was V and the\ny-intercept was given by V",
"divided by R.",
"And in this case, it was\n1, and V was also 1.",
"So those are my two curves, and\nhere&#39;s the point where the",
"two coincide.",
"And then I just have to go and\nfind the values of iD and vD",
"where they two intersect.",
"So at this point, it will be\n0.56 volts, and this point",
"will be 0.44 amps.",
"It&#39;s the same as what\nI calculated in",
"the analytical method.",
"So let me go ahead and write\nthat down. iD equals, in this",
"case, 0.44 amps, and vD\nequals 0.56 volts.",
"So basically, I&#39;ve just\ntaken the two graphs,",
"superimposed them.",
"This was 1 prime, and the\nnon-linear one was related to",
"Equation 2.",
"So before I jump off to one\nother thing, I can define",
"something for you.",
"Notice this curve here.",
"This is a straight line that\nreflects the Thevenin",
"constraint that I apply on\nmy non-linear device.",
"And I mentioned earlier we&#39;re\ngoing to do this again and",
"again and again.",
"I think you will see this at\nleast 10 more times in this",
"course where I take a Thevenin\nequivalent of the following",
"form, some voltage V, some R,\nand apply that in series",
"across something interesting.",
"So this line that I see here is\nthe constraint imposed by",
"the Thevenin equivalent.",
"And you can see that from\nthe equation 1 prime.",
"Now, there&#39;s a name\nfor this line.",
"So this line is called the &quot;load\nline.&quot; You will see more",
"reasons for this later.",
"But this line is called\nthe &quot;load line.&quot;",
"Let me show you one other little\ntrick, just in case you",
"didn&#39;t completely get how I\nsolved the graphical method.",
"But one little trick here.",
"If you like PowerPoint,\nyou will enjoy this.",
"And if you don&#39;t like\nPowerPoint, you",
"will hate me for it.",
"So if you look at these\ncurves, I have my two",
"equations in iD-- the 1 prime\nand 2-- and I&#39;ve plotted them",
"for you here.",
"On the left-hand side,\nI plotted equation 2.",
"Right-hand side, I plotted\nequation 1.",
"And fundamentally, all that the\ngraphical method is doing",
"is simply superimposing\nthe two graphs.",
"And by superimposing the two\ngraphs, it is finding the",
"point where the two\ncurves intersect.",
"And this is what you get.",
"So let me do that again.",
"So I take one of the curves and\nsuperimpose it on top of",
"the other curve given the\nsame axes and the same",
"scales for the axes.",
"And then I go ahead and find\nthe solution for the point",
"where the two intersect.",
null
]
}
</textarea>
...@@ -6,9 +6,6 @@ ...@@ -6,9 +6,6 @@
<a href="#" class="new-module">New Section</a> <a href="#" class="new-module">New Section</a>
</li> </li>
<li> <li>
<a href="#" class="new-module">New Module</a>
</li>
<li>
<a href="#" class="new-module">New Unit</a> <a href="#" class="new-module">New Unit</a>
</li> </li>
</ul> </ul>
......
...@@ -2,17 +2,26 @@ ...@@ -2,17 +2,26 @@
<section class="html-edit"> <section class="html-edit">
<header> <header>
<a href="#" class="cancel">Cancel</a> <h1 class="editable">${module.name}</h1>
<a href="#" class="save-update">Save &amp; Update</a> <p>Unit type: HTML</p>
<!-- <div class="actions"> -->
<!-- <a href="#" class="cancel">Cancel</a> -->
<!-- <a href="#" class="save-update">Save &amp; Update</a> -->
<!-- </div> -->
</header> </header>
<section> <section>
<header> <header>
<h1 class="editable">${module.name}</h1> </header>
<section> <section>
<textarea name="" id="edit-box" rows="8" cols="40">${module.definition['data']['text']}</textarea> <textarea name="" id="edit-box" rows="8" cols="40">${module.definition['data']['text']}</textarea>
<div id="edit-preview" class="preview">${module.definition['data']['text']}</div> <div id="edit-preview" class="preview">${module.definition['data']['text']}</div>
</section> </section>
<div class="actions">
<a href="" class="save-update">Save &amp; Update</a> <a href="" class="save-update">Save &amp; Update</a>
<a href="#" class="cancel">Cancel</a>
</div>
</section> </section>
</section> </section>
<li>
<img src="http://placehold.it/300x180" alt="" /><h5>Video-file-name</h5>
</li>
<section class="caption-save">
<a href="#" class="close-box">Cancel</a>
<button class="close-box">Save changes</button>
</section>
<div class="tooltip">
<ul>
<li><a href="#view" rel="leanModal">View</a></li>
<li><a href="#">Download</a></li>
<li><a href="#" class="delete-speed">Delete</a></li>
</ul>
</div>
<li class="video-box">
<div class="thumb"><img src="http://placehold.it/100x65" /></div>
<div class="meta">
<strong>video-name</strong> 236mb Uploaded 6 hours ago by <em>Anant Agrawal</em>
<p>
<ul class="speed-list">
Speed
<li class="speed">
0.75x
<%include file="speed-tooltip.html"/>
</li>
<li class="speed">Normal
<%include file="speed-tooltip.html"/>
</li>
<li class="speed">1.25x
<%include file="speed-tooltip.html"/>
</li>
<li class="speed">1.5x
<%include file="speed-tooltip.html"/>
</li>
<li style="background: #eee;" ><a href="#upload" rel="leanModal" class="new-upload">+</a></li>
</ul>
</p>
<p>
<a href="#">Download All</a>
<a href="#" style="color: brown;" class="remove">Delete All</a>
<a href="#" class="edit-captions"> Edit Captions </a>
<a href="#" class="use-video">Use clip ⬆</a>
</p>
</div>
<div class="caption-box">
<%include file="captions.html"/>
<%include file="save-captions.html"/>
</div>
</li>
<li class="video-box">
<div class="thumb"><img src="http://placehold.it/155x90" /></div>
<div class="meta">
<strong>video-name</strong> 236mb
<p>Uploaded 6 hours ago by <em>Anant Agrawal</em></p>
<p>
<ul class="speed-list">
Speed
<li class="speed">
0.75x
<%include file="speed-tooltip.html"/>
</li>
<li class="speed">Normal
<%include file="speed-tooltip.html"/>
</li>
<li class="speed">1.25x
<%include file="speed-tooltip.html"/>
</li>
<li class="speed">1.5x
<%include file="speed-tooltip.html"/>
</li>
<li style="background: #eee;" ><a href="#upload" rel="leanModal" class="new-upload">+</a></li>
</ul>
</p>
<p>
<a href="#">Download all</a>
<a href="#" stle="color: brown;" class="remove-video">Remove ⬇ </a>
</p>
</div>
<div style="margin-top: 30px;">
<%include file="captions.html"/>
</div>
</li>
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