UNPKG

makedrive

Version:
139 lines (138 loc) 3.75 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>MakeDrive Images for {{username}}</title> <style> body { margin: 0; padding: 0; background: #EEE; font: 10px/13px 'Lucida Sans',sans-serif; } .wrap { overflow: hidden; margin: 10px; } .box { float: left; position: relative; width: 20%; padding-bottom: 20%; } .boxInner { position: absolute; left: 10px; right: 10px; top: 10px; bottom: 10px; overflow: hidden; border: 1px dotted; } .boxInner img { width: 100%; } .boxInner .titleBox { position: absolute; bottom: 0; left: 0; right: 0; font-size: 2rem; background: #000; background: rgba(0, 0, 0, 0.5); color: #FFF; padding: 5px; text-align: center; -webkit-transition: all 0.3s ease-out; -moz-transition: all 0.3s ease-out; -o-transition: all 0.3s ease-out; transition: all 0.3s ease-out; } body.no-touch .boxInner:hover .titleBox, body.touch .boxInner.touchFocus .titleBox { margin-bottom: 0; } @media only screen and (max-width : 480px) { /* Smartphone view: 1 tile */ .box { width: 100%; padding-bottom: 100%; } .titleBox > ul > li { padding-left: 5px; margin-left: 55px!important; } } @media only screen and (max-width : 650px) and (min-width : 481px) { /* Tablet view: 2 tiles */ .box { width: 50%; padding-bottom: 50%; } } @media only screen and (max-width : 1050px) and (min-width : 651px) { /* Small desktop / ipad view: 3 tiles */ .box { width: 33.3%; padding-bottom: 33.3%; } } @media only screen and (max-width : 1290px) and (min-width : 1051px) { /* Medium desktop: 4 tiles */ .box { width: 25%; padding-bottom: 25%; } } h1 { margin: 13px 0px; font-weight: 500; height: 2rem; text-align: center; } .titleBox > ul { margin-top: 0; } .titleBox > ul > li { list-style: none; float: left; margin-left: 30px; cursor: pointer; } li > a { text-decoration: none; color: #fff; } </style> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> </head> <body> <header> <h1>MakeDrive Images for {{username}}</h1> </header> <div class="wrap"> {% if err %} <h2>There was an error retrieving your images.</h2><br><b> Please try again later..</b> {% elif list.length < 1 %} No images found in your MakeDrive filesystem {% else %} <!-- Define all of the tiles: --> {% for item in list %} <div class="box"> <div class="boxInner"> <img src="{{item}}" /> <div class="titleBox"> <ul> <li><a href="{{item}}" target="_blank"><i class="fa fa-search-plus"></i></a></li> <li><a href="{{item.replace('/p/', '/z/')}}"><i class="fa fa-cloud-download"></i></a></li> </ul> </div> </div> </div> {% endfor %} {% endif %} </div> <!-- /#wrap --> </body> </html>