Skip to content

Commit

Permalink
restore pagination jump buttom (#68)
Browse files Browse the repository at this point in the history
clean up tags
  • Loading branch information
lucascantor authored Apr 7, 2024
1 parent 7e1ac30 commit 0fb7311
Show file tree
Hide file tree
Showing 19 changed files with 74 additions and 23 deletions.
13 changes: 13 additions & 0 deletions content/_includes/partials/pagination.njk
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@
</span>
{% endif %}
</li>
{% if currentPage %}
<li class="current">
<form class="jump-to-page-form">
<label for="jump-to-page" class="page input-label">{{ phrases.go_to_page }}:</label>
<div class="fields">
<input id="jump-to-page" class="page-number-input" title="{{ phrases.page_number_hint }}" type="number" enterkeyhint="go" inputmode="numeric" min="1" max="{{ totalPages }}" value="{{ currentPage }}">
<span class="of">{{ phrases.of }} </span>
<span class="total-pages">{{ totalPages }}</span>
<input type="submit" class="jump-button" disabled value="{{ phrases.go }}">
</div>
</form>
</li>
{% endif %}
<li class="links next">
{% if nextHref %}
<a href="{{ nextHref }}">
Expand Down
3 changes: 3 additions & 0 deletions content/posts/2018/2018-03-10-schedule-repeating-reboots.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
title: Schedule Repeating Reboots
description:
date: 2018-03-10
tags:
- Old Post
- Mac Admin
disclaimer:
text: This is an old post. Content may be out of date.
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
title: Create a Bootable macOS Installation Disk
description:
date: 2018-03-17
tags:
- Old Post
- Mac Admin
disclaimer:
text: This is an old post. Content may be out of date.
---
Expand Down
3 changes: 3 additions & 0 deletions content/posts/2018/2018-03-24-sleep-the-display.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
title: Sleep the Display
description:
date: 2018-03-24
tags:
- Old Post
- Mac Admin
disclaimer:
text: This is an old post. Content may be out of date.
---
Expand Down
3 changes: 3 additions & 0 deletions content/posts/2018/2018-03-31-start-the-screensaver.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
title: Start the Screensaver
description:
date: 2018-03-31
tags:
- Old Post
- Mac Admin
disclaimer:
text: This is an old post. Content may be out of date.
---
Expand Down
3 changes: 3 additions & 0 deletions content/posts/2018/2018-04-07-set-the-login-window-text.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
title: Set the Login Window Text
description:
date: 2018-04-07
tags:
- Old Post
- Mac Admin
disclaimer:
text: This is an old post. Content may be out of date.
---
Expand Down
3 changes: 3 additions & 0 deletions content/posts/2018/2018-04-14-re-run-setup-assistant.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
title: Re-Run the macOS Setup Assistant
description:
date: 2018-04-14
tags:
- Old Post
- Mac Admin
disclaimer:
text: This is an old post. Content may be out of date.
---
Expand Down
3 changes: 3 additions & 0 deletions content/posts/2018/2018-04-21-install-backblaze-silently.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
title: Install Backblaze Silently from the Command Line
description:
date: 2018-04-21
tags:
- Old Post
- Mac Admin
disclaimer:
text: This is an old post. Content may be out of date.
---
Expand Down
3 changes: 3 additions & 0 deletions content/posts/2018/2018-04-28-extract-saved-wifi-passwords.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
title: Extract Saved WiFi Passwords from the macOS Keychain
description:
date: 2018-04-28
tags:
- Old Post
- Mac Admin
disclaimer:
text: This is an old post. Content may be out of date.
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
title: View Available Software Updates in the Mac App Store
description:
date: 2018-05-05
tags:
- Old Post
- Mac Admin
disclaimer:
text: This is an old post. Content may be out of date.
---
Expand Down
3 changes: 3 additions & 0 deletions content/posts/2018/2018-05-12-disable-printer-sharing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
title: Disable Printer Sharing
description:
date: 2018-05-11
tags:
- Old Post
- Mac Admin
disclaimer:
text: This is an old post. Content may be out of date.
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
title: Enable Ownership on External Disks
description:
date: 2018-06-02
tags:
- Old Post
- Mac Admin
disclaimer:
text: This is an old post. Content may be out of date.
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
title: Install Vendor-Hosted Software via curl
description:
date: 2018-10-24
tags:
- Old Post
- Mac Admin
disclaimer:
text: This is an old post. Content may be out of date.
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
title: Add macOS Dark Mode Support to Your Website
description:
date: 2019-05-27
tags:
- Old Post
- Web Dev
- CSS
disclaimer:
text: This is an old post. Content may be out of date.
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
title: Enforcing Google Chrome Policy on Windows via Third-Party ADMX in Intune
description:
date: 2019-07-07
tags:
- Old Post
- Mac Admin
- Windows Admin
disclaimer:
text: This is an old post. Content may be out of date.
---
Expand Down
6 changes: 1 addition & 5 deletions content/posts/2023/10-16-an-iphone-app-built-for-two.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ title: An iPhone App Built for Two
description:
date: 2023-10-16
tags:
- iPhone
- iOS
- apps
- swift
- swiftUI
- iOS Dev
---

## Hello Again 👋🏼
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ title: Terraform Cloud Dynamic Provider Credentials
description:
date: 2023-12-27
tags:
- infrastructure-as-code
- terraform
- security
- Infrastructure as Code
- Terraform
- AWS
---

After years without a good solution to my "static AWS IAM user secrets" problem, I've recently set up [Dynamic Provider Credentials](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/dynamic-provider-credentials) for AWS in my Terraform Cloud org.
Expand Down
5 changes: 1 addition & 4 deletions content/posts/2024/01-05-tines-case-study.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ title: Tines Case Study
description:
date: 2024-01-05
tags:
- no-code
- tines
- featured-work
- case-study
- No-Code
---

I'm excited to announce that [Tines has published a case study](https://www.tines.com/case-studies/intercom) based on my recent work deploying it as a business process automation platform for IT, InfoSec, and the entire company at Intercom! 🎉
Expand Down
23 changes: 12 additions & 11 deletions src/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ window.addEventListener('DOMContentLoaded', () => {
const postLists = document.querySelectorAll('.archive .list');

const archiveYearHeadings = document.querySelectorAll(
`.archive ${yearHeadingSelector}`
`.archive ${yearHeadingSelector}`,
);

const handleArchiveToggle = (e) => {
Expand Down Expand Up @@ -222,7 +222,8 @@ window.addEventListener('DOMContentLoaded', () => {
.split(/\/[0-9]+\//)[0]
.replace(/\/+$/, '');

const newLocation = pageNumber === 1 ? pageUrl : `${pageUrl}/${pageNumber}`;
const newLocation =
pageNumber === 1 ? pageUrl : `${pageUrl}/${pageNumber}/`;

window.location.href = newLocation;
};
Expand All @@ -232,7 +233,7 @@ window.addEventListener('DOMContentLoaded', () => {
const currentPageNumber = parseInt(pageNumberInput.value);

const totalPages = parseInt(
document.querySelector('.total-pages').innerHTML
document.querySelector('.total-pages').innerHTML,
);

const isPageNumberAllowed = (pageNumber) => {
Expand Down Expand Up @@ -297,26 +298,26 @@ window.addEventListener('DOMContentLoaded', () => {
// Mastodon share button

const mastodonShareForm = htmlElement.querySelector(
'.share-buttons .mastodon-share-form'
'.share-buttons .mastodon-share-form',
);

const mastodonShareButton = htmlElement.querySelector(
'.share-buttons .mastodon'
'.share-buttons .mastodon',
);
const mastodonShareDialog = htmlElement.querySelector(
'.share-buttons .mastodon-share-dialog'
'.share-buttons .mastodon-share-dialog',
);

const mastodonDialogCloseLink = htmlElement.querySelector(
'.mastodon-share-dialog .close-link'
'.mastodon-share-dialog .close-link',
);

const instanceUrlInput = htmlElement.querySelector(
'.mastodon-share-dialog .instance-url-input'
'.mastodon-share-dialog .instance-url-input',
);

const shareSubmitButton = htmlElement.querySelector(
'.mastodon-share-dialog .share-form-submit'
'.mastodon-share-dialog .share-form-submit',
);

const isMastodonInstanceValid = (value) => {
Expand Down Expand Up @@ -368,7 +369,7 @@ window.addEventListener('DOMContentLoaded', () => {
encodeURIComponent(title) +
' ' +
encodeURIComponent(href),
'_blank'
'_blank',
);
});

Expand All @@ -388,7 +389,7 @@ window.addEventListener('DOMContentLoaded', () => {
// Copy to clipboard button

const copyToClipboardButton = htmlElement.querySelector(
'.share-buttons .clipboard'
'.share-buttons .clipboard',
);

if (copyToClipboardButton) {
Expand Down

0 comments on commit 0fb7311

Please sign in to comment.