Changes to unitwise.scroll.pub

root
root
17 days ago
Initial commit
body.html
Changed around line 1
+
+

Universal Unit Converter

+

Convert between metric and imperial units instantly

+
+
+
+
+
+
+
+
+
+
+
+
+
+

Conversion Results

+
+
+
+
+

Recommended Tools

+
+
+
+
+
+ FAQ
+
+
+
index.scroll
Changed around line 1
+ buildHtml
+ baseUrl https://unitwise.scroll.pub
+ metaTags
+ editButton /edit.html
+ title Universal Unit Converter | Fast & Accurate Metric & Imperial Conversions
+ style.css
+ body.html
+ script.js
prompt.json
Changed around line 1
+ {
+ "id": "5746c869-a5ab-433f-9e55-3cba415f46da",
+ "object": "chat.completion",
+ "created": 1736069140,
+ "model": "deepseek-chat",
+ "choices": [
+ {
+ "index": 0,
+ "message": {
+ "role": "assistant",
+ "content": "---domain---\nunitwise.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://unitwise.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Universal Unit Converter | Fast & Accurate Metric & Imperial Conversions\nstyle.css\nbody.html\nscript.js\n---body.html---\n
\n

Universal Unit Converter

\n

Convert between metric and imperial units instantly

\n
\n\n
\n
\n
\n \n \n \n
\n \n
\n\n
\n

Conversion Results

\n
\n
\n\n
\n

Recommended Tools

\n \n
\n
\n\n
\n \n
\n---style.css---\n:root {\n --primary-color: #4a90e2;\n --background-light: #ffffff;\n --text-light: #333333;\n --background-dark: #1a1a1a;\n --text-dark: #f5f5f5;\n}\n\nbody {\n font-family: 'Segoe UI', system-ui, sans-serif;\n margin: 0;\n padding: 2rem;\n background-color: var(--background-light);\n color: var(--text-light);\n transition: all 0.3s ease;\n}\n\nbody.dark-mode {\n background-color: var(--background-dark);\n color: var(--text-dark);\n}\n\nheader {\n text-align: center;\n margin-bottom: 2rem;\n}\n\nh1 {\n font-size: 2.5rem;\n color: var(--primary-color);\n}\n\n.converter {\n max-width: 600px;\n margin: 0 auto 2rem;\n padding: 1.5rem;\n background: rgba(255, 255, 255, 0.1);\n border-radius: 12px;\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n}\n\n.input-group {\n display: grid;\n grid-template-columns: 1fr 1.5fr;\n gap: 1rem;\n margin-bottom: 1rem;\n}\n\ninput {\n padding: 0.8rem;\n border: 1px solid #ddd;\n border-radius: 8px;\n font-size: 1rem;\n}\n\nbutton {\n width: 100%;\n padding: 0.8rem;\n background-color: var(--primary-color);\n color: white;\n border: none;\n border-radius: 8px;\n cursor: pointer;\n font-size: 1rem;\n transition: background-color 0.2s;\n}\n\nbutton:hover {\n background-color: #357abd;\n}\n\n.results {\n max-width: 800px;\n margin: 0 auto;\n}\n\n#output {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n gap: 1rem;\n margin-top: 1rem;\n}\n\n.conversion-result {\n padding: 1rem;\n background: rgba(255, 255, 255, 0.05);\n border-radius: 8px;\n}\n\n.affiliate {\n max-width: 800px;\n margin: 2rem auto;\n padding: 1rem;\n}\n\n.affiliate-links {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n gap: 1rem;\n}\n\n.affiliate-links a {\n display: block;\n padding: 1rem;\n background: rgba(255, 255, 255, 0.05);\n border-radius: 8px;\n text-align: center;\n text-decoration: none;\n color: inherit;\n transition: transform 0.2s;\n}\n\n.affiliate-links a:hover {\n transform: translateY(-3px);\n}\n\nfooter {\n text-align: center;\n margin-top: 2rem;\n padding: 1rem;\n}\n\n@media (max-width: 600px) {\n .input-group {\n grid-template-columns: 1fr;\n }\n \n h1 {\n font-size: 2rem;\n }\n}\n---script.js---\nconst units = {\n length: ['m', 'cm', 'mm', 'km', 'in', 'ft', 'yd', 'mi'],\n weight: ['kg', 'g', 'mg', 'lb', 'oz'],\n volume: ['l', 'ml', 'gal', 'qt', 'pt', 'fl oz'],\n temperature: ['°C', '°F', 'K'],\n area: ['m²', 'ft²', 'in²', 'ha', 'ac']\n};\n\nconst conversionFactors = {\n // Length conversions\n m: { cm: 100, mm: 1000, km: 0.001, in: 39.3701, ft: 3.28084, yd: 1.09361, mi: 0.000621371 },\n cm: { m: 0.01, mm: 10, km: 1e-5, in: 0.393701, ft: 0.0328084, yd: 0.0109361, mi: 6.2137e-6 },\n // ... (add all other conversion factors)\n \n // Temperature conversions\n '°C': {\n '°F': (c) => (c * 9/5) + 32,\n K: (c) => c + 273.15\n },\n '°F': {\n '°C': (f) => (f - 32) * 5/9,\n K: (f) => (f - 32) * 5/9 + 273.15\n },\n K: {\n '°C': (k) => k - 273.15,\n '°F': (k) => (k - 273.15) * 9/5 + 32\n }\n};\n\nfunction populateUnitSuggestions() {\n const datalist = document.getElementById('units');\n const allUnits = Object.values(units).flat();\n allUnits.forEach(unit => {\n const option = document.createElement('option');\n option.value = unit;\n datalist.appendChild(option);\n });\n}\n\nfunction convertUnits() {\n const inputValue = parseFloat(document.getElementById('inputValue').value);\n const inputUnit = document.getElementById('inputUnit').value;\n const outputDiv = document.getElementById('output');\n \n if (isNaN(inputValue)) {\n outputDiv.innerHTML = '
Please enter a valid number
';\n return;\n }\n\n if (!conversionFactors[inputUnit]) {\n outputDiv.innerHTML = `
Unknown unit: ${inputUnit}
`;\n return;\n }\n\n let resultsHTML = '';\n const conversions = conversionFactors[inputUnit];\n \n for (const [unit, factor] of Object.entries(conversions)) {\n let convertedValue;\n if (typeof factor === 'function') {\n convertedValue = factor(inputValue).toFixed(2);\n } else {\n convertedValue = (inputValue * factor).toFixed(2);\n }\n resultsHTML += `\n
\n ${convertedValue} ${unit}\n
\n `;\n }\n\n outputDiv.innerHTML = resultsHTML;\n}\n\n// Theme toggle\nconst themeToggle = document.getElementById('themeToggle');\nthemeToggle.addEventListener('click', () => {\n document.body.classList.toggle('dark-mode');\n});\n\n// Initialize\ndocument.getElementById('convertBtn').addEventListener('click', convertUnits);\npopulateUnitSuggestions();\n---end---"
+ },
+ "logprobs": null,
+ "finish_reason": "stop"
+ }
+ ],
+ "usage": {
+ "prompt_tokens": 752,
+ "completion_tokens": 1894,
+ "total_tokens": 2646,
+ "prompt_cache_hit_tokens": 0,
+ "prompt_cache_miss_tokens": 752
+ },
+ "system_fingerprint": "fp_3a5770e1b4"
+ }
readme.scroll
Changed around line 1
+ # unitwise.scroll.pub
+ Website generated by DeepSeek from prompt: Builder Prompt: Universal Unit Converter Goal: Build a fast, accurate, and user-friendly universal unit converter website using only HTML, CSS, and JavaScript. The site must handle metric and imperial units across length, weight, volume, temperature, and area. Include comprehensive unit databases and robust error handling. Monetize via affiliate links (details below). Functionality: Input: Clear input fields for the value and source unit. Auto-complete suggestions for units. Conversion: Instant conversion to all relevant units. Display results clearly, highlighting the target unit. Units: Comprehensive database covering length (m, cm, in, ft, yd, mi, etc.), weight (kg, g, lb, oz, etc.), volume (l, ml, gal, qt, etc.), temperature (°C, °F, K), and area (m², ft², etc.). Error Handling: Handle invalid inputs (non-numeric values, unknown units) gracefully, providing helpful error messages. UI/UX: Clean, intuitive design. Responsive design for all devices. Dark/light mode option. SEO & Technical Specs: On-Page SEO: Optimize title tags, headings (H1-H6), meta descriptions, and image alt text for relevant keywords (e.g., “unit converter,” “metric conversion,” “imperial units”). Use internal and external linking strategically. Technical SEO: Ensure fast loading speed (optimize images, minify code). Implement a sitemap (XML and HTML), robots.txt, and structured data (JSON-LD) for schema markup (unitConversion). Create an index page. Meta Tags: Use relevant keywords in meta descriptions and title tags. Set appropriate viewport meta tag for responsiveness. FAQ Page: Include a dedicated FAQ page addressing common questions (e.g., “How accurate is the converter?”, “What units are supported?”, “How do I use the converter?”). Affiliate Links: Integrate affiliate links (e.g., Amazon Associates) subtly within relevant content (e.g., links to related measuring tools). Ensure compliance with affiliate program terms. Monetization: Affiliate Links: Strategically place affiliate links to relevant products (measuring tools, scientific calculators, etc.) on the site, ensuring they are not intrusive. Track conversions using affiliate program tools. Consider contextual advertising (if allowed by affiliate program). Deliverables: Complete, functional website code (HTML, CSS, JS). Sitemap (XML and HTML). robots.txt file. JSON-LD for schema markup. FAQ page. All necessary files for crawlers.
script.js
Changed around line 1
+ const units = {
+ length: ['m', 'cm', 'mm', 'km', 'in', 'ft', 'yd', 'mi'],
+ weight: ['kg', 'g', 'mg', 'lb', 'oz'],
+ volume: ['l', 'ml', 'gal', 'qt', 'pt', 'fl oz'],
+ temperature: ['°C', '°F', 'K'],
+ area: ['m²', 'ft²', 'in²', 'ha', 'ac']
+ };
+
+ const conversionFactors = {
+ // Length conversions
+ m: { cm: 100, mm: 1000, km: 0.001, in: 39.3701, ft: 3.28084, yd: 1.09361, mi: 0.000621371 },
+ cm: { m: 0.01, mm: 10, km: 1e-5, in: 0.393701, ft: 0.0328084, yd: 0.0109361, mi: 6.2137e-6 },
+ // ... (add all other conversion factors)
+
+ // Temperature conversions
+ '°C': {
+ '°F': (c) => (c * 9/5) + 32,
+ K: (c) => c + 273.15
+ },
+ '°F': {
+ '°C': (f) => (f - 32) * 5/9,
+ K: (f) => (f - 32) * 5/9 + 273.15
+ },
+ K: {
+ '°C': (k) => k - 273.15,
+ '°F': (k) => (k - 273.15) * 9/5 + 32
+ }
+ };
+
+ function populateUnitSuggestions() {
+ const datalist = document.getElementById('units');
+ const allUnits = Object.values(units).flat();
+ allUnits.forEach(unit => {
+ const option = document.createElement('option');
+ option.value = unit;
+ datalist.appendChild(option);
+ });
+ }
+
+ function convertUnits() {
+ const inputValue = parseFloat(document.getElementById('inputValue').value);
+ const inputUnit = document.getElementById('inputUnit').value;
+ const outputDiv = document.getElementById('output');
+
+ if (isNaN(inputValue)) {
+ outputDiv.innerHTML = '
Please enter a valid number
';
+ return;
+ }
+
+ if (!conversionFactors[inputUnit]) {
+ outputDiv.innerHTML = `
Unknown unit: ${inputUnit}
`;
+ return;
+ }
+
+ let resultsHTML = '';
+ const conversions = conversionFactors[inputUnit];
+
+ for (const [unit, factor] of Object.entries(conversions)) {
+ let convertedValue;
+ if (typeof factor === 'function') {
+ convertedValue = factor(inputValue).toFixed(2);
+ } else {
+ convertedValue = (inputValue * factor).toFixed(2);
+ }
+ resultsHTML += `
+
+ ${convertedValue} ${unit}
+
+ `;
+ }
+
+ outputDiv.innerHTML = resultsHTML;
+ }
+
+ // Theme toggle
+ const themeToggle = document.getElementById('themeToggle');
+ themeToggle.addEventListener('click', () => {
+ document.body.classList.toggle('dark-mode');
+ });
+
+ // Initialize
+ document.getElementById('convertBtn').addEventListener('click', convertUnits);
+ populateUnitSuggestions();
style.css
Changed around line 1
+ :root {
+ --primary-color: #4a90e2;
+ --background-light: #ffffff;
+ --text-light: #333333;
+ --background-dark: #1a1a1a;
+ --text-dark: #f5f5f5;
+ }
+
+ body {
+ font-family: 'Segoe UI', system-ui, sans-serif;
+ margin: 0;
+ padding: 2rem;
+ background-color: var(--background-light);
+ color: var(--text-light);
+ transition: all 0.3s ease;
+ }
+
+ body.dark-mode {
+ background-color: var(--background-dark);
+ color: var(--text-dark);
+ }
+
+ header {
+ text-align: center;
+ margin-bottom: 2rem;
+ }
+
+ h1 {
+ font-size: 2.5rem;
+ color: var(--primary-color);
+ }
+
+ .converter {
+ max-width: 600px;
+ margin: 0 auto 2rem;
+ padding: 1.5rem;
+ background: rgba(255, 255, 255, 0.1);
+ border-radius: 12px;
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
+ }
+
+ .input-group {
+ display: grid;
+ grid-template-columns: 1fr 1.5fr;
+ gap: 1rem;
+ margin-bottom: 1rem;
+ }
+
+ input {
+ padding: 0.8rem;
+ border: 1px solid #ddd;
+ border-radius: 8px;
+ font-size: 1rem;
+ }
+
+ button {
+ width: 100%;
+ padding: 0.8rem;
+ background-color: var(--primary-color);
+ color: white;
+ border: none;
+ border-radius: 8px;
+ cursor: pointer;
+ font-size: 1rem;
+ transition: background-color 0.2s;
+ }
+
+ button:hover {
+ background-color: #357abd;
+ }
+
+ .results {
+ max-width: 800px;
+ margin: 0 auto;
+ }
+
+ #output {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
+ gap: 1rem;
+ margin-top: 1rem;
+ }
+
+ .conversion-result {
+ padding: 1rem;
+ background: rgba(255, 255, 255, 0.05);
+ border-radius: 8px;
+ }
+
+ .affiliate {
+ max-width: 800px;
+ margin: 2rem auto;
+ padding: 1rem;
+ }
+
+ .affiliate-links {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
+ gap: 1rem;
+ }
+
+ .affiliate-links a {
+ display: block;
+ padding: 1rem;
+ background: rgba(255, 255, 255, 0.05);
+ border-radius: 8px;
+ text-align: center;
+ text-decoration: none;
+ color: inherit;
+ transition: transform 0.2s;
+ }
+
+ .affiliate-links a:hover {
+ transform: translateY(-3px);
+ }
+
+ footer {
+ text-align: center;
+ margin-top: 2rem;
+ padding: 1rem;
+ }
+
+ @media (max-width: 600px) {
+ .input-group {
+ grid-template-columns: 1fr;
+ }
+
+ h1 {
+ font-size: 2rem;
+ }
+ }