Difference between revisions of "Template:Domain Form"

From End to Dawn
Jump to navigation Jump to search
(Created page with "<noinclude> This is the "Domain Form" template. Use this form to create a new Domain page with all the necessary information. </noinclude><includeonly> <div style="max-width:...")
 
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
This is the "Domain Form" template.
+
This is the "Domain" template.
Use this form to create a new Domain page with all the necessary information.
+
It should be called in the following format:
</noinclude><includeonly>
+
<pre>
<div style="max-width: 900px; margin: 0 auto; background: #000; border: 4px double #DC7; padding: 30px; border-radius: 8px;">
+
{{Domain
  <h2 style="font-family: Georgia, serif; color: #DC7; text-align: center; margin-bottom: 10px; font-size: 2em;">Domain Information Form</h2>
+
|domain=AL-009-D
  <p style="text-align: center; color: #AAA; margin-bottom: 30px; font-size: 0.9em;">Fill out the form below to create domain page content</p>
+
|domainname=
 
+
|titlepic=
  <div id="domainFormContainer">
+
|region=
    <form id="domainForm">
+
|city=
      <div style="color: #DC7; font-size: 1.3em; margin-top: 25px; margin-bottom: 15px; padding-bottom: 8px; border-bottom: 2px solid #DC7; font-weight: bold;">Basic Information</div>
+
|state=
     
+
|dst_name=
      <div style="margin-bottom: 20px;">
+
|dst_email=
        <label style="display: block; margin-bottom: 8px; font-weight: bold; color: #DC7;">
+
|dc_name=
          Title Picture
+
|dc_email=
          <span style="font-size: 0.85em; color: #999; font-weight: normal;">(Optional - filename with extension)</span>
+
|notes=
         </label>
+
}}
        <input type="text" id="titlepic" name="titlepic" placeholder="Leave blank to use auto-detection" style="width: 100%; padding: 12px; background: #1a1a1a; border: 2px solid #DC7; color: #DC7; font-size: 16px; border-radius: 4px;">
+
</pre>
       </div>
+
</noinclude><includeonly>__NOTOC__ __NOEDITSECTION__
     
+
<div id="domain-container">
      <div style="margin-bottom: 20px;">
+
<div id="domain-title" class="clearfix">{{PAGENAME}}
        <label style="display: block; margin-bottom: 8px; font-weight: bold; color: #DC7;">
+
<div id="domain-title-image">{{#if: {{{titlepic|}}}|[[File:{{{titlepic}}}|center|200px]]|
          Region <span style="color: #ff6b6b;">*</span>
+
  {{#ifexist: File:{{PAGENAME}}.png|[[File:{{PAGENAME}}.png|center]]
        </label>
+
    |{{#ifexist: File:{{PAGENAME}}.jpg|[[File:{{PAGENAME}}.jpg|center]]
        <input type="text" id="region" name="region" placeholder="Enter region name" required style="width: 100%; padding: 12px; background: #1a1a1a; border: 2px solid #DC7; color: #DC7; font-size: 16px; border-radius: 4px;">
+
      |{{#ifexist: File:{{PAGENAME}}.jpeg|[[File:{{PAGENAME}}.jpeg|center]]
      </div>
+
         |{{#ifexist: File:{{PAGENAME}}.gif|[[File:{{PAGENAME}}.gif|center]]
 +
          |{{#ifexist: File:{{PAGENAME}}.webp|[[File:{{PAGENAME}}.webp|center]]
 +
          }}
 +
        }}
 +
       }}
 +
    }}
 +
  }}
 +
}}
 +
  </div>
 +
</div>
 +
<div id="domain-info">
 +
{| id="domain-info-table"
 +
! Region
 +
| [[:Category:{{{region}}}|{{{region}}}]]
 +
|-
 +
|}
 +
</div>
 +
</div>
  
      <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px;">
+
'''Location:''' {{{city|}}}, {{{state|}}}
        <div>
 
          <label style="display: block; margin-bottom: 8px; font-weight: bold; color: #DC7;">
 
            City <span style="color: #ff6b6b;">*</span>
 
          </label>
 
          <input type="text" id="city" name="city" placeholder="Enter city" required style="width: 100%; padding: 12px; background: #1a1a1a; border: 2px solid #DC7; color: #DC7; font-size: 16px; border-radius: 4px;">
 
        </div>
 
  
        <div>
+
== Domain Staff ==
          <label style="display: block; margin-bottom: 8px; font-weight: bold; color: #DC7;">
 
            State <span style="color: #ff6b6b;">*</span>
 
          </label>
 
          <input type="text" id="state" name="state" placeholder="Enter state" required style="width: 100%; padding: 12px; background: #1a1a1a; border: 2px solid #DC7; color: #DC7; font-size: 16px; border-radius: 4px;">
 
        </div>
 
      </div>
 
  
      <div style="color: #DC7; font-size: 1.3em; margin-top: 25px; margin-bottom: 15px; padding-bottom: 8px; border-bottom: 2px solid #DC7; font-weight: bold;">Domain Storyteller (DST)</div>
+
'''Domain Storyteller:''' {{{dst_name|}}}
  
      <div style="margin-bottom: 20px;">
+
'''Email:''' {{{dst_email|}}}
        <label style="display: block; margin-bottom: 8px; font-weight: bold; color: #DC7;">
 
          DST Name <span style="color: #ff6b6b;">*</span>
 
        </label>
 
        <input type="text" id="dstName" name="dstName" placeholder="Enter Domain Storyteller name" required style="width: 100%; padding: 12px; background: #1a1a1a; border: 2px solid #DC7; color: #DC7; font-size: 16px; border-radius: 4px;">
 
      </div>
 
  
      <div style="margin-bottom: 20px;">
+
'''Domain Coordinator:''' {{{dc_name|}}}
        <label style="display: block; margin-bottom: 8px; font-weight: bold; color: #DC7;">
 
          DST Email <span style="color: #ff6b6b;">*</span>
 
        </label>
 
        <input type="email" id="dstEmail" name="dstEmail" placeholder="dst@example.com" required style="width: 100%; padding: 12px; background: #1a1a1a; border: 2px solid #DC7; color: #DC7; font-size: 16px; border-radius: 4px;">
 
      </div>
 
  
      <div style="color: #DC7; font-size: 1.3em; margin-top: 25px; margin-bottom: 15px; padding-bottom: 8px; border-bottom: 2px solid #DC7; font-weight: bold;">Domain Coordinator (DC)</div>
+
'''Email:''' {{{dc_email|}}}
  
      <div style="margin-bottom: 20px;">
+
{{#if: {{{notes|}}}|
        <label style="display: block; margin-bottom: 8px; font-weight: bold; color: #DC7;">
+
== Notes ==
          DC Name <span style="color: #ff6b6b;">*</span>
 
        </label>
 
        <input type="text" id="dcName" name="dcName" placeholder="Enter Domain Coordinator name" required style="width: 100%; padding: 12px; background: #1a1a1a; border: 2px solid #DC7; color: #DC7; font-size: 16px; border-radius: 4px;">
 
      </div>
 
  
      <div style="margin-bottom: 20px;">
+
{{{notes}}}
        <label style="display: block; margin-bottom: 8px; font-weight: bold; color: #DC7;">
+
}}
          DC Email <span style="color: #ff6b6b;">*</span>
 
        </label>
 
        <input type="email" id="dcEmail" name="dcEmail" placeholder="dc@example.com" required style="width: 100%; padding: 12px; background: #1a1a1a; border: 2px solid #DC7; color: #DC7; font-size: 16px; border-radius: 4px;">
 
      </div>
 
  
      <div style="color: #DC7; font-size: 1.3em; margin-top: 25px; margin-bottom: 15px; padding-bottom: 8px; border-bottom: 2px solid #DC7; font-weight: bold;">Additional Information</div>
+
<!-- Auto-categorization -->
 +
[[Category:Domain]]
 +
{{#if: {{{region|}}}|[[Category:{{{region}}}]]}}
  
      <div style="margin-bottom: 20px;">
+
<!-- Automatically create a subcategory named after the domain code -->
        <label style="display: block; margin-bottom: 8px; font-weight: bold; color: #DC7;">
+
{{#if: {{{domain|}}}|
          Additional Notes
+
  [[Category:{{{domain}}}]]
          <span style="font-size: 0.85em; color: #999; font-weight: normal;">(Optional)</span>
+
}}
        </label>
 
        <textarea id="notes" name="notes" placeholder="Enter any additional notes..." style="width: 100%; padding: 12px; background: #1a1a1a; border: 2px solid #DC7; color: #DC7; font-size: 16px; border-radius: 4px; min-height: 100px; resize: vertical;"></textarea>
 
      </div>
 
     
 
      <div style="display: flex; gap: 15px; margin-top: 30px;">
 
        <button type="submit" style="flex: 1; padding: 15px; font-size: 16px; font-weight: bold; border: 2px solid #DC7; border-radius: 4px; cursor: pointer; background: #DC7; color: #000;">Generate Template Code</button>
 
        <button type="button" onclick="clearDomainForm()" style="flex: 1; padding: 15px; font-size: 16px; font-weight: bold; border: 2px solid #DC7; border-radius: 4px; cursor: pointer; background: transparent; color: #DC7;">Clear Form</button>
 
      </div>
 
    </form>
 
   
 
    <div id="domainOutput" style="margin-top: 30px; display: none;">
 
      <div style="font-weight: bold; margin-bottom: 10px; color: #DC7; font-size: 1.1em;">Generated Template Code:</div>
 
      <textarea id="domainOutputCode" readonly style="width: 100%; padding: 15px; background: #1a1a1a; border: 2px solid #DC7; color: #DC7; font-family: Courier New, monospace; font-size: 14px; min-height: 200px; border-radius: 4px; resize: vertical;"></textarea>
 
      <button onclick="copyDomainCode()" style="width: 100%; margin-top: 10px; padding: 12px; background: #2a5c2a; color: #DC7; border: 2px solid #3a7c3a; border-radius: 4px; cursor: pointer; font-size: 16px; font-weight: bold;">Copy to Clipboard</button>
 
    </div>
 
  </div>
 
</div>
 
  
<script>
+
<!-- If this is a category page itself, add description + parent link -->
document.getElementById('domainForm').addEventListener('submit', function(e) {
+
{{#ifeq: {{NAMESPACE}} | Category |
  e.preventDefault();
+
This category contains all pages related to the Domain '''{{PAGENAME}}'''.
 
+
[[Category:Domain]]
  const titlepic = document.getElementById('titlepic').value.trim();
+
}}
  const region = document.getElementById('region').value.trim();
 
  const city = document.getElementById('city').value.trim();
 
  const state = document.getElementById('state').value.trim();
 
  const dstName = document.getElementById('dstName').value.trim();
 
  const dstEmail = document.getElementById('dstEmail').value.trim();
 
  const dcName = document.getElementById('dcName').value.trim();
 
  const dcEmail = document.getElementById('dcEmail').value.trim();
 
  const notes = document.getElementById('notes').value.trim();
 
 
 
  if (!region || !city || !state || !dstName || !dstEmail || !dcName || !dcEmail) {
 
    alert('Please fill in all required fields!');
 
    return;
 
  }
 
 
 
  let templateCode = '{{Domain\n';
 
 
 
  if (titlepic) {
 
    templateCode += '|titlepic=' + titlepic + '\n';
 
  }
 
 
 
  templateCode += '|region=' + region + '\n';
 
  templateCode += '}}\n\n';
 
 
 
  templateCode += "'''Location:''' " + city + ", " + state + '\n\n';
 
 
 
  templateCode += '== Domain Staff ==\n\n';
 
  templateCode += "'''Domain Storyteller:''' " + dstName + '\n';
 
  templateCode += "'''Email:''' " + dstEmail + '\n\n';
 
  templateCode += "'''Domain Coordinator:''' " + dcName + '\n';
 
  templateCode += "'''Email:''' " + dcEmail + '\n';
 
 
 
  if (notes) {
 
    templateCode += '\n== Notes ==\n\n' + notes + '\n';
 
  }
 
 
 
  document.getElementById('domainOutputCode').value = templateCode;
 
  document.getElementById('domainOutput').style.display = 'block';
 
 
 
  document.getElementById('domainOutput').scrollIntoView({ behavior: 'smooth', block: 'nearest' });
 
});
 
  
function clearDomainForm() {
+
{{#css:
  document.getElementById('domainForm').reset();
+
.mw-body h1.firstHeading {
   document.getElementById('domainOutput').style.display = 'none';
+
  font-family: "Limelight", cursive;
 +
  color: #DC7;
 +
  font-weight: bold;
 +
   font-size: 22px;
 
}
 
}
 
+
#mw-content-text {
function copyDomainCode() {
+
  padding: 5px;
   const outputCode = document.getElementById('domainOutputCode');
+
  background-color: #000;
   outputCode.select();
+
  border-style: double;
   document.execCommand('copy');
+
  border-color: #DC7;
    
+
  border-width: thick;
   const btn = event.target;
+
}
   const originalText = btn.textContent;
+
#domain-title {
   btn.textContent = 'Copied!';
+
   font-family: "Limelight", cursive;
   btn.style.background = '#3a7c3a';
+
  color: #DC7;
    
+
  font-size: 4em;
   setTimeout(function() {
+
  text-align: center;
    btn.textContent = originalText;
+
}
    btn.style.background = '#2a5c2a';
+
div#bodyContent.mw-body-content h2, .my-h2 {
   }, 2000);
+
  font-family: "Poiret One", cursive;
 +
  color: #DC7;
 +
  font-weight: bold;
 +
   size: 18px;
 +
}
 +
div#bodyContent.mw-body-content h3, .my-h3 {
 +
  font-family: "Poiret One", cursive;
 +
  color: #DC7;
 +
   font-weight: bold;
 +
  size: 16px;
 +
}
 +
div#bodyContent.mw-body-content p, div#bodyContent.mw-body-content td, div#bodyContent.mw-body-content th, div#bodyContent.mw-body-content ul {
 +
  font-size: 16px;
 +
  font-family: 'Belleza', 'Avant Garde', sans-serif;
 +
  color: #DC7;
 +
   vertical-align:top;
 +
   text-align:left;
 +
  list-style:none;
 +
}
 +
#domain-title-image {
 +
  max-width: 100%;
 +
}
 +
#domain-title-image img {
 +
  height: auto;
 +
  max-width: 80%;
 +
}
 +
div#domain-info {
 +
  max-width: 80%;
 +
  margin: auto;
 +
  margin-top: 20px;
 +
}
 +
table#domain-info-table {
 +
   vertical-align: top;
 +
   text-align:left;
 +
   margin: auto;
 +
}
 +
div#content.mw-body {
 +
  background-color: #030303;
 +
}
 +
div#catlinks.catlinks {
 +
  background-color: #000;
 +
  border-color: #DC7;
 +
  font-family: 'Belleza', 'Avant Garde', sans-serif;
 +
}
 +
div#catlinks.catlinks a {
 +
   vertical-align: bottom;
 +
}
 +
div#bodyContent.mw-body-content img {
 +
   max-width: 100%
 +
}
 +
div#bodyContent.mw-body-content a:link, div#bodyContent.mw-body-content a.external:link {
 +
  color: #FFF;
 +
}
 +
div#bodyContent.mw-body-content a:visited, div#bodyContent.mw-body-content a.external:visited {
 +
  color: #FFC;
 +
}
 +
div#bodyContent.mw-body-content a:hover, div#bodyContent.mw-body-content a.external:hover {
 +
  color: #FF9;
 +
}
 +
div#bodyContent.mw-body-content a:active, div#bodyContent.mw-body-content a.external:active {
 +
  color: #FFD;
 +
}
 +
a.mw-helplink {
 +
  font-size: 16px;
 +
  font-family: 'Belleza', 'Avant Garde', sans-serif;
 +
   color: #DC7;
 +
}
 +
.clearfix::after {
 +
  content: "";
 +
  clear: both;
 +
  display: table;
 
}
 
}
</script>
+
}}
 
</includeonly>
 
</includeonly>

Latest revision as of 03:43, 5 October 2025

This is the "Domain" template. It should be called in the following format:

{{Domain
|domain=AL-009-D
|domainname=
|titlepic=
|region=
|city=
|state=
|dst_name=
|dst_email=
|dc_name=
|dc_email=
|notes=
}}