picture wall update

This commit is contained in:
Bruno Charest 2026-01-13 21:59:14 -05:00
parent 2da5ffcacc
commit 16a76db547
2 changed files with 403 additions and 55 deletions

View File

@ -2280,25 +2280,170 @@ select:focus {
} }
/* ===== Picture Wall ===== */ /* ===== Picture Wall ===== */
.picwall-container {
display: grid; /* Picwall Controls */
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); .picwall-controls {
gap: 1rem; margin-bottom: 1.5rem;
padding: 1rem 1.25rem;
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 0.75rem;
box-shadow: var(--shadow-sm);
} }
.picwall-controls-inner {
display: flex;
align-items: center;
gap: 1.25rem;
flex-wrap: wrap;
}
.picwall-controls-label {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.9rem;
font-weight: 600;
color: var(--text-main);
}
.picwall-controls-label i {
font-size: 1.125rem;
color: var(--primary);
}
.picwall-size-controls {
display: flex;
align-items: center;
gap: 0.75rem;
flex: 1;
max-width: 300px;
}
.picwall-size-btn {
display: flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border-radius: 0.5rem;
border: 1px solid var(--border);
background: var(--bg-body);
color: var(--text-main);
cursor: pointer;
transition: all 0.2s ease;
flex-shrink: 0;
}
.picwall-size-btn:hover {
background: var(--primary);
border-color: var(--primary);
color: white;
transform: scale(1.05);
}
.picwall-size-btn:active {
transform: scale(0.95);
}
.picwall-size-btn i {
font-size: 1rem;
}
.picwall-size-slider {
flex: 1;
-webkit-appearance: none;
appearance: none;
height: 6px;
background: var(--border);
border-radius: 3px;
outline: none;
cursor: pointer;
}
.picwall-size-slider::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 18px;
height: 18px;
border-radius: 50%;
background: var(--primary);
cursor: pointer;
border: 3px solid white;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.picwall-size-slider::-webkit-slider-thumb:hover {
transform: scale(1.15);
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}
.picwall-size-slider::-moz-range-thumb {
width: 18px;
height: 18px;
border-radius: 50%;
background: var(--primary);
cursor: pointer;
border: 3px solid white;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.picwall-size-value {
font-size: 0.85rem;
font-weight: 600;
color: var(--text-secondary);
background: var(--primary-light);
padding: 0.375rem 0.75rem;
border-radius: 9999px;
min-width: 60px;
text-align: center;
}
/* Picwall Container with dynamic sizing */
.picwall-container {
--picwall-item-size: 200px;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(var(--picwall-item-size), 1fr));
gap: 1rem;
transition: grid-template-columns 0.3s ease;
}
/* Picture Frame */
.picwall-pictureframe { .picwall-pictureframe {
position: relative; position: relative;
border-radius: 0.5rem; border-radius: 0.75rem;
overflow: hidden; overflow: hidden;
aspect-ratio: 16/10; aspect-ratio: 16/10;
background: var(--bg-card); background: var(--bg-card);
border: 1px solid var(--border); border: 1px solid var(--border);
box-shadow: var(--shadow-sm);
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.picwall-pictureframe:hover {
transform: translateY(-4px) scale(1.02);
box-shadow: var(--shadow-xl);
z-index: 10;
}
/* Image Link Wrapper */
.picwall-image-link {
display: block;
width: 100%;
height: 100%;
} }
.picwall-pictureframe img { .picwall-pictureframe img {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: cover; object-fit: cover;
transition: transform 0.4s ease;
}
.picwall-pictureframe:hover img {
transform: scale(1.08);
} }
.picwall-pictureframe .b-lazy { .picwall-pictureframe .b-lazy {
@ -2307,6 +2452,136 @@ select:focus {
object-fit: cover; object-fit: cover;
} }
/* Hover Overlay */
.picwall-overlay {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background: linear-gradient(0deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
padding: 2.5rem 1rem 1rem 1rem;
transform: translateY(100%);
transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.picwall-pictureframe:hover .picwall-overlay {
transform: translateY(0);
}
.picwall-link {
display: block;
text-decoration: none;
color: white;
}
.picwall-link:hover {
color: white;
}
.picwall-title {
display: block;
font-size: 0.95rem;
font-weight: 600;
color: white;
line-height: 1.4;
margin-bottom: 0.5rem;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.picwall-url {
display: flex;
align-items: center;
gap: 0.375rem;
font-size: 0.75rem;
color: rgba(255, 255, 255, 0.7);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.picwall-url i {
flex-shrink: 0;
font-size: 0.875rem;
}
/* External Link Icon Indicator */
.picwall-pictureframe::before {
content: '';
position: absolute;
top: 0.75rem;
right: 0.75rem;
width: 32px;
height: 32px;
background: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(4px);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transform: scale(0.8);
transition: opacity 0.25s ease, transform 0.25s ease;
z-index: 5;
}
.picwall-pictureframe::after {
content: '\eb82';
font-family: 'remixicon';
position: absolute;
top: 0.75rem;
right: 0.75rem;
width: 32px;
height: 32px;
color: white;
font-size: 0.875rem;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transform: scale(0.8);
transition: opacity 0.25s ease, transform 0.25s ease;
z-index: 6;
}
.picwall-pictureframe:hover::before,
.picwall-pictureframe:hover::after {
opacity: 1;
transform: scale(1);
}
/* Responsive adjustments */
@media (max-width: 768px) {
.picwall-controls-inner {
flex-direction: column;
align-items: stretch;
}
.picwall-size-controls {
max-width: none;
}
.picwall-controls-label {
justify-content: center;
}
.picwall-size-value {
align-self: center;
}
.picwall-container {
gap: 0.75rem;
}
.picwall-pictureframe:hover {
transform: none;
}
}
/* ===== Daily Page ===== */ /* ===== Daily Page ===== */
.daily-entry { .daily-entry {
background: var(--bg-card); background: var(--bg-card);

View File

@ -1,9 +1,11 @@
<!DOCTYPE html> <!DOCTYPE html>
<html{if="$language !=='auto'"} lang=" {$language}"{/if}> <html{if="$language !=='auto'"} lang=" {$language}"{/if}>
<head> <head>
{$pageName="picwall"} {$pageName="picwall"}
{include="includes"} {include="includes"}
</head> </head>
<body> <body>
{include="page.header"} {include="page.header"}
@ -21,17 +23,44 @@
{/loop} {/loop}
</div> </div>
<div class="picwall-container"> <!-- Picwall Controls -->
<div class="picwall-controls">
<div class="picwall-controls-inner">
<span class="picwall-controls-label">
<i class="ri-zoom-in-line"></i>
Image Size
</span>
<div class="picwall-size-controls">
<button type="button" class="picwall-size-btn" id="picwall-size-decrease" title="Decrease size">
<i class="ri-subtract-line"></i>
</button>
<input type="range" id="picwall-size-slider" class="picwall-size-slider" min="120" max="400"
value="200" step="20">
<button type="button" class="picwall-size-btn" id="picwall-size-increase" title="Increase size">
<i class="ri-add-line"></i>
</button>
</div>
<span class="picwall-size-value" id="picwall-size-value">200px</span>
</div>
</div>
<div class="picwall-container" id="picwall-container">
{loop="$linksToDisplay"} {loop="$linksToDisplay"}
<div class="picwall-pictureframe"> <div class="picwall-pictureframe">
<img src="{$root_path}/{$value.thumbnail}#" <!-- Clickable image linking to the website -->
loading="lazy" <a href="{$value.real_url}" target="_blank" rel="noopener noreferrer" class="picwall-image-link"
alt="{$value.title}" title="{$value.title}">
style="width: 100%; height: 100%; object-fit: cover;" /> <img src="{$root_path}/{$value.thumbnail}#" loading="lazy" alt="{$value.title}" />
</a>
<div class="picwall-overlay" style="position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.7); padding: 0.5rem; transform: translateY(100%); transition: transform 0.2s ease;"> <!-- Overlay with title - visible on hover -->
<a class="picwall-link" href="{$value.real_url}" style="color: white; font-size: 0.9rem; text-decoration: none; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"> <div class="picwall-overlay">
{$value.title} <a class="picwall-link" href="{$value.real_url}" target="_blank" rel="noopener noreferrer">
<span class="picwall-title">{$value.title}</span>
<span class="picwall-url">
<i class="ri-external-link-line"></i>
{$value.real_url}
</span>
</a> </a>
</div> </div>
@ -49,12 +78,56 @@
</div> </div>
</div> </div>
<style> <script>
.picwall-pictureframe:hover .picwall-overlay { (function () {
transform: translateY(0); // Picwall size control
const slider = document.getElementById('picwall-size-slider');
const container = document.getElementById('picwall-container');
const sizeValue = document.getElementById('picwall-size-value');
const decreaseBtn = document.getElementById('picwall-size-decrease');
const increaseBtn = document.getElementById('picwall-size-increase');
// Load saved size from localStorage
const savedSize = localStorage.getItem('picwallImageSize');
if (savedSize) {
slider.value = savedSize;
updateSize(savedSize);
} }
</style>
function updateSize(size) {
container.style.setProperty('--picwall-item-size', size + 'px');
sizeValue.textContent = size + 'px';
localStorage.setItem('picwallImageSize', size);
}
slider.addEventListener('input', function () {
updateSize(this.value);
});
decreaseBtn.addEventListener('click', function () {
const currentValue = parseInt(slider.value);
const step = parseInt(slider.step);
const min = parseInt(slider.min);
const newValue = Math.max(min, currentValue - step);
slider.value = newValue;
updateSize(newValue);
});
increaseBtn.addEventListener('click', function () {
const currentValue = parseInt(slider.value);
const step = parseInt(slider.step);
const max = parseInt(slider.max);
const newValue = Math.min(max, currentValue + step);
slider.value = newValue;
updateSize(newValue);
});
// Initialize with default size
updateSize(slider.value);
})();
</script>
{include="page.footer"} {include="page.footer"}
</body> </body>
</html> </html>