forked from DebaucheryLibrarian/traxxx
Improved scene tile layout.
This commit is contained in:
parent
e3558fc0c5
commit
665b77fb4e
|
@ -17,5 +17,6 @@
|
|||
"max-len": [2, {"code": 200, "tabWidth": 4, "ignoreUrls": true}],
|
||||
"react/jsx-uses-vars": 2,
|
||||
"react/jsx-indent": ["error", 4],
|
||||
"react/jsx-indent-props": ["error", 4],
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,38 +12,16 @@ class Home extends React.Component {
|
|||
<ul className="scenes">
|
||||
{this.props.releases.map(release => (
|
||||
<li key={release.id} className="scene">
|
||||
<a
|
||||
href={`/item/${release.id}`}
|
||||
target="_blank"
|
||||
<span
|
||||
className="scene-banner"
|
||||
>
|
||||
<img
|
||||
src={`/${release.site.id}/${release.id}/0.jpg`}
|
||||
className="scene-thumbnail"
|
||||
/>
|
||||
</a>
|
||||
|
||||
<div className="scene-info">
|
||||
<a
|
||||
href={`/item/${release.id}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="scene-row scene-link"
|
||||
><h2 className="scene-title">{release.title}</h2></a>
|
||||
|
||||
<span className="scene-row">
|
||||
<span className="scene-details">
|
||||
<a
|
||||
href={`/site/${release.site.id}`}
|
||||
className="scene-site site-link"
|
||||
title={release.network.name}
|
||||
>{release.site.name}</a>
|
||||
|
||||
<span>
|
||||
<a
|
||||
className="scene-network"
|
||||
href={`/network/${release.network.id}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>{release.network.name}</a>
|
||||
|
||||
<a
|
||||
href={release.url}
|
||||
target="_blank"
|
||||
|
@ -51,8 +29,21 @@ class Home extends React.Component {
|
|||
className="scene-date"
|
||||
>{moment(release.date).format('YYYY-MM-DD')}</a>
|
||||
</span>
|
||||
|
||||
<img
|
||||
src={`/${release.site.id}/${release.id}/0.jpg`}
|
||||
className="scene-thumbnail"
|
||||
/>
|
||||
</span>
|
||||
|
||||
<div className="scene-info">
|
||||
<a
|
||||
href={`/item/${release.id}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="scene-row scene-link"
|
||||
><h2 className="scene-title">{release.title}</h2></a>
|
||||
|
||||
<span className="scene-row">
|
||||
<ul className="scene-actors nolist">{release.actors.map(actor =>
|
||||
<li
|
||||
|
@ -67,7 +58,10 @@ class Home extends React.Component {
|
|||
)}</ul>
|
||||
</span>
|
||||
|
||||
<span className="scene-row">
|
||||
<span
|
||||
title={release.tags.map(tag => tag.tag).join(', ')}
|
||||
className="scene-row"
|
||||
>
|
||||
<ul className="scene-tags nolist">{release.tags.map(tag =>
|
||||
<li
|
||||
key={tag.tag}
|
||||
|
|
|
@ -14,7 +14,7 @@ body {
|
|||
|
||||
.scenes {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
|
||||
grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
|
@ -24,11 +24,23 @@ body {
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
padding: 0 0 .5rem 0;;
|
||||
margin: .5rem;
|
||||
height: 22rem;
|
||||
box-shadow: 0 0 3px rgba(0, 0, 0, .5);
|
||||
}
|
||||
|
||||
.scene-banner {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.scene-details {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.scene-thumbnail {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
|
@ -40,7 +52,9 @@ body {
|
|||
.scene-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: .25rem .5rem;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
padding: .1rem .5rem;
|
||||
}
|
||||
|
||||
.scene-info {
|
||||
|
@ -55,16 +69,19 @@ body {
|
|||
color: #000;
|
||||
margin: 0;
|
||||
font-size: 1rem;
|
||||
word-wrap: break-word;
|
||||
overflow: hidden;
|
||||
max-height: 3rem;
|
||||
line-height: 1.5rem;
|
||||
}
|
||||
|
||||
.scene-site {
|
||||
font-weight: bold;
|
||||
font-size: .8rem;
|
||||
}
|
||||
|
||||
.scene-site,
|
||||
.scene-date {
|
||||
color: #555;
|
||||
color: #fff;
|
||||
background: rgba(0, 0, 0, .5);
|
||||
font-size: .8rem;
|
||||
padding: .25rem;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.scene-network {
|
||||
|
@ -74,8 +91,10 @@ body {
|
|||
}
|
||||
|
||||
.scene-tags {
|
||||
white-space: nowrap;
|
||||
word-wrap: break-word;
|
||||
overflow: hidden;
|
||||
max-height: 2.5rem;
|
||||
line-height: 1.25rem;
|
||||
}
|
||||
|
||||
.scene-actor,
|
||||
|
@ -83,6 +102,10 @@ body {
|
|||
margin: 0 .25rem 0 0;
|
||||
}
|
||||
|
||||
.scene-actor {
|
||||
font-size: .9rem;
|
||||
}
|
||||
|
||||
.scene-tag {
|
||||
font-size: .75rem;
|
||||
}
|
||||
|
@ -92,10 +115,6 @@ body {
|
|||
content: ",";
|
||||
}
|
||||
|
||||
.site-link {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.actor-link,
|
||||
.tag-link {
|
||||
color: #000;
|
||||
|
|
Loading…
Reference in New Issue