Skip to content

Commit

Permalink
feat: print styles, closes #54
Browse files Browse the repository at this point in the history
  • Loading branch information
Arcath committed Dec 17, 2024
1 parent 6b76d41 commit 5716420
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/lib/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ export const Header = ({
<LinkButton
key={i}
to={link}
className={className}
className={`${className} print:hidden`}
onClick={action}
>
{label}
</LinkButton>
)
})}
<Button
className="bg-success"
className="bg-success print:hidden"
onClick={() => {
copyToClipboard(window.location.href)
notify({
Expand Down
2 changes: 2 additions & 0 deletions app/lib/components/sortable-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const SortableTable = ({
<th>
{asset.singular}
<button
className="print:hidden"
onClick={() => {
sort(
sortedBy === asset.nameFieldId && sortOrder === 'ASC'
Expand All @@ -56,6 +57,7 @@ export const SortableTable = ({
<th key={id}>
{field.name}{' '}
<button
className="print:hidden"
onClick={() => {
sort(
sortedBy === field.id && sortOrder === 'ASC'
Expand Down
4 changes: 2 additions & 2 deletions app/routes/app.$assetslug.$entry._index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const AssetEntry = () => {

return (
<div className="grid grid-cols-4 gap-4">
<div className="col-span-3">
<div className="col-span-3 print:col-span-4">
<div className="border border-gray-300 shadow-xl bg-white p-2">
<h2 className="border-b border-b-gray-200 text-xl font-light mb-4">
{name}
Expand All @@ -128,7 +128,7 @@ const AssetEntry = () => {
})}
</div>
</div>
<div>
<div className="print:hidden">
<h3 className="border-b border-b-gray-200 text-xl font-light mb-4">
Additional Details
</h3>
Expand Down
4 changes: 2 additions & 2 deletions app/routes/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ const Dashboard = () => {
''
)}
<nav
className="shadow-xl pt-8 text-[#444]"
className="shadow-xl pt-8 text-[#444] print:hidden"
style={{
backgroundColor: settings['site-color'],
color: contrastColor(settings['site-color'].replace('#', ''))
Expand Down Expand Up @@ -236,7 +236,7 @@ const Dashboard = () => {
<Link to="/app/logout">👋 Logout</Link>
</div>
</nav>
<div className="pt-8 pr-8">
<div className="pt-8 pr-8 print:col-span-2">
<Outlet />
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/styles/root.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ body {
}

.entry-table {
@apply border border-gray-300 bg-white shadow-xl;
@apply border border-gray-300 bg-white shadow-xl print:shadow-none;
}

.entry-table th,
Expand Down

0 comments on commit 5716420

Please sign in to comment.