Skip to content

Instantly share code, notes, and snippets.

@benpturner
Created May 6, 2023 19:02
Show Gist options
  • Save benpturner/e2d26d7ca1a37becf2fb9c61f127efa4 to your computer and use it in GitHub Desktop.
Save benpturner/e2d26d7ca1a37becf2fb9c61f127efa4 to your computer and use it in GitHub Desktop.
PoshC2 Thumbnail Template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Image Thumbnails</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" integrity="sha384-KyZXEAg3QhqLMpG8r+Knujsl5/1ov5I55g5m3g3/1eL7gyMT_TXLa21u8N2D/xM" crossorigin="anonymous">
<style>
body {
font-family: Arial, Helvetica, sans-serif;
line-height: 1.6;
margin: 0;
padding: 0;
background-color: #f4f4f4;
}
.container {
width: 80%;
margin: auto;
overflow: hidden;
}
#thumbnails {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-gap: 20px;
margin-top: 30px;
padding-bottom: 20px;
}
#thumbnails .box {
background-color: #fff;
padding: 20px;
text-align: center;
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}
#thumbnails img {
width: 100%;
height: auto;
border-radius: 5px;
margin-bottom: 10px;
}
</style>
</head>
<body>
<header>
<h1 style="background-color: #333; color: #fff; padding: 20px 0; text-align: center;">Image Thumbnails</h1>
</header>
<div class="container">
<div id="thumbnails">
{% for image in images %}
<div class="box">
<a href="{{ url_for('serve_file', filename=image) }}" target="_blank">
<img src="{{ url_for('serve_file', filename=image) }}" alt="{{ image }}">
</a>
<h3>{{ image }}</h3>
</div>
{% endfor %}
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment