Skip to content

Commit

Permalink
initial intro
Browse files Browse the repository at this point in the history
initial intro before anything in Server Software has been selected
  • Loading branch information
gstrauss committed Dec 6, 2024
1 parent b737c6f commit a93f2d3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/js/configs.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ module.exports = {
tls13: '8.0.16',
},
nginx: {
checked: true,
highlighter: 'nginx',
latestVersion: '1.27.3',
eolBefore: '1.26.0',
Expand Down
8 changes: 8 additions & 0 deletions src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ templateContext.keys().forEach(key => {


const render = async () => {

// initial introduction
if (document.getElementById('form-generator').server.value === '') {
document.getElementById('output-config').innerHTML = '';
document.getElementById('copy').classList.toggle('d-none', true);
return;
}

const _state = await state();

// enable and disable the appropriate fields
Expand Down
8 changes: 6 additions & 2 deletions src/templates/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
if (config[1].name) {
%>
<div class="form-check">
<input class="form-check-input" type="radio" name="server" id="server-<%= config[0] %>" value="<%= config[0] %>" <% if (config[1].checked) {%>checked<% } %>>
<input class="form-check-input" type="radio" name="server" id="server-<%= config[0] %>" value="<%= config[0] %>">
<label class="form-check-label" for="server-<%= config[0] %>">
<%= config[1].name %>
</label>
Expand Down Expand Up @@ -116,7 +116,11 @@
</div>
</form>

<div id="output-header"></div>
<div id="output-header">
<div class="h3 pb-3">Getting Started</div>
<p>Select an application server in Server Software (above) to generate a sample TLS configuration.</p>
<p>When using sample TLS configurations, replace example.com with your server name (e.g. hostname) and replace /path/to/... with actual paths to your local files.</p>
</div>

<div id="output-config-container">
<pre class="border p-3"><code id="output-config"></code></pre>
Expand Down

0 comments on commit a93f2d3

Please sign in to comment.