StoreGenerator / output /test /format_test.html
drakosfire's picture
LLM dictionary to text and back to dictionary for inventory, html templates
760ff9a
raw
history blame
17.7 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Content Overflow Management</title>
<style>
body {
font-family: Arial, sans-serif;
}
.pages {
display: flex;
flex-direction: column;
}
.page {
border: 1px solid #000;
margin: 10px 0;
padding: 10px;
overflow: hidden;
height: 1123px; /* Set a fixed height for each page to match A4 size in pixels */
}
.grid-container {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
}
.column {
display: flex;
flex-direction: column;
gap: 10px;
}
.item {
background-color: #f0f0f0;
padding: 10px;
border: 1px solid #ccc;
text-align: center;
}
</style>
</head>
<body>
<div class='brewRenderer'>
<div>
<div class="frame-content">
<div class="brewRenderer" style="height: 750;">
<div class="popups"></div>
<div class="pages" lang="en">
<div class="page" id="p1">
<div class="grid-container">
<!-- Column 1 content -->
<div class="grid-item">
<h1 id="morgors-meaty-marvels">Morgor’s Meaty Marvels</h1>
<p><img class="" style="width:300px; mix-blend-mode:multiply;" src="https://raw.githubusercontent.com/Drakosfire/StoreGenerator/master/galleries/test_images/morgor_meaty_marvels.png" alt="shop"></p>
<p>A clandestine butcher shop tucked away in the narrow, winding alleyways of Grimborough. The shop boasts a thrilling array of exotic meats, from subterranean lizard tail to basilisk flank. Dimly lit and pungent with the metallic scent of freshly cut meat, the shop is an intoxicating blend of mystery and carnivorous delight.</p>
<p>Morgor Bloodclaw’s journey from a petty thief in Goblintown to the notorious butcher of Grimborough is the stuff of legend. His knack for procuring the most exotic meats has earned him a shadowy but well-regarded status.</p>
</div>
<!-- Column split -->
<div class="column-split"></div>
<!-- Column 2 content -->
<div class="grid-item">
<h2 id="owner">Owner</h2>
<h3 id="morgor-bloodclaw">Morgor Bloodclaw</h3>
<table>
<thead>
<tr>
<th align="center"></th>
<th align="center"></th>
</tr>
</thead>
<tbody>
<tr>
<td align="center"><strong>Species</strong></td>
<td align="center">Goblin</td>
</tr>
<tr>
<td align="center"><strong>Class</strong></td>
<td align="center">Rogue</td>
</tr>
<tr>
<td align="center"><strong>Description</strong></td>
<td align="center">Morgor is a scruffy goblin with green skin, sharp teeth, and a greasy apron stained with the remnants of his work. His eyes gleam with a cunning intelligence.</td>
</tr>
<tr>
<td align="center"><strong>Personality</strong></td>
<td align="center">Shrewd and opportunistic, Morgor knows how to make a deal that benefits him the most. He has a sharp wit and a knack for making customers feel both uneasy and intrigued.</td>
</tr>
<tr>
<td align="center"><strong>Secrets</strong></td>
<td align="center">Morgor secretly supplies meat to a clandestine fighting ring., He once was part of a notorious thieves’ guild and still holds connections in the underworld.</td>
</tr>
</tbody>
</table>
<p><img class="" style="width:330px; mix-blend-mode:multiply;" src="https://raw.githubusercontent.com/Drakosfire/StoreGenerator/master/galleries/test_images/Morgor_bloodclaw.png" alt="Owner"></p>
</div>
</div>
<div class="blank"></div>
<h2 id="employees">Employees</h2>
<h3 id="brega">Brega</h3>
<table>
<thead>
<tr>
<th align="center"></th>
<th align="center"></th>
</tr>
</thead>
<tbody>
<tr>
<td align="center"><strong>Species</strong></td>
<td align="center">Half-Orc</td>
</tr>
<tr>
<td align="center"><strong>Class</strong></td>
<td align="center">Assistant Butcher</td>
</tr>
<tr>
<td align="center"><strong>Description</strong></td>
<td align="center">A burly half-orc with a kind face and a perpetual smudge of blood on his cheek. Brega handles the heavy lifting and cutting of larger beasts.</td>
</tr>
<tr>
<td align="center"><strong>Personality</strong></td>
<td align="center">Soft-spoken and gentle despite his imposing appearance, Brega is loyal to Morgor and respects his cunning. He has a soft spot for stray animals.</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<div class="column-split"></div>
<p>&nbsp;</p>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
<div class="page" id="p2"><div class="columnWrapper"><div class="block classTable frame decoration"><h5 id="inventory">Inventory</h5>
<table><thead><tr><th align="center">Name</th>
<th align="center">Type</th>
<th align="left">Cost</th>
<th align="center">Properties</th>
</tr></thead><tbody><tr><td align="center">Poultry Drumsticks</td>
<td align="center">Meat</td>
<td align="left">1 gp per lbs</td>
<td align="center"></td>
</tr><tr><td align="center">Ground Beef</td>
<td align="center">Meat</td>
<td align="left">1 gp per lbs</td>
<td align="center"></td>
</tr><tr><td align="center">Pork Chops</td>
<td align="center">Meat</td>
<td align="left">1 gp per lbs</td>
<td align="center"></td>
</tr><tr><td align="center">Bacon Strips</td>
<td align="center">Meat</td>
<td align="left">1 gp per lbs</td>
<td align="center"></td>
</tr><tr><td align="center">Sausage Links</td>
<td align="center">Meat</td>
<td align="left">1 gp per lbs</td>
<td align="center"></td>
</tr><tr><td align="center">Mystic Minotaur Steak</td>
<td align="center">Exotic Meat</td>
<td align="left">25 gold per pound</td>
<td align="center">Grants temporary strength boost when consumed, Requires fine culinary skills to cook properly</td>
</tr><tr><td align="center">Quantum Quail</td>
<td align="center">Exotic Poultry</td>
<td align="left">15 gold each</td>
<td align="center">“Phases in and out of existence”, “Can enhance one’s agility”</td>
</tr><tr><td align="center">Invisible Bacon</td>
<td align="center">Mystical Meat</td>
<td align="left">10 gold per slice</td>
<td align="center">“Invisible to the naked eye”, “Tastes incredibly savory”, “Can only be seen with a special spell”</td>
</tr><tr><td align="center">Hydra Sausage</td>
<td align="center">Mythical Meat</td>
<td align="left">50 gold per link</td>
<td align="center">“Each bite regenerates after a while”, “Consuming too much may cause mild hallucinations”</td>
</tr><tr><td align="center">Cursed Cleaver</td>
<td align="center">Kitchen Equipment</td>
<td align="left">100 gold</td>
<td align="center">“Cuts through any meat effortlessly”, “Occasionally whispers in a long-forgotten language”, “Rumored to be haunted”</td>
</tr><tr><td align="center">Vampire Spice Mix</td>
<td align="center">Cooking Ingredient</td>
<td align="left">20 gold per pouch</td>
<td align="center">“Adds a distinct flavor”, “Enhances blood flow in the consumer”, “Leaves a lingering aftertaste of garlic”</td>
</tr><tr><td align="center">Phoenix Feather Skewers</td>
<td align="center">Cooking Utensil</td>
<td align="left">75 gold per set</td>
<td align="center">“Prevents meat from overcooking”, “Gives a slight warmth to cooked items”, “Reusable endlessly”</td>
</tr></tbody></table></div><div class="columnSplit"> </div><div class="block"><h1 id="related-quests">Related Quests</h1>
<h3 id="the-basilisk-bounty">The Basilisk Bounty</h3>
<p>Morgor needs fresh basilisk meat and offers a handsome reward for those brave enough to hunt one.</p>
<p>500 gold coins and choice cuts of meat.</p>
<h1 id="notable-customers">Notable Customers</h1>
<div class="block note"><h3 id="lord-vittorio-blackthorn">Lord Vittorio Blackthorn</h3>
<p>An eccentric noble known for his extravagant feasts featuring rare and exotic meats.</p>
<p>Lord Blackthorn’s patronage lends an air of mystery and prestige to Morgor’s shop, attracting curious gourmands and shady characters alike.</p>
</div><h1 id="services-and-specialties">Services and Specialties</h1>
<div class="blank"> </div><h2 id="services">Services</h2>
<h3 id="custom-slaughtering">Custom Slaughtering</h3>
<p>Bring your own beasts, and Morgor will prepare the meat to your specifications.
50 gold coins per beast.</p>
<div class="blank"> </div><h2 id="specialties">Specialties</h2>
<div class="blank"> </div><h3 id="basilisk-cutlets">Basilisk Cutlets</h3>
<p>Tender and marbled with a unique flavor, perfect for those seeking a truly rare dining experience.</p>
<h3 id="subterranean-lizard-tail">Subterranean Lizard Tail</h3>
<p>A delicacy prized for its unique texture and earthy taste, enchanted to enhance its natural flavor.</p>
<h1 id="security">Security</h1>
<div class="blank"> </div><h3 id="bewitched-meat-hooks">Bewitched Meat Hooks</h3>
<p>These enchanted meat hooks animate and attack intruders who try to take meat without paying. 200 gold coins per pound.</p>
<div class="blank"> </div><p>Attack: +5 to hit, 1d8+3 piercing damage.</p>
<h3 id="shadow-ward">Shadow Ward</h3>
<p>A magical barrier that alerts Morgor if someone enters the shop after hours. 150 gold coins per pound.</p>
<div class="blank"> </div><p>Detection radius of 60 feet, triggers an audible alarm.</p>
<!-- Size, Town, District, Street, Type, Owners, Employees, Store Hours, Services, Specialties, Reputation, Rumors -->
<div class="block classTable frame "><table><thead><tr><th align="left"></th>
<th align="center"></th>
<th align="center"></th>
</tr></thead><tbody><tr><td align="left"><strong>Size</strong></td>
<td align="center">Small</td>
</tr><tr><td align="left"><strong>Town</strong></td>
<td align="center">Grimborough</td>
</tr><tr><td align="left"><strong>District</strong></td>
<td align="center">The Shadow Market</td>
</tr><tr><td align="left"><strong>Street</strong></td>
<td align="center">Cipher’s Alley</td>
</tr><tr><td align="left"><strong>Type</strong></td>
<td align="center">Butcher’s Shop</td>
</tr><tr><td align="left"><strong>Owners</strong></td>
<td align="center">Morgor Bloodclaw</td>
</tr><tr><td align="left"><strong>Employees</strong></td>
<td align="center">Brega</td>
</tr><tr><td align="left"><strong>Store Hours</strong></td>
<td align="center">From dusk till dawn, seven days a week.</td>
</tr><tr><td align="left"><strong>Services</strong></td>
<td align="center">Custom Slaughtering</td>
</tr><tr><td align="left"><strong>Specialties</strong></td>
<td align="center">Basilisk Cutlets, Subterranean Lizard Tail</td>
</tr><tr><td align="left"><strong>Reputation</strong></td>
<td align="center">Morgor’s Meaty Marvels is rumored to stock the rarest and most unusual meats, sometimes even from mythical creatures, making it a thrilling destination for adventurous eaters.</td>
</tr><tr><td align="left"><strong>Rumors</strong></td>
<td align="center">People say Morgor once sold dragon meat, but no one can confirm the truth., It’s whispered that Morgor has dealings with dark forces to acquire his exotic meats.</td>
</tr></tbody></table></div>
</div><div class="columnSplit"> </div><p>&nbsp;</p>
<div class="columnSplit"> </div><p>&nbsp;</p>
</div></div></div></div></div></div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const pagesContainer = document.querySelector('.pages');
const maxPageHeight = 1123; // Set the maximum page height to the height of an A4 page in pixels
function createNewPage() {
const newPage = document.createElement('div');
newPage.classList.add('page');
newPage.id = `page${pagesContainer.children.length + 1}`;
newPage.style.height = `${maxPageHeight}px`; // Ensure new pages have the same height
pagesContainer.appendChild(newPage);
const newGridContainer = document.createElement('div');
newGridContainer.classList.add('grid-container');
newGridContainer.id = `grid-container-page${pagesContainer.children.length}`;
newPage.appendChild(newGridContainer);
const leftColumn = document.createElement('div');
leftColumn.classList.add('column');
leftColumn.id = `left-column-page${pagesContainer.children.length}`;
newGridContainer.appendChild(leftColumn);
const rightColumn = document.createElement('div');
rightColumn.classList.add('column');
rightColumn.id = `right-column-page${pagesContainer.children.length}`;
newGridContainer.appendChild(rightColumn);
return { leftColumn, rightColumn };
}
function moveOverflowContent() {
let { leftColumn, rightColumn } = createNewPage();
leftColumn = document.getElementById('left-column-page1');
rightColumn = document.getElementById('right-column-page1');
let itemsToMove = Array.from(leftColumn.children).concat(Array.from(rightColumn.children));
leftColumn.innerHTML = '';
rightColumn.innerHTML = '';
let currentColumn = leftColumn;
for (let item of itemsToMove) {
currentColumn.appendChild(item);
if (currentColumn.scrollHeight > maxPageHeight) {
if (currentColumn === leftColumn) {
currentColumn = rightColumn;
} else {
({ leftColumn, rightColumn } = createNewPage());
currentColumn = leftColumn;
}
currentColumn.appendChild(item);
}
}
}
moveOverflowContent();
window.addEventListener('resize', moveOverflowContent);
});
</script>
</body>
</html>