Skip to content

Commit

Permalink
style updates
Browse files Browse the repository at this point in the history
  • Loading branch information
dux committed Jul 14, 2024
1 parent 13aa1af commit c39f878
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
5 changes: 4 additions & 1 deletion demo/fez/todo.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ Fez('ui-todo', class extends FezBase {
{{/if}}
{{#for task, index in @tasks}}
<p>
<input type="text" name="" value="{{ task.name }}" onkeyup="$$.setName({{ index }}, this.value)" />
<input
type="text" name="" value="{{ task.name }}" onkeyup="$$.setName({{ index }}, this.value)"
style="{{ task.done ? 'background-color: #ccc;' : '' }}"
/>
&sdot;
<input
type="checkbox"
Expand Down
4 changes: 2 additions & 2 deletions dist/fez.js.map

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Test</title>
<link rel="icon" href="./demo/fez.webp">
<link rel="stylesheet" href="./demo/main.css" />
<link rel="stylesheet" href="./demo/hjs-theme.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script> <script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
Expand Down Expand Up @@ -644,7 +645,10 @@ <h2>
{{/if}}
{{#for task, index in @tasks}}
&lt;p>
&lt;input type="text" name="" value="{{ task.name }}" onkeyup="$$.setName({{ index }}, this.value)" />
&lt;input
type="text" name="" value="{{ task.name }}" onkeyup="$$.setName({{ index }}, this.value)"
style="{{ task.done ? 'background-color: #ccc;' : '' }}"
/>
&sdot;
&lt;input
type="checkbox"
Expand Down
1 change: 1 addition & 0 deletions index.html.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Test</title>
<link rel="icon" href="./demo/fez.webp">
<link rel="stylesheet" href="./demo/main.css" />
<link rel="stylesheet" href="./demo/hjs-theme.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script> <script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
Expand Down
1 change: 1 addition & 0 deletions src/fez.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ class FezBase {

if (text.includes('{{')) {
try {
// TODO: return template function pointer
text = renderStache(text, this)
} catch(error) {
console.error(`Fez stache template error in "${this.fezName}"`, error)
Expand Down

0 comments on commit c39f878

Please sign in to comment.