show all 3 prompts/images in the enlarged view
Browse filesFiles changed (3)
- index.css+29-3
- index.html+1-1
- index.js+29-14
85 unmodified lines868788899091929394959697471 unmodified lines56957057157257357457557657757840 unmodified lines61962062162262362462562662762862963063163285 unmodified linesbox-shadow: 0 5px 20px #0000007d;}#alert.show {right: 12px;opacity: 1;transition: all 100ms ease-in;}footer {flex-shrink: 0;padding: 5px 10px;471 unmodified linestop: -256px;left: 0px;width: 256px;aspect-ratio: 1 / 1;overflow: hidden;border-radius: 2px;background-color: #222;cursor: pointer;animation-name: reduce;animation-duration: 100ms;40 unmodified lines.image-item img {display: block;width: 256px;}.image-item img.hidden {display: none;}.image-item:hover .imgBox img {width: 100%;}.image-item.favorite {85 unmodified lines8687888990919293949596979899100101102103104105106107108109471 unmodified lines58158258358458558658758858959059140 unmodified lines63263363463563663763863964064164264364464564664764864965065165265365465565665765885 unmodified linesbox-shadow: 0 5px 20px #0000007d;}#alert.left {left: -52px;right: initial;}#alert.show {right: 12px;opacity: 1;transition: all 100ms ease-in;}#alert.left.show {left: 12px;right: initial;opacity: 1;transition: all 100ms ease-in;}footer {flex-shrink: 0;padding: 5px 10px;471 unmodified linestop: -256px;left: 0px;width: 256px;aspect-ratio: 1 / 1.33;overflow: hidden;border-radius: 2px;background-color: #111;text-align: left;cursor: pointer;animation-name: reduce;animation-duration: 100ms;40 unmodified lines.image-item img {display: block;width: 256px;position: absolute;top: 0;}.image-item .imgBox img.hidden {display: none;}.image-item:hover .imgBox img {width: 100%;z-index: 1;box-shadow: -10px 10px 20px rgba(0,0,0,0.6);}.image-item:hover .imgBox img.hidden {display: initial;width: 33%;position: relative;top: 75%;box-shadow: initial;z-index: 0;}.image-item.favorite {
189 unmodified lines190191192193194195196189 unmodified lines<footer class="special"><div><span><strong>Temporarily 500 artists while in Beta.</strong> To learn more click the 📓 at the top left -</span><span>SDXL artist browser, v0.9, by</span><a href="https://huggingface.co/mattthew" target="_blank">Mattthew</a><div id="close_footer"><strong> x </strong></div></div>189 unmodified lines190191192193194195196189 unmodified lines<footer class="special"><div><span><strong>Temporarily 500 artists while in Beta.</strong> To learn more click the 📓 at the top left -</span><span>SDXL Artist Style Explorer, v0.9, by</span><a href="https://huggingface.co/mattthew" target="_blank">Mattthew</a><div id="close_footer"><strong> x </strong></div></div>
51 unmodified lines5253545556575859606162244 unmodified lines307308309310311312313314315316317318319320321322323324325326327328329330333 unmodified lines664665666667668669670385 unmodified lines1056105710581059106010611062106310641065106610671068106910701071107210735 unmodified lines1079108010811082108310841085108610871088108951 unmodified lineslet imagePromises = artistsData.map((artist) => {var last = artist[0];var first = artist[1];var tags1 = artist[2].replaceAll('|', ' ').toLowerCase();// class names can't start with a number, but some tags do// in these cases prepending with 'qqqq-'tags1 = tags1.replace(/(^|\s)(\d)/g, '$1qqqq-$2');var tags2 = artist[2].replaceAll('|', ', ').toLowerCase();var itemDiv = document.createElement('div');itemDiv.className = 'image-item ' + tags1;var itemHeader = document.createElement('span');244 unmodified lines});if(imgTypeShown == 0) {document.getElementById('promptA').classList.add('selected');doAlert('Showing artwork');} else if(imgTypeShown == 1) {document.getElementById('promptP').classList.add('selected');doAlert('Showing portraits');} else if(imgTypeShown == 2) {document.getElementById('promptL').classList.add('selected');doAlert('Showing landscapes');}} else {if(selected == 'promptA') {imgTypeShown = 0;doAlert('Showing artwork');} else if(selected == 'promptP') {imgTypeShown = 1;doAlert('Showing portraits');} else if(selected == 'promptL') {imgTypeShown = 2;doAlert('Showing landscapes');}var links = document.getElementById(selected).parentNode.querySelectorAll('.link');links.forEach(function(link) {333 unmodified linesfunction copyExportToClipboard() {var favorites = document.getElementById('export').getElementsByTagName('textarea')[0].value;navigator.clipboard.writeText(favorites);doAlert('Favorites copied to clipboard!');}function importFavorites() {385 unmodified linesfavoriteCounter.textContent = ' - ' + favoriteCount;}function doAlert(str) {var alert = document.getElementById('alert');alert.textContent = str;alert.classList.remove('show');window.clearTimeout(timer);timer = setTimeout(showAlert, 100);}function showAlert() {var alert = document.getElementById('alert');alert.classList.add('show');timer = setTimeout(hideAlert, 2000);}function hideAlert() {5 unmodified linesif(stuff == 'name') {var str = item.closest('.image-item').getElementsByClassName('firstN')[0].textContent +' ' + item.closest('.image-item').getElementsByClassName('lastN')[0].textContent;doAlert('Copied to name clipboard!');} else if(stuff == 'tags') {console.log(item);var str = item.textContent;doAlert('Copied to tags clipboard!');}navigator.clipboard.writeText(str);}51 unmodified lines5253545556575859606162636465244 unmodified lines310311312313314315316317318319320321322323324325326327328329330331332333333 unmodified lines667668669670671672673385 unmodified lines1059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710885 unmodified lines1094109510961097109810991100110111021103110451 unmodified lineslet imagePromises = artistsData.map((artist) => {var last = artist[0];var first = artist[1];var tags1 = artist[2].replaceAll('|', ' ').toLowerCase(); // for classesvar tags2 = artist[2].replaceAll('|', ', ').toLowerCase(); // for display// class names can't start with a number, but some tags do// in these cases we prepend the class with 'qqqq-'tags1 = tags1.replace(/(^|\s)(\d)/g, '$1qqqq-$2');// artists can have a tag in the format of "added-YYYY-MM"// we want that to show up as a filter, but not on the artist cardtags2 = tags2.replace(/, added-(\d|-)*/g,'');var itemDiv = document.createElement('div');itemDiv.className = 'image-item ' + tags1;var itemHeader = document.createElement('span');244 unmodified lines});if(imgTypeShown == 0) {document.getElementById('promptA').classList.add('selected');doAlert('Showing artwork',0);} else if(imgTypeShown == 1) {document.getElementById('promptP').classList.add('selected');doAlert('Showing portraits',0);} else if(imgTypeShown == 2) {document.getElementById('promptL').classList.add('selected');doAlert('Showing landscapes',0);}} else {if(selected == 'promptA') {imgTypeShown = 0;doAlert('Showing artwork',0);} else if(selected == 'promptP') {imgTypeShown = 1;doAlert('Showing portraits',0);} else if(selected == 'promptL') {imgTypeShown = 2;doAlert('Showing landscapes',0);}var links = document.getElementById(selected).parentNode.querySelectorAll('.link');links.forEach(function(link) {333 unmodified linesfunction copyExportToClipboard() {var favorites = document.getElementById('export').getElementsByTagName('textarea')[0].value;navigator.clipboard.writeText(favorites);doAlert('Favorites copied to clipboard!',1);}function importFavorites() {385 unmodified linesfavoriteCounter.textContent = ' - ' + favoriteCount;}function doAlert(str,location) {var alert = document.getElementById('alert');alert.textContent = str;// remove show and cleartimeout to redo anim if alert called multiple timesalert.classList.remove('show');window.clearTimeout(timer);if(location == 0) {alert.classList.add('left');} else {alert.classList.remove('left');// CSS defaults to right}timer = setTimeout(showAlert, 100);}function showAlert() {var alert = document.getElementById('alert');alert.classList.add('show');if(alert.classList.contains('left')) {// shorter display time because it covers the enlarged imagetimer = setTimeout(hideAlert, 750);} else {timer = setTimeout(hideAlert, 2000);}}function hideAlert() {5 unmodified linesif(stuff == 'name') {var str = item.closest('.image-item').getElementsByClassName('firstN')[0].textContent +' ' + item.closest('.image-item').getElementsByClassName('lastN')[0].textContent;doAlert('Copied to name clipboard!',1);} else if(stuff == 'tags') {console.log(item);var str = item.textContent;doAlert('Copied to tags clipboard!',1);}navigator.clipboard.writeText(str);}
index.css+29-3
index.html+1-1
index.js+29-14