-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(elements): fake table using paragraphs (#126)
- Loading branch information
1 parent
2501662
commit 1b9010e
Showing
16 changed files
with
111 additions
and
12 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/*! @tacc/core-styles 1.0.0+ | MIT | github.com/TACC/Core-Styles */ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/*! @tacc/core-styles 1.0.0+ | MIT | github.com/TACC/Core-Styles */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/*! @tacc/core-styles 1.0.0+ | MIT | github.com/TACC/Core-Styles */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@custom-selector :--s-paragraph-table | ||
.s-paragraph-table, | ||
.paragraph-table; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<h2>Fake Table</h2> | ||
|
||
{{> @s-paragraph-table class="s-paragraph-table" data=data }} | ||
|
||
<h2>Real Table</h2> | ||
|
||
<table class="{{#if class }}{{ class }}{{/if}}"> | ||
<tbody> | ||
{{#each data.rows}} | ||
<tr> | ||
{{#if paragraph}} | ||
<td title="{{> @text-of-one-paragraph-short }}"> | ||
<p>{{> @text-of-one-paragraph-short }}</p> | ||
</td> | ||
{{/if}} | ||
</tr> | ||
{{/each}} | ||
</tbody> | ||
</table> |
17 changes: 17 additions & 0 deletions
17
src/lib/_imports/elements/table/table--via-paragraphs.readme.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
A [table]({{path './table' }}) that uses [paragraphs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p) instead of cells. | ||
|
||
> **ⓘ Notice** | ||
> | ||
> - Text will not truncate. It will wrap. | ||
> - Only a single column is supported. | ||
> **⁉ Help** | ||
> | ||
> Should text truncate? Ask designers. | ||
<script> | ||
/* To open external links in new window */ | ||
Array.from(document.links) | ||
.filter(link => link.hostname != window.location.hostname) | ||
.forEach(link => link.target = '_blank'); | ||
</script> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/* FAQ: Using @custom-selector within elements/table */ | ||
/* SEE: src/lib/_imports/elements/table--basic.css */ | ||
/* SEE: src/lib/_imports/elements/table.selectors.css */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
context: | ||
data: | ||
rows: | ||
- paragraph: true | ||
- paragraph: true | ||
- paragraph: true | ||
- paragraph: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
A [table]({{path './table' }}) that uses [paragraphs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p) instead of cells. | ||
|
||
> **ⓘ Notice** | ||
> | ||
> - Text will not truncate. It will wrap. | ||
> - Only a single column is supported. | ||
> **⁉ Help** | ||
> | ||
> Should text truncate? Ask designers. | ||
<script> | ||
/* To open external links in new window */ | ||
Array.from(document.links) | ||
.filter(link => link.hostname != window.location.hostname) | ||
.forEach(link => link.target = '_blank'); | ||
</script> |
7 changes: 7 additions & 0 deletions
7
src/lib/_imports/trumps/s-paragraph-table/s-paragraph-table.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<div class="{{#if class }}{{ class }}{{else}}s-paragraph-table{{/if}}"> | ||
{{#each data.rows}} | ||
{{#if paragraph}} | ||
<p>{{> @text-of-one-paragraph-short }}</p> | ||
{{/if}} | ||
{{/each}} | ||
</div> |