trmnl_preview 0.5.1 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +4 -0
- data/bin/trmnlp +4 -1
- data/lib/markup/custom_liquid_filters.rb +36 -0
- data/lib/markup/inline_templates_file_system.rb +19 -0
- data/lib/markup/template.rb +17 -0
- data/lib/markup/template_tag.rb +31 -0
- data/lib/trmnlp/commands/login.rb +1 -0
- data/lib/trmnlp/config/project.rb +2 -0
- data/lib/trmnlp/context.rb +20 -6
- data/lib/trmnlp/paths.rb +2 -0
- data/lib/trmnlp/version.rb +1 -1
- data/trmnl_preview.gemspec +2 -0
- data/web/public/index.css +0 -45
- data/web/public/index.js +16 -11
- data/web/public/trmnl-component.js +782 -0
- data/web/views/index.erb +7 -8
- data/web/views/render_html.erb +1 -1
- metadata +35 -3
- data/lib/trmnlp/custom_filters.rb +0 -14
data/web/views/index.erb
CHANGED
@@ -9,6 +9,7 @@
|
|
9
9
|
<title>TRMNL Preview</title>
|
10
10
|
|
11
11
|
<link rel="stylesheet" href="/index.css">
|
12
|
+
<script src="/trmnl-component.js" defer></script>
|
12
13
|
<script src="/index.js"></script>
|
13
14
|
</head>
|
14
15
|
<body>
|
@@ -20,27 +21,25 @@
|
|
20
21
|
<a class="<%= 'active' if @view == 'half_vertical' %>" href="/half_vertical">Half Vertical</a>
|
21
22
|
<a class="<%= 'active' if @view == 'quadrant' %>" href="/quadrant">Quadrant</a>
|
22
23
|
</div>
|
23
|
-
<div style="display: flex; gap: 0.3em;">
|
24
|
+
<div style="display: flex; gap: 0.3em; align-items: center;">
|
24
25
|
<div class="spinner" style="display: none;"></div>
|
25
26
|
<select class="select-format">
|
26
27
|
<option value="bmp">BMP</option>
|
27
28
|
<option value="html" selected>HTML</option>
|
28
29
|
</select>
|
29
30
|
<select class="select-case">
|
30
|
-
<option value="none">None</option>
|
31
31
|
<option value="white">White</option>
|
32
|
-
<option value="black"
|
33
|
-
<option value="
|
32
|
+
<option value="black">Black</option>
|
33
|
+
<option value="mint">Mint</option>
|
34
|
+
<option value="gray">Gray</option>
|
35
|
+
<option value="wood">Wood</option>
|
34
36
|
</select>
|
35
37
|
|
36
38
|
<a href="/poll">Poll</a>
|
37
39
|
</div>
|
38
40
|
</menu>
|
39
41
|
|
40
|
-
<
|
41
|
-
<iframe width="800" height="480"></iframe>
|
42
|
-
<div class="case-overlay"></div>
|
43
|
-
</div>
|
42
|
+
<trmnl-frame>Rendering…</trmnl-frame>
|
44
43
|
|
45
44
|
<pre id="user-data"><%= @user_data %></pre>
|
46
45
|
</main>
|
data/web/views/render_html.erb
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
<link href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap" rel="stylesheet">
|
11
11
|
<!-- End Inter font -->
|
12
12
|
</head>
|
13
|
-
<body class="environment trmnl">
|
13
|
+
<body class="environment trmnl" style="background: white">
|
14
14
|
<div class="<%= @screen_classes %>">
|
15
15
|
<div class="view view--<%= @view %>">
|
16
16
|
<%= yield %>
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trmnl_preview
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rockwell Schrock
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-05-22 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: sinatra
|
@@ -93,6 +93,20 @@ dependencies:
|
|
93
93
|
- - "~>"
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: '8.0'
|
96
|
+
- !ruby/object:Gem::Dependency
|
97
|
+
name: actionview
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '8.0'
|
103
|
+
type: :runtime
|
104
|
+
prerelease: false
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - "~>"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '8.0'
|
96
110
|
- !ruby/object:Gem::Dependency
|
97
111
|
name: ferrum
|
98
112
|
requirement: !ruby/object:Gem::Requirement
|
@@ -233,6 +247,20 @@ dependencies:
|
|
233
247
|
- - "~>"
|
234
248
|
- !ruby/object:Gem::Version
|
235
249
|
version: 3.16.9
|
250
|
+
- !ruby/object:Gem::Dependency
|
251
|
+
name: tzinfo-data
|
252
|
+
requirement: !ruby/object:Gem::Requirement
|
253
|
+
requirements:
|
254
|
+
- - "~>"
|
255
|
+
- !ruby/object:Gem::Version
|
256
|
+
version: '1.2025'
|
257
|
+
type: :runtime
|
258
|
+
prerelease: false
|
259
|
+
version_requirements: !ruby/object:Gem::Requirement
|
260
|
+
requirements:
|
261
|
+
- - "~>"
|
262
|
+
- !ruby/object:Gem::Version
|
263
|
+
version: '1.2025'
|
236
264
|
description: Automatically rebuild and preview TRNML plugins in multiple views
|
237
265
|
email:
|
238
266
|
- rockwell@schrock.me
|
@@ -245,6 +273,10 @@ files:
|
|
245
273
|
- LICENSE.txt
|
246
274
|
- README.md
|
247
275
|
- bin/trmnlp
|
276
|
+
- lib/markup/custom_liquid_filters.rb
|
277
|
+
- lib/markup/inline_templates_file_system.rb
|
278
|
+
- lib/markup/template.rb
|
279
|
+
- lib/markup/template_tag.rb
|
248
280
|
- lib/trmnlp.rb
|
249
281
|
- lib/trmnlp/api_client.rb
|
250
282
|
- lib/trmnlp/app.rb
|
@@ -263,7 +295,6 @@ files:
|
|
263
295
|
- lib/trmnlp/config/plugin.rb
|
264
296
|
- lib/trmnlp/config/project.rb
|
265
297
|
- lib/trmnlp/context.rb
|
266
|
-
- lib/trmnlp/custom_filters.rb
|
267
298
|
- lib/trmnlp/paths.rb
|
268
299
|
- lib/trmnlp/screen_generator.rb
|
269
300
|
- lib/trmnlp/version.rb
|
@@ -279,6 +310,7 @@ files:
|
|
279
310
|
- web/public/clear-case.jpg
|
280
311
|
- web/public/index.css
|
281
312
|
- web/public/index.js
|
313
|
+
- web/public/trmnl-component.js
|
282
314
|
- web/public/white-case.jpg
|
283
315
|
- web/views/index.erb
|
284
316
|
- web/views/render_html.erb
|
@@ -1,14 +0,0 @@
|
|
1
|
-
require 'active_support'
|
2
|
-
|
3
|
-
module TRMNLP
|
4
|
-
module CustomFilters
|
5
|
-
# TODO: sync up with core
|
6
|
-
def number_with_delimiter(*args)
|
7
|
-
ActiveSupport::NumberHelper.number_to_delimited(*args)
|
8
|
-
end
|
9
|
-
|
10
|
-
def number_to_currency(*args)
|
11
|
-
ActiveSupport::NumberHelper.number_to_currency(*args)
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|