TIST-24: Fixed small issues on admin page #19

Merged
greendavid004 merged 2 commits from TIST-24 into develop 2025-06-29 13:43:48 +02:00
5 changed files with 56 additions and 7 deletions
Showing only changes of commit 184d7f43cb - Show all commits

View File

@ -57,7 +57,7 @@
<form action="<?php the_permalink('admin:recipe-list') ?>" method="get">
<div class="input-admin">
<input type="text" name="s" placeholder="Search for recipes">
<button class="hover-anim" type="submit"><i class="fa-solid fa-magnifying-glass"></i></button>
<button class="btn btn-secondary hover-anim" type="submit"><i class="fa-solid fa-magnifying-glass"></i></button>
</div>
</form>

View File

@ -15,7 +15,7 @@
<form method="get">
<div class="input-admin">
<input type="text" name="s" placeholder="Search for <?php echo $context['verbose_name_multiply'] ?>" value="<?php echo isset($_GET['s']) ? $_GET['s'] : '' ?>">
<button type="submit" class="hover-anim"><i class="fa-solid fa-magnifying-glass"></i></button>
<button type="submit" class="hover-anim btn btn-secondary"><i class="fa-solid fa-magnifying-glass"></i></button>
</div>
</form>
</div>

View File

@ -15,8 +15,8 @@
<?php endif ?>
</div>
<div class="btn-control">
<a href="<?php the_permalink('admin:ing-cat-rel-list', [$recipe->get_id()]) ?>" class="btn">Show all</a>
<a href="<?php the_permalink('admin:ing-cat-rel-new', [$recipe->get_id()]) ?>" class="btn btn-primary">Add ingredient</a>
<a href="<?php the_permalink('admin:ing-cat-rel-list', [$recipe->get_id()]) ?>" class="btn btn-secondary hover-anim">Show all</a>
<a href="<?php the_permalink('admin:ing-cat-rel-new', [$recipe->get_id()]) ?>" class="btn btn-primary hover-anim">Add ingredient</a>
</div>
</div>
</div>

View File

@ -1,6 +1,6 @@
<div class="admin-block">
<div class="admin-block__title">Author</div>
<div class="admin-block__content">
<a href="<?php the_permalink('admin:user', [$author->get_id()]) ?>"><?php echo $author->field_username ?></a>
<a href="<?php the_permalink('admin:user', [$author->get_id()]) ?>" class="recipe-author"><?php echo $author->field_username ?></a>
</div>
</div>

View File

@ -22,6 +22,9 @@
}
body {
min-height: 100vh;
font-family: var(--common-font);
greendavid004 marked this conversation as resolved Outdated

This is not working because admin-header.php doesn't have Roboto Condensed font.

Replace old fonts to it:

<!-- Google fonts -->
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link
        href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,100..900;1,100..900&family=Roboto+Slab:wght@100..900&display=swap"
        rel="stylesheet">
    <!-- Google fonts/ -->
    ```
This is not working because `admin-header.php` doesn't have `Roboto Condensed` font. Replace old fonts to it: ``` <!-- Google fonts --> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,100..900;1,100..900&family=Roboto+Slab:wght@100..900&display=swap" rel="stylesheet"> <!-- Google fonts/ --> ```
font-size: 14px;
color: var(--common-text);
}
.wrapper-admin {
display: flex;
@ -220,6 +223,11 @@ body {
.admin-block__table .row {
padding: 10px;
}
.admin-block__table a{
color: var(--title-color);
}
.admin-container.delete {
text-align: center;
}
@ -289,7 +297,48 @@ body {
.admin-block__content .btn-control {
display: flex;
justify-content: space-between;
justify-content: space-between;
}
input:disabled{
background-color: #e9ecef;
color: #6c757d;
}
.admin-single__form select{
greendavid004 marked this conversation as resolved Outdated

Why you add styles like input:disabled, select and etc in the admin.css like it can be used only on admin page?

Why you add styles like input:disabled, select and etc in the admin.css like it can be used only on admin page?
padding: 6px;
border-radius: 10px;
margin-bottom: 20px;
}
.admin-single__form img{
height: 260px;
width: 350;
border-radius: 10px;
margin-bottom: 20px;
}
.admin-single__form #instruction{
greendavid004 marked this conversation as resolved Outdated

Why do you use #id for textarea? And I don't see styles as on input.

Why do you use `#id` for textarea? And I don't see styles as on input.
width: 400px;
padding: 5px;
}
.admin-single__form input[type="file"]{
margin-bottom: 20px;
}
.recipe-author{
color: var(--title-color);
}
.admin-single__form label{
display: inline-block;
margin-bottom: 5px;
}
.admin-single__form .input-checkbox{
accent-color: #0DBB99;
}