0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-15 21:22:43 +00:00

add decent table styles

This commit is contained in:
Víctor Losada Hernández
2025-02-12 12:54:34 +01:00
parent 489f00b785
commit 9944398e4c
3 changed files with 47 additions and 23 deletions

View File

@@ -67,7 +67,6 @@ body {
dd { height : fit-content; } dd { height : fit-content; }
} }
.tabs button { .tabs button {
margin-right : 3px; margin-right : 3px;
margin-left : 3px; margin-left : 3px;
@@ -95,6 +94,50 @@ body {
} }
} }
table {
padding : 10px;
tr:nth-child(even) { background : #DDDDDD; }
thead {
background : rgb(193,236,230);
border-bottom : 2px solid;
}
th, td {
padding : 5px 10px;
vertical-align : middle;
text-align : center;
border-right : 1px solid;
&:last-child { border-right : none; }
}
th {
font-weight:900;
&:nth-child(2) { background : #FFB3BA; }
&:nth-child(3) { background : #FFDFBA; }
&:nth-child(4) { background : #FFFFBA; }
&:nth-child(5) { background : #BAFFC9; }
&:nth-child(6) { background : #BAE1FF; }
}
td {
&:first-child {
font-weight : 900;
text-align : left;
border-right : 2px solid;
}
&:nth-child(2) { background : #FFB3BA80; }
&:nth-child(3) { background : #FFDFBA80; }
&:nth-child(4) { background : #FFFFBA80; }
&:nth-child(5) { background : #BAFFC980; }
&:nth-child(6) { background : #BAE1FF80; }
}
}
.error { .error {
float : right; float : right;
padding : 10px; padding : 10px;

View File

@@ -26,7 +26,7 @@ const authorLookup = ()=>{
</>; </>;
return <> return <>
<h2>{`Results - ${results.length}`}</h2> <h2>{`Results - ${results.length} brews` }</h2>
<table className='resultsTable'> <table className='resultsTable'>
<thead> <thead>
<tr> <tr>
@@ -45,8 +45,8 @@ const authorLookup = ()=>{
}) })
.map((brew, idx)=>{ .map((brew, idx)=>{
return <tr key={idx}> return <tr key={idx}>
<td>{brew.title}</td> <td><strong>{brew.title}</strong></td>
<td>{brew.shareId}</td> <td><a href={`/share/${brew.shareId}`}>{brew.shareId}</a></td>
<td>{brew.editId}</td> <td>{brew.editId}</td>
<td>{brew.updatedAt}</td> <td>{brew.updatedAt}</td>
<td>{brew.googleId ? 'Google' : 'Homebrewery'}</td> <td>{brew.googleId ? 'Google' : 'Homebrewery'}</td>

View File

@@ -26,23 +26,4 @@
} }
} }
table.resultsTable {
* {
border: 1px solid black;
vertical-align: middle;
padding: 5px;
}
th {
font-weight: bold;
}
th, td {
text-align: center;
&:first-of-type {
text-align: left;
}
}
}
} }