Skip to content

Commit c87b15f

Browse files
authored
Will now wrap the dashboard buttons when the screen size runs out. Al… (#330)
* Will now wrap the dashboard buttons when the screen size runs out. Also fixes mobile alignment issue * fix nesting * Fix simple liniting issues
1 parent 0f1d917 commit c87b15f

2 files changed

Lines changed: 43 additions & 10 deletions

File tree

assets/css/src/admin/_dashboard.scss

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,21 @@
116116
padding: 12px;
117117
background: #f0f0f1;
118118
display: flex;
119+
flex-wrap: wrap;
119120
gap: 10px;
120121
justify-content: flex-end;
122+
121123
a {
124+
display: flex;
125+
align-items: center;
126+
white-space: nowrap;
122127
text-decoration: none;
128+
129+
.dashicons {
130+
@media (max-width: 782px) {
131+
margin-top: 8px !important;
132+
}
133+
}
123134
}
124135
}
125136
}
@@ -267,6 +278,26 @@
267278
display: block;
268279
}
269280
}
281+
&-navigation {
282+
padding: 12px;
283+
background: #f0f0f1;
284+
display: flex;
285+
flex-wrap: wrap;
286+
gap: 10px;
287+
justify-content: flex-end;
288+
289+
a {
290+
display: flex;
291+
align-items: center;
292+
white-space: nowrap;
293+
294+
.dashicons {
295+
@media (max-width: 782px) {
296+
margin-top: 8px !important;
297+
}
298+
}
299+
}
300+
}
270301
}
271302

272303
// Link Checks Section
@@ -480,4 +511,4 @@
480511
&-no-posts {
481512
margin: 0;
482513
}
483-
}
514+
}

templates/admin/dashboard/widget.php

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -152,22 +152,24 @@
152152
<?php if ( ! Dashboard_Page::is_current_page() ) : ?>
153153
<a href="<?php echo esc_url( Dashboard_Page::get_page_url() ); ?>" class="button">
154154
<span class="dashicons dashicons-dashboard" style="margin-top: 3px;"></span>
155-
<?php esc_html_e( 'Dashboard', 'internet-archive-wayback-machine-link-fixer' ); ?>
155+
<span class="link-text"><?php esc_html_e( 'Dashboard', 'internet-archive-wayback-machine-link-fixer' ); ?></span>
156156
</a>
157157
<?php endif; ?>
158158
<a href="<?php echo esc_url( $iawmlf_link_to_settings ); ?>" class="button">
159159
<span class="dashicons dashicons-admin-settings" style="margin-top: 3px;"></span>
160-
<?php esc_html_e( 'Advanced Settings', 'internet-archive-wayback-machine-link-fixer' ); ?>
160+
<span class="link-text"><?php esc_html_e( 'Advanced Settings', 'internet-archive-wayback-machine-link-fixer' ); ?></span>
161161
</a>
162162
<a href="<?php echo esc_url( $iawmlf_link_table ); ?>" class="button">
163163
<span class="dashicons dashicons-list-view" style="margin-top: 3px;"></span>
164-
<?php
165-
printf(
166-
/* translators: %d: number of links */
167-
esc_html__( 'View Links (%d)', 'internet-archive-wayback-machine-link-fixer' ),
168-
absint( $iawmlf_total_link_count )
169-
);
170-
?>
164+
<span class="link-text">
165+
<?php
166+
printf(
167+
/* translators: %d: number of links */
168+
esc_html__( 'View Links (%d)', 'internet-archive-wayback-machine-link-fixer' ),
169+
absint( $iawmlf_total_link_count )
170+
);
171+
?>
172+
</span>
171173
</a>
172174
</div>
173175
</div>

0 commit comments

Comments
 (0)