slideshow.csson commit add expand button, change image height to max-height (3b37366)
   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  text-align: center;
  27  position: absolute;
  28  top: 0;
  29  left: 0;
  30  width: 100%;
  31  margin: 0;
  32  /* Slides start at 0 opacity */
  33  opacity: 0;
  34  /* Fade out duration is double the fade in duration (approximates a cross 
  35   * dissolve) */
  36  transition: opacity calc(2 * var(--sl-transition)) ease;
  37  -webkit-transition: opacity calc(2 * var(--sl-transition)) ease;
  38  -moz-transition: opacity calc(2 * var(--sl-transition))  ease;
  39  z-index: -1;
  40}
  41
  42figure.slide.active {
  43  opacity: 1;
  44  z-index: 0;
  45  /*display: block;*/
  46  transition: opacity 1s ease;
  47  -webkit-transition: opacity 1s ease;
  48  -moz-transition: opacity 1s ease;
  49}
  50
  51figure.slide img {
  52  max-width: 100%;
  53}
  54
  55
  56/* 
  57 * Buttons
  58 */
  59
  60#prev, #next, #state, #expand {
  61  cursor: pointer;
  62  font-weight: bold;
  63  font-size: 1.5em;
  64  user-select: none;
  65  opacity: 0;
  66  transition: 0.2s ease;
  67  position: absolute;
  68  color: white;
  69}
  70
  71#prev, #next {
  72  top: calc(50% - calc(var(--sl-cap) + var(--sl-dots) + 50px) / 2);
  73  width: auto;
  74  padding: 16px;
  75}
  76
  77#state, #expand {
  78  width: 1.5em;
  79  height: 1.5em;
  80  line-height: 1.5em;
  81  text-align: center;
  82  font-family: monospace;
  83  top: 15px;
  84  padding: 4px;
  85  border-radius: 3px;
  86}
  87
  88#state {
  89  right: 15px;
  90}
  91
  92#expand {
  93  right: calc(15px + 15px + 1.5em);
  94}
  95
  96#expand svg path {
  97  fill: #fff;
  98}
  99
 100#prev {
 101  left: 0;
 102  border-radius: 0 3px 3px 0;
 103}
 104
 105#next {
 106  /* Position next button on right */
 107  right: 0;
 108  border-radius: 3px 0 0 3px;
 109}
 110
 111div.slideshow:hover #prev,
 112div.slideshow:hover #next,
 113div.slideshow:hover #expand,
 114div.slideshow:hover #state {
 115  /* Show buttons on slideshow hover */
 116  opacity: 100;
 117  background-color: rgba(0,0,0,0.3);
 118}
 119
 120#prev:hover, #next:hover, #expand:hover, #state:hover {
 121  /* Button hover */
 122  background-color: rgba(0,0,0,0.8) !important;
 123}
 124
 125
 126/* 
 127 * Dot controls/indicators
 128 */
 129
 130div.slideshow div#controls {
 131  text-align: center;
 132  width: 100%;
 133}
 134
 135div.slideshow div#controls span {
 136  cursor: pointer;
 137  height: var(--sl-dots);
 138  width: var(--sl-dots);
 139  margin: 0 2px;
 140  background-color: #bbb;
 141  border-radius: 50%;
 142  display: inline-block;
 143  transition: background-color 0.6s ease;
 144}
 145
 146div#controls span.active,
 147div#controls span:hover {
 148  background-color: #717171 !important;
 149}