Skip to content

Commit

Permalink
Feature style update (#6)
Browse files Browse the repository at this point in the history
hamburger fix positioning, fix hamburger scroll to top on click, medEng
docs sm edits
  • Loading branch information
luukee authored Sep 5, 2024
2 parents 8720b8e + a7acc4d commit 8ee33cb
Show file tree
Hide file tree
Showing 8 changed files with 104 additions and 46 deletions.
3 changes: 2 additions & 1 deletion _layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@

<!-- Wrap is the content to shift when toggling the sidebar. We wrap the
content to avoid any CSS collisions with our real content. -->
<label for="sidebar-checkbox" class="sidebar-toggle"></label>

<div class="wrap">
<div class="masthead">
<div class="container">
<label for="sidebar-checkbox" class="sidebar-toggle"></label>

<h3 class="masthead-title">
{%- if page.path contains '_posts' -%}
Expand Down
30 changes: 19 additions & 11 deletions _posts/2023-05-20-mediaengagement-technical-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -525,17 +525,25 @@ After your code is reviewed:
</td>
<td>master
</td>
<td>Accepts merges from Features/Issues and Hotfixes
<td>Accepts merges from Features/Issues, Bugs and Hotfixes
</td>
</tr>
<tr>
<td>Features/Issues
</td>
<td>topic-*
<td>feature-*
</td>
<td>Always branch off HEAD of Working
</td>
</tr>
<tr>
<td>Bug
</td>
<td>bug-*
</td>
<td>Always branch off Working
</td>
</tr>
<tr>
<td>Hotfix
</td>
Expand Down Expand Up @@ -625,25 +633,25 @@ Although likelihood will be less, during the lifespan of the bug development, th
If the branch does not exist yet (check with the Lead), create the branch locally and then push to GitHub. A bug branch should always be 'publicly' available. That is, development should never exist in just one developer's local branch.

```
$ git checkout -b bug-id master // creates a local branch for the new bug
$ git push origin bug-id // makes the new bug remotely available
$ git checkout -b bug-id master // creates a local branch for the new bug
$ git push origin bug-id // makes the new bug remotely available
```

Periodically, changes made to `master` (if any) should be merged back into your bug branch.


```
$ git merge master // merges changes from master into bug branch
$ git merge master // merges changes from master into bug branch
```


When development on the bug is complete, [the Lead] should merge changes into `master` and then make sure the remote branch is deleted.

```
$ git checkout master // change to the master branch
$ git merge --no-ff bug-id // makes sure to create a commit object during merge
$ git push origin master // push merge changes
$ git push origin :bug-id // deletes the remote branch
$ git checkout master // change to the master branch
$ git merge --no-ff bug-id // makes sure to create a commit object during merge
$ git push origin master // push merge changes
$ git push origin :bug-id // deletes the remote branch
```

### Hotfix Branches
Expand All @@ -665,8 +673,8 @@ ___
If the branch does not exist yet (check with the Lead), create the branch locally and then push to GitHub. A hotfix branch should always be 'publicly' available. That is, development should never exist in just one developer's local branch.

```
$ git checkout -b hotfix-id stable // creates a local branch for the new hotfix
$ git push origin hotfix-id // makes the new hotfix remotely available
$ git checkout -b hotfix-id stable // creates a local branch for the new hotfix
$ git push origin hotfix-id // makes the new hotfix remotely available
```

When development on the hotfix is complete, [the Lead] should merge changes into `stable` and then update the tag.
Expand Down
3 changes: 2 additions & 1 deletion _posts/2023-05-21-mediaengagement.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ location ~ ^/wp-content/uploads/(.*) {
git fetch --all
git reset --hard origin/master
```

For more detail see [Technical Docs - Sync with GitHub](mediaengagement-technical-docs/#syncing-with-github)
---

## Local Development
Expand Down Expand Up @@ -140,6 +140,7 @@ npm run production

### Git Usage
- Always create separate branches for new features or bug fixes.
- For more detail see [Technical Docs - Sync with GitHub](/mediaengagement-technical-docs/#git-usage)
- Push to the `master` branch only after code review and testing.

For more detailed Git workflows, see [Deployment Workflow](#deployment-workflow).
Expand Down
26 changes: 13 additions & 13 deletions _sass/minima/_lanyon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,19 @@ body {
* Center the page content.
*/

.container {
max-width: 28rem;
}
@media (min-width: 38em) {
.container {
max-width: 32rem;
}
}
@media (min-width: 56em) {
.container {
max-width: 38rem;
}
}
// .container {
// max-width: 28rem;
// }
// @media (min-width: 38em) {
// .container {
// max-width: 32rem;
// }
// }
// @media (min-width: 56em) {
// .container {
// max-width: 38rem;
// }
// }


/*
Expand Down
2 changes: 1 addition & 1 deletion _sass/minima/_syntax.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
.highlight .nl { color: #99f } /* Name.Label */
.highlight .nn { color: #0cf; } /* Name.Namespace */
.highlight .nt { color: #2f6f9f; } /* Name.Tag */
.highlight .nv { color: #033 } /* Name.Variable */
.highlight .nv { color: rgb(255, 171, 115) } /* Name.Variable */
.highlight .ow { color: #000; } /* Operator.Word */
.highlight .w { color: #bbb } /* Text.Whitespace */
.highlight .mf { color: #f60 } /* Literal.Number.Float */
Expand Down
77 changes: 59 additions & 18 deletions _sass/minima/custom-styles.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Placeholder to allow defining custom styles that override everything else.
// (Use `_sass/minima/custom-variables.scss` to override variable defaults)
@import "minima/poole";
@import "minima/syntax";
@import "minima/lanyon";
@import 'minima/poole';
@import 'minima/syntax';
@import 'minima/lanyon';

/* Black Theme */
body {
Expand All @@ -21,7 +21,10 @@ body {
color: $link-base-color;
}
.sidebar-toggle {
top: 1rem;
left: 10px;
z-index: 9;
position: fixed;
}
pre {
background-color: $border-color-02;
Expand All @@ -48,22 +51,30 @@ pre {
display: flex;
border-bottom: 2px solid $border-color-01;
}

@media screen and (min-width: 1000px) {
.container {
padding: 1rem;
.container {
padding: 0.25rem 1rem 0.25rem 4rem;
margin-left: 0;
}
@media (min-width: 38em) {
.container {
padding: 0.25rem 1rem 0.25rem 4rem;
}
}
@media (min-width: 56em) {
.container {
padding: 1rem 1rem 1rem 3rem;
}
}
}
.edit {
display: none;
@media screen and (min-width: 1000px) {
position: absolute;
display: block;
@media screen and (min-width: 1000px) {
position: absolute;
display: block;
right: 0;
top: 0;
padding: 1rem;
}
padding: 1rem;
}
}
.masthead-title {
text-align: left;
Expand All @@ -76,15 +87,47 @@ pre {
}

.container {
margin-left: 2rem;

&.content {
@include media-query($on-medium) {
margin-top: 6rem;
margin-left: auto;
}
}
}
.content {
&.container {
max-width: unset;
// max-width: 28rem;
}
@media (min-width: 38em) {
&.container {
max-width: unset;
margin-left: 4rem;

}
}
@media (min-width: 56em) {
&.container {
max-width: unset;
}
}
}
.post-content > *:not(.highlighter-rouge) {
max-width: 28rem;
}
@media (min-width: 38em) {
.post-content > *:not(.highlighter-rouge) {
max-width: 32rem;
}
}
@media (min-width: 56em) {
.post-content > *:not(.highlighter-rouge) {
max-width: 34rem;
}
.post-content .highlighter-rouge {
max-width: 48rem;
}
}
/* Blog post or page title */
.page-title,
.post-title,
Expand All @@ -104,9 +147,8 @@ pre {
.sidebar-nav-item {
color: $lm-brand-color;
padding-left: 2rem;
&.active {
background-color: $subtitle-bk-color;

&.active {
background-color: $subtitle-bk-color;
}
}
}
Expand Down Expand Up @@ -144,7 +186,6 @@ span.sidebar-nav-item {
}
}


ul {
&.inline {
list-style: none;
Expand Down
2 changes: 1 addition & 1 deletion _sass/minima/custom-variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ $link-visited-color: #2f81f7;
$border-color-01: #30363d;
$border-color-02: #465059;
$sidebar-background-color: #010409;
$code-background-color: #2b2b2b;
$code-background-color: #3b3b3b;
7 changes: 7 additions & 0 deletions assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
console.log("object")
checkbox.removeAttribute("checked")
}

// Event listener for clicks on the toggle button (hamburger)
toggle.addEventListener("click", function (e) {
e.preventDefault() // Prevents the default scrolling behavior
checkbox.checked = !checkbox.checked // Toggle the checkbox state
})

document.addEventListener(
"click",
function (e) {
Expand Down

0 comments on commit 8ee33cb

Please sign in to comment.