mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
added responsive file box
This commit is contained in:
+31
-26
@@ -324,7 +324,6 @@ const Board = ({ setBodyStyle }) => {
|
||||
[
|
||||
<Link to={`/${selectedAddress}/catalog`}>Catalog</Link>
|
||||
]
|
||||
<hr />
|
||||
</TopBar>
|
||||
<BoardForm selectedStyle={selectedStyle}>
|
||||
<div className="board">
|
||||
@@ -343,42 +342,49 @@ const Board = ({ setBodyStyle }) => {
|
||||
<div key={`t-${thread.cid}`} className="thread">
|
||||
<div key={`c-${thread.cid}`} className="post-container op-container">
|
||||
<div key={`po-${thread.cid}`} className="post op">
|
||||
<hr key={`hr-${thread.cid}`} />
|
||||
<div key={`pi-${thread.cid}`} className="post-info">
|
||||
|
||||
<div key={`f-${thread.cid}`} className="file">
|
||||
<div key={`ft-${thread.cid}`} className="file-text">
|
||||
File:
|
||||
<a key={`fa-${thread.cid}`} href={`${thread.link}`} target="_blank">filename.something</a> (metadata)
|
||||
</div>
|
||||
<a key={`fta-${thread.cid}`} href={handleVoidClick} target="_blank" class="file-thumb">
|
||||
<img key={`fti-${thread.cid}`} src="/assets/plebchan-psycho.png" alt="filename.something" />
|
||||
</a>
|
||||
</div>
|
||||
<span key={`nb-${thread.cid}`} className="name-block">
|
||||
<span key={`q-${thread.cid}`} className="title">
|
||||
{thread.title ? `${thread.title}` : null}
|
||||
</span>
|
||||
<span key={`n-${thread.cid}`} className="name">{thread.author.displayName || "Anonymous"}</span>
|
||||
|
||||
<span key={`pa-${thread.cid}`} className="poster-address">
|
||||
(User: {thread.author.address})
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<span key={`dt-${thread.cid}`} className="date-time" data-utc="data">2 weeks ago</span>
|
||||
|
||||
<span key={`pn-${thread.cid}`} className="post-number">
|
||||
<a key={`pl1-${thread.cid}`} href={handleVoidClick} title="Link to this post">No.</a>
|
||||
<a key={`pl2-${thread.cid}`} href={handleVoidClick} title="Reply to this post">00000001</a>
|
||||
|
||||
<span key={`rl1-${thread.cid}`}>
|
||||
[
|
||||
<Link key={`rl2-${thread.cid}`} to={`/${selectedAddress}/thread/${thread.cid}`} onClick={() => handleClickThread(thread.cid)} className="reply-link" >Reply</Link>
|
||||
]
|
||||
|
||||
<span key={`dt-${thread.cid}`} className="date-time" data-utc="data">2 weeks ago</span>
|
||||
|
||||
<span key={`pn-${thread.cid}`} className="post-number">
|
||||
<a key={`pl1-${thread.cid}`} href={handleVoidClick} title="Link to this post">No.</a>
|
||||
<a key={`pl2-${thread.cid}`} href={handleVoidClick} title="Reply to this post">00000001</a>
|
||||
|
||||
<span key={`rl1-${thread.cid}`}>
|
||||
[
|
||||
<Link key={`rl2-${thread.cid}`} to={`/${selectedAddress}/thread/${thread.cid}`} onClick={() => handleClickThread(thread.cid)} className="reply-link" >Reply</Link>
|
||||
]
|
||||
</span>
|
||||
</span>
|
||||
<a key={`pmb-${thread.cid}`} className="post-menu-button" href={handleVoidClick} title="Post menu" data-cmd="post-menu">▶</a>
|
||||
<div key={`bi-${thread.cid}`} id="backlink-id" className="backlink">
|
||||
<span key={`ql1-${thread.cid}`}>
|
||||
<a key={`ql2-${thread.cid}`} className="quote-link" href={handleVoidClick}>{'>>'}00000002</a>
|
||||
</span>
|
||||
</div>
|
||||
</span>
|
||||
<a key={`pmb-${thread.cid}`} className="post-menu-button" href={handleVoidClick} title="Post menu" data-cmd="post-menu">▶</a>
|
||||
<div key={`bi-${thread.cid}`} id="backlink-id" className="backlink">
|
||||
<span key={`ql1-${thread.cid}`}>
|
||||
<a key={`ql2-${thread.cid}`} className="quote-link" href={handleVoidClick}>{'>>'}00000002</a>
|
||||
</span>
|
||||
</div>
|
||||
<blockquote key={`bq-${thread.cid}`}>
|
||||
<span key={`q-${thread.cid}`} className="title">
|
||||
{thread.title ? `${thread.title}` : null}
|
||||
</span>
|
||||
<br key={`br1-${thread.cid}`} />
|
||||
{thread.content ? (
|
||||
<>
|
||||
<br key={`br2-${thread.cid}`} />
|
||||
{thread.content}
|
||||
</>
|
||||
) : null}
|
||||
@@ -421,7 +427,6 @@ const Board = ({ setBodyStyle }) => {
|
||||
</div>
|
||||
)})}
|
||||
</div>
|
||||
<hr key={`hr-${thread.cid}`} />
|
||||
</>
|
||||
)})}
|
||||
</InfiniteScroll>
|
||||
|
||||
@@ -260,7 +260,15 @@ const Thread = ({ setBodyStyle }) => {
|
||||
<div className="post-container op-container">
|
||||
<div className="post op">
|
||||
<div className="post-info">
|
||||
|
||||
<div key={`f-${comment.cid}`} className="file">
|
||||
<div key={`ft-${comment.cid}`} className="file-text">
|
||||
File:
|
||||
<a key={`fa-${comment.cid}`} href={`${comment.link}`} target="_blank">filename.something</a> (metadata)
|
||||
</div>
|
||||
<a key={`fta-${comment.cid}`} href={handleVoidClick} target="_blank" class="file-thumb">
|
||||
<img key={`fti-${comment.cid}`} src="/assets/plebchan-psycho.png" alt="filename.something" />
|
||||
</a>
|
||||
</div>
|
||||
<span className="name-block">
|
||||
<span key={`q-${comment.cid}`} className="title">{comment.title}</span>
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ export const NavBar = styled.div`
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: red;
|
||||
color: #d00;
|
||||
}
|
||||
|
||||
.nav {
|
||||
@@ -929,7 +929,7 @@ export const PostForm = styled.div`
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover {
|
||||
color: red;
|
||||
color: #d00;
|
||||
}`;
|
||||
|
||||
case 'Futaba':
|
||||
@@ -1042,7 +1042,7 @@ export const TopBar = styled.div`
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: red;
|
||||
color: #d00;
|
||||
}`;
|
||||
|
||||
case 'Futaba':
|
||||
@@ -1142,6 +1142,50 @@ export const TopBar = styled.div`
|
||||
`;
|
||||
|
||||
export const BoardForm = styled.div`
|
||||
.file {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.file-text {
|
||||
max-width: 600px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.fileText a {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.file-thumb {
|
||||
float: left;
|
||||
margin: 3px 20px 5px 20px;
|
||||
}
|
||||
|
||||
.file-thumb img {
|
||||
border: none;
|
||||
float: left;
|
||||
max-width: 200px;
|
||||
max-height: 200px;
|
||||
}
|
||||
|
||||
@media (min-width: 600px) {
|
||||
.post-info {
|
||||
margin: 3px;
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.name-block {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.post-info {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
|
||||
${({ selectedStyle }) => {
|
||||
switch (selectedStyle) {
|
||||
case 'Yotsuba':
|
||||
@@ -1170,14 +1214,13 @@ export const BoardForm = styled.div`
|
||||
border: none;
|
||||
}
|
||||
|
||||
.post-info {
|
||||
margin: 3px;
|
||||
display: block;
|
||||
width: 100%;
|
||||
.file a {
|
||||
text-decoration: underline;
|
||||
color: #00e;
|
||||
}
|
||||
|
||||
.name-block {
|
||||
display: inline-block;
|
||||
.file a:hover {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.name {
|
||||
@@ -1316,14 +1359,13 @@ export const BoardForm = styled.div`
|
||||
border: none;
|
||||
}
|
||||
|
||||
.post-info {
|
||||
margin: 3px;
|
||||
display: block;
|
||||
width: 100%;
|
||||
.file a {
|
||||
text-decoration: underline;
|
||||
color: #34345c;
|
||||
}
|
||||
|
||||
.name-block {
|
||||
display: inline-block;
|
||||
.file a:hover {
|
||||
color: #d00;
|
||||
}
|
||||
|
||||
.name {
|
||||
@@ -1337,7 +1379,7 @@ export const BoardForm = styled.div`
|
||||
}
|
||||
|
||||
.post-number a:hover {
|
||||
color: red;
|
||||
color: #d00;
|
||||
}
|
||||
|
||||
.reply-link:not(:hover) {
|
||||
@@ -1359,7 +1401,7 @@ export const BoardForm = styled.div`
|
||||
}
|
||||
|
||||
.post-menu-button:hover {
|
||||
color: red;
|
||||
color: #d00;
|
||||
}
|
||||
|
||||
.backlink {
|
||||
@@ -1370,14 +1412,10 @@ export const BoardForm = styled.div`
|
||||
}
|
||||
|
||||
.quote-link {
|
||||
color: #34345C;
|
||||
color: #d00;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.quote-link:hover {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.backlink span {
|
||||
padding: 0;
|
||||
}
|
||||
@@ -1436,7 +1474,7 @@ export const BoardForm = styled.div`
|
||||
return `
|
||||
font-size: 12pt;
|
||||
|
||||
.thread {
|
||||
.thread {
|
||||
margin: 0;
|
||||
clear: both;
|
||||
}
|
||||
@@ -1461,15 +1499,14 @@ export const BoardForm = styled.div`
|
||||
border: none;
|
||||
}
|
||||
|
||||
.post-info {
|
||||
margin: 3px;
|
||||
display: block;
|
||||
width: 100%;
|
||||
.file a {
|
||||
color: #00e;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.name-block {
|
||||
display: inline-block;
|
||||
}
|
||||
.file a:hover {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.name {
|
||||
color: #117743;
|
||||
@@ -1586,9 +1623,9 @@ export const BoardForm = styled.div`
|
||||
return `
|
||||
font-size: 12pt;
|
||||
|
||||
.thread {
|
||||
margin: 0;
|
||||
clear: both;
|
||||
.thread {
|
||||
margin: 0;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.op-container {
|
||||
@@ -1611,15 +1648,14 @@ export const BoardForm = styled.div`
|
||||
border: none;
|
||||
}
|
||||
|
||||
.post-info {
|
||||
margin: 3px;
|
||||
display: block;
|
||||
width: 100%;
|
||||
.file a {
|
||||
color: #34345c;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.name-block {
|
||||
display: inline-block;
|
||||
}
|
||||
.file a:hover {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.name {
|
||||
color: #117743;
|
||||
@@ -1752,15 +1788,14 @@ export const BoardForm = styled.div`
|
||||
border: none;
|
||||
}
|
||||
|
||||
.post-info {
|
||||
margin: 3px;
|
||||
display: block;
|
||||
width: 100%;
|
||||
.file a {
|
||||
color: #81a2be;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.name-block {
|
||||
display: inline-block;
|
||||
}
|
||||
.file a:hover {
|
||||
color: #5f89ab;
|
||||
}
|
||||
|
||||
.name {
|
||||
color: #c5c8c6;
|
||||
@@ -1902,14 +1937,13 @@ export const BoardForm = styled.div`
|
||||
border: none;
|
||||
}
|
||||
|
||||
.post-info {
|
||||
margin: 3px;
|
||||
display: block;
|
||||
width: 100%;
|
||||
.file a {
|
||||
text-decoration: underline;
|
||||
color: #f60;
|
||||
}
|
||||
|
||||
.name-block {
|
||||
display: inline-block;
|
||||
.file a:hover {
|
||||
color: #ff3300;
|
||||
}
|
||||
|
||||
.name {
|
||||
|
||||
Reference in New Issue
Block a user