Skip to content

Sami Saeed #156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
243 changes: 243 additions & 0 deletions new_twitter.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,243 @@
*{
margin: 0;
}
.container{
display:grid;
height: 100vh;
grid-template:
'left-sidebar main right-sidebar'/300px 1fr 300px
}
.logo{
Comment on lines +9 to +10
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should add an empty line after every CSS block to give some breathing space, it makes it a little easier to read / maintain

img{
height:40px;
width:47px;
padding-left:5px
}
Comment on lines +11 to +15
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this img element inside of the logo element? You can't nest css selectors inside of others, except with things like media queries. You should use specificity to target specific child elements:

.logo img {

}

}
.left-sidebar{
grid-area:left-sidebar;
background-color: rgb(255, 255, 255);
padding-left: 10px;
padding-top: 10px;
padding-right:100px
}
.left-buttons{
display:grid;
height:80vh;
gap:10px;
grid-template-rows: 40px 40px 40px 40px 40px 40px 40px 40px;
border-radius:20px;
}
.home-btn{
text-align:left ;
border-radius: 13px;
padding-left: 15px;
border: none;
cursor: pointer;
background-color: white;
font-size: 15px;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
font-weight: 700;
img{
height: 25px;
}
Comment on lines +41 to +43
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, you can't nest this img element inside the home-btn element

}
.home-btn:hover{
background-color: rgb(77, 170, 224);
}
.explore-btn{
text-align:left ;
border-radius: 13px;
padding-left: 15px;
border: none;
cursor: pointer;
background-color: white;
font-size: 15px;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
font-weight: 700;
img{
height: 25px;
}
}
.explore-btn:hover{
background-color: rgb(77, 170, 224);
}
.notif-btn{
text-align:left ;
border-radius: 13px;
padding-left: 15px;
border: none;
cursor: pointer;
background-color: white;
font-size: 15px;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
font-weight: 700;
img{
height: 25px;
}
}
.notif-btn:hover{
background-color: rgb(77, 170, 224);
}
.messages-btn{
text-align:left ;
border-radius: 13px;
padding-left: 15px;
border: none;
cursor: pointer;
background-color: white;
font-size: 15px;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
font-weight: 700;
img{
height: 25px;
}
}
.messages-btn:hover{
background-color: rgb(77, 170, 224);
}
.bookmarks-btn{
text-align:left ;
border-radius: 13px;
padding-left: 15px;
border: none;
cursor: pointer;
background-color: white;
font-size: 15px;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
font-weight: 700;
img{
height: 25px;
}
}
.bookmarks-btn:hover{
background-color: rgb(77, 170, 224);
}
.profile-btn{
text-align:left ;
border-radius: 13px;
padding-left: 15px;
border: none;
cursor: pointer;
background-color: white;
font-size: 15px;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
font-weight: 700;
img{
height: 25px;
}
}
.profile-btn:hover{
background-color: rgb(77, 170, 224);
}
.more-btn{
text-align:left ;
border-radius: 13px;
padding-left: 15px;
border: none;
cursor: pointer;
background-color: white;
font-size: 15px;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
font-weight: 700;
img{
height: 25px;
}
}
.more-btn:hover{
background-color: rgb(77, 170, 224);
}
.tweet-button{
color: white;
background-color: rgb(77, 170, 224);
border: none;
cursor: pointer;
border-radius: 13px;
font-family:'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
font-weight: 400;
font-size:19px;
}
.main{
grid-area:main;
background-color: rgb(255, 255, 255);
padding: 20px;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}
.twitter-profile{
padding:10px;
img{
height:60px;
width: 60px;
padding-left: 11px;
}
}
.feed{
display: grid;
height: 80vh;
grid-template-rows: 100px 100px 100px;

}
.feed div{
background-color: rgb(255, 255, 255);
/* border:1px solid lightblue; */
}
.tweet-message{
display: grid;
grid-template:'twitter-profile twitter-message'/100px 1fr;
/* padding-bottom: 80px; */
font-family: sans-serif;
font-size: 17px;
color: rgb(0, 0, 0);
text-align:left;
}
.tweet-message div{
background-color: rgb(255, 252, 252);
}
.twitter-profile2{
img{
height: 65px;
width: 65px;
padding-left: 21px;
}
}
.tweet1{
display: grid;
grid-template:'twitter-profile2 twitter-text1'/100px 1fr;
/* padding-bottom:80px; */
font-family:sans-serif;
font-size: 17px;
color: rgb(0, 0, 0);
text-align: left;
}
.right-sidebar{
grid-area:right-sidebar;
background-color: rgb(255, 255, 255);
padding:20px;
padding-top: 20px;
}
.searchbar{
display:grid;
height: 5vh;
grid-template-rows: 40px 60px 60px;
gap:10px;
img{
height: 20px;
width:20px;
padding-top: 10px;
padding-left: 10px;
}
}
.searchbar div{
background-color: rgba(77, 170, 224, 0.515);
border-radius: 13px;
}
.text1{
font-size: 20px;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
padding: 10px;
}
.text2{
font-size: 20px;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
padding: 10px;
}
72 changes: 72 additions & 0 deletions new_twitter.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./new_twitter.css" />
</head>
<body>
<div class = 'container'>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't add white space around the property/value pairs. It works, but it goes against convention - I don't know any project that uses whitespace in this way. Also, be sure to use double quotes instead of single quotes

<div class="container">

<div class = 'left-sidebar'>
<div class = 'logo'>
<img src = 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6f/Logo_of_Twitter.svg/512px-Logo_of_Twitter.svg.png' alt ='twitter-logo'/>
</div>
<div class = 'left-buttons'>
<button class="home-btn">
<img src = 'https://marketplace.canva.cn/c4Sds/MAEwo6c4Sds/1/tl/canva-MAEwo6c4Sds.png' alt = 'png-of-house-icon'/>
</i>Home</button>
<button class="explore-btn">
<img src = 'https://cdn-icons-png.flaticon.com/512/158/158740.png' alt = 'png-of-search-icon'/>
</i>Explore</button>
<button class="notif-btn">
<img src = 'https://www.iconpacks.net/icons/1/free-bell-icon-860-thumb.png' alt = 'png-of-notif-icon'/>
</i>Notifications</button>
<button class="messages-btn">
<img src = 'https://icons.veryicon.com/png/o/internet--web/lobomeeting_web_designsystem/message-16.png' alt = 'png-of-message-icon'/>
</i>Messages</button>
<button class="bookmarks-btn">
<img src = 'https://cdn-icons-png.flaticon.com/512/494/494568.png' alt = 'png-of-bookmark-icon'/>
</i>Bookmarks</button>
<button class="profile-btn">
<img src = 'https://cdn-icons-png.flaticon.com/512/3106/3106773.png' alt = 'png-of-profile-icon'/>
</i>Profile</button>
<button class="more-btn">
<img src = 'https://cdn-icons-png.flaticon.com/512/152/152529.png' alt = 'png-of-more-icon'/>
</i>More</button>
<button class="tweet-button"><i class="fa fa-home"></i>Tweet</button>
</div>
</div>
<div class = 'main'>
<h1>Home</h1>
<br><br>
<div class = 'feed'>
<div class = 'tweet-message'>
<div class = 'twitter-profile'>
<img src = 'https://static-00.iconduck.com/assets.00/profile-circle-icon-2048x2048-cqe5466q.png' alt='twitter-profile-dp'/></div>
<div class = 'tweet-text'>
<strong>Sami</strong><font color='lightgray'>@samisalehsaeed · 30m</font><br><br>
I'm currently loving the Boolean UK course!</div>
</div>
<div class = 'tweet1'>
<div class = 'twitter-profile2'>
<img src = 'https://tr.rbxcdn.com/1623b394780fcdd69abfd2519827de58/420/420/Hat/Png' alt = 'png-of-profile-icon'/>
</div>
<div class = 'tweet-text2'>
<strong>Nathan</strong><font color = 'lightgray'>@vherus · 1hr </font><br><br>
Do not use chatGPT.</div>
</div>
</div>
</div>
<div class = 'right-sidebar'>
<div class = 'searchbar'>
<div>
<img src ='https://cdn-icons-png.flaticon.com/512/158/158740.png' alt ='png-of-search-icon'/>
</div>
<div class = 'text1'><strong>What's happening?</strong></div>
<div class = 'text2'><strong>Who to follow</strong></div>
</div>
</div>

</div>
</body>
</html>