focuslabllc / craft-cheat-sheet

A fast and customized set of instantly usable Field code samples.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Complete Table code samples

erikreagan opened this issue · comments

@alexsailer The final 2 field types I have to implement are the ones that are "different" in terms of output. This one is simply called Table and it allows for flexible table creation. I want to show a table with 3 columns that contain data about each "Table field."

Can you put together a table design and throw a screenshot in here so @andyfought can mark it up?

The table would contain a header row, then body rows containing plain text and single-line code samples.

First Heading Second Heading Third Heading
Text {{ code }} text
Text {{ code }} text
Text {{ code }} text
Text {{ code }} text
Text {{ code }} text
Text {{ code }} text

This is how GitHub styles that kinda stuff.

The markup would be pretty standard, I'd imagine.

<table>
    <thead>
        <tr>
            <th>Heading</th>
            ...
        </tr>
    </thead>
    <tbody>
        <tr>
            <td></td>
            ...
        </tr>
    </tbody>
</table>

Schweet. Probably no need for any changes, but for @andyfought's notes:

  1. The descriptive text will never be above it like that
  2. No copy-to-clipboard icon needed

On it!

Should be good to go. Please confirm and we can close this issue.

@andyfought pulling down to check it out soon. Thanks!