diff --git a/.ruby-version b/.ruby-version index 619b537..be94e6f 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.3.3 +3.2.2 diff --git a/.tool-versions b/.tool-versions index 306ab33..f2a971a 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1 @@ -ruby 3.1.4 +ruby 3.2.2 diff --git a/Gemfile.lock b/Gemfile.lock index c882319..d0deb8d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -62,13 +62,13 @@ GEM rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.4.0) - mini_portile2 (2.8.7) minima (2.5.1) jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) jekyll-seo-tag (~> 2.1) - nokogiri (1.15.2) - mini_portile2 (~> 2.8.2) + nokogiri (1.15.2-arm64-darwin) + racc (~> 1.4) + nokogiri (1.15.2-x86_64-linux) racc (~> 1.4) pathutil (0.16.2) forwardable-extended (~> 2.6) @@ -112,7 +112,7 @@ DEPENDENCIES webrick (~> 1.8) RUBY VERSION - ruby 3.3.3p89 + ruby 3.2.2p53 BUNDLED WITH 2.3.26 diff --git a/_config.yml b/_config.yml index d049bcd..ef21703 100644 --- a/_config.yml +++ b/_config.yml @@ -55,7 +55,7 @@ defaults: # TOC Default Configuration toc: min_level: 1 - max_level: 2 + max_level: 3 no_toc_section_class: no_toc_section list_id: toc list_class: section-nav diff --git a/_layouts/base.html b/_layouts/base.html index 8b84795..43e5ffe 100644 --- a/_layouts/base.html +++ b/_layouts/base.html @@ -12,10 +12,11 @@ + +
-

{%- if page.path contains '_posts' -%} diff --git a/_posts/2023-05-20-mediaengagement-technical-docs.md b/_posts/2023-05-20-mediaengagement-technical-docs.md index beb3d43..9dbe31e 100644 --- a/_posts/2023-05-20-mediaengagement-technical-docs.md +++ b/_posts/2023-05-20-mediaengagement-technical-docs.md @@ -37,7 +37,9 @@ It might be a little overwhelming at first, but after a couple of weeks, things ### 2. Import .zip -- Request the lead dev to export a "slimmer" version of the site. This will be a .zip file you can import into your Local App. +> Windows users need to run the Local app as an administrator. Right-click on the Local app icon and select "Run as administrator" to open the app. + +- Request the lead dev to [export a "slimmer" version](#export-from-local-app) of the site. This will be a .zip file you can import into your Local App. - In the Local App click the plus (+) icon in the bottom left @@ -65,7 +67,7 @@ Create a `config.json` file in the root of your theme (ex.`/themes/engage-2-x/co Replace `localhost:10000` with the local URL in the Local App / Overview / Site host. -### 4. Proxy Requests for `/wp-content/uploads/` to the Production Site +### 4. Proxy Image Requests This will save you storage on your machine because all images will be fetched from the live site. @@ -79,7 +81,7 @@ This will save you storage on your machine because all images will be fetched fr } ``` -2. Open `siteRoot/conf/nginx/site.conf.hbs` in your editor and add the below snippet below the `{{/unless}}` line in the `# WordPress Rules`: +2. Open `siteRoot/conf/nginx/site.conf.hbs` in your editor and add the below snippet below the "{{/unless}}" line in the `# WordPress Rules`: ``` include uploads-proxy.conf; @@ -523,17 +525,25 @@ After your code is reviewed: master - Accepts merges from Features/Issues and Hotfixes + Accepts merges from Features/Issues, Bugs and Hotfixes Features/Issues - topic-* + feature-* Always branch off HEAD of Working + + Bug + + bug-* + + Always branch off Working + + Hotfix @@ -623,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 @@ -663,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. @@ -1247,3 +1257,24 @@ If you want to optimize specific tables only, you can do so by running a SQL que ```bash wp db query "OPTIMIZE TABLE wp_posts, wp_postmeta, wp_usermeta, wp_options;" ``` + +## Get WordPress Info + +WP Sidebar > Site Health > Info Tab + +# Lead Notes + +## Export from Local App + +To export a slimmer version of the site you first need to export your main site and import is into Local as a new site. This new site is the site you will remove files from to "slim" it down. Then you can export the new site and send the zip to the new undergrads. + +**Delete these files & folders** + +Before you export the new duplicate local site you need to delete these: + +- siteRoot/app/public/.git +- siteRoot/app/public/wp-content/themes/engage-2-x/node_modules +- any vs code *.code-workspace files +- all .* files in siteRoot/app/public/ +- siteRoot/app/public/enp-quiz-database-config.php +- siteRoot/app/public/LocalValetDriver.php diff --git a/_posts/2023-05-21-mediaengagement.md b/_posts/2023-05-21-mediaengagement.md index 19eb22b..c5e0988 100644 --- a/_posts/2023-05-21-mediaengagement.md +++ b/_posts/2023-05-21-mediaengagement.md @@ -62,7 +62,37 @@ Welcome to the CME (Engage) Website documentation. This guide covers everything ``` ### Step 4: Proxy Requests for `/wp-content/uploads/` -- Set up a proxy to save local storage by fetching images from the live site. +- Set up a proxy to save storage on you local machine by fetching images from the live/production site. If this step is not completed your local site willnot show any images. + +
+ How to configure the proxy + +
    +
  1. +

    Create a file named uploads-proxy.conf in the siteRoot/conf/nginx directory with this content:

    +
    
    +location ~ ^/wp-content/uploads/(.*) {
    +    if (!-e $request_filename) {
    +        rewrite ^/wp-content/uploads/(.*) https://mediaengagement.org/wp-content/uploads/$1 redirect;
    +    }
    +}
    +      
    +
  2. + +
  3. +

    Open siteRoot/conf/nginx/site.conf.hbs in your editor and add the below snippet below the {{/unless}} line in the `# WordPress Rules`:

    + +
    
    +  include uploads-proxy.conf;
    +      
    + +

    Your updated site.conf.hbs hould look like this screenshot:

    + Proxy Configuration Example +
  4. + +
  5. Save and restart the site in the Local App.
  6. +
+
### Step 5: Sync with GitHub - Initialize the repository and set the remote origin: @@ -72,7 +102,7 @@ Welcome to the CME (Engage) Website documentation. This guide covers everything 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 @@ -110,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). diff --git a/_sass/minima/_lanyon.scss b/_sass/minima/_lanyon.scss index b886ca2..1ddfcee 100644 --- a/_sass/minima/_lanyon.scss +++ b/_sass/minima/_lanyon.scss @@ -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; +// } +// } /* diff --git a/_sass/minima/_syntax.scss b/_sass/minima/_syntax.scss index 63c9731..8f5d96a 100644 --- a/_sass/minima/_syntax.scss +++ b/_sass/minima/_syntax.scss @@ -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 */ diff --git a/_sass/minima/custom-styles.scss b/_sass/minima/custom-styles.scss index a04d658..510a587 100644 --- a/_sass/minima/custom-styles.scss +++ b/_sass/minima/custom-styles.scss @@ -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 { @@ -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; @@ -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; @@ -76,8 +87,6 @@ pre { } .container { - margin-left: 2rem; - &.content { @include media-query($on-medium) { margin-top: 6rem; @@ -85,6 +94,40 @@ pre { } } } +.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, @@ -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; } } } @@ -144,7 +186,6 @@ span.sidebar-nav-item { } } - ul { &.inline { list-style: none; diff --git a/_sass/minima/custom-variables.scss b/_sass/minima/custom-variables.scss index 21897f0..7031f52 100644 --- a/_sass/minima/custom-variables.scss +++ b/_sass/minima/custom-variables.scss @@ -8,4 +8,4 @@ $link-visited-color: #2f81f7; $border-color-01: #30363d; $border-color-02: #465059; $sidebar-background-color: #010409; -$code-background-color: #2b2b2b; \ No newline at end of file +$code-background-color: #3b3b3b; \ No newline at end of file diff --git a/assets/img/site.conf.hbs-proxy.png b/assets/img/site.conf.hbs-proxy.png new file mode 100644 index 0000000..410d40f Binary files /dev/null and b/assets/img/site.conf.hbs-proxy.png differ diff --git a/assets/js/script.js b/assets/js/script.js index 44250fe..b54c0e8 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -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) {