DEV Community

Cover image for Use Tailwind On A Template - Building SaaS #43
Matt Layman
Matt Layman

Posted on • Originally published at mattlayman.com

1

Use Tailwind On A Template - Building SaaS #43

In this episode, we worked on the template styles of a tabular view. We also made some context data adjustments to include header rows and column highlighting.

I started by showing the template that I already created. It was rough.

Before changing anything, I took the time to explain the modeling in use for this project and the context passed to the view. The models mostly form a tree in the a hierarchy. Here is the top to bottom list of the models in use:

SchoolYear -> GradeLevel -> Course -> CourseTask -> Coursework

The view is showing a lot of data in a tabular structure so I walked through the logic to put that together in the view.

After explaining the data, I added week date headers to the table. Then we used Tailwind to set some styling on them.

The next task was to make the table aware of week dates to show column highlighting of the current day. We added the date to each cell to make it possible to test if it should be highlighted. I also made some style changes to round off the corners of the columns. This small detail actually required a suprising amount of template adjustment.

At the end, I discussed the next pieces that will be going into the app.

This article first appeared on mattlayman.com.

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay