From 2db2aa545d5da2d92bde33ee6b2485b60e5ddeec Mon Sep 17 00:00:00 2001 From: plebbitor Date: Wed, 29 Mar 2023 22:02:44 +0200 Subject: [PATCH] added media anchors on mobile --- src/components/views/Board.jsx | 143 +++++++++---------- src/components/views/styles/Board.styled.jsx | 126 ++++++++-------- 2 files changed, 133 insertions(+), 136 deletions(-) diff --git a/src/components/views/Board.jsx b/src/components/views/Board.jsx index e81cd9b7..55bcfdb1 100644 --- a/src/components/views/Board.jsx +++ b/src/components/views/Board.jsx @@ -399,7 +399,8 @@ const Board = () => {
Link:  - { + { commentMediaInfo?.url.length > 30 ? commentMediaInfo?.url.slice(0, 30) + "(...)" : commentMediaInfo?.url @@ -579,7 +580,8 @@ const Board = () => { style={{marginBottom: "5px"}}>
Link:  - { + { replyMediaInfo?.url.length > 30 ? replyMediaInfo?.url.slice(0, 30) + "(...)" : replyMediaInfo?.url @@ -698,40 +700,39 @@ const Board = () => {
- {commentMediaInfo?.url ? ( - commentMediaInfo.type === "webpage" ? ( -
- - thumbnail e.target.src = fallbackImgUrl} /> -
{commentMediaInfo.type}
-
-
- ) : commentMediaInfo.type === "image" ? ( -
- - {commentMediaInfo.type} e.target.src = fallbackImgUrl} /> -
{commentMediaInfo.type}
-
-
- ) : commentMediaInfo.type === "video" ? ( -
- - -
- ) : commentMediaInfo.type === "audio" ? ( -
- - -
- ) : null + {thread.link ? ( +
+ + {commentMediaInfo?.url ? ( + commentMediaInfo.type === "webpage" ? ( + + thumbnail e.target.src = fallbackImgUrl} /> +
{commentMediaInfo?.type}
+
+ ) : commentMediaInfo.type === "image" ? ( + + {commentMediaInfo.type} e.target.src = fallbackImgUrl} /> +
{commentMediaInfo?.type}
+
+ ) : commentMediaInfo.type === "video" ? ( + + + ) : commentMediaInfo.type === "audio" ? ( + + + ) : null + ) : null} +
+
) : null} {thread.content ? ( thread.content.length > 500 ? @@ -751,7 +752,7 @@ const Board = () => { : null}
- {thread.replyCount} Replies / ? Images + {thread.replyCount} Replies handleClickThread(thread.cid)} className="button-mobile" >View Thread
@@ -793,42 +794,38 @@ const Board = () => { - {replyMediaInfo?.url ? ( - replyMediaInfo.type === "webpage" ? ( -
- - thumbnail e.target.src = fallbackImgUrl} /> -
{replyMediaInfo.type}
-
-
- ) : replyMediaInfo.type === "image" ? ( -
- - {replyMediaInfo.type} e.target.src = fallbackImgUrl} /> -
{replyMediaInfo.type}
-
-
- ) : replyMediaInfo.type === "video" ? ( -
- - - -
{replyMediaInfo.type}
-
-
- ) : replyMediaInfo.type === "audio" ? ( -
- - -
- ) : null + {reply.link ? ( +
+ + {replyMediaInfo?.url ? ( + replyMediaInfo.type === "webpage" ? ( + + thumbnail e.target.src = fallbackImgUrl} /> +
{replyMediaInfo.type}
+
+ ) : replyMediaInfo.type === "image" ? ( + + {replyMediaInfo.type} e.target.src = fallbackImgUrl} /> +
{replyMediaInfo.type}
+
+ ) : replyMediaInfo.type === "video" ? ( + + + ) : replyMediaInfo.type === "audio" ? ( + + + ) : null + ) : null} +
+
) : null} {reply.content ? ( reply.content.length > 500 ? diff --git a/src/components/views/styles/Board.styled.jsx b/src/components/views/styles/Board.styled.jsx index 244211a0..82089211 100644 --- a/src/components/views/styles/Board.styled.jsx +++ b/src/components/views/styles/Board.styled.jsx @@ -340,7 +340,7 @@ export const Header = styled.div` .board-address { margin-top: 5px; - font-size: 11pt; + font-size: 10pt; }`; case 'Tomorrow': @@ -1585,6 +1585,7 @@ export const BoardForm = styled.div` .op-container { background-color: #f5e9e1; border: 1px solid #d9bfb7 !important; + } .post-info-mobile { border-bottom: 1px solid #d9bfb7; @@ -1645,7 +1646,6 @@ export const BoardForm = styled.div` background-repeat: repeat-x; text-decoration: none; } - } .reply-container { background-color: #f0e0d6; @@ -1702,6 +1702,7 @@ export const BoardForm = styled.div` .op-container { background-color: #d6daf0; border: 1px solid #b7c5d9 !important; + } .post-info-mobile { border-bottom: 1px solid #b7c5d9; @@ -1762,7 +1763,6 @@ export const BoardForm = styled.div` background-repeat: repeat-x; text-decoration: none; } - } .reply-container { background-color: #d6daf0; @@ -1815,6 +1815,7 @@ export const BoardForm = styled.div` .op-container { background-color: #f5e9e1; border: 1px solid #d9bfb7 !important; + } .post-info-mobile { border-bottom: 1px solid #d9bfb7; @@ -1875,7 +1876,6 @@ export const BoardForm = styled.div` background-repeat: repeat-x; text-decoration: none; } - } .reply-container { background-color: #f0e0d6; @@ -1931,6 +1931,7 @@ export const BoardForm = styled.div` .op-container { background-color: #d6daf0; border: 1px solid #b7c5d9 !important; + } .post-info-mobile { border-bottom: 1px solid #b7c5d9; @@ -1991,7 +1992,6 @@ export const BoardForm = styled.div` background-repeat: repeat-x; text-decoration: none; } - } .reply-container { background-color: #d6daf0; @@ -2043,6 +2043,7 @@ export const BoardForm = styled.div` .op-container { background-color: #282A2E; border: 1px solid #2D2F33 !important; + } .post-info-mobile { border-bottom: 1px solid #2D2F33; @@ -2108,7 +2109,6 @@ export const BoardForm = styled.div` background-repeat: repeat-x; text-decoration: none; } - } .reply-container { background-color: #f0e0d6; @@ -2165,67 +2165,67 @@ export const BoardForm = styled.div` .op-container { background-color: #eee; border: 1px solid #ccc !important; + } - .post-info-mobile { - border-bottom: 1px solid #ccc; - background-color: #ddd; - } - - .post-menu-button-mobile { - color: #f60 !important; - } - - .name-mobile { - color: #004a99; - font-weight: 700; - } - - .subject-mobile { - color: #111; - font-weight: 700; - } - - .date-time-mobile { - color: #333; + .post-info-mobile { + border-bottom: 1px solid #ccc; + background-color: #ddd; + } + + .post-menu-button-mobile { + color: #f60 !important; + } + + .name-mobile { + color: #004a99; + font-weight: 700; + } + + .subject-mobile { + color: #111; + font-weight: 700; + } + + .date-time-mobile { + color: #333; - a { - text-decoration: none; - color: #333; - } - } - - .file-thumb-mobile { - color: #f60 !important; - } - - .file-info-mobile { - color: #707070; - font-size: 9pt !important; - } - - blockquote { - font-size: 11pt; - } - - .post-link-mobile { - background-color: #ddd; - border-top: 1px solid #ccc; - } - - .info-mobile { + a { + text-decoration: none; color: #333; } - - .button-mobile { - background: linear-gradient(to bottom, rgba(238, 238, 238, 1) 0%, rgba(224, 224, 224, 1) 100%); - border: 1px solid #ccc; - color: #333; - border-radius: 3px 3px 3px 3px; - font-weight: 700; - padding: 6px 10px 5px; - background-repeat: repeat-x; - cursor: pointer; - } + } + + .file-thumb-mobile { + color: #f60 !important; + } + + .file-info-mobile { + color: #707070; + font-size: 9pt !important; + } + + blockquote { + font-size: 11pt; + } + + .post-link-mobile { + background-color: #ddd; + border-top: 1px solid #ccc; + } + + .info-mobile { + color: #333; + } + + .button-mobile { + background: linear-gradient(to bottom, rgba(238, 238, 238, 1) 0%, rgba(224, 224, 224, 1) 100%); + border: 1px solid #ccc; + color: #333; + border-radius: 3px 3px 3px 3px; + font-weight: 700; + padding: 6px 10px 5px; + background-repeat: repeat-x; + cursor: pointer; } .reply-container {