Skip to content

Commit

Permalink
missing assets
Browse files Browse the repository at this point in the history
  • Loading branch information
tkphd committed Aug 30, 2018
1 parent 9f125af commit 11f0fa8
Show file tree
Hide file tree
Showing 4 changed files with 215 additions and 15 deletions.
1 change: 1 addition & 0 deletions assets/css/bootstrap.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

128 changes: 115 additions & 13 deletions assets/css/lesson.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,32 +29,38 @@ $color-testimonial: #fc8dc1 !default;
//----------------------------------------

@mixin cdSetup($color) {
color: $color;
border-left: solid 5px $color;
margin-bottom: 0px;
border-radius: 4px 0 0 4px;
color: $color;
border-left: solid 5px $color;
margin: 15px 0;
border-radius: 4px 0 0 4px;
}

.error { @include cdSetup($color-error); }
.output { @include cdSetup($color-output); }
.source { @include cdSetup($color-source); }

.bash { @include cdSetup($color-source); }
.make { @include cdSetup($color-source); }
.matlab { @include cdSetup($color-source); }
.python { @include cdSetup($color-source); }
.r { @include cdSetup($color-source); }
.sql { @include cdSetup($color-source); }
.bash, .language-bash { @include cdSetup($color-source); }
.make, .language-make { @include cdSetup($color-source); }
.matlab, .language-matlab { @include cdSetup($color-source); }
.python, .language-python { @include cdSetup($color-source); }
.r, .language-r { @include cdSetup($color-source); }
.sql, .language-sql { @include cdSetup($color-source); }

.error pre,
.output pre,
.source pre,
.bash pre,
.language-bash pre,
.make pre,
.language-make pre,
.matlab pre,
.language-matlab pre,
.python pre,
.language-python pre,
.r pre,
.sql pre {
.language-r pre,
.sql pre ,
.language-sql pre {
border-radius: 0 4px 4px 0;
}

Expand All @@ -75,8 +81,11 @@ $codeblock-padding: 5px !default;
padding-right: 0;
border: 1px solid;
border-color: $color;
border-radius: 4px;
padding-bottom: $codeblock-padding;

margin: 15px 0;

h2 {
padding-top: $codeblock-padding;
padding-bottom: $codeblock-padding;
Expand Down Expand Up @@ -108,24 +117,54 @@ $codeblock-padding: 5px !default;
.solution{ @include bkSetup($color-solution, "\e105"); }
.testimonial{ @include bkSetup($color-testimonial, "\e143"); }

.callout h3,
.challenge h3,
.checklist h3,
.discussion h3,
.keypoints h3,
.objectives h3,
.prereq h3,
.solution h3,
.testimonial h3 {
font-size: 18px;
}

blockquote p {
margin: 5px;
}

//----------------------------------------
// Override Bootstrap settings.
//----------------------------------------

code {
white-space: nowrap;
padding: 2px 5px;
color: #3d90d9;
background-color: #e7e7e7;
}

img {
max-width: 100%;
article img {
display: block;
margin: 20px auto;
max-width: 100%;
}

article h2 {
margin: 48px 0 16px;
border-bottom: solid 1px #eaecef;
padding-bottom: 0.3em;
line-height: 1.25;
}

article h3 { margin: 40px 0 16px; }

//----------------------------------------
// Miscellaneous.
//----------------------------------------

.figures h2 { margin-top: 100px; }

.maintitle {
text-align: center;
}
Expand All @@ -134,6 +173,16 @@ img {
text-align: center;
}

footer .copyright,
footer .help-links
{
font-size: inherit;
margin-top: 10px;
margin-bottom: 10px;
font-weight: 500;
line-height: 1.1;
}

img.navbar-logo {
height: 40px; // synchronize with height of navbar
padding-top: 5px;
Expand All @@ -153,3 +202,56 @@ span.fold-unfold {
margin-left: 1em;
opacity: 0.5;
}


//----------------------------------------
// Life cycle box
//----------------------------------------

div.life-cycle {
position: -webkit-sticky; /* Safari */
position: sticky;
top: 0;
z-index: 100;
font-size: 1.2em;
text-align: center;
margin-bottom: -1px;
border-radius: 0;
}

.pre-alpha {
color: #a94442;
background: #f2dede;
}

.alpha {
color: #8a6d3b;
background: #fcf8e3;
}

.beta {
color: #31708f;
background: #d9edf7;
}


//----------------------------------------
// keyboard key style, from StackExchange.
//----------------------------------------

kbd {
display: inline-block;
margin: 0 .1em;
padding: .1em .6em;
font-family: Arial,"Helvetica Neue",Helvetica,sans-serif;
font-size: 11px;
line-height: 1.4;
color: #242729;
text-shadow: 0 1px 0 #FFF;
background-color: #e1e3e5;
border: 1px solid #adb3b9;
border-radius: 3px;
box-shadow: 0 1px 0 rgba(12,13,14,0.2), 0 0 0 2px #FFF inset;
white-space: nowrap;
font-style: normal;
}
69 changes: 69 additions & 0 deletions assets/css/syntax.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
.highlight .hll { background-color: #ffffcc }
.highlight { background: #f8f8f8; }
.highlight .c { color: #408080; font-style: italic } /* Comment */
.highlight .err { border: 1px solid #FF0000 } /* Error */
.highlight .k { color: #008000; font-weight: bold } /* Keyword */
.highlight .o { color: #666666 } /* Operator */
.highlight .ch { color: #408080; font-style: italic } /* Comment.Hashbang */
.highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #BC7A00 } /* Comment.Preproc */
.highlight .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */
.highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */
.highlight .cs { color: #408080; font-style: italic } /* Comment.Special */
.highlight .gd { color: #A00000 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #FF0000 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #00A000 } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: #0044DD } /* Generic.Traceback */
.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008000 } /* Keyword.Pseudo */
.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #B00040 } /* Keyword.Type */
.highlight .m { color: #666666 } /* Literal.Number */
.highlight .s { color: #BA2121 } /* Literal.String */
.highlight .na { color: #7D9029 } /* Name.Attribute */
.highlight .nb { color: #008000 } /* Name.Builtin */
.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */
.highlight .no { color: #880000 } /* Name.Constant */
.highlight .nd { color: #AA22FF } /* Name.Decorator */
.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */
.highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0000FF } /* Name.Function */
.highlight .nl { color: #A0A000 } /* Name.Label */
.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #19177C } /* Name.Variable */
.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #666666 } /* Literal.Number.Bin */
.highlight .mf { color: #666666 } /* Literal.Number.Float */
.highlight .mh { color: #666666 } /* Literal.Number.Hex */
.highlight .mi { color: #666666 } /* Literal.Number.Integer */
.highlight .mo { color: #666666 } /* Literal.Number.Oct */
.highlight .sa { color: #BA2121 } /* Literal.String.Affix */
.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
.highlight .sc { color: #BA2121 } /* Literal.String.Char */
.highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */
.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
.highlight .s2 { color: #BA2121 } /* Literal.String.Double */
.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
.highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
.highlight .sx { color: #008000 } /* Literal.String.Other */
.highlight .sr { color: #BB6688 } /* Literal.String.Regex */
.highlight .s1 { color: #BA2121 } /* Literal.String.Single */
.highlight .ss { color: #19177C } /* Literal.String.Symbol */
.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0000FF } /* Name.Function.Magic */
.highlight .vc { color: #19177C } /* Name.Variable.Class */
.highlight .vg { color: #19177C } /* Name.Variable.Global */
.highlight .vi { color: #19177C } /* Name.Variable.Instance */
.highlight .vm { color: #19177C } /* Name.Variable.Magic */
.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */
32 changes: 30 additions & 2 deletions assets/js/lesson.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $("table").addClass("table table-striped");


// Handle foldable challenges and solutions (on click and at start).
$(".discussion,.solution").click(function(event) {
$(".solution").click(function(event) {
var trigger = $(event.target).has(".fold-unfold").size() > 0
|| $(event.target).filter(".fold-unfold").size() > 0;
if (trigger) {
Expand All @@ -12,7 +12,7 @@ $(".discussion,.solution").click(function(event) {
event.stopPropagation();
}
});
$(".discussion,.solution").each(function() {
$(".solution").each(function() {
$(">*:not(h2)", this).toggle();
var h2 = $("h2:first", this);
h2.append("<span class='fold-unfold glyphicon glyphicon-collapse-down'></span>");
Expand All @@ -26,3 +26,31 @@ function google_search() {
var domain = $("meta[name=search-domain]").attr("value");
window.open("https://www.google.com/search?q=" + query + "+site:" + domain);
}

// function to shrink the life cycle bar when scrolling
$(function(){
$('#life-cycle').data('size','big');
});

$(window).scroll(function(){
if($(document).scrollTop() > 0)
{
if($('#life-cycle').data('size') == 'big')
{
$('#life-cycle').data('size','small');
$('#life-cycle').stop().animate({
padding: '5px'
},100);
}
}
else
{
if($('#life-cycle').data('size') == 'small')
{
$('#life-cycle').data('size','big');
$('#life-cycle').stop().animate({
padding: '15px'
},100);
}
}
});

0 comments on commit 11f0fa8

Please sign in to comment.