related to #1837 added dropdown for album badges

This commit is contained in:
MatthieuLP
2022-12-21 14:25:07 +01:00
parent 00d5c8773c
commit 896125194c
5 changed files with 52 additions and 1 deletions

View File

@@ -372,6 +372,11 @@ function createAlbumNode(node, li) {
+"<i class='icon-blue icon-sitemap nb-subcats'>"+node.nb_subcats+"</i>"
+"<i class='icon-purple icon-picture nb-images'>"+node.nb_images+"</i>"
+"<i class='icon-green icon-imagefolder-01 nb-sub-photos'>"+node.nb_sub_photos+"</i>"
+"<div class='badge-dropdown'>"
+"<span class='icon-blue icon-sitemap nb-subcats'>"+x_nb_subcats.replace('%d', node.nb_subcats)+"</span>"
+"<span class='icon-purple icon-picture nb-images'>"+x_nb_images.replace('%d', node.nb_images)+"</span>"
+"<span class='icon-green icon-imagefolder-01 nb-sub-photos'>"+x_nb_sub_photos.replace('%d', node.nb_sub_photos)+"</span>"
+"</div>"
+"</div>"
)

View File

@@ -15,6 +15,10 @@ var openCat = {$open_cat};
var nb_albums = {$nb_albums};
var light_album_manager = {$light_album_manager};
var x_nb_subcats = "{'%d sub-albums'|@translate}";
var x_nb_images = "{'%d photos'|@translate}";
var x_nb_sub_photos = "{'%d lineage pictures'|@translate}";
var delay_autoOpen = {$delay_before_autoOpen}
{/footer_script}
@@ -542,6 +546,46 @@ input[name="position"] {
margin-right: 6px;
}
.badge-container:hover .badge-dropdown {
display: flex;
}
.badge-dropdown {
position: absolute;
display: none;
flex-direction: column;
background: linear-gradient(130deg, white 0%, white 100%);
right: 50%;
top: 30px;
width: max-content;
border-radius: 10px;
z-index: 10;
transform: translateX(48%);
box-shadow: 0px 3px 3px 1px rgba(0,0,0,0.2);
padding: 10px 20px;
}
.badge-dropdown:after {
content: " ";
position: absolute;
top: -10px;
left: 50%;
transform: rotate(0);
border-width: 5px;
border-style: solid;
border-color: transparent transparent white transparent;
}
.badge-dropdown span {
background: transparent;
font-size: 14px;
font-weight: 600;
margin: 5px 0;
}
.badge-dropdown span::before {
margin: 0 5px 0 0;
}
@media (max-width: 1415px) {
.badge-container .last-update {
display: none;

View File

@@ -4209,7 +4209,7 @@ FORM#categoryOrdering p.albumActions .userSeparator {margin:0 5px;}
left: 6px;
}
.move-cat-container .icon-folder-open, .move-cat-container .icon-sitemap {
.move-cat-container .icon-folder-open, .move-cat-container .icon-sitemap.node-icon {
display: inline-block;
border-radius: 50%;
font-size: 20px;

View File

@@ -1328,4 +1328,5 @@ $lang['Visit history'] = 'Visit history';
$lang['Some photos are missing from your file system. Details provided by plugin Check Uploads'] = 'Some photos are missing from your file system. Details provided by plugin Check Uploads';
$lang['<b>%d</b> filtered users'] = '<b>%d</b> filtered users';
$lang['<b>%d</b> filtered user'] = '<b>%d</b> filtered user';
$lang['%d lineage pictures'] = '%d lineage pictures';
// Leave this line empty

View File

@@ -1328,4 +1328,5 @@ $lang['Visit history'] = 'Historique des visites';
$lang['Some photos are missing from your file system. Details provided by plugin Check Uploads'] = 'Des photos sont absentes de votre système de fichier. À contrôler avec le plugin Check Uploads.';
$lang['<b>%d</b> filtered users'] = '<b>%d</b> utilisateurs filtrés';
$lang['<b>%d</b> filtered user'] = '<b>%d</b> utilisateur filtré';
$lang['%d lineage pictures'] = '%d images de lignée';
// Leave this line empty