Skip to content

Commit

Permalink
Merge pull request #280 from gstrauss/initial-intro
Browse files Browse the repository at this point in the history
initial intro
  • Loading branch information
gstrauss authored Dec 6, 2024
2 parents b737c6f + a93f2d3 commit 147a650
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 147a650

Please sign in to comment.