Created
June 29, 2022 10:03
-
-
Save AnoRebel/1c32f638dd53f09f0cc08531441b23db to your computer and use it in GitHub Desktop.
A nice timeline UI in simple html from `https://codepen.io/banik/pen/ELpWNJ`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@charset "UTF-8"; | |
@import url("https://fonts.googleapis.com/css?family=Raleway:400,600"); | |
body { | |
font-family: "Raleway", sans-serif; | |
background: #fafafa; | |
} | |
h1 { | |
text-align: center; | |
padding: 30px 0 0 0; | |
} | |
h4 { | |
font-size: 1.2em; | |
text-align: center; | |
padding: 0 0 30px 0; | |
} | |
.timeline { | |
list-style: none; | |
padding: 20px 0 20px; | |
position: relative; | |
} | |
.timeline:before { | |
top: 0; | |
bottom: 0; | |
position: absolute; | |
content: ""; | |
width: 3px; | |
background-color: #d9d9d9; | |
margin-left: -1.5px; | |
left: 20px; | |
} | |
@media (min-width: 576px) { | |
.timeline:before { | |
left: 50%; | |
} | |
} | |
.timeline > li { | |
margin-bottom: 20px; | |
position: relative; | |
padding-left: 55px; | |
} | |
.timeline > li:after, .timeline > li:after { | |
content: ""; | |
display: table; | |
clear: both; | |
} | |
.timeline > li .panel { | |
width: 100%; | |
float: left; | |
border-radius: 3px; | |
overflow: hidden; | |
position: relative; | |
background: #fff; | |
box-shadow: 1px 2px 80px 0 rgba(0, 0, 0, 0.1); | |
} | |
.timeline > li .panel summary { | |
display: block; | |
user-select: none; | |
outline: none; | |
padding: 20px; | |
margin-bottom: 0px; | |
transition: all 600ms cubic-bezier(0.23, 1, 0.32, 1); | |
transition-property: margin, background; | |
font-weight: 600; | |
} | |
.timeline > li .panel summary::-webkit-details-marker { | |
display: none; | |
} | |
.timeline > li .panel summary:hover { | |
background: rgba(0, 0, 0, 0.1); | |
} | |
.timeline > li .panel p { | |
padding: 0 20px 10px; | |
} | |
.timeline > li .panel[open] summary { | |
margin-bottom: 20px; | |
padding-bottom: 20px; | |
border-bottom: 1px solid rgba(0, 0, 0, 0.1); | |
} | |
@media (min-width: 576px) { | |
.timeline > li { | |
padding-left: 0px; | |
} | |
.timeline > li .panel { | |
width: 50%; | |
} | |
.timeline > li:not(:nth-child(even)) { | |
padding-right: 90px; | |
} | |
.timeline > li:nth-child(even) { | |
padding-left: 90px; | |
} | |
.timeline > li:nth-child(even) > :nth-child(even) { | |
float: right; | |
} | |
} | |
.timeline > li > .icon { | |
color: #d9d9d9; | |
width: 50px; | |
height: 50px; | |
line-height: 50px; | |
font-size: 2.5em; | |
text-align: center; | |
position: absolute; | |
left: 20px; | |
margin-left: -25px; | |
background-color: #fafafa; | |
z-index: 999; | |
border-radius: 50%; | |
font-family: Font Awesome\ 5 Free; | |
} | |
.timeline > li > .icon:before { | |
content: ""; | |
} | |
@media (min-width: 576px) { | |
.timeline > li > .icon { | |
left: 50%; | |
} | |
} | |
.timeline > li > .icon.done { | |
color: #23b5af; | |
} | |
.timeline > li > .icon.done:before { | |
content: ""; | |
} | |
.timeline > li > .icon.working { | |
color: #eeba4c; | |
} | |
.timeline > li > .icon.working:before { | |
content: ""; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<h1>A Detailed Summary of Life</h1> | |
<h4>Quotes from Monty Python's <i>The Meaning of Life</i></h4> | |
<ul class="timeline"> | |
<li class="timeline"> | |
<div class="icon done"></div> | |
<details class="panel"> | |
<summary>The Miracle of Birth</summary> | |
<p><strong>Patient:</strong> Is it a boy or a girl?<br><br> | |
<strong>Obstetrician:</strong> Now, I think it's a little early to start imposing roles on it, don't you? Now, a word of advice. You may find that you suffer for some time a totally irrational feeling of depression. PND is what we doctors call it. So it's lots of happy pills for you, and you can find out all about the birth when you get home. It's available on Betamax, VHS, and Super 8. | |
</p> | |
</details> | |
</li> | |
<li class="timeline"> | |
<div class="icon done"></div> | |
<details class="panel"> | |
<summary>Growth and Learning</summary> | |
<p>And spotteth twice they the camels before the third hour. And so the Midianites went forth to Ram Gilead in Kadesh Bilgemath by Shor Ethra Regalion, to the house of Gash-Bil-Betheul-Bazda, he who brought the butter dish to Balshazar and the tent peg to the house of Rashomon, and there slew they the goats, yea, and placed they the bits in little pots. Here endeth the lesson.</p> | |
</details> | |
</li> | |
<li class="timeline"> | |
<div class="icon working"></div> | |
<details class="panel"> | |
<summary>Fighting Each Other</summary> | |
<p>Here is better than home, eh, sir? I mean, at home if you kill someone they arrest you — here they'll give you a gun and show you what to do, sir. I mean, I killed fifteen of those buggers. Now, at home they'd hang me — here they'll give me a fucking medal, sir!</p> | |
</details> | |
</li> | |
<li class="timeline"> | |
<div class="icon"></div> | |
<details class="panel"> | |
<summary>Middle Age</summary> | |
<p>It's real Hawaiian food served in an authentic medieval English dungeon atmosphere.</p> | |
</details> | |
</li> | |
<li class="timeline"> | |
<div class="icon"></div> | |
<details class="panel"> | |
<summary>Live Organ Transplants</summary> | |
<p>Yeah, I know what it is, but...I'm using it!</p> | |
</details> | |
</li> | |
<li class="timeline"> | |
<div class="icon"></div> | |
<details class="panel"> | |
<summary>The Meaning of Life</summary> | |
<p>That’s right, yeah. I’ve had a team working on this over the past few weeks, and what we’ve come up with can be reduced to two fundamental concepts. One, people are not wearing enough hats. Two, matter is energy. In the Universe there are many energy fields which we cannot normally perceive. Some energies have a spiritual source which act upon a person’s soul. However, this soul does not exist ab initio as orthodox Christianity teaches; it has to be brought into existence by a process of guided self-observation. However, this is rarely achieved owing to man’s unique ability to be distracted from spiritual matters by everyday trivia.</p> | |
</details> | |
</li> | |
<li class="timeline"> | |
<div class="icon"></div> | |
<details class="panel"> | |
<summary>Death</summary> | |
<p>Well, you're dead now, so shut up.</p> | |
</details> | |
</li> | |
</ul> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment