commit 7556e011f398380850be664478437a165ac05c8e
parent df20c13a35523e8e80d466f034f1f411d908fbe0
Author: breadcat <breadcat@users.noreply.github.com>
Date: Wed, 25 Feb 2026 12:17:09 +0000
Remove some wonky CSS
Diffstat:
3 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/static/sed-rules.js b/static/sed-rules.js
@@ -12,47 +12,47 @@ document.addEventListener('DOMContentLoaded', function() {
function renderSedRules() {
const container = document.getElementById('sed-rules');
if (!container) return;
-
+
container.innerHTML = '';
-
+
sedRules.forEach((rule, index) => {
const ruleDiv = document.createElement('div');
- ruleDiv.style.cssText = 'border: 1px solid #ddd; padding: 15px; margin-bottom: 15px; border-radius: 5px; background-color: #f8f9fa;';
-
+ ruleDiv.style.cssText = 'border: 1px solid #ddd; padding: 15px; margin-bottom: 15px; border-radius: 5px;';
+
ruleDiv.innerHTML = `
<div style="display: flex; justify-content: space-between; align-items: start; margin-bottom: 10px;">
- <h4 style="margin: 0; color: #333;">Rule ${index + 1}</h4>
+ <h4 style="margin: 0;">Rule ${index + 1}</h4>
<button onclick="removeSedRule(${index})" style="background-color: #dc3545; color: white; padding: 5px 10px; border: none; border-radius: 3px; font-size: 12px; cursor: pointer;">
Remove
</button>
</div>
-
+
<div style="margin-bottom: 10px;">
<label style="display: block; font-weight: bold; margin-bottom: 5px; font-size: 13px;">Name:</label>
- <input type="text" value="${escapeHtml(rule.name)}"
+ <input type="text" value="${escapeHtml(rule.name)}"
onchange="updateSedRule(${index}, 'name', this.value)"
placeholder="e.g., Remove URL Parameters"
style="width: 100%; padding: 6px; font-size: 13px; border: 1px solid #ccc; border-radius: 3px;">
</div>
-
+
<div style="margin-bottom: 10px;">
<label style="display: block; font-weight: bold; margin-bottom: 5px; font-size: 13px;">Description:</label>
- <input type="text" value="${escapeHtml(rule.description)}"
+ <input type="text" value="${escapeHtml(rule.description)}"
onchange="updateSedRule(${index}, 'description', this.value)"
placeholder="e.g., Removes brandIds and productId from URLs"
style="width: 100%; padding: 6px; font-size: 13px; border: 1px solid #ccc; border-radius: 3px;">
</div>
-
+
<div style="margin-bottom: 0;">
<label style="display: block; font-weight: bold; margin-bottom: 5px; font-size: 13px;">Sed Command:</label>
- <input type="text" value="${escapeHtml(rule.command)}"
+ <input type="text" value="${escapeHtml(rule.command)}"
onchange="updateSedRule(${index}, 'command', this.value)"
placeholder="e.g., s?[?&]brandIds=[0-9]\\+&productId=[0-9]\\+??g"
style="width: 100%; padding: 6px; font-size: 13px; font-family: monospace; border: 1px solid #ccc; border-radius: 3px;">
- <small style="color: #666;">Sed command syntax (e.g., s/old/new/g)</small>
+ <small>Sed command syntax (e.g., s/old/new/g)</small>
</div>
`;
-
+
container.appendChild(ruleDiv);
});
}
@@ -82,7 +82,7 @@ function updateSedRule(index, field, value) {
function setupSedRulesForm() {
const form = document.getElementById('sedrules-form');
if (!form) return;
-
+
form.addEventListener('submit', function(e) {
// Validate rules
for (let i = 0; i < sedRules.length; i++) {
@@ -93,10 +93,10 @@ function setupSedRulesForm() {
return;
}
}
-
+
// Update hidden field with JSON
document.getElementById('sed_rules_json').value = JSON.stringify(sedRules);
-
+
// Let the form submit normally (don't prevent default)
});
}
diff --git a/static/tag-alias.js b/static/tag-alias.js
@@ -7,7 +7,7 @@ function renderAliasGroups() {
aliasGroups.forEach((group, groupIndex) => {
const groupDiv = document.createElement('div');
- groupDiv.style.cssText = 'border: 1px solid #ddd; padding: 15px; margin-bottom: 15px; border-radius: 4px; background-color: #f8f9fa;';
+ groupDiv.style.cssText = 'border: 1px solid #ddd; padding: 15px; margin-bottom: 15px; border-radius: 4px;';
groupDiv.innerHTML = `
<div style="margin-bottom: 10px;">
diff --git a/templates/admin.html b/templates/admin.html
@@ -139,7 +139,7 @@
<!-- Aliases Tab -->
<div id="admin-content-aliases" style="display: none;">
<h2>Tag Aliases</h2>
- <p style="color: #666; margin-bottom: 20px;">
+ <p>
Define tag aliases so that multiple tag values are treated as equivalent when searching or filtering.
For example, if you alias "colour/blue" with "colour/navy", searching for either will show files tagged with both.
</p>
@@ -167,7 +167,7 @@
<div class="config-container">
<div class="config-split">
<h2>Sed Rules for Notes</h2>
- <p style="color: #666; margin-bottom: 20px;">
+ <p>
Define sed rules that can be applied to notes in the Notes editor.
These rules will appear as buttons in the notes interface for quick text transformations.
</p>