fix all URLs to be relative, not root

This commit is contained in:
Tom
2023-04-29 12:47:30 +02:00
parent d9322a31b4
commit 70fd17d91f
16 changed files with 83 additions and 83 deletions
+2 -2
View File
@@ -464,7 +464,7 @@ const Board = () => {
itemContent={(index, thread) => {
const { displayedReplies, omittedCount } = filteredRepliesByThread[thread.cid] || {};
const commentMediaInfo = getCommentMediaInfo(thread);
const fallbackImgUrl = "/assets/filedeleted-res.gif";
const fallbackImgUrl = "assets/filedeleted-res.gif";
return (
<Fragment key={`fr-${index}`}>
<div key={`t-${index}`} className="thread">
@@ -611,7 +611,7 @@ const Board = () => {
</span>
{displayedReplies?.map((reply, index) => {
const replyMediaInfo = getCommentMediaInfo(reply);
const fallbackImgUrl = "/assets/filedeleted-res.gif";
const fallbackImgUrl = "assets/filedeleted-res.gif";
const shortParentCid = findShortParentCid(reply.parentCid, selectedFeed);
return (
<div key={`rc-${index}`} className="reply-container">
+1 -1
View File
@@ -379,7 +379,7 @@ const Catalog = () => {
>
{feed.map((thread, index) => {
const commentMediaInfo = getCommentMediaInfo(thread);
const fallbackImgUrl = "/assets/filedeleted-res.gif";
const fallbackImgUrl = "assets/filedeleted-res.gif";
return (
<Link style={{all: "unset", cursor: "pointer"}} key={`link-${index}`} to={`/p/${selectedAddress}/c/${thread.cid}`} onClick={() => setSelectedThread(thread.cid)}>
<div key={`thread-${index}`} className="thread">
+3 -3
View File
@@ -22,7 +22,7 @@ const Home = () => {
// prevent dark mode
useEffect(() => {
setBodyStyle({
background: "#ffe url(/assets/fade.png) top repeat-x",
background: "#ffe url(assets/fade.png) top repeat-x",
color: "maroon",
fontFamily: "Helvetica, Arial, sans-serif"
});
@@ -39,7 +39,7 @@ const Home = () => {
<Header>
<Logo>
<Link to="/">
<img alt="plebchan" src="/assets/logo/logo-transparent.png" />
<img alt="plebchan" src="assets/logo/logo-transparent.png" />
</Link>
</Logo>
</Header>
@@ -92,7 +92,7 @@ const Home = () => {
setSelectedTitle(subplebbit.title);
setSelectedAddress(subplebbit.address);
}} >
<img alt="board logo" src="/assets/plebchan.png" />
<img alt="board logo" src="assets/plebchan.png" />
</Link>
<div className="board-text">
<b>{subplebbit.address}</b>
+3 -3
View File
@@ -12,7 +12,7 @@ const NotFound = ({ setBodyStyle }) => {
useEffect(() => {
setBodyStyle({
background: "#ffe url(/assets/fade.png) top repeat-x",
background: "#ffe url(assets/fade.png) top repeat-x",
color: "maroon",
fontFamily: "Helvetica, Arial, sans-serif"
});
@@ -28,7 +28,7 @@ const NotFound = ({ setBodyStyle }) => {
<Header>
<Logo>
<Link to="/">
<img alt="plebchan" src="/assets/logo/logo-transparent.png" />
<img alt="plebchan" src="assets/logo/logo-transparent.png" />
</Link>
</Logo>
</Header>
@@ -37,7 +37,7 @@ const NotFound = ({ setBodyStyle }) => {
<BoardsTitle>
<h2 style={{textAlign: 'center'}}>404 Not Found</h2>
</BoardsTitle>
<img src="/assets/plebchan-husbando.jpg" alt="plebchan" style={{
<img src="assets/plebchan-husbando.jpg" alt="plebchan" style={{
display: "block",
margin: "auto",
padding: "15px",
+1 -1
View File
@@ -42,7 +42,7 @@ const Pending = () => {
const navigate = useNavigate();
const [commentMediaInfo, setCommentMediaInfo] = useState(null);
const fallbackImgUrl = "/assets/filedeleted-res.gif";
const fallbackImgUrl = "assets/filedeleted-res.gif";
// mobile navbar board select functionality
const handleSelectChange = (event) => {
+2 -2
View File
@@ -60,7 +60,7 @@ const Thread = () => {
const handleClickForm = useClickForm();
const commentMediaInfo = getCommentMediaInfo(comment);
const fallbackImgUrl = "/assets/filedeleted-res.gif";
const fallbackImgUrl = "assets/filedeleted-res.gif";
const [errorMessage, setErrorMessage] = useState(null);
useError(errorMessage, [errorMessage]);
@@ -561,7 +561,7 @@ const Thread = () => {
{comment.state === "fetching-ipns" ? <PostLoader /> : null}
{sortedReplies.map((reply, index) => {
const replyMediaInfo = getCommentMediaInfo(reply);
const fallbackImgUrl = "/assets/filedeleted-res.gif";
const fallbackImgUrl = "assets/filedeleted-res.gif";
const shortParentCid = findShortParentCid(reply.parentCid, comment);
return (
<div key={`pc-${index}`} className="reply-container">