commit 2e87b66669d85a393db1972071d0fe78c321ebe4
Author: root <root@hub.scroll.pub>
Date: 2024-12-30 09:53:57 +0000
Subject: Initial commit
diff --git a/body.html b/body.html
new file mode 100644
index 0000000..2597c1d
--- /dev/null
+++ b/body.html
@@ -0,0 +1,37 @@
+<header class="header">
+ <h1>SubjectLab</h1>
+ <p>Your AI-powered subject line testing and optimization tool</p>
+</header>
+
+<main class="container">
+ <section class="subject-line-tester">
+ <h2>Test Your Subject Line</h2>
+ <textarea id="subjectInput" placeholder="Enter your subject line here..." maxlength="100"></textarea>
+ <button id="testButton">Test Subject Line</button>
+ <div class="results">
+ <h3>Analysis Results</h3>
+ <div class="score">
+ <span>Score:</span>
+ <span id="scoreValue">0/100</span>
+ </div>
+ <div class="feedback">
+ <p id="lengthFeedback"></p>
+ <p id="powerWordsFeedback"></p>
+ <p id="spamFeedback"></p>
+ </div>
+ </div>
+ </section>
+
+ <section class="subject-line-library">
+ <h2>Your Subject Line Library</h2>
+ <div class="library-controls">
+ <button id="newDraft">New Draft</button>
+ <button id="saveDraft">Save Draft</button>
+ </div>
+ <ul id="draftList"></ul>
+ </section>
+</main>
+
+<footer class="footer">
+ <p>SubjectLab - Helping you craft emails that get opened</p>
+</footer>
\ No newline at end of file
diff --git a/index.scroll b/index.scroll
new file mode 100644
index 0000000..aa09c0e
--- /dev/null
+++ b/index.scroll
@@ -0,0 +1,8 @@
+buildHtml
+baseUrl https://subjectlab.scroll.pub
+metaTags
+editButton /edit.html
+title SubjectLab - Craft Perfect Email Subject Lines
+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..24fbb96
--- /dev/null
+++ b/prompt.json
@@ -0,0 +1,25 @@
+{
+ "id": "a5b09cae-4764-4d34-b7a9-e40aa8c1e66d",
+ "object": "chat.completion",
+ "created": 1735552402,
+ "model": "deepseek-chat",
+ "choices": [
+ {
+ "index": 0,
+ "message": {
+ "role": "assistant",
+ "content": "---domain---\nsubjectlab.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://subjectlab.scroll.pub\nmetaTags\neditButton /edit.html\ntitle SubjectLab - Craft Perfect Email Subject Lines\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header class=\"header\">\n <h1>SubjectLab</h1>\n <p>Your AI-powered subject line testing and optimization tool</p>\n</header>\n\n<main class=\"container\">\n <section class=\"subject-line-tester\">\n <h2>Test Your Subject Line</h2>\n <textarea id=\"subjectInput\" placeholder=\"Enter your subject line here...\" maxlength=\"100\"></textarea>\n <button id=\"testButton\">Test Subject Line</button>\n <div class=\"results\">\n <h3>Analysis Results</h3>\n <div class=\"score\">\n <span>Score:</span>\n <span id=\"scoreValue\">0/100</span>\n </div>\n <div class=\"feedback\">\n <p id=\"lengthFeedback\"></p>\n <p id=\"powerWordsFeedback\"></p>\n <p id=\"spamFeedback\"></p>\n </div>\n </div>\n </section>\n\n <section class=\"subject-line-library\">\n <h2>Your Subject Line Library</h2>\n <div class=\"library-controls\">\n <button id=\"newDraft\">New Draft</button>\n <button id=\"saveDraft\">Save Draft</button>\n </div>\n <ul id=\"draftList\"></ul>\n </section>\n</main>\n\n<footer class=\"footer\">\n <p>SubjectLab - Helping you craft emails that get opened</p>\n</footer>\n---style.css---\n:root {\n --primary-color: #2563eb;\n --secondary-color: #1e40af;\n --background-color: #f8fafc;\n --text-color: #1e293b;\n --success-color: #16a34a;\n --warning-color: #ea580c;\n --error-color: #dc2626;\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n background-color: var(--background-color);\n color: var(--text-color);\n line-height: 1.6;\n}\n\n.header {\n text-align: center;\n padding: 2rem;\n background-color: var(--primary-color);\n color: white;\n}\n\n.header h1 {\n font-size: 2.5rem;\n margin-bottom: 0.5rem;\n}\n\n.container {\n max-width: 800px;\n margin: 2rem auto;\n padding: 0 1rem;\n}\n\n.subject-line-tester {\n background: white;\n padding: 2rem;\n border-radius: 8px;\n box-shadow: 0 2px 4px rgba(0,0,0,0.1);\n margin-bottom: 2rem;\n}\n\n.subject-line-tester h2 {\n margin-bottom: 1rem;\n}\n\ntextarea {\n width: 100%;\n min-height: 100px;\n padding: 0.75rem;\n border: 1px solid #ddd;\n border-radius: 4px;\n margin-bottom: 1rem;\n resize: vertical;\n}\n\nbutton {\n background-color: var(--primary-color);\n color: white;\n border: none;\n padding: 0.75rem 1.5rem;\n border-radius: 4px;\n cursor: pointer;\n transition: background-color 0.3s ease;\n}\n\nbutton:hover {\n background-color: var(--secondary-color);\n}\n\n.results {\n margin-top: 1.5rem;\n}\n\n.score {\n font-size: 1.25rem;\n margin-bottom: 1rem;\n}\n\n.feedback p {\n margin: 0.5rem 0;\n}\n\n.subject-line-library {\n background: white;\n padding: 2rem;\n border-radius: 8px;\n box-shadow: 0 2px 4px rgba(0,0,0,0.1);\n}\n\n.library-controls {\n display: flex;\n gap: 1rem;\n margin-bottom: 1rem;\n}\n\n#draftList {\n list-style: none;\n}\n\n#draftList li {\n background: var(--background-color);\n padding: 1rem;\n margin: 0.5rem 0;\n border-radius: 4px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.footer {\n text-align: center;\n padding: 1rem;\n background-color: var(--primary-color);\n color: white;\n margin-top: 2rem;\n}\n\n@media (max-width: 600px) {\n .header h1 {\n font-size: 2rem;\n }\n \n .container {\n padding: 0 0.5rem;\n }\n \n button {\n width: 100%;\n margin-bottom: 0.5rem;\n }\n}\n---script.js---\nconst subjectInput = document.getElementById('subjectInput');\nconst testButton = document.getElementById('testButton');\nconst scoreValue = document.getElementById('scoreValue');\nconst lengthFeedback = document.getElementById('lengthFeedback');\nconst powerWordsFeedback = document.getElementById('powerWordsFeedback');\nconst spamFeedback = document.getElementById('spamFeedback');\nconst newDraftButton = document.getElementById('newDraft');\nconst saveDraftButton = document.getElementById('saveDraft');\nconst draftList = document.getElementById('draftList');\n\nconst powerWords = ['free', 'new', 'proven', 'secret', 'instant', 'guaranteed'];\nconst spamWords = ['buy', 'cheap', 'discount', 'limited', 'offer', 'win'];\n\nlet drafts = JSON.parse(localStorage.getItem('drafts')) || [];\n\nfunction analyzeSubjectLine(subject) {\n let score = 0;\n let feedback = [];\n\n // Length check\n if (subject.length >= 30 && subject.length <= 50) {\n score += 40;\n feedback.push({type: 'length', message: 'Good length! (30-50 characters)'});\n } else {\n feedback.push({type: 'length', message: 'Aim for 30-50 characters'});\n }\n\n // Power words check\n const foundPowerWords = powerWords.filter(word => subject.toLowerCase().includes(word));\n if (foundPowerWords.length > 0) {\n score += 30;\n feedback.push({type: 'powerWords', message: `Great use of power words: ${foundPowerWords.join(', ')}`});\n } else {\n feedback.push({type: 'powerWords', message: 'Consider adding power words'});\n }\n\n // Spam words check\n const foundSpamWords = spamWords.filter(word => subject.toLowerCase().includes(word));\n if (foundSpamWords.length === 0) {\n score += 30;\n feedback.push({type: 'spam', message: 'No spam trigger words detected'});\n } else {\n feedback.push({type: 'spam', message: `Potential spam trigger words: ${foundSpamWords.join(', ')}`});\n }\n\n return {score, feedback};\n}\n\nfunction displayResults(score, feedback) {\n scoreValue.textContent = `${score}/100`;\n scoreValue.style.color = score >= 70 ? 'var(--success-color)' : score >= 40 ? 'var(--warning-color)' : 'var(--error-color)';\n \n feedback.forEach(item => {\n if (item.type === 'length') {\n lengthFeedback.textContent = item.message;\n } else if (item.type === 'powerWords') {\n powerWordsFeedback.textContent = item.message;\n } else if (item.type === 'spam') {\n spamFeedback.textContent = item.message;\n }\n });\n}\n\nfunction saveDraft() {\n const subject = subjectInput.value.trim();\n if (subject) {\n drafts.push(subject);\n localStorage.setItem('drafts', JSON.stringify(drafts));\n renderDrafts();\n subjectInput.value = '';\n }\n}\n\nfunction renderDrafts() {\n draftList.innerHTML = '';\n drafts.forEach((draft, index) => {\n const li = document.createElement('li');\n li.textContent = draft;\n \n const deleteButton = document.createElement('button');\n deleteButton.textContent = 'Delete';\n deleteButton.addEventListener('click', () => {\n drafts.splice(index, 1);\n localStorage.setItem('drafts', JSON.stringify(drafts));\n renderDrafts();\n });\n \n li.appendChild(deleteButton);\n draftList.appendChild(li);\n });\n}\n\ntestButton.addEventListener('click', () => {\n const subject = subjectInput.value.trim();\n if (subject) {\n const {score, feedback} = analyzeSubjectLine(subject);\n displayResults(score, feedback);\n }\n});\n\nnewDraftButton.addEventListener('click', () => {\n subjectInput.value = '';\n scoreValue.textContent = '0/100';\n lengthFeedback.textContent = '';\n powerWordsFeedback.textContent = '';\n spamFeedback.textContent = '';\n});\n\nsaveDraftButton.addEventListener('click', saveDraft);\n\nrenderDrafts();\n---end---"
+ },
+ "logprobs": null,
+ "finish_reason": "stop"
+ }
+ ],
+ "usage": {
+ "prompt_tokens": 315,
+ "completion_tokens": 2028,
+ "total_tokens": 2343,
+ "prompt_cache_hit_tokens": 0,
+ "prompt_cache_miss_tokens": 315
+ },
+ "system_fingerprint": "fp_f1afce2943"
+}
\ No newline at end of file
diff --git a/readme.scroll b/readme.scroll
new file mode 100644
index 0000000..4bde591
--- /dev/null
+++ b/readme.scroll
@@ -0,0 +1,2 @@
+# subjectlab.scroll.pub
+Website generated by DeepSeek from prompt: Subject Line Tester • Problem Solved: Email marketers often struggle to write compelling subject lines. • Features: • Create, read, update, and delete subject line drafts. • Integration with a basic scoring system (e.g., checks for length, power words, and spam trigger words). • Save and revisit subject line ideas for campaigns.
\ No newline at end of file
diff --git a/script.js b/script.js
new file mode 100644
index 0000000..92328c1
--- /dev/null
+++ b/script.js
@@ -0,0 +1,111 @@
+const subjectInput = document.getElementById('subjectInput');
+const testButton = document.getElementById('testButton');
+const scoreValue = document.getElementById('scoreValue');
+const lengthFeedback = document.getElementById('lengthFeedback');
+const powerWordsFeedback = document.getElementById('powerWordsFeedback');
+const spamFeedback = document.getElementById('spamFeedback');
+const newDraftButton = document.getElementById('newDraft');
+const saveDraftButton = document.getElementById('saveDraft');
+const draftList = document.getElementById('draftList');
+
+const powerWords = ['free', 'new', 'proven', 'secret', 'instant', 'guaranteed'];
+const spamWords = ['buy', 'cheap', 'discount', 'limited', 'offer', 'win'];
+
+let drafts = JSON.parse(localStorage.getItem('drafts')) || [];
+
+function analyzeSubjectLine(subject) {
+ let score = 0;
+ let feedback = [];
+
+ // Length check
+ if (subject.length >= 30 && subject.length <= 50) {
+ score += 40;
+ feedback.push({type: 'length', message: 'Good length! (30-50 characters)'});
+ } else {
+ feedback.push({type: 'length', message: 'Aim for 30-50 characters'});
+ }
+
+ // Power words check
+ const foundPowerWords = powerWords.filter(word => subject.toLowerCase().includes(word));
+ if (foundPowerWords.length > 0) {
+ score += 30;
+ feedback.push({type: 'powerWords', message: `Great use of power words: ${foundPowerWords.join(', ')}`});
+ } else {
+ feedback.push({type: 'powerWords', message: 'Consider adding power words'});
+ }
+
+ // Spam words check
+ const foundSpamWords = spamWords.filter(word => subject.toLowerCase().includes(word));
+ if (foundSpamWords.length === 0) {
+ score += 30;
+ feedback.push({type: 'spam', message: 'No spam trigger words detected'});
+ } else {
+ feedback.push({type: 'spam', message: `Potential spam trigger words: ${foundSpamWords.join(', ')}`});
+ }
+
+ return {score, feedback};
+}
+
+function displayResults(score, feedback) {
+ scoreValue.textContent = `${score}/100`;
+ scoreValue.style.color = score >= 70 ? 'var(--success-color)' : score >= 40 ? 'var(--warning-color)' : 'var(--error-color)';
+
+ feedback.forEach(item => {
+ if (item.type === 'length') {
+ lengthFeedback.textContent = item.message;
+ } else if (item.type === 'powerWords') {
+ powerWordsFeedback.textContent = item.message;
+ } else if (item.type === 'spam') {
+ spamFeedback.textContent = item.message;
+ }
+ });
+}
+
+function saveDraft() {
+ const subject = subjectInput.value.trim();
+ if (subject) {
+ drafts.push(subject);
+ localStorage.setItem('drafts', JSON.stringify(drafts));
+ renderDrafts();
+ subjectInput.value = '';
+ }
+}
+
+function renderDrafts() {
+ draftList.innerHTML = '';
+ drafts.forEach((draft, index) => {
+ const li = document.createElement('li');
+ li.textContent = draft;
+
+ const deleteButton = document.createElement('button');
+ deleteButton.textContent = 'Delete';
+ deleteButton.addEventListener('click', () => {
+ drafts.splice(index, 1);
+ localStorage.setItem('drafts', JSON.stringify(drafts));
+ renderDrafts();
+ });
+
+ li.appendChild(deleteButton);
+ draftList.appendChild(li);
+ });
+}
+
+testButton.addEventListener('click', () => {
+ const subject = subjectInput.value.trim();
+ if (subject) {
+ const {score, feedback} = analyzeSubjectLine(subject);
+ displayResults(score, feedback);
+ }
+});
+
+newDraftButton.addEventListener('click', () => {
+ subjectInput.value = '';
+ scoreValue.textContent = '0/100';
+ lengthFeedback.textContent = '';
+ powerWordsFeedback.textContent = '';
+ spamFeedback.textContent = '';
+});
+
+saveDraftButton.addEventListener('click', saveDraft);
+
+renderDrafts();
\ No newline at end of file
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..bd27583
--- /dev/null
+++ b/style.css
@@ -0,0 +1,139 @@
+:root {
+ --primary-color: #2563eb;
+ --secondary-color: #1e40af;
+ --background-color: #f8fafc;
+ --text-color: #1e293b;
+ --success-color: #16a34a;
+ --warning-color: #ea580c;
+ --error-color: #dc2626;
+}
+
+* {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+}
+
+body {
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
+ background-color: var(--background-color);
+ color: var(--text-color);
+ line-height: 1.6;
+}
+
+.header {
+ text-align: center;
+ padding: 2rem;
+ background-color: var(--primary-color);
+ color: white;
+}
+
+.header h1 {
+ font-size: 2.5rem;
+ margin-bottom: 0.5rem;
+}
+
+.container {
+ max-width: 800px;
+ margin: 2rem auto;
+ padding: 0 1rem;
+}
+
+.subject-line-tester {
+ background: white;
+ padding: 2rem;
+ border-radius: 8px;
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);
+ margin-bottom: 2rem;
+}
+
+.subject-line-tester h2 {
+ margin-bottom: 1rem;
+}
+
+textarea {
+ width: 100%;
+ min-height: 100px;
+ padding: 0.75rem;
+ border: 1px solid #ddd;
+ border-radius: 4px;
+ margin-bottom: 1rem;
+ resize: vertical;
+}
+
+button {
+ background-color: var(--primary-color);
+ color: white;
+ border: none;
+ padding: 0.75rem 1.5rem;
+ border-radius: 4px;
+ cursor: pointer;
+ transition: background-color 0.3s ease;
+}
+
+button:hover {
+ background-color: var(--secondary-color);
+}
+
+.results {
+ margin-top: 1.5rem;
+}
+
+.score {
+ font-size: 1.25rem;
+ margin-bottom: 1rem;
+}
+
+.feedback p {
+ margin: 0.5rem 0;
+}
+
+.subject-line-library {
+ background: white;
+ padding: 2rem;
+ border-radius: 8px;
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);
+}
+
+.library-controls {
+ display: flex;
+ gap: 1rem;
+ margin-bottom: 1rem;
+}
+
+#draftList {
+ list-style: none;
+}
+
+#draftList li {
+ background: var(--background-color);
+ padding: 1rem;
+ margin: 0.5rem 0;
+ border-radius: 4px;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.footer {
+ text-align: center;
+ padding: 1rem;
+ background-color: var(--primary-color);
+ color: white;
+ margin-top: 2rem;
+}
+
+@media (max-width: 600px) {
+ .header h1 {
+ font-size: 2rem;
+ }
+
+ .container {
+ padding: 0 0.5rem;
+ }
+
+ button {
+ width: 100%;
+ margin-bottom: 0.5rem;
+ }
+}
\ No newline at end of file