Skip to content

Commit

Permalink
Elimina home.css y home.jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
DianaRubiano16 committed Oct 13, 2024
1 parent 3a5b7a0 commit 6e01dc8
Show file tree
Hide file tree
Showing 8 changed files with 4,602 additions and 228 deletions.
4,381 changes: 4,381 additions & 0 deletions social-network/package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion social-network/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
},
"dependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react-dom": "^18.3.1",
"react-icons": "^5.3.0"
},
"devDependencies": {
"@eslint/js": "^9.11.1",
Expand Down
42 changes: 15 additions & 27 deletions social-network/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,35 +1,23 @@
import { useState } from 'react'
import reactLogo from './assets/react.svg'
import viteLogo from '/vite.svg'
import './App.css'
import { useState } from 'react';
import './assets/styles/post.css';
import Post from './components/post';

function App() {
const [count, setCount] = useState(0)
const [count, setCount] = useState(0);

const examplePost = {
title: 'Título de la Publicación',
content: 'Contenido de la publicación aquí...',
likes: 42,
shares: 10,
};

return (
<>
<div>
<a href="https://vitejs.dev" target="_blank">
<img src={viteLogo} className="logo" alt="Vite logo" />
</a>
<a href="https://react.dev" target="_blank">
<img src={reactLogo} className="logo react" alt="React logo" />
</a>
</div>
<h1>Vite + React</h1>
<div className="card">
<button onClick={() => setCount((count) => count + 1)}>
count is {count}
</button>
<p>
Edit <code>src/App.jsx</code> and save to test HMR
</p>
</div>
<p className="read-the-docs">
Click on the Vite and React logos to learn more
</p>
<Post post={examplePost} />
</>
)
);
}

export default App
export default App;

173 changes: 173 additions & 0 deletions social-network/src/assets/styles/post.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
body {
font-family: 'Arial', sans-serif;
background-color: #f0f4f8;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}


.post {
background-color: white;
border-radius: 12px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
width: 450px;
padding: 20px;
margin-top: 20px;
position: relative;
transition: transform 0.2s ease-in-out;
}

.post:hover {
transform: scale(1.02);
}


.post__header {
display: flex;
align-items: center;
margin-bottom: 15px;
}

.post__avatar {
width: 50px;
height: 50px;
border-radius: 50%;
margin-right: 15px;
border: 2px solid #ddd;
}

.post__user-info {
display: flex;
flex-direction: column;
}

.post__username {
font-weight: bold;
font-size: 18px;
color: #333;
}

.post__timestamp {
font-size: 13px;
color: #888;
}


.post__title {
font-size: 20px;
font-weight: 600;
color: #2c3e50;
margin: 10px 0;
}


.post__body {
margin-bottom: 15px;
font-size: 15px;
line-height: 1.6;
color: #555;
}

.post__image-placeholder {
width: 100%;
height: 200px;
background-color: #eef1f5;
border-radius: 10px;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 15px;
border: 2px dashed #ccc;
}

.post__image-placeholder::before {
content: "\f03e";
font-family: 'Font Awesome 5 Free';
font-weight: 900;
font-size: 48px;
color: #bbb;
}


.post__stats {
display: flex;
justify-content: space-between;
font-size: 14px;
color: #555;
margin: 10px 0;
}

.post__actions {
display: flex;
justify-content: space-between;
margin-top: 10px;
padding-top: 10px;
border-top: 1px solid #eef1f5;
}

.post__action-button {
background: none;
border: none;
color: #007bff;
cursor: pointer;
font-size: 16px;
display: flex;
align-items: center;
transition: color 0.2s ease;
}

.post__action-button svg {
margin-right: 5px;
}

.post__action-button:hover {
color: #0056b3;
}

.post__action-button:focus {
outline: none;
color: #003b80;
}

@media (max-width: 768px) {
.post {
width: 90%;
padding: 15px;
}

.post__title {
font-size: 18px;
}

.post__body {
font-size: 14px;
}
}

@media (max-width: 480px) {
.post {
padding: 10px;
}

.post__header {
flex-direction: column;
align-items: flex-start;
}

.post__avatar {
margin-bottom: 8px;
}

.post__actions {
flex-direction: column;
align-items: stretch;
}

.post__action-button {
width: 100%;
margin: 4px 0;
}
}
83 changes: 0 additions & 83 deletions social-network/src/components/home.css

This file was deleted.

54 changes: 0 additions & 54 deletions social-network/src/components/home.jsx

This file was deleted.

Loading

0 comments on commit 6e01dc8

Please sign in to comment.