UNPKG

dsw

Version:

Dynamic Service Worker, offline Progressive Web Apps much easier

314 lines (266 loc) 6.91 kB
*, *:after, *:before { box-sizing: border-box; } html, body { height: 100%; margin: 0; padding: 0; } body { background: #f0f0f0; background: -moz-linear-gradient(-45deg, #f0f0f0 0%, #d2d3d5 40%, #eff0f2 100%); background: -webkit-linear-gradient(-45deg, #f0f0f0 0%,#d2d3d5 40%,#eff0f2 100%); background: linear-gradient(135deg, #f0f0f0 0%,#d2d3d5 40%,#eff0f2 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f0f0f0', endColorstr='#eff0f2',GradientType=1 ); font-family: Helvetica, Arial, sans-serif; background-size: cover; background-attachment: fixed; } img { float: left; } a { text-decoration: none; } .card .run-test-btn { position: absolute; bottom: .6rem; left: 1rem; z-index: 9; color: blue; cursor: pointer; } .card.left .run-test-btn { left: auto; right: 1rem; } #offline-support-message { position: fixed; bottom: -200px; left: 0; width: 100%; height: 200px; background: rgba(0, 0, 0, .7); color: #fff; text-align: center; opacity: 0; transition: all linear .2s; font-size: 30px; text-transform: uppercase; padding-top: 90px; z-index: 999; border-top: solid 2px #fff; } #offline-support-message sub { font-size: 16px; } #offline-support-message.offline-support { background: #728631; background: -moz-linear-gradient(-45deg, #728631 0%, #bdbe32 40%, #b7b031 100%); background: -webkit-linear-gradient(-45deg, #728631 0%,#bdbe32 40%,#b7b031 100%); background: linear-gradient(135deg, #728631 0%,#bdbe32 40%,#b7b031 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#728631', endColorstr='#b7b031',GradientType=1 ); bottom: 0; opacity: 1; } #offline-support-message.no-offline-support { background: #962f20; background: -moz-linear-gradient(-45deg, #962f20 0%, #c65d4f 40%, #c7422f 100%); background: -webkit-linear-gradient(-45deg, #962f20 0%,#c65d4f 40%,#c7422f 100%); background: linear-gradient(135deg, #962f20 0%,#c65d4f 40%,#c7422f 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#962f20', endColorstr='#c7422f',GradientType=1 ); bottom: 0; opacity: 1; } .buttons-container { float: left; width: 20%; height: 100%; background: #fff; } .buttons-container a, .buttons-container input { width: 100%; margin: 0; border: none; background: #fff; text-align: left; min-height: 1.5rem; border-bottom: solid 1px #ccc; } .test-output { float: left; width: 80%; } #fetch-result { white-space: pre; } .wrapper { width: 90%; max-width: 800px; min-width: 300px; margin: auto; } .card { width: 100%; height: 200px; margin: 40px 0; box-shadow: 6px 8px 30px #777; position: relative; display: flex; overflow: hidden; } .fg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 5; } .fg>div { flex: 25em 0; } .fg .corner { flex-grow: 0; float: right; width: 240px; height: 100%; background-image: url(../images/public/card-fg-corner-right.png); background-repeat: no-repeat; background-position: top left; } .left .corner { float: left; background-image: url(../images/public/card-fg-corner-left.png); background-position: top right; } .left .test-container { left: 0; right: auto; text-align: left; } .left .test-description { border-left: none; } .test-description-container { display: flex; height: 100%; } .test-content { position: absolute; left: 0; top: 0; z-index: 1; width: 100%; } .test-content img { height: 200px; min-width: 100%; } .test-content img[src=""] { display: none; } .test-content iframe { height: 200px; width: 100%; border: none; background: transparent; } .test-description { display: block; width: 100%; background-image: url(../images/public/card-fg.png); background-repeat: repeat-x; background-position: top; border-left: solid 2px #fff; padding: 1rem; } .test-long-description { overflow-y: auto; height: 70px; } .test-description h3:after { content: ""; width: 200px; border-bottom: solid 1px; display: block; margin: 1rem auto; opacity: .5; } .test-container { position: absolute; right: 0; text-align: right; } .test-container { color: #fff; padding: 0 10px; height: 100%; width: 240px; } .test-container .counter { font-size: 3rem; font-weight: 700; color: rgba(255, 255, 255, 1); position: relative; z-index: 5; text-shadow: 0 0 2px #000; opacity: .8; } @media screen and (max-width: 460px) { .wrapper { width: 100%; } .test-container { width: 170px; } .fg .corner { width: 170px; background-image: none; } .test-description { padding: 0 0.3rem; border-left: none; } } .orange { color: #e47c25; } .orange .test-container{ background: #bb4f29; background: -moz-linear-gradient(-45deg, #bb4f29 0%, #e47c25 40%, #e47c25 100%); background: -webkit-linear-gradient(-45deg, #bb4f29 0%,#e47c25 40%,#e47c25 100%); background: linear-gradient(135deg, #bb4f29 0%,#e47c25 40%,#e47c25 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#bb4f29', endColorstr='#e47c25',GradientType=1 ); } .blue { color: #4b808e; } .blue .test-container{ background: #3a4f6c; background: -moz-linear-gradient(-45deg, #3a4f6c 0%, #4b808e 40%, #5b9fad 100%); background: -webkit-linear-gradient(-45deg, #3a4f6c 0%,#4b808e 40%,#5b9fad 100%); background: linear-gradient(135deg, #3a4f6c 0%,#4b808e 40%,#5b9fad 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3a4f6c', endColorstr='#5b9fad',GradientType=1 ); } .red { color: #c65d4f; } .red .test-container{ background: #962f20; background: -moz-linear-gradient(-45deg, #962f20 0%, #c65d4f 40%, #c7422f 100%); background: -webkit-linear-gradient(-45deg, #962f20 0%,#c65d4f 40%,#c7422f 100%); background: linear-gradient(135deg, #962f20 0%,#c65d4f 40%,#c7422f 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#962f20', endColorstr='#c7422f',GradientType=1 ); } .green { color: #bdbe32; } .green .test-container{ background: #728631; background: -moz-linear-gradient(-45deg, #728631 0%, #bdbe32 40%, #b7b031 100%); background: -webkit-linear-gradient(-45deg, #728631 0%,#bdbe32 40%,#b7b031 100%); background: linear-gradient(135deg, #728631 0%,#bdbe32 40%,#b7b031 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#728631', endColorstr='#b7b031',GradientType=1 ); }