commit 9b9ae1fb688b37af773178311cf630a8163b380e
Author: root <root@hub.scroll.pub>
Date: 2024-12-28 11:25:18 +0000
Subject: Initial commit
diff --git a/body.html b/body.html
new file mode 100644
index 0000000..35c6024
--- /dev/null
+++ b/body.html
@@ -0,0 +1,66 @@
+<header>
+ <h1>Farm Calculator</h1>
+ <p class="tagline">Professional pricing tool for eggs and chickens</p>
+</header>
+
+<main>
+ <div class="calculator-container">
+ <section class="input-section">
+ <h2>Calculate Your Price</h2>
+
+ <div class="input-group">
+ <label for="quantity">Quantity:</label>
+ <input type="number" id="quantity" min="1" value="1">
+ </div>
+
+ <div class="input-group">
+ <label for="size">Size:</label>
+ <select id="size">
+ <option value="small">Small</option>
+ <option value="medium" selected>Medium</option>
+ <option value="large">Large</option>
+ <option value="xlarge">Extra Large</option>
+ </select>
+ </div>
+
+ <div class="input-group">
+ <label for="quality">Quality Grade:</label>
+ <select id="quality">
+ <option value="A">Grade A</option>
+ <option value="AA">Grade AA</option>
+ <option value="B">Grade B</option>
+ </select>
+ </div>
+
+ <div class="input-group">
+ <label for="type">Product Type:</label>
+ <select id="type">
+ <option value="eggs">Eggs</option>
+ <option value="chicken">Chicken</option>
+ </select>
+ </div>
+
+ <button id="calculate" class="calculate-btn">Calculate Price</button>
+ </section>
+
+ <section class="result-section">
+ <div class="price-display">
+ <h3>Total Price</h3>
+ <p id="total-price">$0.00</p>
+ </div>
+ <div class="price-breakdown">
+ <h3>Price Breakdown</h3>
+ <ul id="breakdown-list"></ul>
+ </div>
+ </section>
+ </div>
+</main>
+
+<footer>
+ <p>Farm Calculator - Professional pricing tool for farmers</p>
+ <nav>
+ <a href="#about">About</a>
+ <a href="#contact">Contact</a>
+ <a href="#privacy">Privacy Policy</a>
+ </nav>
+</footer>
\ No newline at end of file
diff --git a/index.scroll b/index.scroll
new file mode 100644
index 0000000..0580233
--- /dev/null
+++ b/index.scroll
@@ -0,0 +1,8 @@
+buildHtml
+baseUrl https://eggonomics.scroll.pub
+metaTags
+editButton /edit.html
+title Farm Calculator - Egg & Chicken Pricing Tool
+style.css
+body.html
+script.js
\ No newline at end of file
diff --git a/prompt.json b/prompt.json
new file mode 100644
index 0000000..3940afe
--- /dev/null
+++ b/prompt.json
@@ -0,0 +1,20 @@
+{
+ "id": "msg_01RtdVJD8z6RZ46JFG4Exvvj",
+ "type": "message",
+ "role": "assistant",
+ "model": "claude-3-5-sonnet-20241022",
+ "content": [
+ {
+ "type": "text",
+ "text": "I'll create a farm calculator website with a modern, clean design.\n\nSuggested domain: eggonomics.scroll.pub (combines \"egg\" and \"economics\")\n\n---domain---\neggonomics.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://eggonomics.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Farm Calculator - Egg & Chicken Pricing Tool\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header>\n <h1>Farm Calculator</h1>\n <p class=\"tagline\">Professional pricing tool for eggs and chickens</p>\n</header>\n\n<main>\n <div class=\"calculator-container\">\n <section class=\"input-section\">\n <h2>Calculate Your Price</h2>\n \n <div class=\"input-group\">\n <label for=\"quantity\">Quantity:</label>\n <input type=\"number\" id=\"quantity\" min=\"1\" value=\"1\">\n </div>\n\n <div class=\"input-group\">\n <label for=\"size\">Size:</label>\n <select id=\"size\">\n <option value=\"small\">Small</option>\n <option value=\"medium\" selected>Medium</option>\n <option value=\"large\">Large</option>\n <option value=\"xlarge\">Extra Large</option>\n </select>\n </div>\n\n <div class=\"input-group\">\n <label for=\"quality\">Quality Grade:</label>\n <select id=\"quality\">\n <option value=\"A\">Grade A</option>\n <option value=\"AA\">Grade AA</option>\n <option value=\"B\">Grade B</option>\n </select>\n </div>\n\n <div class=\"input-group\">\n <label for=\"type\">Product Type:</label>\n <select id=\"type\">\n <option value=\"eggs\">Eggs</option>\n <option value=\"chicken\">Chicken</option>\n </select>\n </div>\n\n <button id=\"calculate\" class=\"calculate-btn\">Calculate Price</button>\n </section>\n\n <section class=\"result-section\">\n <div class=\"price-display\">\n <h3>Total Price</h3>\n <p id=\"total-price\">$0.00</p>\n </div>\n <div class=\"price-breakdown\">\n <h3>Price Breakdown</h3>\n <ul id=\"breakdown-list\"></ul>\n </div>\n </section>\n </div>\n</main>\n\n<footer>\n <p>Farm Calculator - Professional pricing tool for farmers</p>\n <nav>\n <a href=\"#about\">About</a>\n <a href=\"#contact\">Contact</a>\n <a href=\"#privacy\">Privacy Policy</a>\n </nav>\n</footer>\n---style.css---\n:root {\n --primary-color: #2c5f2d;\n --secondary-color: #97bc62;\n --accent-color: #fc9f5b;\n --background-color: #f4f1de;\n --text-color: #333;\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: 'Segoe UI', system-ui, sans-serif;\n line-height: 1.6;\n background-color: var(--background-color);\n color: var(--text-color);\n}\n\nheader {\n background-color: var(--primary-color);\n color: white;\n padding: 2rem;\n text-align: center;\n box-shadow: 0 2px 4px rgba(0,0,0,0.1);\n}\n\n.tagline {\n font-size: 1.2rem;\n opacity: 0.9;\n}\n\n.calculator-container {\n max-width: 1200px;\n margin: 2rem auto;\n padding: 0 1rem;\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 2rem;\n}\n\n.input-section, .result-section {\n background: white;\n padding: 2rem;\n border-radius: 12px;\n box-shadow: 0 4px 6px rgba(0,0,0,0.1);\n}\n\n.input-group {\n margin-bottom: 1.5rem;\n}\n\nlabel {\n display: block;\n margin-bottom: 0.5rem;\n font-weight: 500;\n}\n\ninput, select {\n width: 100%;\n padding: 0.8rem;\n border: 2px solid #ddd;\n border-radius: 6px;\n font-size: 1rem;\n transition: border-color 0.3s;\n}\n\ninput:focus, select:focus {\n border-color: var(--accent-color);\n outline: none;\n}\n\n.calculate-btn {\n background-color: var(--accent-color);\n color: white;\n border: none;\n padding: 1rem 2rem;\n border-radius: 6px;\n font-size: 1.1rem;\n cursor: pointer;\n width: 100%;\n transition: transform 0.2s, background-color 0.2s;\n}\n\n.calculate-btn:hover {\n background-color: #e88f4f;\n transform: translateY(-2px);\n}\n\n.price-display {\n text-align: center;\n margin-bottom: 2rem;\n}\n\n#total-price {\n font-size: 3rem;\n color: var(--primary-color);\n font-weight: bold;\n}\n\n.price-breakdown {\n border-top: 2px solid #eee;\n padding-top: 1rem;\n}\n\n#breakdown-list {\n list-style: none;\n margin-top: 1rem;\n}\n\n#breakdown-list li {\n display: flex;\n justify-content: space-between;\n margin-bottom: 0.5rem;\n padding: 0.5rem;\n background: #f8f8f8;\n border-radius: 4px;\n}\n\nfooter {\n background-color: var(--primary-color);\n color: white;\n padding: 2rem;\n text-align: center;\n margin-top: 4rem;\n}\n\nfooter nav {\n margin-top: 1rem;\n}\n\nfooter a {\n color: white;\n text-decoration: none;\n margin: 0 1rem;\n opacity: 0.8;\n transition: opacity 0.2s;\n}\n\nfooter a:hover {\n opacity: 1;\n}\n\n@media (max-width: 768px) {\n .calculator-container {\n grid-template-columns: 1fr;\n }\n \n header {\n padding: 1.5rem;\n }\n \n .input-section, .result-section {\n padding: 1.5rem;\n }\n \n #total-price {\n font-size: 2.5rem;\n }\n}\n---script.js---\ndocument.addEventListener('DOMContentLoaded', () => {\n const calculateBtn = document.getElementById('calculate');\n const totalPriceElement = document.getElementById('total-price');\n const breakdownList = document.getElementById('breakdown-list');\n\n const basePrices = {\n eggs: {\n small: 0.15,\n medium: 0.20,\n large: 0.25,\n xlarge: 0.30\n },\n chicken: {\n small: 8.00,\n medium: 10.00,\n large: 12.00,\n xlarge: 15.00\n }\n };\n\n const qualityMultipliers = {\n B: 0.9,\n A: 1.0,\n AA: 1.2\n };\n\n function calculatePrice() {\n const quantity = parseInt(document.getElementById('quantity').value);\n const size = document.getElementById('size').value;\n const quality = document.getElementById('quality').value;\n const type = document.getElementById('type').value;\n\n const basePrice = basePrices[type][size];\n const qualityMultiplier = qualityMultipliers[quality];\n const subtotal = basePrice * quantity;\n const qualityAdjustment = subtotal * (qualityMultiplier - 1);\n const total = subtotal + qualityAdjustment;\n\n // Update total price display\n totalPriceElement.textContent = `$${total.toFixed(2)}`;\n\n // Update breakdown\n breakdownList.innerHTML = `\n <li>\n <span>Base Price (${quantity} × $${basePrice.toFixed(2)})</span>\n <span>$${subtotal.toFixed(2)}</span>\n </li>\n <li>\n <span>Quality Adjustment (Grade ${quality})</span>\n <span>$${qualityAdjustment.toFixed(2)}</span>\n </li>\n `;\n\n // Add animation\n totalPriceElement.classList.add('price-updated');\n setTimeout(() => {\n totalPriceElement.classList.remove('price-updated');\n }, 300);\n }\n\n calculateBtn.addEventListener('click', calculatePrice);\n\n // Calculate initial price\n calculatePrice();\n});\n---end---\n\nThis calculator allows farmers to price their eggs and chickens based on:\n1. Quantity\n2. Size (Small to Extra Large)\n3. Quality Grade (B, A, AA)\n4. Product Type (Eggs vs Chicken)\n\nThe design features:\n- Clean, modern interface\n- Responsive layout\n- Smooth animations\n- Professional color scheme\n- Clear price breakdown\n- Accessible form controls\n- Mobile-friendly design\n\nThe calculator uses realistic base prices and quality multipliers to calculate the final price, with a detailed breakdown of the calculation components."
+ }
+ ],
+ "stop_reason": "end_turn",
+ "stop_sequence": null,
+ "usage": {
+ "input_tokens": 292,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "output_tokens": 2485
+ }
+}
\ No newline at end of file
diff --git a/readme.scroll b/readme.scroll
new file mode 100644
index 0000000..f09ad6d
--- /dev/null
+++ b/readme.scroll
@@ -0,0 +1,2 @@
+# eggonomics.scroll.pub
+Website generated by Claude from prompt: Create a calc to sell eggs and chickens, put at least 3 dimensions to set thw price
\ No newline at end of file
diff --git a/script.js b/script.js
new file mode 100644
index 0000000..3699cb2
--- /dev/null
+++ b/script.js
@@ -0,0 +1,65 @@
+document.addEventListener('DOMContentLoaded', () => {
+ const calculateBtn = document.getElementById('calculate');
+ const totalPriceElement = document.getElementById('total-price');
+ const breakdownList = document.getElementById('breakdown-list');
+
+ const basePrices = {
+ eggs: {
+ small: 0.15,
+ medium: 0.20,
+ large: 0.25,
+ xlarge: 0.30
+ },
+ chicken: {
+ small: 8.00,
+ medium: 10.00,
+ large: 12.00,
+ xlarge: 15.00
+ }
+ };
+
+ const qualityMultipliers = {
+ B: 0.9,
+ A: 1.0,
+ AA: 1.2
+ };
+
+ function calculatePrice() {
+ const quantity = parseInt(document.getElementById('quantity').value);
+ const size = document.getElementById('size').value;
+ const quality = document.getElementById('quality').value;
+ const type = document.getElementById('type').value;
+
+ const basePrice = basePrices[type][size];
+ const qualityMultiplier = qualityMultipliers[quality];
+ const subtotal = basePrice * quantity;
+ const qualityAdjustment = subtotal * (qualityMultiplier - 1);
+ const total = subtotal + qualityAdjustment;
+
+ // Update total price display
+ totalPriceElement.textContent = `$${total.toFixed(2)}`;
+
+ // Update breakdown
+ breakdownList.innerHTML = `
+ <li>
+ <span>Base Price (${quantity} × $${basePrice.toFixed(2)})</span>
+ <span>$${subtotal.toFixed(2)}</span>
+ </li>
+ <li>
+ <span>Quality Adjustment (Grade ${quality})</span>
+ <span>$${qualityAdjustment.toFixed(2)}</span>
+ </li>
+ `;
+
+ // Add animation
+ totalPriceElement.classList.add('price-updated');
+ setTimeout(() => {
+ totalPriceElement.classList.remove('price-updated');
+ }, 300);
+ }
+
+ calculateBtn.addEventListener('click', calculatePrice);
+
+ // Calculate initial price
+ calculatePrice();
+});
\ No newline at end of file
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..e6fb802
--- /dev/null
+++ b/style.css
@@ -0,0 +1,162 @@
+:root {
+ --primary-color: #2c5f2d;
+ --secondary-color: #97bc62;
+ --accent-color: #fc9f5b;
+ --background-color: #f4f1de;
+ --text-color: #333;
+}
+
+* {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+}
+
+body {
+ font-family: 'Segoe UI', system-ui, sans-serif;
+ line-height: 1.6;
+ background-color: var(--background-color);
+ color: var(--text-color);
+}
+
+header {
+ background-color: var(--primary-color);
+ color: white;
+ padding: 2rem;
+ text-align: center;
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);
+}
+
+.tagline {
+ font-size: 1.2rem;
+ opacity: 0.9;
+}
+
+.calculator-container {
+ max-width: 1200px;
+ margin: 2rem auto;
+ padding: 0 1rem;
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: 2rem;
+}
+
+.input-section, .result-section {
+ background: white;
+ padding: 2rem;
+ border-radius: 12px;
+ box-shadow: 0 4px 6px rgba(0,0,0,0.1);
+}
+
+.input-group {
+ margin-bottom: 1.5rem;
+}
+
+label {
+ display: block;
+ margin-bottom: 0.5rem;
+ font-weight: 500;
+}
+
+input, select {
+ width: 100%;
+ padding: 0.8rem;
+ border: 2px solid #ddd;
+ border-radius: 6px;
+ font-size: 1rem;
+ transition: border-color 0.3s;
+}
+
+input:focus, select:focus {
+ border-color: var(--accent-color);
+ outline: none;
+}
+
+.calculate-btn {
+ background-color: var(--accent-color);
+ color: white;
+ border: none;
+ padding: 1rem 2rem;
+ border-radius: 6px;
+ font-size: 1.1rem;
+ cursor: pointer;
+ width: 100%;
+ transition: transform 0.2s, background-color 0.2s;
+}
+
+.calculate-btn:hover {
+ background-color: #e88f4f;
+ transform: translateY(-2px);
+}
+
+.price-display {
+ text-align: center;
+ margin-bottom: 2rem;
+}
+
+#total-price {
+ font-size: 3rem;
+ color: var(--primary-color);
+ font-weight: bold;
+}
+
+.price-breakdown {
+ border-top: 2px solid #eee;
+ padding-top: 1rem;
+}
+
+#breakdown-list {
+ list-style: none;
+ margin-top: 1rem;
+}
+
+#breakdown-list li {
+ display: flex;
+ justify-content: space-between;
+ margin-bottom: 0.5rem;
+ padding: 0.5rem;
+ background: #f8f8f8;
+ border-radius: 4px;
+}
+
+footer {
+ background-color: var(--primary-color);
+ color: white;
+ padding: 2rem;
+ text-align: center;
+ margin-top: 4rem;
+}
+
+footer nav {
+ margin-top: 1rem;
+}
+
+footer a {
+ color: white;
+ text-decoration: none;
+ margin: 0 1rem;
+ opacity: 0.8;
+ transition: opacity 0.2s;
+}
+
+footer a:hover {
+ opacity: 1;
+}
+
+@media (max-width: 768px) {
+ .calculator-container {
+ grid-template-columns: 1fr;
+ }
+
+ header {
+ padding: 1.5rem;
+ }
+
+ .input-section, .result-section {
+ padding: 1.5rem;
+ }
+
+ #total-price {
+ font-size: 2.5rem;
+ }
+}
\ No newline at end of file