365 Self Portraits Tracker
About this app
Capture your journey with 365 self portraits, one for each week of the year. Upload your personal themes and memories!
365 Self Portraits Tracker 365 Self Portraits Tracker Add Portrait
Related apps
Put this on your site
Source
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>365 Self Portraits Tracker</title>
<meta name="description" content="Capture your journey with 365 self portraits, one for each week of the year. Upload your personal themes and memories!">
<meta name="keywords" content="Self Portraits, Photo Gallery, Memories Tracker, Weekly Themes, Personal Journal">
<!-- Libraries -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.6.0/css/fontawesome.min.css" crossorigin="anonymous">
<script type="text/javascript">
try {
document.addEventListener("DOMContentLoaded", function() {
const portraits = [];
const maxWeeks = 52;
function renderGallery() {
const gallery = $("#gallery");
gallery.empty();
for (let i = 0; i < portraits.length; i++) {
const portrait = `
<div class="col-6 col-md-4 mb-3">
<div class="card">
<img src="${portraits[i].src}" class="card-img-top" alt="Self Portrait ${i + 1}">
<div class="card-body">
<h5 class="card-title">${portraits[i].theme}</h5>
<p class="card-text">Week ${i + 1}</p>
</div>
</div>
</div>`;
gallery.append(portrait);
}
}
$("#addPortrait").click(function() {
if (portraits.length < maxWeeks) {
const fileInput = $("#fileInput")[0];
const theme = $("#theme").val();
if (fileInput.files.length > 0 && theme.trim() !== "") {
const reader = new FileReader();
reader.onload = function (e) {
portraits.push({ src: e.target.result, theme: theme });
renderGallery();
$("#theme").val('');
$("#fileInput").val('');
}
reader.readAsDataURL(fileInput.files[0]);
} else {
alert("Please select an image and enter a theme.");
}
if (portraits.length === maxWeeks) {
alert("Hope you have 365 Memories from April 21, 2008 to April 20, 2009!");
}
} else {
alert("You have reached the maximum of 52 portraits.");
}
});
});
} catch (error) {
throw error;
}
</script>
<style>
body {
background: linear-gradient(to right, #00c6ff, #0072ff);
color: white;
}
#main-container {
margin-top: 20px;
}
.card {
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.3);
border-radius: 15px;
}
.btn {
background: #f4a261;
border-radius: 20px;
}
.btn:hover {
background: #e76f51;
}
.input-group {
margin-bottom: 20px;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<h1 class="text-center">365 Self Portraits Tracker</h1>
<div class="input-group">
<input type="file" id="fileInput" class="form-control" accept="image/*" required>
<input type="text" id="theme" class="form-control" placeholder="Theme of the Portrait" required>
<button id="addPortrait" class="btn btn-primary">Add Portrait</button>
</div>
<div class="row" id="gallery">
<!-- Portraits will be rendered here -->
</div>
</div>
</body>
</html>
NEW APPS
These are apps made by the community!