Skip to content

Commit

Permalink
abc
Browse files Browse the repository at this point in the history
  • Loading branch information
KanujanKing committed May 21, 2024
1 parent 83bcb9a commit cc8c811
Show file tree
Hide file tree
Showing 10 changed files with 82 additions and 51 deletions.
21 changes: 11 additions & 10 deletions .firebase/hosting.YnVpbGQ.cache
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@ manifest.json,1711711460662,4d47db56847e9af0b8bfc8b723444ef255dd2d9787d2478f03bf
robots.txt,1709280357884,bfe106a3fb878dc83461c86818bf74fc1bdc7f28538ba613cd3e775516ce8b49
sci.jpg,1709789635884,4c5448e40428d3fd3033583c46dc4ce86c1176db926615c6b7ef4aa70cd6bf9f
share.jpg,1711111242983,3e968ba5afa44fca5323bbca4741bd9d282c71f664c0031bc1112c7043263e66
share.png,1716195064953,d93c49242cde8bb80dacdaa70c6b7cde906180fb4bf123e07c98c6fef908efaa
share2.jpg,1711111334899,ced9b6d5992c5087ebfb95cc224cb06c8b12ddb2e933ae04b94f0e462ab49d8c
user.png,1712897080910,907ec16851ca2c2a2464be05608fef09d27b8190cfce7c18d2c0346998215fa9
yinyang.png,1709294277295,04dc3ebfbd6163150e7d4ea40a2a753ad362558f9a62cd8c3353f12e4e161d02
index.html,1716176188018,68e6ccb292a495fcabdffbfb246cb5fa68114e33800012955158c8d6a9fe9aa8
asset-manifest.json,1716176188018,db4cd6196bc5074cfbb1ca97c2a2829dd10793966b0cb5720663e7f3f234d57a
static/css/main.7f226360.css,1716176188049,95aeb848b6e406673e89351f1795b41dea3104ff4243b323f34a29ea6cadaa61
static/js/453.14226cd2.chunk.js,1716176188049,4658586edf85ae11aa8b2cbb2f4e4a49191a0c6e0a3cf1ccda87672113926307
static/js/main.712c186f.js.LICENSE.txt,1716176188049,102c3d9d4d5e4f275c5cc1fc72853d51c27b686a6ce055adeba9e782da3539d7
static/js/453.14226cd2.chunk.js.map,1716176188049,275bede4dbd95fcc969a764da9c1dae3935a80f64191025a5e643c8faebb2376
static/css/main.7f226360.css.map,1716176188049,8fb1618bd79b3591c0a5fbb1d63f20aca2ada6a408403fc60da050434486b33e
static/js/main.712c186f.js,1716176188049,aa201496a4f3df4b7298fdbb9b7ea4123348bb21653bdfdf832aace6eaa6e6e3
static/media/background.4f592c1b69c0e5709c40.mp4,1716176188049,fe37b2e1b9b450c325a953e790ca93d997de4bb39b763d375ae8c9951ab096dc
static/js/main.712c186f.js.map,1716176188049,7120947cfaf684c3b583d4a928cbf4784d2dda8fd61f180ab23948e30ee9c6bd
asset-manifest.json,1716207513843,2105f6ee4d71e4964144af88675abf361d7efe22c239a1f6de6930d7cd7347b3
index.html,1716207513843,1e85fcbf5963787a54e9afeb4d5879dd03a17d524439f0e3ef8e1634c20da110
static/css/main.a70fdfa4.css,1716207513859,3d4a658ff094a2986765da2cebc10b16bdc3b791f64936978be6025b0b0a3289
static/js/453.14226cd2.chunk.js,1716207513859,4658586edf85ae11aa8b2cbb2f4e4a49191a0c6e0a3cf1ccda87672113926307
static/js/main.6e0bdb68.js.LICENSE.txt,1716207513859,102c3d9d4d5e4f275c5cc1fc72853d51c27b686a6ce055adeba9e782da3539d7
static/js/453.14226cd2.chunk.js.map,1716207513859,275bede4dbd95fcc969a764da9c1dae3935a80f64191025a5e643c8faebb2376
static/css/main.a70fdfa4.css.map,1716207513859,a73874d2dba323544a9c5541953ccff70e9012ab1d4d29df4c8bc1008e14e505
static/js/main.6e0bdb68.js,1716207513859,654697b47473282fc5bd663094d9c027b108903680875ad5777cb8bd654584f9
static/media/background.4f592c1b69c0e5709c40.mp4,1716207513859,fe37b2e1b9b450c325a953e790ca93d997de4bb39b763d375ae8c9951ab096dc
static/js/main.6e0bdb68.js.map,1716207513859,fbab1ea68cb7d4c46752103f89243b2ce3add3566d34afc9d3e09b99711722c8
Binary file added public/share.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/Pages/New Post/newpost.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.body {
background-color: #121212;
background-color: #1c1c1c;
color: white;
display: flex;
justify-content: center;
Expand Down
3 changes: 2 additions & 1 deletion src/Pages/Post/post.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
}
.sticky{
position: sticky;
position: -webkit-sticky;
bottom: 5px;
background-color: #334477;
margin-left: 1vh;
Expand All @@ -36,7 +37,7 @@
cursor: pointer;
border-radius: 15px;
transition: background-color 0.3s;
font-size: calc(5px + 3vmin);
font-size: 3.3vh;
}

.tab:hover {
Expand Down
1 change: 1 addition & 0 deletions src/Pages/Post/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ function Post() {
document.title = 'The Conspiracy World';
};
}, [post.Title]);

return (
<>
<div className="postbox">
Expand Down
3 changes: 1 addition & 2 deletions src/Pages/Post/postClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,13 @@ function PostClient() {

}}></div>
<div className={`tab ${activeTab === "tab2" ? "active" : ""}`} onClick={() => handleTabClick("tab2")}>💬Comment</div>
<div className={`tab ${activeTab === "tab3" ? "active" : ""}`} onClick={() => handleTabClick('tab3')}><ShareIcon /> Share</div>
<div className={`tab ${activeTab === "tab3" ? "active" : ""}`} onClick={() => handleTabClick('tab3')}><img src="share.png" width={20} style={{display:"inline"}}></img> Share</div>
</div>
<div className="tabContent">
{activeTab === "tab1" && <div className="tabc"></div>}
{activeTab === "tab2" && <div className="tabc" id="ref" ><ChatComponent data={postid} userid={userid} /></div>}
{activeTab === "tab3" && <div className="tabc" >
<div id="popup" className="popup">
Copy URL
<button type="button" onClick={copyfun}>📄 Copy Link</button>
</div>
</div>}
Expand Down
4 changes: 2 additions & 2 deletions src/Pages/Profile/Profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function Profile() {
(box.data()['ConspiracyVotes']>box.data()['HypothesisVotes'])&&(box.data()['ConspiracyVotes']>box.data()['MythVotes'])?
"blue":
(box.data()['MythVotes']>box.data()['HypothesisVotes'])&&(box.data()['MythVotes']>box.data()['ConspiracyVotes'])?
"red":"black",
"red":"grey",
width:"max-content",
padding:"1%",
borderRadius:"15px",
Expand All @@ -118,7 +118,7 @@ function Profile() {
"Conspiracy":
(box.data()['MythVotes']>box.data()['HypothesisVotes'])&&(box.data()['MythVotes']>box.data()['ConspiracyVotes'])?

"Myth":""
"Myth":"Pending"
} </h2>

<h2 className="post-title">{box.data()['Title']}</h2>
Expand Down
23 changes: 12 additions & 11 deletions src/Pages/Search/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function Search(){
const queryParams = new URLSearchParams(location.search);
const userId = queryParams.get('userid');
const usertype = queryParams.get('usertype');
var searchterm = (queryParams.get('term') === null)?"":queryParams.get('term');
var searchterm = (queryParams.get('term') === null)?"":queryParams.get('term').toLowerCase();
const [postData, setPostData] = useState([]);
const [names, getNames] = useState([])
useEffect(() => {
Expand All @@ -45,15 +45,19 @@ function Search(){
const posts = [];
querySnapshot.forEach((doc) => {
var title = doc.data()['Title'];
title = title.toLowerCase();

if(title.includes(searchterm)){
posts.push(doc);
}
var content = doc.data()['Content'];
content = content.toLowerCase();
if(content.includes(searchterm)){
posts.push(doc);
}
});
setPostData(posts);
let postsuniq = [...new Set(posts)];
setPostData(postsuniq);

} catch (error) {
console.error('Error fetching posts:', error);
Expand Down Expand Up @@ -95,16 +99,13 @@ function Search(){
postData.map((box, id) => (
<div key={box} className="box">
<div className="post-box" onClick={postClick.bind(null, box.id)} >
<img style={{
display:"inline",
marginRight:"1px"
}} src="user.png" alt="Profile" width={35}/>
<h2 style={{
color:"white",
<img style={{display:"inline", marginBottom:"7px"}} src='https://static.vecteezy.com/system/resources/previews/011/947/163/non_2x/gold-user-icon-free-png.png' width={20}></img>
<h2 className="usernames"style={{
color:"#FFD700",
textAlign:"left",
fontSize:"115%",
display:"inline"
}}>{names[id]}</h2>
display:"inline",
}}> {names[id]}</h2>


<h2 className="post-title">{box.data()['Title']}</h2>
Expand All @@ -116,7 +117,7 @@ function Search(){
(box.data()['ConspiracyVotes']>box.data()['HypothesisVotes'])&&(box.data()['ConspiracyVotes']>box.data()['MythVotes'])?
"blue":
(box.data()['MythVotes']>box.data()['HypothesisVotes'])&&(box.data()['MythVotes']>box.data()['ConspiracyVotes'])?
"red":"black",
"red":"grey",
width:"max-content",
padding:"1%",
borderRadius:"15px",
Expand Down
63 changes: 47 additions & 16 deletions src/newHome.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,30 @@
height: fit-content;
}
body{
background-color: #111;
background-color: #1C1C1C;
color: white;
}

h2{
color:#FFFFFF;
}
p{
color:#D3D3D3;
}
#likebutton{
font-size: 3.3vh;
}
#comment{
font-size: 3.3vh;
}
#share{
font-size: 3.3vh;
}
.post-box {
border: 1px solid #555;
border-radius: 12px;
padding: 20px;
margin: 10vh;
width: 50vw;
width: 55vw;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
background-color: rgba(255, 255, 255, 0.05);
text-overflow:clip;
Expand All @@ -29,9 +43,23 @@ body{
background-color: rgba(255, 255, 255, 0.1);
}

@media(max-width:900px) {

.post-title {
font-size: 1.5rem;
margin-bottom: 8px;
}

.post-content {
font-size: 1.1rem;
text-overflow: clip;
max-height: 30vh;
height: max-content;
overflow: hidden;
}

@media(max-width:1100px) {
.post-box{
width: 100vw;
width: 80vw;
font-size: 2.5vh;
}
#likebutton{
Expand All @@ -44,15 +72,18 @@ body{
font-size: 3vh;
}
}
.post-title {
font-size: 1.5rem;
margin-bottom: 8px;
}

.post-content {
font-size: 1.1rem;
text-overflow: clip;
max-height: 30vh;
height: max-content;
overflow: hidden;
@media(max-width:800px) {
.post-box{
width: 97vw;
font-size: 2.5vh;
}
#likebutton{
font-size: 3vh;
}
#comment{
font-size: 3vh;
}
#share{
font-size: 3vh;
}
}
13 changes: 5 additions & 8 deletions src/newHome.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,13 @@ function NewHome(){
{posts.map((box, id) => (
<div key={box} className="box">
<div className="post-box" onClick={postClick.bind(null, box.id)} >
<img style={{
display:"inline",
marginRight:"1px"
}} src="/user.png" alt="Profile" width={35}/>
<img style={{display:"inline", marginBottom:"7px"}} src='https://static.vecteezy.com/system/resources/previews/011/947/163/non_2x/gold-user-icon-free-png.png' width={20}></img>
<h2 className="usernames"style={{
color:"white",
color:"#FFD700",
textAlign:"left",
fontSize:"115%",
display:"inline"
}}>{names[id]}</h2>
display:"inline",
}}> {names[id]}</h2>


<h2 className="post-title">{box.data()['Title']}</h2>
Expand All @@ -148,7 +145,7 @@ function NewHome(){
<div className={`tab ${activeTab === "tab1" ? "active" : ""}`} id="likebutton">
🤍Like</div>
<div className={`tab ${activeTab === "tab2" ? "active" : ""}`} id="comment">💬Comment</div>
<div className={`tab ${activeTab === "tab3" ? "active" : ""}`} id="share">&#x1F4E5;Share</div>
<div className={`tab ${activeTab === "tab3" ? "active" : ""}`} id="share"><img src="share.png" width={20} style={{display:"inline"}}></img> Share</div>
<div style={{
backgroundColor:
(box.data()['HypothesisVotes']>box.data()['ConspiracyVotes'])&&(box.data()['HypothesisVotes']>box.data()['MythVotes'])?
Expand Down

0 comments on commit cc8c811

Please sign in to comment.