Skip to content

Commit

Permalink
successfully added a report button
Browse files Browse the repository at this point in the history
  • Loading branch information
kuldp18 committed Apr 21, 2024
1 parent a5f9a86 commit 03ddcfb
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
27 changes: 27 additions & 0 deletions css/video_page.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,33 @@

.video__title {
font-size: 2rem;
display: flex;
justify-content: space-between;
align-items: center;
}

.report__container {
width: auto;
display: inline;
}


.report__btn {
background-color: #f44336;
border: none;
color: white;
width: 30px;
height: 30px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
cursor: pointer;
border-radius: 4px;
}

.report__btn:hover {
background-color: #d32f2f;
}

.user__name,
Expand Down
6 changes: 6 additions & 0 deletions pages/video_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@
<span class="star" data-rating="4"><i class="far fa-star"></i></span>
<span class="star" data-rating="5"><i class="far fa-star"></i></span>
</div>
<form class="report__container">
<input type="hidden" value="<?php echo $current_video_id; ?>" name="video_id">
<button class="report__btn" type="submit">
<i class="fas fa-flag"></i>
</button>
</form>
<!-- if previous_rating is not 0 show it below -->
<?php if ($previous_rating !== 0) : ?>
<p class="previous__rating">
Expand Down

0 comments on commit 03ddcfb

Please sign in to comment.