-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapps.html
More file actions
166 lines (144 loc) · 9.97 KB
/
Copy pathapps.html
File metadata and controls
166 lines (144 loc) · 9.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>EAHA | Post Builder</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/svg+xml" href="favicon.svg">
<link rel="stylesheet" href="style.css">
</head>
<body>
<header class="top-nav">
<div class="nav-header">
<div class="brand">Elys Astra Helper Application</div>
<button class="mobile-menu-btn" onclick="document.querySelector('.nav-links').classList.toggle('active')">☰</button>
</div>
<nav class="nav-links">
<a class="nav-btn" href="index.html">Dashboard</a>
<a class="nav-btn active" href="apps.html">Post Builder</a>
<a class="nav-btn" href="work.html">Rules & Guidelines</a>
<a class="nav-btn" href="docs.html">Creature Profiles</a>
<a class="nav-btn" href="about.html">Stats</a>
<a class="nav-btn" href="combat.html">Combat Log</a>
<a class="nav-btn" href="map.html">Tactical Map</a>
<a class="nav-btn" href="lineage.html">Lineage</a>
<a class="nav-btn" href="settings.html">Settings</a>
<a class="nav-btn" href="guide.html">System Manual</a>
</nav>
</header>
<main class="page builder-workspace">
<aside class="preset-sidebar card" style="border-top: 5px solid var(--primary);">
<h2 style="font-size: 1.5em;">Preset Library</h2>
<p class="muted" style="margin-bottom: 20px; font-size: 0.9em; line-height: 1.4;">Save and load your custom post configurations instantly.</p>
<div style="display: flex; flex-direction: column; gap: 10px; margin-bottom: 25px;">
<button class="btn full-width" id="saveNewPreset">Save Current as New</button>
<button class="btn btn-ghost full-width" id="updatePreset" disabled>Update Selected</button>
</div>
<div class="preset-list" id="presetList" style="display: flex; flex-direction: column; gap: 10px;">
</div>
<hr style="border-top: 2px solid var(--border); margin: 25px 0; border-bottom: none;">
<h3 style="font-size: 1.2em; color: var(--primary);">Cookie-Cutter Templates</h3>
<p class="muted" style="font-size: 0.85em; margin-bottom: 10px;">Start with a pre-built foundation.</p>
<select id="templateSelect" class="full-width" style="margin-bottom: 15px; cursor: pointer;"></select>
<button class="btn btn-ghost full-width" id="clearAll" style="border-color: var(--danger); color: var(--danger);">Clear Editor</button>
</aside>
<section class="editor-pane scrollable">
<div class="card" style="box-shadow: none; border: 2px solid var(--border); border-top: 5px solid var(--primary); margin-bottom: 20px; position: sticky; top: 0; z-index: 10;">
<div style="display: flex; flex-wrap: wrap; gap: 15px; align-items: center;">
<div style="display: flex; gap: 5px; background: var(--bg); padding: 5px; border-radius: 8px; border: 1px solid var(--border);">
<button class="btn btn-ghost btn-sm format-btn" data-wrap="**" title="Bold"><b>B</b></button>
<button class="btn btn-ghost btn-sm format-btn" data-wrap="*" title="Italic"><i>I</i></button>
<button class="btn btn-ghost btn-sm format-btn" data-wrap="__" title="Underline"><u>U</u></button>
<button class="btn btn-ghost btn-sm format-btn" data-wrap="||" title="Spoiler"><span style="background:var(--muted); color:transparent; border-radius:3px;">Sp</span></button>
</div>
<div style="display: flex; gap: 5px; background: var(--bg); padding: 5px; border-radius: 8px; border: 1px solid var(--border);">
<button class="btn btn-ghost btn-sm format-btn" data-prefix="# " title="Heading 1 (Large)">H1</button>
<button class="btn btn-ghost btn-sm format-btn" data-prefix="## " title="Heading 2 (Medium)">H2</button>
<button class="btn btn-ghost btn-sm format-btn" data-prefix="### " title="Heading 3 (Small)">H3</button>
<button class="btn btn-ghost btn-sm format-btn" data-prefix="> " title="Blockquote">”</button>
</div>
<div style="display: flex; gap: 5px; background: var(--bg); padding: 5px; border-radius: 8px; border: 1px solid var(--border);">
<button class="btn btn-ghost btn-sm font-btn" data-font="gothic" title="Gothic Font" style="font-family: serif;">𝔊𝔬𝔱𝔥𝔦𝔠</button>
<button class="btn btn-ghost btn-sm font-btn" data-font="script" title="Script Font" style="font-family: cursive;">𝒮𝒸𝓇𝒾𝓅𝓉</button>
<button class="btn btn-ghost btn-sm font-btn" data-font="double" title="Double Struck">𝔻𝕠𝕦𝕓𝕝𝕖</button>
</div>
<span class="muted" style="font-size: 0.8em; margin-left: auto;">Highlight text to apply formats & fonts.</span>
</div>
</div>
<div class="card" style="box-shadow: none; border: 2px solid var(--border);">
<h2 style="color: var(--primary);">Core Details</h2>
<div class="form-grid">
<label class="field"><span>Post Title</span><input type="text" id="postTitle" placeholder="✧ Dragonflight Event ✧"></label>
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 15px;">
<label class="field"><span>Target Channel</span><input type="text" id="postChannel" placeholder="#events"></label>
<label class="field"><span>Tag / Category</span><input type="text" id="postTag" placeholder="Event, Group Finder"></label>
</div>
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 15px;">
<label class="field"><span>Role Mentions</span><input type="text" id="postRoles" placeholder="@here @Rangers"></label>
<label class="field"><span>Header Prefix</span><input type="text" id="postPrefix" placeholder=">"></label>
</div>
<label class="field">
<span>Discord Layout Theme</span>
<select id="themeSelect" style="cursor: pointer;"></select>
</label>
</div>
</div>
<div class="card" style="box-shadow: none; border: 2px solid var(--border);">
<div class="card-header" style="flex-wrap: wrap; gap: 15px;">
<h2 style="margin: 0; color: var(--primary);">Sections</h2>
<button class="btn btn-sm" id="addSection" style="margin-left: auto;">+ Add Section</button>
</div>
<div id="sections" class="drag-container" style="display: flex; flex-direction: column; gap: 20px;"></div>
</div>
<div class="card" style="box-shadow: none; border: 2px solid var(--border);">
<div class="card-header" style="margin-bottom: 5px;">
<h2 style="margin: 0; color: var(--primary);">Checklist & Questions</h2>
<label class="toggle" style="margin: 0;"><input type="checkbox" id="checklistEnabled" checked><span>Enable Module</span></label>
</div>
<label class="toggle" style="margin-bottom: 20px;"><input type="checkbox" id="checklistInclude" checked><span>Include in final Discord output</span></label>
<div class="form-grid">
<label class="field"><span>Checklist Items (one per line)</span><textarea id="checklistItems" rows="3" placeholder="Verify server rules..."></textarea></label>
<label class="field"><span>Questions to Answer</span><textarea id="questionItems" rows="3" placeholder="What is your timezone?..."></textarea></label>
</div>
</div>
</section>
<section class="preview-pane scrollable">
<div class="card" style="border-top: 5px solid var(--primary); display: flex; flex-direction: column;">
<div class="card-header" style="margin-bottom: 20px;">
<h2 style="margin: 0;">Live Preview</h2>
<div style="display: flex; gap: 10px;">
<button class="btn btn-sm" id="copyPost">Copy Text</button>
<button class="btn btn-ghost btn-sm" id="copyCode">Copy Code</button>
</div>
</div>
<pre id="postPreview" class="preview" style="flex: 1; margin: 0;"></pre>
</div>
<div class="card" style="box-shadow: none; border: 2px solid var(--border);">
<h2 style="color: var(--primary);">Design Library</h2>
<p class="muted" style="font-size: 0.85em; margin-bottom: 15px;">Click to instantly insert at your cursor.</p>
<div class="library" style="display: flex; flex-direction: column; gap: 20px;">
<div><h3 style="font-size: 1em; color: var(--muted); border-bottom: 1px solid var(--border); padding-bottom: 5px;">Dividers</h3><div class="chip-group" id="dividerLibrary"></div></div>
<div><h3 style="font-size: 1em; color: var(--muted); border-bottom: 1px solid var(--border); padding-bottom: 5px;">Server & Fantasy</h3><div class="chip-group" id="emojiServer"></div></div>
<div><h3 style="font-size: 1em; color: var(--muted); border-bottom: 1px solid var(--border); padding-bottom: 5px;">Status & Alerts</h3><div class="chip-group" id="emojiStatus"></div></div>
<div><h3 style="font-size: 1em; color: var(--muted); border-bottom: 1px solid var(--border); padding-bottom: 5px;">Diet & Nature</h3><div class="chip-group" id="emojiFood"></div></div>
<div><h3 style="font-size: 1em; color: var(--muted); border-bottom: 1px solid var(--border); padding-bottom: 5px;">Fonts & Symbols</h3><div class="chip-group" id="emojiSymbols"></div></div>
</div>
</div>
</section>
</main>
<div id="toast" class="toast" role="status" aria-live="polite"></div>
<script src="https://cdn.jsdelivr.net/npm/sortablejs@latest/Sortable.min.js"></script>
<script type="module" src="data-store.js"></script>
<script type="module" src="post-builder.js"></script>
</body>
<script type="module">
import { auth } from './data-store.js';
import { onAuthStateChanged } from "https://www.gstatic.com/firebasejs/10.8.0/firebase-auth.js";
// The Security Guard
onAuthStateChanged(auth, (user) => {
if (!user) {
window.location.replace("login.html");
}
});
</script>
</html>