trmnl_preview 0.5.2 → 0.5.4
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 +14 -0
- data/README.md +12 -2
- data/bin/rake +27 -0
- 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/app.rb +7 -3
- data/lib/trmnlp/commands/login.rb +1 -0
- data/lib/trmnlp/config/project.rb +2 -2
- data/lib/trmnlp/context.rb +11 -3
- data/lib/trmnlp/paths.rb +2 -0
- data/lib/trmnlp/screen_generator.rb +146 -87
- data/lib/trmnlp/version.rb +1 -1
- data/templates/init/src/shared.liquid +1 -0
- data/trmnl_preview.gemspec +3 -2
- data/web/public/index.css +4 -43
- data/web/public/index.js +16 -11
- data/web/public/trmnl-component.js +782 -0
- data/web/views/index.erb +8 -9
- data/web/views/render_html.erb +1 -1
- metadata +26 -9
- data/lib/trmnlp/custom_filters.rb +0 -14
- data/web/public/black-case.jpg +0 -0
- data/web/public/clear-case.jpg +0 -0
- data/web/public/white-case.jpg +0 -0
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
|
-
<option value="
|
27
|
+
<option value="png">PNG</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.4
|
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-06-09 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: sinatra
|
@@ -94,19 +94,19 @@ dependencies:
|
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: '8.0'
|
96
96
|
- !ruby/object:Gem::Dependency
|
97
|
-
name:
|
97
|
+
name: actionview
|
98
98
|
requirement: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
100
|
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: '0
|
102
|
+
version: '8.0'
|
103
103
|
type: :runtime
|
104
104
|
prerelease: false
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
107
|
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: '0
|
109
|
+
version: '8.0'
|
110
110
|
- !ruby/object:Gem::Dependency
|
111
111
|
name: puppeteer-ruby
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
@@ -233,6 +233,20 @@ dependencies:
|
|
233
233
|
- - "~>"
|
234
234
|
- !ruby/object:Gem::Version
|
235
235
|
version: 3.16.9
|
236
|
+
- !ruby/object:Gem::Dependency
|
237
|
+
name: tzinfo-data
|
238
|
+
requirement: !ruby/object:Gem::Requirement
|
239
|
+
requirements:
|
240
|
+
- - "~>"
|
241
|
+
- !ruby/object:Gem::Version
|
242
|
+
version: '1.2025'
|
243
|
+
type: :runtime
|
244
|
+
prerelease: false
|
245
|
+
version_requirements: !ruby/object:Gem::Requirement
|
246
|
+
requirements:
|
247
|
+
- - "~>"
|
248
|
+
- !ruby/object:Gem::Version
|
249
|
+
version: '1.2025'
|
236
250
|
description: Automatically rebuild and preview TRNML plugins in multiple views
|
237
251
|
email:
|
238
252
|
- rockwell@schrock.me
|
@@ -244,7 +258,12 @@ files:
|
|
244
258
|
- CHANGELOG.md
|
245
259
|
- LICENSE.txt
|
246
260
|
- README.md
|
261
|
+
- bin/rake
|
247
262
|
- bin/trmnlp
|
263
|
+
- lib/markup/custom_liquid_filters.rb
|
264
|
+
- lib/markup/inline_templates_file_system.rb
|
265
|
+
- lib/markup/template.rb
|
266
|
+
- lib/markup/template_tag.rb
|
248
267
|
- lib/trmnlp.rb
|
249
268
|
- lib/trmnlp/api_client.rb
|
250
269
|
- lib/trmnlp/app.rb
|
@@ -263,7 +282,6 @@ files:
|
|
263
282
|
- lib/trmnlp/config/plugin.rb
|
264
283
|
- lib/trmnlp/config/project.rb
|
265
284
|
- lib/trmnlp/context.rb
|
266
|
-
- lib/trmnlp/custom_filters.rb
|
267
285
|
- lib/trmnlp/paths.rb
|
268
286
|
- lib/trmnlp/screen_generator.rb
|
269
287
|
- lib/trmnlp/version.rb
|
@@ -274,12 +292,11 @@ files:
|
|
274
292
|
- templates/init/src/half_vertical.liquid
|
275
293
|
- templates/init/src/quadrant.liquid
|
276
294
|
- templates/init/src/settings.yml
|
295
|
+
- templates/init/src/shared.liquid
|
277
296
|
- trmnl_preview.gemspec
|
278
|
-
- web/public/black-case.jpg
|
279
|
-
- web/public/clear-case.jpg
|
280
297
|
- web/public/index.css
|
281
298
|
- web/public/index.js
|
282
|
-
- web/public/
|
299
|
+
- web/public/trmnl-component.js
|
283
300
|
- web/views/index.erb
|
284
301
|
- web/views/render_html.erb
|
285
302
|
homepage: https://github.com/usetrmnl/trmnlp
|
@@ -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
|
data/web/public/black-case.jpg
DELETED
Binary file
|
data/web/public/clear-case.jpg
DELETED
Binary file
|
data/web/public/white-case.jpg
DELETED
Binary file
|