Skip to content
lesson.scss 3.44 KiB
Newer Older
Greg Wilson's avatar
Greg Wilson committed
---
---

//----------------------------------------
// Colors.
//----------------------------------------

// branding
$color-brand:       #2b3990 !default;

// code boxes
$color-error:       #bd2c00 !default;
$color-output:      #303030 !default;
$color-source:      #6e5494 !default;

// blockquotes

{% if site.carpentry == "swc" %}
$color-callout:     #00B3A3 !default;
$color-challenge:   #cf0039 !default;
$color-checklist:   #ea7f6a !default;
$color-keypoints:   #98a546 !default;
$color-objectives:  #98a546 !default;
$color-prereq:      #b63d00 !default;
$color-solution:    #9a7366 !default;
$color-testimonial: #d99600 !default;
{% endif %}
Greg Wilson's avatar
Greg Wilson committed

{% if site.carpentry == "dc" %}
$color-callout:     #c4e177 !default;
$color-challenge:   #f4b4aa !default;
$color-checklist:   #5ac76e !default;
$color-keypoints:   #ae9aca !default;
$color-objectives:  #cf71a9 !default;
$color-prereq:      #9cd6dc !default;
$color-solution:    #e3bb70 !default;
$color-testimonial: #f4fd9c !default;
{% endif %}

Greg Wilson's avatar
Greg Wilson committed
//----------------------------------------
// Specialized code blocks.
//----------------------------------------

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

.error  { @include cdSetup($color-error); }
.output { @include cdSetup($color-output); }
.source { @include cdSetup($color-source); }
Greg Wilson's avatar
Greg Wilson committed

//----------------------------------------
// Specialized blockquote environments for learning objectives, callouts, etc.
//----------------------------------------

$codeblock-padding: 5px !default;

@mixin bkSetup($color, $glyph) {

  $gradientcolor1: $color;
  $gradientcolor2: scale-color($color, $lightness: 10%);
Greg Wilson's avatar
Greg Wilson committed

  padding-left: $codeblock-padding;
  padding-top: 0;
  padding-bottom: 0;
  padding-right: 0;
  border: 1px solid;
  border-color: $color;
  padding-bottom: $codeblock-padding;

  h2 {
    padding-top: $codeblock-padding;
    padding-bottom: $codeblock-padding;
    font-size: 20px;
    background: linear-gradient(to bottom, $gradientcolor1, $gradientcolor2);
    border-color: $color;
    margin-top: 0px;
    margin-left: -$codeblock-padding; // to move back to the left margin of the enclosing blockquote
  }
  h2:before {
    font-family: 'Glyphicons Halflings';
    content: $glyph;
    float: left;
    padding-left: $codeblock-padding;
    padding-right: $codeblock-padding;
    display: inline-block;
    -webkit-font-smoothing: antialiased;
  }

}

.callout{ @include bkSetup($color-callout, "\e146"); }
.challenge{ @include bkSetup($color-challenge, "\270f"); }
.checklist{ @include bkSetup($color-checklist, "\e067"); }
.keypoints{ @include bkSetup($color-keypoints, "\e101"); }
.objectives{ @include bkSetup($color-objectives, "\e085"); }
.prereq{ @include bkSetup($color-prereq, "\e124"); }
.solution{ @include bkSetup($color-solution, "\e105"); }
.testimonial{ @include bkSetup($color-testimonial, "\e143"); }
Greg Wilson's avatar
Greg Wilson committed

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

code {
  padding: 0 0;
  color: inherit;
  background-color: inherit;
}

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

.maintitle {
  text-align: center;
}

.footertext {
  text-align: center;
}

img.navbar-logo {
  height: 40px; // synchronize with height of navbar
  padding-top: 5px;
  padding-right: 10px;
}

div.branding {
  color: $color-brand;
Greg Wilson's avatar
Greg Wilson committed
}

ul,
ol {
  padding-left: 1em;
}
Rémi Emonet's avatar
Rémi Emonet committed


span.fold-unfold {
  margin-left: 1em;
  opacity: 0.5;