Skip to content

Commit

Permalink
Add small screen styles for submission table
Browse files Browse the repository at this point in the history
  • Loading branch information
ryelle committed Nov 26, 2024
1 parent 6016128 commit ddd44bc
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,39 @@
th {
padding-block: var(--wp--preset--spacing--10);
}

.is-inline-label {
display: none;
}

@media (max-width: 600px) {
thead {
display: none;
}

tr {
display: block;
border-width: 1px 1px 0;
border-style: solid;
border-color: var(--wp--preset--color--light-grey-1);
padding-block: 5px;

&:last-of-type {
border-bottom-width: 1px;
}
}

td {
display: block;
border: 0;
padding-block: 5px;
}

.is-inline-label {
display: initial;
font-weight: 700;
}
}
}

#wporg-photo-upload {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,18 @@
$image_caption = get_the_content( null, false, $photo_post ) ?: __( '(none provided)', 'wporg-photos' );
?>
<tr>
<td><?php echo esc_html( $image_title ); ?></td>
<td><?php echo esc_html( $image_date ); ?></td>
<td><?php echo esc_html( $image_caption ); ?></td>
<td>
<span class="is-inline-label"><?php esc_html_e( 'File:', 'wporg-photos' ); ?></span>
<?php echo esc_html( $image_title ); ?>
</td>
<td>
<span class="is-inline-label"><?php esc_html_e( 'Submission date:', 'wporg-photos' ); ?></span>
<?php echo esc_html( $image_date ); ?>
</td>
<td>
<span class="is-inline-label"><?php esc_html_e( 'Caption:', 'wporg-photos' ); ?></span>
<?php echo esc_html( $image_caption ); ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
Expand Down

0 comments on commit ddd44bc

Please sign in to comment.