Use prism as smaller nicer code highlighting library

This commit is contained in:
2020-04-27 19:14:44 +02:00
parent bc45040bb1
commit add4a2f7f0
9 changed files with 163 additions and 29 deletions

View File

@@ -42,7 +42,7 @@
<p>
Please set your form action as in the example below. Make sure to use proper <code>name</code> attributes.
<p>
<pre><code class="html">
<pre><code class="language-html">
<%= html_escape_once render('form_example', form: @form) %>
</code></pre>
@@ -50,12 +50,9 @@
<p>
Learn more about our <a href="https://www.notion.so/JavaScript-Library-442071548edd4cd1af9c7d8edb3d42cb">JavaScript library</a> and our <a href="https://www.notion.so/Tinyforms-API-7862355e22ce4bbead5de3b635cda55e">API</a> in your help section.
</p>
<pre><code class="html">
<pre><code class="language-html">
<%= html_escape_once render('form_example_js', form: @form) %>
</code></pre>
<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.0.0/build/styles/railscasts.min.css">
<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.0.0/build/highlight.min.js"></script>
</div>
</div>

View File

@@ -24,22 +24,23 @@
<div class="columns is-centered">
<div class="column is-two-thirds">
<h3 class="title">Setup your online form:</h3>
<h3 class="title">One more step:</h3>
<p>
Your form submission URL: <code><%= submission_url(@form) %></code>
</p>
<p>
Set the <code>action</code> of your online form to this URL and make sure your fields have proper <code>name</code> attributes.
Set the <code>action</code> of your online form to <code><%= submission_url(@form) %></code> and make sure your fields have proper <code>name</code> attributes.
</p>
<h4 class="subtitle" style="margin-top:1em">Example:</h4>
<pre><code class="html">
<pre><code class="language-html">
<%= html_escape_once render('form_example', form: @form) %>
</code></pre>
<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.0.0/build/styles/default.min.css">
<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.0.0/build/highlight.min.js"></script>
<p>
Let us know if you need <%= link_to 'help', help_url %> - we also build the form for you!
If you prefer to submit the form using JavaScript/AJAX have a look at our <a href="https://www.notion.so/JavaScript-Library-442071548edd4cd1af9c7d8edb3d42cb">JavaScript library</a> and our <a href="https://www.notion.so/Tinyforms-API-7862355e22ce4bbead5de3b635cda55e">API</a>.
</p>
<p>
If you need help, <%= link_to "we're here!", help_url %>
</p>
<p style="margin-top:15px">
And if you do not want to deal with your form at all, have a look at our <%= link_to 'form building service', form_building_service_url %>.
</p>
</div>