diff --git a/assets/scripts/records/DkimRecord.js b/assets/scripts/records/DkimRecord.js index c64a007..619bb0f 100644 --- a/assets/scripts/records/DkimRecord.js +++ b/assets/scripts/records/DkimRecord.js @@ -17,10 +17,20 @@ export class DkimRecord extends TagListRecord { .required() .pos(1), + new EnumTag("k", ["rsa", "ed25519"]) + .label("Key type") + .desc("") + .options(["RSA", "Ed25519"]) + .default("rsa") + .pos(1), + new FlagsTag("t", ["y", "s"]) .label("Flags") - .desc("Optional extra options that can be enabled") - .options(["Test mode", "Require identical domain in i= and d= tags of DKIM signature (Recommended)"]) + .options(["Test mode", "Strict mode (Recommended)"]) + .optionDesc([ + "Indicates the server is currently testing DKIM support", + "Require identical domain in i= and d= tags of DKIM signature (Recommended unless using subdomains)", + ]) .default("") .pos(1), @@ -38,11 +48,6 @@ export class DkimRecord extends TagListRecord { .default("") .pos(1), - new EnumTag("k", ["rsa"]) - .disabled() - .default("rsa") - .pos(1), - new EnumTag("s", ["*", "email"]) .disabled() .default("*") diff --git a/assets/scripts/records/SpfRecord.js b/assets/scripts/records/SpfRecord.js index d64eac6..73aba4f 100644 --- a/assets/scripts/records/SpfRecord.js +++ b/assets/scripts/records/SpfRecord.js @@ -50,7 +50,7 @@ export class SpfRecord { .label("Include") .desc("Check the SPF record of another domain. If it passes, return with the selected result") .multiple() - .pos(1), + .pos(2), new DomainMechanism("exists") .label("Exists") diff --git a/assets/scripts/tags/FlagsTag.js b/assets/scripts/tags/FlagsTag.js index 6ad49ec..7e42454 100644 --- a/assets/scripts/tags/FlagsTag.js +++ b/assets/scripts/tags/FlagsTag.js @@ -11,11 +11,19 @@ export class FlagsTag extends Tag { return this; } + optionDesc(descriptions) { + this.flagDescriptions = descriptions; + return this; + } + getInputHtml() { return `
` + this.flags.map((flag, i) => ` - + `).join("") + "
"; } diff --git a/assets/scripts/ui/creator.js b/assets/scripts/ui/creator.js index bb00a0e..62954d4 100644 --- a/assets/scripts/ui/creator.js +++ b/assets/scripts/ui/creator.js @@ -3,12 +3,12 @@ import { DmarcRecord } from "../records/DmarcRecord.js"; import { SpfRecord } from "../records/SpfRecord.js"; const records = { - "/dkim-creator": DkimRecord, - "/dmarc-creator": DmarcRecord, - "/spf-creator": SpfRecord, + "dkim-creator": DkimRecord, + "dmarc-creator": DmarcRecord, + "spf-creator": SpfRecord, }; -const Record = records[location.pathname]; +const Record = records[location.pathname.split("/")[1]]; const inputs = []; diff --git a/assets/scripts/ui/validator.js b/assets/scripts/ui/validator.js index f293867..96d3d67 100644 --- a/assets/scripts/ui/validator.js +++ b/assets/scripts/ui/validator.js @@ -2,11 +2,11 @@ import { DmarcRecord } from "../records/DmarcRecord.js"; import { SpfRecord } from "../records/SpfRecord.js"; const records = { - "/dmarc-validator": DmarcRecord, - "/spf-validator": SpfRecord, + "dmarc-validator": DmarcRecord, + "spf-validator": SpfRecord, }; -const Record = records[location.pathname]; +const Record = records[location.pathname.split("/")[1]]; document.getElementById("record").oninput = event => validate(event.target.value); diff --git a/assets/styles/main.css b/assets/styles/main.css index 7fca2b5..9df60f9 100644 --- a/assets/styles/main.css +++ b/assets/styles/main.css @@ -27,6 +27,16 @@ body { padding: 1rem; } +footer { + font-size: 0.8rem; + text-align: center; + margin-bottom: 1rem; +} + +footer a { + color: black; +} + h1, h2 { text-align: center; } @@ -67,7 +77,7 @@ main { background-color: white; border: 1px solid #BDBDBD; padding: 1rem 2rem; - margin: 2rem auto; + margin: 1rem auto; color: #424242; font-size: 0.8rem; } @@ -166,6 +176,11 @@ summary:hover { color: black; } +.checkbox-desc { + color: #9E9E9E; + margin-left: 2em; +} + .field-container { display: flex; flex-direction: column; @@ -191,3 +206,25 @@ summary:hover { .text-button:hover { color: black; } + +.tool-button { + display: inline-block; + margin: 0.25rem 1rem 0.25rem 0; + background-color: #F9F9F9; + padding: 0.75rem 1.5rem; + border: 1px solid #BDBDBD; + color: black; + text-decoration: none; + box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1); + font-weight: bold; + width: 170px; + text-align: center; + position: relative; + bottom: 0; + transition: box-shadow, bottom 200ms; +} + +.tool-button:hover { + bottom: 3px; + box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1); +} diff --git a/dkim-creator/index.html b/dkim-creator/index.html index 59b15ae..b9d3089 100644 --- a/dkim-creator/index.html +++ b/dkim-creator/index.html @@ -4,6 +4,7 @@ DKIM Record Creator - Generate DKIM DNS Records + @@ -53,5 +54,9 @@ SPF Creator Tool + + diff --git a/dmarc-creator/index.html b/dmarc-creator/index.html index 6043dd5..5775c0d 100644 --- a/dmarc-creator/index.html +++ b/dmarc-creator/index.html @@ -4,6 +4,7 @@ DMARC Record Creator - Generate DMARC DNS Records + @@ -41,9 +42,13 @@

More tools:

DMARC Validator Tool • - DKIM Creator Tool • + DKIM Creator ToolSPF Creator Tool
+ + diff --git a/dmarc-validator/index.html b/dmarc-validator/index.html index 788ce92..448761c 100644 --- a/dmarc-validator/index.html +++ b/dmarc-validator/index.html @@ -4,6 +4,7 @@ DMARC Record Validator - Validate DMARC DNS Records + @@ -78,5 +79,9 @@ SPF Validator Tool + + diff --git a/spf-creator/index.html b/spf-creator/index.html index 5b77bc8..03aa0c6 100644 --- a/spf-creator/index.html +++ b/spf-creator/index.html @@ -4,6 +4,7 @@ SPF Record Creator - Generate SPF DNS Records + @@ -63,5 +64,9 @@ DMARC Creator Tool + + diff --git a/spf-macro-guide/index.html b/spf-macro-guide/index.html index d342f82..46b35a5 100644 --- a/spf-macro-guide/index.html +++ b/spf-macro-guide/index.html @@ -4,6 +4,7 @@ SPF Macro Guide - Explanation of all SPF macros with examples + @@ -149,5 +150,9 @@ SPF Creator Tool + + diff --git a/spf-validator/index.html b/spf-validator/index.html index 8a23352..c3d3b7b 100644 --- a/spf-validator/index.html +++ b/spf-validator/index.html @@ -4,6 +4,7 @@ SPF Record Validator - Validate SPF DNS Records + @@ -69,5 +70,9 @@ DMARC Validator Tool + +