Skip to content

Commit

Permalink
update font-awesome with more specific asset path, compiling docs
Browse files Browse the repository at this point in the history
  • Loading branch information
swobspace committed Apr 1, 2024
1 parent 268a37d commit 27c0388
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 66 deletions.
2 changes: 1 addition & 1 deletion docs/playbook/datatables/datatables-js.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Datatables Javascript files :: Rails Playbook</title>
<meta name="generator" content="Antora 3.0.0">
<meta name="generator" content="Antora 3.1.2">
<link rel="stylesheet" href="../../_/css/site.css">
<script>var uiRootPath = '../../_'</script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/playbook/datatables/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>A stimulus datatables controller :: Rails Playbook</title>
<meta name="generator" content="Antora 3.0.0">
<meta name="generator" content="Antora 3.1.2">
<link rel="stylesheet" href="../../_/css/site.css">
<script>var uiRootPath = '../../_'</script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/playbook/flash/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Flash messages with Turbo Streams (Bootstrap Alert) :: Rails Playbook</title>
<meta name="generator" content="Antora 3.0.0">
<meta name="generator" content="Antora 3.1.2">
<link rel="stylesheet" href="../../_/css/site.css">
<script>var uiRootPath = '../../_'</script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/playbook/flash/remove-js.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Stimulus Controller to close the alert :: Rails Playbook</title>
<meta name="generator" content="Antora 3.0.0">
<meta name="generator" content="Antora 3.1.2">
<link rel="stylesheet" href="../../_/css/site.css">
<script>var uiRootPath = '../../_'</script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/playbook/flash/toast-js.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Stimulus Controller to initialize Bootstrap Toast :: Rails Playbook</title>
<meta name="generator" content="Antora 3.0.0">
<meta name="generator" content="Antora 3.1.2">
<link rel="stylesheet" href="../../_/css/site.css">
<script>var uiRootPath = '../../_'</script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/playbook/flash/toast.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Flash messages with Turbo Streams (Bootstrap Toast) :: Rails Playbook</title>
<meta name="generator" content="Antora 3.0.0">
<meta name="generator" content="Antora 3.1.2">
<link rel="stylesheet" href="../../_/css/site.css">
<script>var uiRootPath = '../../_'</script>
</head>
Expand Down
20 changes: 4 additions & 16 deletions docs/playbook/fontawesome/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Font Awesome :: Rails Playbook</title>
<meta name="generator" content="Antora 3.0.0">
<meta name="generator" content="Antora 3.1.2">
<link rel="stylesheet" href="../../_/css/site.css">
<script>var uiRootPath = '../../_'</script>
</head>
Expand Down Expand Up @@ -169,21 +169,9 @@ <h2 id="_installation"><a class="anchor" href="#_installation"></a>Installation<
<div class="sectionbody">
<div class="listingblock">
<div class="content">
<pre>yarn add @fortawesome/fontawesome-free@5</pre>
<pre>yarn add @fortawesome/fontawesome-free</pre>
</div>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
for fontawesome v6 omit the version <code>@5</code>.
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="sect1">
Expand All @@ -198,13 +186,13 @@ <h2 id="_webfonts_and_css"><a class="anchor" href="#_webfonts_and_css"></a>Webfo
<div class="listingblock">
<div class="title">./config/initializers/assets.rb</div>
<div class="content">
<pre class="highlightjs highlight"><code class="language-ruby hljs" data-lang="ruby">Rails.application.config.assets.paths &lt;&lt; Rails.root.join('node_modules')</code></pre>
<pre class="highlightjs highlight"><code class="language-ruby hljs" data-lang="ruby">Rails.application.config.assets.paths &lt;&lt; Rails.root.join('node_modules/@fortawesome/fontawesome-free/webfonts')</code></pre>
</div>
</div>
<div class="listingblock">
<div class="title">./app/assets/stylesheets/application.bootstrap.scss</div>
<div class="content">
<pre class="highlightjs highlight"><code class="language-scss hljs" data-lang="scss">$fa-font-path: '@fortawesome/fontawesome-free/webfonts'; <i class="conum" data-value="1"></i><b>(1)</b>
<pre class="highlightjs highlight"><code class="language-scss hljs" data-lang="scss">$fa-font-path: '.'; <i class="conum" data-value="1"></i><b>(1)</b>
@import '@fortawesome/fontawesome-free/scss/fontawesome'; <i class="conum" data-value="2"></i><b>(2)</b>
@import '@fortawesome/fontawesome-free/scss/brands';
@import '@fortawesome/fontawesome-free/scss/solid';
Expand Down
2 changes: 1 addition & 1 deletion docs/playbook/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Rails Playground :: Rails Playbook</title>
<meta name="generator" content="Antora 3.0.0">
<meta name="generator" content="Antora 3.1.2">
<link rel="stylesheet" href="../_/css/site.css">
<script>var uiRootPath = '../_'</script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/playbook/modal/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>A stimulus controller for Bootstrap v5 Modal :: Rails Playbook</title>
<meta name="generator" content="Antora 3.0.0">
<meta name="generator" content="Antora 3.1.2">
<link rel="stylesheet" href="../../_/css/site.css">
<script>var uiRootPath = '../../_'</script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/playbook/modal/modal-js.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Stimulus Controller for Bootstrap Modal :: Rails Playbook</title>
<meta name="generator" content="Antora 3.0.0">
<meta name="generator" content="Antora 3.1.2">
<link rel="stylesheet" href="../../_/css/site.css">
<script>var uiRootPath = '../../_'</script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/playbook/slim-select/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Stimulus Slim Select :: Rails Playbook</title>
<meta name="generator" content="Antora 3.0.0">
<meta name="generator" content="Antora 3.1.2">
<link rel="stylesheet" href="../../_/css/site.css">
<script>var uiRootPath = '../../_'</script>
</head>
Expand Down
38 changes: 2 additions & 36 deletions docs/playbook/slim-select/slim-select-js.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Stimulus Controller for SlimSelect :: Rails Playbook</title>
<meta name="generator" content="Antora 3.0.0">
<meta name="generator" content="Antora 3.1.2">
<link rel="stylesheet" href="../../_/css/site.css">
<script>var uiRootPath = '../../_'</script>
</head>
Expand Down Expand Up @@ -144,41 +144,7 @@ <h3 id="_the_complete_controller"><a class="anchor" href="#_the_complete_control
<div class="listingblock">
<div class="title">node_modules/@swobspace/stimulus-slim-select/stimulus-slim-select.js</div>
<div class="content">
<pre class="highlightjs highlight"><code class="language-javascript hljs" data-lang="javascript">import { Controller } from "@hotwired/stimulus"
import SlimSelect from "slim-select"

export default class extends Controller {
static values = { url: String }

connect() {
// set basic options
let options = {
select: this.element,
allowDeselect: true
}

// check if url is present -&gt; fetch via ajax
if (this.hasUrlValue) {
let _this = this
options.ajax = function (search, callback) {
if (search.length &lt; 3) {
callback('Bitte geben Sie mind. 3 Buchstaben ein...')
return
}

let url = new URL(_this.urlValue)
url.search = new URLSearchParams({ q: search })

fetch(url)
.then(response =&gt; response.json())
.then(json =&gt; callback(json))
.catch(error =&gt; callback(error))
}
}

new SlimSelect(options)
}
}</code></pre>
<pre class="highlightjs highlight"><code class="language-javascript hljs" data-lang="javascript">Unresolved include directive in modules/ROOT/pages/slim-select/slim-select-js.adoc - include::example$@swobspace/stimulus-slim-select/stimulus-slim-select.js[]</code></pre>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/playbook/sortable/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>A stimulus sortable controller :: Rails Playbook</title>
<meta name="generator" content="Antora 3.0.0">
<meta name="generator" content="Antora 3.1.2">
<link rel="stylesheet" href="../../_/css/site.css">
<script>var uiRootPath = '../../_'</script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/playbook/sortable/sortable-js.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Sortable Stimulus Controller :: Rails Playbook</title>
<meta name="generator" content="Antora 3.0.0">
<meta name="generator" content="Antora 3.1.2">
<link rel="stylesheet" href="../../_/css/site.css">
<script>var uiRootPath = '../../_'</script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/playbook/turbo/delete-button.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Destroy action :: Rails Playbook</title>
<meta name="generator" content="Antora 3.0.0">
<meta name="generator" content="Antora 3.1.2">
<link rel="stylesheet" href="../../_/css/site.css">
<script>var uiRootPath = '../../_'</script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/playbook/turbo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Hotwire/Turbolences :: Rails Playbook</title>
<meta name="generator" content="Antora 3.0.0">
<meta name="generator" content="Antora 3.1.2">
<link rel="stylesheet" href="../../_/css/site.css">
<script>var uiRootPath = '../../_'</script>
</head>
Expand Down

0 comments on commit 27c0388

Please sign in to comment.