Skip to content

Commit

Permalink
Style text
Browse files Browse the repository at this point in the history
  • Loading branch information
SandraBergstrom committed Jul 3, 2023
1 parent b5936ce commit 7e06766
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 9 deletions.
10 changes: 10 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ code {
background-color: white;
}

h1, h2, h3, h4, h5 {
font-family: 'Lato' sans-serif;
color: var(--clr-accent-dark);
}

p {
font-family: 'Roboto', sans-serif;
color: var(--clr-accent-dark);
}

.form-control:focus {
color: var(--clr-primary-dark);
background-color: var(--clr-natural-light);
Expand Down
8 changes: 5 additions & 3 deletions src/pages/posts/Post.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const Post = (props) => {
{owner}
</Link>
<div className="d-flex align-items-center">
<span>{updated_at}</span>
<span className={styles.smallText}>{updated_at}</span>
{is_owner && postPage && (
<MoreDropdown
handleEdit={handleEdit}
Expand All @@ -147,7 +147,7 @@ const Post = (props) => {
<Card.Img src={image} alt={title} />
</Link>
<Card.Body>
{title && <Card.Title className="text-center">{title}</Card.Title>}
{title && <Card.Title className={`text-center ${styles.TitleText}`}>{title}</Card.Title>}
{truncated && content && (
<Card.Text>{content.substring(0, 200)} ...</Card.Text>
)}
Expand Down Expand Up @@ -195,7 +195,9 @@ const Post = (props) => {
</div>
<hr />
<div className="d-flex align-items-center justify-content-end">
<span>With love from {location} in {country}</span>
<span className={styles.smallText}>
With love from {location} in {country}
</span>
</div>
</Card.Body>
</Card>
Expand Down
16 changes: 10 additions & 6 deletions src/styles/Post.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@
text-align: center;
}

/* .PostImage {
max-height: 600px;
width: auto;
object-fit: cover;
} */

.Post figure,
h5 {
margin: 0 0;
}

.TitleText {
color: var(--clr-accent-dark);
font-family: 'Lato', sans-serif;
}

.Heart {
color: var(--clr-accent-pink);
}
Expand All @@ -28,3 +27,8 @@ h5 {
.HeartOutline:hover {
color: var(--clr-accent-pink);
}

.smallText {
font-size: small;
color: var(--clr-accent-dark);
}

0 comments on commit 7e06766

Please sign in to comment.