552d5fb7ee1ceb59a560afea9c15c101b8566fdf
   1:root {
   2  --sl-cap: 20px;
   3  --sl-dots: 10px;
   4  --sl-transition: 0.5s;
   5}
   6
   7div.slideshow {
   8  max-width: 1000px;
   9  position: relative;
  10  margin: auto;
  11}
  12
  13
  14/* 
  15 * Slides
  16 */
  17
  18figure.slide:first-child {
  19  /* Position the first slide relatively to set the height (others are 
  20   * positioned absolutely to allow overlapping) */
  21  position: relative;
  22}
  23
  24figure.slide {
  25  /* Position slides absolutely to allow overlapping */
  26  position: absolute;
  27  top: 0;
  28  left: 0;
  29  margin: 0;
  30  /* Slides start at 0 opacity */
  31  opacity: 0;
  32  /* Fade out duration is double the fade in duration (approximates a cross 
  33   * dissolve) */
  34  transition: opacity calc(2 * var(--sl-transition)) ease;
  35  -webkit-transition: opacity calc(2 * var(--sl-transition)) ease;
  36  -moz-transition: opacity calc(2 * var(--sl-transition))  ease;
  37  z-index: -1;
  38}
  39
  40figure.slide.active {
  41  opacity: 1;
  42  z-index: 0;
  43  /*display: block;*/
  44  transition: opacity 1s ease;
  45  -webkit-transition: opacity 1s ease;
  46  -moz-transition: opacity 1s ease;
  47}
  48
  49figure.slide *,
  50div.slideshow div#controls {
  51  width: 100%;
  52}
  53
  54figure.slide figcaption {
  55  height: var(--sl-cap);
  56  text-align: center;
  57}
  58
  59
  60/* 
  61 * Buttons
  62 */
  63
  64#prev, #next, #state {
  65  cursor: pointer;
  66  font-weight: bold;
  67  font-size: 1.5em;
  68  user-select: none;
  69  opacity: 0;
  70  transition: 0.2s ease;
  71  position: absolute;
  72  color: white;
  73}
  74
  75#prev, #next {
  76  top: calc(50% - calc(var(--sl-cap) + var(--sl-dots) + 50px) / 2);
  77  width: auto;
  78  padding: 16px;
  79  border-radius: 0 3px 3px 0;
  80}
  81
  82#state {
  83  width: 1.5em;
  84  height: 1.5em;
  85  text-align: center;
  86  font-family: monospace;
  87  top: 15px;
  88  right: 15px;
  89  padding: 4px;
  90  border-radius: 3px;
  91}
  92
  93#next {
  94  /* Position next button on right */
  95  right: 0;
  96  border-radius: 3px 0 0 3px;
  97}
  98
  99div.slideshow:hover #prev,
 100div.slideshow:hover #next,
 101div.slideshow:hover #state {
 102  /* Show buttons on slideshow hover */
 103  opacity: 100;
 104  background-color: rgba(0,0,0,0.3);
 105}
 106
 107#prev:hover, #next:hover, #state:hover {
 108  /* Button hover */
 109  background-color: rgba(0,0,0,0.8) !important;
 110}
 111
 112
 113/* 
 114 * Dot controls/indicators
 115 */
 116
 117div.slideshow div#controls {
 118  text-align: center;
 119}
 120
 121div.slideshow div#controls span {
 122  cursor: pointer;
 123  height: var(--sl-dots);
 124  width: var(--sl-dots);
 125  margin: 0 2px;
 126  background-color: #bbb;
 127  border-radius: 50%;
 128  display: inline-block;
 129  transition: background-color 0.6s ease;
 130}
 131
 132div#controls span.active,
 133div#controls span:hover {
 134  background-color: #717171 !important;
 135}