Skip to content

Commit fd0f983

Browse files
committed
chore: optimize the layout of main content and search input
1 parent 35cadf9 commit fd0f983

File tree

5 files changed

+17
-6
lines changed

5 files changed

+17
-6
lines changed

_includes/footer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- The Footer -->
22

3-
<footer class="row">
3+
<footer class="row pl-3 pr-3">
44
<div class="col-12 d-flex justify-content-between align-items-center text-muted pl-0 pr-0">
55
<div class="footer-left">
66
<p class="mb-0">

_layouts/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
{% include topbar.html %}
2727

2828
<div id="main-wrapper" class="d-flex justify-content-center">
29-
<div id="main" class="container">
29+
<div id="main" class="container pl-xl-4 pr-xl-4">
3030

3131
{{ content }}
3232

_layouts/page.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<div class="row">
1010

1111
<!-- core -->
12-
<div id="core-wrapper" class="col-12 col-lg-11 col-xl-9 pr-xl-5">
12+
<div id="core-wrapper" class="col-12 col-lg-11 col-xl-9 pr-xl-4">
1313
<div class="post pl-1 pr-1 pl-md-2 pr-md-2">
1414

1515
{% capture _content %}
@@ -54,7 +54,7 @@ <h1 class="dynamic-title">
5454
<!-- tail -->
5555
{% if layout.tail_includes %}
5656
<div class="row">
57-
<div id="tail-wrapper" class="col-12 col-lg-11 col-xl-9 pl-4 pr-4 pr-xl-5">
57+
<div id="tail-wrapper" class="col-12 col-lg-11 col-xl-9 pl-3 pr-3 pr-xl-4">
5858
{% for _include in layout.tail_includes %}
5959
{% assign _include_path = _include | append: '.html' %}
6060
{% include {{ _include_path }} %}

_sass/addon/commons.scss

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1377,7 +1377,7 @@ $sidebar-display: "sidebar-display";
13771377
}
13781378

13791379
#search-wrapper {
1380-
max-width: 210px;
1380+
max-width: $search-max-width;
13811381
}
13821382

13831383
#search-result-wrapper {
@@ -1541,11 +1541,20 @@ $sidebar-display: "sidebar-display";
15411541
left: $sidebar-width-large;
15421542
}
15431543

1544+
#search-wrapper {
1545+
margin-right: calc(#{$main-content-max-width} * 0.25 - #{$search-max-width});
1546+
}
1547+
15441548
#topbar,
15451549
#main {
15461550
max-width: $main-content-max-width;
15471551
}
15481552

1553+
#core-wrapper,
1554+
#tail-wrapper {
1555+
padding-right: 4.5rem !important;
1556+
}
1557+
15491558
#back-to-top {
15501559
right: calc((100vw - #{$sidebar-width-large} - #{$main-content-max-width}) / 2 + 2rem);
15511560
}

_sass/addon/variables.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ $cursor-width: 2px !default; /* the cursor width of the selected tab */
2020

2121
$topbar-height: 3rem !default;
2222

23+
$search-max-width: 210px !default;
24+
2325
$footer-height: 5rem !default;
2426
$footer-height-mobile: 6rem !default; /* screen width: <= 576px */
2527

26-
$main-content-max-width: 1200px !default;
28+
$main-content-max-width: 1250px !default;
2729

2830
$bottom-min-height: 35rem !default;
2931

0 commit comments

Comments
 (0)