Beispiel:Adventskalender-2.html

Aus SELFHTML-Wiki
Wechseln zu: Navigation, Suche
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Adventskalender - 2</title>
<style>
html {
  --bgcolor: #e6f2f7;
  --linkcolor: #306f91;
  --bordercolor: #c32e04;
  background: var(--bgcolor);	
}
ol {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  color: black;
  max-width: 120rem;
  margin: 1rem auto;
  padding: 0 1rem;  
  counter-reset: advents-counter;
  list-style: none;  
}
@media (min-width: 80rem) { /* 4x6 */ 
  ol {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (min-width: 120rem) { /* 6x4 */ 
  ol {
    grid-template-columns: repeat(6, 1fr);
  } 
}
li {
  min-height: 10em;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: thin solid var(--bordercolor);
  counter-increment: advents-counter;
  position: relative;
}

li::after {
  --size: 2rem;
  content: counter(advents-counter);
  position: absolute;
  color: var(--bgcolor);
  font-size: calc(var(--size) * .75);
  font-weight: bold;
  right: calc(var(--size) * .25);
  top: calc(var(--size) * .25);
  line-height: var(--size);
  width: var(--size);
  height: var(--size);
  padding: calc(var(--size) * .2);
  transform: rotate(-10deg);
  background-color: var(--bordercolor);
  border-radius: 50%;
  text-align: center;
  box-shadow: calc(var(--size) * .05) calc(var(--size) * .05) 0 #999;
}


li > .donate, li > .coming_soon {
  margin: 0;
  align-self: center;
  text-align: center;
}	

li > .donate::after, li > .coming_soon::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

li > a {
  text-decoration: none;
  color: var(--linkcolor);
}
li > :not(.open) {
  color: var(--bgcolor);
  transition: color ease .5s;
}
li > :not(.open):hover, li > :not(.open):focus {
  color: var(--linkcolor);
  transition: color ease .5s;
}
li > .coming_soon:hover {
  color: inherit;
}



li:nth-of-type(1) {
  order: 5;
}
li:nth-of-type(4) {
  order: 7;
}
li:nth-of-type(5) {
  order: 21;
}
li:nth-of-type(6) {
  order: 18;
}
li:nth-of-type(8) {
  order: 5;
}
li:nth-of-type(9) {
  order: 7;
}
li:nth-of-type(10) {
  order: 21;
}
li:nth-of-type(12) {
  order: 18;
}
li:nth-of-type(14) {
  order: 5;
}
li:nth-of-type(16) {
  order: 7;
}
li:nth-of-type(21) {
  order: 2;
}
li:nth-of-type(22) {
  order: 18;
}

h1 {
  font-size: 3rem;
  margin: 1rem auto;
  padding: 5rem 0 2rem;
  text-align: center;
}
h1 a {
  text-decoration: none;
  color: inherit;
  padding: 6rem 0 2rem calc(126px + 1rem);
  background-image: url(https://blog.selfhtml.org/wp-content/uploads/2017/12/Selfhtml-nico.png);
  background-position: left center;
  background-repeat: no-repeat;
}
span.self {
  text-transform: uppercase;
}


 
</style>
</head>

<body>
<h1><a href="https://selfhtml.org">Adventskalender 202x</a></h1>

    <ol>
<li>
  <a href="Link/zum/Artikel">
    <h2>Überschrift</h2>
    <p>Autor</p>
    <p>Teaser</p>
  </a>
</li>
<li>
  <a class="donate" href="https://selfhtml.org/spenden.html">
    <h2>Es ist noch zu früh.</h2>
    <p>Wussten Sie, dass Sie <span class="self">self</span>HTML unterstützen können?</p>
  </a>
</li>
<li>
  <a class="coming_soon">
    Dieses Türchen öffnet sich erst am 3.&nbsp;Dezember
  </a>
</li>
      <li><p>Dieses Türchen öffnet sich erst am 4.&nbsp;Dezember.</li>
      <li><p>Dieses Türchen öffnet sich erst am 5.&nbsp;Dezember.</li>
      <li><p>Dieses Türchen öffnet sich erst am 6.&nbsp;Dezember.</li>
      <li><p>Dieses Türchen öffnet sich erst am 7.&nbsp;Dezember.</li>
      <li><p>Dieses Türchen öffnet sich erst am 8.&nbsp;Dezember.</li>
      <li><p>Dieses Türchen öffnet sich erst am 9.&nbsp;Dezember.</li>
      <li><p>Dieses Türchen öffnet sich erst am 10.&nbsp;Dezember.</li>
      <li><p>Dieses Türchen öffnet sich erst am 11.&nbsp;Dezember.</li>  
      <li><p>Dieses Türchen öffnet sich erst am 12.&nbsp;Dezember.</li>
      <li><p>Dieses Türchen öffnet sich erst am 13.&nbsp;Dezember.</li>
      <li><p>Dieses Türchen öffnet sich erst am 14.&nbsp;Dezember.</li>
      <li><p>Dieses Türchen öffnet sich erst am 15.&nbsp;Dezember.</li>
      <li><p>Dieses Türchen öffnet sich erst am 16.&nbsp;Dezember.</li>
      <li><p>Dieses Türchen öffnet sich erst am 17.&nbsp;Dezember.</li>
      <li><p>Dieses Türchen öffnet sich erst am 18.&nbsp;Dezember.</li>
      <li><p>Dieses Türchen öffnet sich erst am 19.&nbsp;Dezember.</li>
      <li><p>Dieses Türchen öffnet sich erst am 20.&nbsp;Dezember.</li>   
      <li><p>Dieses Türchen öffnet sich erst am 21.&nbsp;Dezember.</li>  
      <li><p>Dieses Türchen öffnet sich erst am 22.&nbsp;Dezember.</li>
      <li><p>Dieses Türchen öffnet sich erst am 23.&nbsp;Dezember.</li>
      <li><p>Dieses Türchen öffnet sich erst am 24.&nbsp;Dezember.</li>                            
    </ol>

</body>
</html>