Skip to content

Commit

Permalink
patch: layout and mobile tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
liquidg3 committed Jun 27, 2024
1 parent 558148a commit c248b28
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"editor.formatOnSave": false
}
4 changes: 0 additions & 4 deletions src/pages/_includes/base-layout.njk
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@

<body class="{{ pageStyleId }} {{ layoutId }}">
{% include "parts/header.njk" %}
{% renderlayoutblock "abovePageWrap" %}{% endrenderlayoutblock %}

{{ content | safe }}

{% renderlayoutblock "belowPageWrap" %}{% endrenderlayoutblock %}

{% include "parts/footer.njk" %}
{% include "parts/templates.njk" %}
{% include "widgets/unsupported-brower-warning.njk" %}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/_includes/default-page-layout.njk
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ layoutId: default-page-type
surpressH1InLayout: false
---
{% from "widgets/navigation.njk" import mainNavTree %}

<div class="side-bar">
{{ mainNavTree(navigation.mainNav, page) }}
</div>
{% renderlayoutblock "abovePageWrap" %}{% endrenderlayoutblock %}
<div class="main-area">
{% if not surpressH1InLayout %}
<h1>{{ title }}</h1>
Expand Down
6 changes: 3 additions & 3 deletions src/pages/_includes/widgets/navigation.njk
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
</li>
{% for topLink in mainNavData.links %}
{% set isCurrentParent = topLink.url == activeParent.url %}
{% if isCurrentParent %}
<li data-is-current-parent="true" aria-current="page">
{# {% if isCurrentParent %} #}
<li class="{% if isCurrentParent %}is-current{% endif %} top" data-is-current-parent="{% if isCurrentParent %}true{% endif %}" aria-current="page">
<a href="{{ topLink.url | url }}" {{ 'target=_blank' if topLink.external }}>
<span>
{{ topLink.title }}
Expand Down Expand Up @@ -52,7 +52,7 @@
</ul>
{% endif %}
</li>
{% endif %}
{# {% endif %} #}
{% endfor %}
</ul>
</nav>
Expand Down
5 changes: 5 additions & 0 deletions src/scss/_navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
height: 24px;
}

a.btn-text {
display: none;
}


@include mq-full {
display: none;
}
Expand Down
5 changes: 4 additions & 1 deletion src/scss/page-specific/_default-page-type.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ $cl-sidebar-bg: #f7f7f7;
}

@include mq-full {
grid-template-columns: [vp-left] minmax(20px, 1fr) [sidebar-begin] 420px [sidebar-end] minmax(0, 1000px) minmax(20px, 1fr) [vp-right];
grid-template-columns: [vp-left] minmax(20px, 1fr) [sidebar-begin] 320px [sidebar-end] minmax(0, 1000px) minmax(20px, 1fr) [vp-right];
grid-template-areas:
"... header header ..."
"... header header ..."
Expand All @@ -72,6 +72,9 @@ $cl-sidebar-bg: #f7f7f7;
.side-bar {
grid-area: sideBar;
z-index: unset;
li.top:not(.is-current) {
display: none;
}
}

.header-full-bg,
Expand Down
9 changes: 9 additions & 0 deletions src/scss/page-specific/_home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,15 @@
}
}

.side-bar {
grid-area: greeting;
display: none;
}

.side-bar.show {
display: block;
}

@include mq-full {
#greeting {
display: flex;
Expand Down

0 comments on commit c248b28

Please sign in to comment.