diff --git a/index.html b/index.html index 900adb9..b86371a 100644 --- a/index.html +++ b/index.html @@ -23,15 +23,20 @@ body{ font-size: 12px; -webkit-text-size-adjust: none; position: relative; + overflow: hidden; } a{ color: #fff; } header{ - position: fixed; + z-index: 2; + background-color: rgba(56, 64, 71, .75); + -webkit-backdrop-filter: blur(5px); + backdrop-filter: blur(5px); + position: absolute; bottom: 0; margin: 0; - padding: 20px; + padding: 10px; } header a{ margin-left: 1em; @@ -53,23 +58,50 @@ h1{ white-space: nowrap; } #life{ - padding-top: 40px; - padding-bottom: 5em; -} -#life section.year{ - min-height: 100%; + position: absolute; + width: 100%; + height: 100%; box-sizing: border-box; - -moz-box-sizing: border-box; - border-left: 1px dashed rgba(255,255,255,.1); - color: rgba(255,255,255,.3); + overflow: auto; + -webkit-overflow-scrolling: touch; +} +#life-years{ position: absolute; top: 0; bottom: 0; - padding-left: 10px; - padding-top: 10px; + white-space: nowrap; +} +#life-years section.year{ + display: inline-block; + box-sizing: border-box; + -moz-box-sizing: border-box; + color: #fff; pointer-events: none; font-weight: 300; white-space: nowrap; + box-sizing: border-box; + height: 100%; +} +#life-years section.year:nth-child(even){ + background: linear-gradient(to bottom, rgba(255,255,255,.05) 0%, rgba(255,255,255,0) 100%); +} +#life-years section.year span{ + background-color: rgba(56, 64, 71, .75); + -webkit-backdrop-filter: blur(5px); + backdrop-filter: blur(5px); + display: block; + padding: 10px; + position: -webkit-sticky; + position: sticky; + top: 0; +} +#life-years section.year span i{ + opacity: .5; + font-style: normal; +} +#life-events{ + margin-top: 40px; + padding-bottom: 5em; } #life .event{ padding-right: 20px; @@ -271,7 +303,6 @@ h1{ + '
' + '' + d.time.title + ' ' + d.text + ' ' + ''; - return ''; }, renderYears: function(firstYear, lastYear){ var dayLength = life.config.yearLength/12/30; @@ -279,10 +310,10 @@ h1{ var days = 0; var hideAge = life.config.hideAge; for (var y=firstYear, age = 0; y<=lastYear+1; y++, age++){ - html += '