Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
250 commits
Select commit Hold shift + click to select a range
a90d345
extracted gathering of meta tags into a function
Nealium104 Apr 3, 2024
98f198c
removed some event listeners
Nealium104 Apr 4, 2024
c4c3016
first working model
Nealium104 Apr 4, 2024
6968e0f
easy var purge
Nealium104 Apr 4, 2024
590f3d3
expireDate refactor
Nealium104 Apr 4, 2024
8d77e21
last var purge
Nealium104 Apr 4, 2024
dfa6aa6
pulled out bases
Nealium104 Apr 4, 2024
c61f670
fixed typo in config
Nealium104 Apr 4, 2024
8253aa7
switched the label and title roles for clarity
Nealium104 Apr 8, 2024
126e033
added global functions like toggleMobile and reworked how the header …
Nealium104 Apr 9, 2024
0e2675e
had the inverse condition set for hdr_simple in the chooseRender func…
Nealium104 Apr 9, 2024
061ea9a
weird issue solved by removing an annoucment link color?
Nealium104 Apr 9, 2024
95da7c4
all functions accurate
Nealium104 Apr 10, 2024
6e209ad
fixed survey close
Nealium104 Apr 10, 2024
cb088e3
commit for dev merge
Nealium104 Apr 18, 2024
b3458b2
merge fix
Nealium104 Apr 18, 2024
800bde1
removed some stale variables and changed the document cookie to be a …
Nealium104 Apr 19, 2024
e925cc5
extracted cookie functionality
Nealium104 Apr 19, 2024
337acf5
Fixed issue with empty links, pulled out cookie functionality, and se…
Nealium104 Apr 19, 2024
df9fd3b
Merge pull request #6 from uklibraries/neal
Nealium104 Apr 19, 2024
447b540
changed expireDate to a short circuit &&, and changed base loop to us…
Nealium104 Apr 22, 2024
c2c75e7
changed menu_button ID's to use classes
Nealium104 Apr 22, 2024
b87fb2d
drop down functionality added
Nealium104 Apr 22, 2024
baa09ff
minor cleanup
Nealium104 Apr 22, 2024
d67ff70
just a quick refactor for a one liner
Nealium104 Apr 22, 2024
044fa2b
extracted annoucement function
Nealium104 Apr 23, 2024
a927e3a
added dropdowns
Nealium104 Apr 24, 2024
31336de
quick and dirty logo addition
Nealium104 Apr 25, 2024
1c6071f
just added the styles for the new functionality'
Nealium104 Apr 25, 2024
4b8e785
for merge
Nealium104 Apr 26, 2024
49acbe8
minor mistake, had an errant m
Nealium104 Apr 26, 2024
d77b0a7
Update universalheader.js
libmanuk Apr 26, 2024
3550d9c
Update global_header_footer.css
libmanuk Apr 26, 2024
3bc1ac9
Update universalheader.js
libmanuk Apr 26, 2024
d1d76c4
Merge pull request #10 from uklibraries/eric
Nealium104 Apr 26, 2024
876160b
Update global_header_footer.css
libmanuk Apr 26, 2024
37e15b4
removed mobile menu
Nealium104 Apr 29, 2024
aecc75f
extracted handleResize function. The menus are now shared
Nealium104 Apr 29, 2024
e2dce72
Update global_header_footer.css
libmanuk Apr 29, 2024
e4c1f53
Update universalheader.js
libmanuk Apr 29, 2024
f4b1235
Update LibCalConfig.js
libmanuk Apr 29, 2024
3ff3821
Merge branch 'neal' into eric
Nealium104 Apr 29, 2024
d81571b
Merge pull request #11 from uklibraries/eric
Nealium104 Apr 29, 2024
bf428f4
made the handleResize respect the hamburger
Nealium104 Apr 29, 2024
0de9ac0
Update universalheader.js
libmanuk Apr 29, 2024
1e5e789
fix spacing issue for mobile menu drop down
libmanuk Apr 29, 2024
e54d19f
Clean up global_header_footer.css
libmanuk Apr 30, 2024
5deae6f
changed mobile button
Nealium104 May 1, 2024
4dd7fda
changed mobile button, fixes #13
Nealium104 May 1, 2024
5c0b548
Merge branch 'neal' of https://github.com/uklibraries/UKL_HeaderFoote…
Nealium104 May 1, 2024
fcb6e5a
deleted zombie header and changed span to div, fixes #14
Nealium104 May 1, 2024
4f91db0
changed all ukltophdr_sitehdr spans to divs. Fixes #16
Nealium104 May 1, 2024
3003015
Merge branch 'dev' of https://github.com/uklibraries/UKL_HeaderFooter…
Nealium104 May 2, 2024
0fd5058
Merge pull request #12 from uklibraries/eric
Nealium104 May 2, 2024
d5b0dca
Merge pull request #17 from uklibraries/neal
Nealium104 May 2, 2024
19deb11
Merge branch 'dev' of https://github.com/uklibraries/UKL_HeaderFooter…
Nealium104 May 2, 2024
689f30f
Merge pull request #20 from uklibraries/dev
libmanuk May 2, 2024
bea2416
Set tabindex to be focusable in sequential keyboard navigation and im…
libmanuk May 2, 2024
70b0927
Merge pull request #22 from uklibraries/eric
libmanuk May 2, 2024
d24093f
Update global_header_footer.css
libmanuk May 2, 2024
1a8dd1b
convert javascript:void(0) links to buttons with id and titles
libmanuk May 2, 2024
229429e
Merge pull request #24 from uklibraries/eric
libmanuk May 2, 2024
feaa0b5
Fix line-height below minimum value
libmanuk May 2, 2024
f0a3d2b
Merge pull request #26 from uklibraries/eric
libmanuk May 2, 2024
ba2a6c6
first pass at globalConfig extraction
Nealium104 May 2, 2024
b31afbd
Merge branch 'dev' of https://github.com/uklibraries/UKL_HeaderFooter…
Nealium104 May 2, 2024
75148bd
removed zombie config
Nealium104 May 2, 2024
3b8782d
global config replacement
Nealium104 May 2, 2024
580ea69
changed function order
Nealium104 May 2, 2024
dc2e3a0
Create globalConfig.js
libmanuk May 3, 2024
3c1b979
Update LibCalConfig.js
libmanuk May 3, 2024
6ef35d1
Update universalheader.js
libmanuk May 3, 2024
6ab252c
Update mockup.html
libmanuk May 3, 2024
c82f5db
Update universalheader.js
libmanuk May 3, 2024
ec55da1
readded the dynamic import and added folder structure for different c…
Nealium104 May 3, 2024
2fa29ea
Update universalheader.js
libmanuk May 3, 2024
2c1bfae
Update LibCalConfig.js
libmanuk May 3, 2024
c630d43
fixes some mobile errors
Nealium104 May 3, 2024
1d33d35
first pass at cookie functionality, fixes #28
Nealium104 May 6, 2024
3a20440
first pass at image addition
Nealium104 May 9, 2024
fddbbab
second pass at images'
Nealium104 May 9, 2024
4c6471d
Update universalheader.js
libmanuk May 10, 2024
c9c7d2f
Update global_header_footer.css
libmanuk May 10, 2024
e5ef4e5
Update mockup.html
libmanuk May 10, 2024
6d11110
Create globalConfig.js
libmanuk May 13, 2024
ef7644c
Update globalConfig.js
libmanuk May 13, 2024
198eec1
Create libcalConfig.js
libmanuk May 13, 2024
55aee40
Delete js/globalConfig.js
libmanuk May 13, 2024
38fb036
Delete js/LibCalConfig.js
libmanuk May 13, 2024
b95b19e
merge fix
Nealium104 May 13, 2024
52922b1
merge fix'
Nealium104 May 13, 2024
9f4ca46
clean up and announcement fix
Nealium104 May 14, 2024
3252770
Update universalheader.js
libmanuk May 14, 2024
8f374dc
Update global_header_footer.css
libmanuk May 14, 2024
961dd8e
Update globalConfig.js
libmanuk May 14, 2024
6711d8d
Removed color from css, added surveymsgcolor. Fixes #9
Nealium104 May 14, 2024
95acb2f
Merge branch 'main' into dev
Nealium104 May 14, 2024
06a5e8e
Merge branch 'dev' into neal
Nealium104 May 14, 2024
dacb5eb
Update global_header_footer.css
libmanuk May 16, 2024
3ba7164
Update universalheader.js
libmanuk May 16, 2024
4b78c1f
removed authorship line
Nealium104 May 17, 2024
c478f7c
Merge branch 'eric' into dev
libmanuk May 17, 2024
12904a0
Merge pull request #30 from uklibraries/dev
libmanuk May 17, 2024
fecb52b
remove added nav padding in mobile
libmanuk May 17, 2024
aa576f6
Merge pull request #32 from uklibraries/eric
libmanuk May 17, 2024
762bc4b
fix spacing in the mobile menu
libmanuk May 21, 2024
a8712dd
Merge pull request #34 from uklibraries/eric
libmanuk May 21, 2024
c900eed
added some real mockup material and used tailwind CDN for styling
Nealium104 May 21, 2024
b587bdb
fix CSS reset issues with footer
libmanuk May 22, 2024
5f00ac3
Merge branch 'eric' into neal
Nealium104 May 22, 2024
3da233e
simplify resize code block
libmanuk May 23, 2024
ee40604
global header, utility links, and nav links prefixed
Nealium104 May 24, 2024
579e5cf
added slab prefixes
Nealium104 May 24, 2024
b275d9b
added link prefixes
Nealium104 May 24, 2024
00f5f54
added section header prefixes
Nealium104 May 24, 2024
9491a8e
removed both mentions of utility-nav
Nealium104 May 24, 2024
2468fa3
Added prefixes for menu_buttons, both more/less and by itself. Also r…
Nealium104 May 24, 2024
f4b50eb
Added prefixes to dropdown and dropdown-content
Nealium104 May 24, 2024
cb0eee1
added prefixes to show-for-sr
Nealium104 May 24, 2024
304b918
deleted both link-group rules
Nealium104 May 24, 2024
4916ebc
deleted menu-button rules
Nealium104 May 24, 2024
f5871bb
remove unused uky-logo rule
Nealium104 May 24, 2024
d198d1c
remove unused .clamp rule and prefix universal-nav
Nealium104 May 24, 2024
c6e4d8f
prefix universal-breadcrumb and remove unused .search-control css rule
Nealium104 May 24, 2024
da22529
remove unused rules
Nealium104 May 24, 2024
d0b7bea
Had a save conflict trying to fix icon-wrapper
Nealium104 May 24, 2024
1679357
fix spacing around icon-wrapper
Nealium104 May 24, 2024
3e291da
remove unused class .r
Nealium104 May 28, 2024
da88192
add missing prefixes to classes
Nealium104 May 28, 2024
c5979de
prefix all get ID's
Nealium104 May 28, 2024
b4be33e
prefix all survey IDs
Nealium104 May 28, 2024
1a5795a
fix springshare search visibility
Nealium104 May 28, 2024
a28b835
Merge branch 'Prefix-Fix' into neal
Nealium104 May 28, 2024
f006e77
save fix
Nealium104 May 28, 2024
7d34d9b
refactor header resize
libmanuk May 29, 2024
5033cd9
Merge branch 'eric' into neal
Nealium104 May 29, 2024
fe9db18
prefix for new loop
Nealium104 May 29, 2024
8d0ca05
prefix for new loop
Nealium104 May 29, 2024
1057d62
Merge branch 'neal' of https://github.com/uklibraries/UKL_HeaderFoote…
Nealium104 May 29, 2024
706ab0a
fix brace issue
Nealium104 May 29, 2024
f1faeb0
Merge branch 'neal' into dev
Nealium104 May 29, 2024
9b26f9d
add prefix
Nealium104 May 29, 2024
e603b8e
Merge branch 'neal' into dev
Nealium104 May 29, 2024
574a13e
remove copyright/author info
libmanuk May 30, 2024
8ff3988
Add hover effects on menu hyperlinks
libmanuk May 30, 2024
6b1e729
Merge pull request #46 from uklibraries/eric
libmanuk May 30, 2024
0979f07
fix menu sub items bug in mobile
libmanuk May 30, 2024
4f226e6
Merge pull request #47 from uklibraries/eric
libmanuk May 30, 2024
5646bf9
fix line height is below minimum value for accessibility
libmanuk May 30, 2024
119d80b
Merge pull request #48 from uklibraries/eric
libmanuk May 30, 2024
c6d3af6
fix missing styles in footer
libmanuk Jun 4, 2024
c7c4a98
Merge pull request #50 from uklibraries/eric
libmanuk Jun 4, 2024
aa29bbf
fix inconsistent line-height for mobile
libmanuk Jun 6, 2024
92f1a04
Merge pull request #53 from uklibraries/eric
libmanuk Jun 6, 2024
e6d61a5
change custom header width CSS from rem to em
libmanuk Jun 6, 2024
9b93f7a
change rem calculations to em calculations
libmanuk Jun 6, 2024
3c9a215
fix breadcrumb font-size
libmanuk Jun 6, 2024
1af445f
Merge pull request #54 from uklibraries/eric
libmanuk Jun 6, 2024
3c1d1a0
Adjusting CSS for ExploreUK integration
libmanuk Jun 10, 2024
5756bb3
Merge pull request #56 from uklibraries/eric
libmanuk Jun 10, 2024
a707cb6
Delete js/infokat_universalheader.js
libmanuk Jun 10, 2024
0302032
Merge pull request #59 from uklibraries/eric
libmanuk Jun 10, 2024
1e908a6
Update libcalConfig.js
libmanuk Jul 23, 2024
83dea32
Update libcalConfig.js
libmanuk Jul 23, 2024
9d0ccc5
change id's and add fallback
Nealium104 Jul 24, 2024
8f16abd
Merge branch 'neal' into dev
Nealium104 Jul 24, 2024
0e681a9
Merge branch 'dev' of https://github.com/uklibraries/UKL_HeaderFooter…
Nealium104 Jul 24, 2024
f1de4e9
add fallback to config and universalheader
Nealium104 Jul 24, 2024
4957477
fix onerror usage
Nealium104 Jul 24, 2024
394daeb
Update libcalConfig.js
libmanuk Jul 24, 2024
a5b7d31
Update README.md
Nealium104 Jul 25, 2024
7dfcdb8
Update README.md
Nealium104 Jul 31, 2024
ebbc3cd
add CSS reset constrained with id's
Nealium104 Aug 2, 2024
0698529
Merge branch 'dev' of https://github.com/uklibraries/UKL_HeaderFooter…
Nealium104 Aug 2, 2024
4e18b47
Add basic linting CI
Nealium104 Aug 9, 2024
3aa89a9
add globals package and eslint configuration to CI
Nealium104 Aug 12, 2024
c341a32
change site title
Nealium104 Aug 12, 2024
d5dc9c1
trigger github actions
Nealium104 Aug 12, 2024
22bed88
add eslint to root
Nealium104 Aug 12, 2024
682aa32
add fail
Nealium104 Aug 12, 2024
ae69fc3
fix unused var
Nealium104 Aug 13, 2024
db49280
fix unused var
Nealium104 Aug 13, 2024
1a684bd
Update universalheader.js
Nealium104 Aug 13, 2024
a2bf57c
Update universalheader.js
Nealium104 Aug 13, 2024
f750b00
Delete solr.json
Nealium104 Aug 13, 2024
4ae55fe
Merge pull request #61 from uklibraries/ci
Nealium104 Aug 13, 2024
28e00b0
modify workflow for dev branch
Nealium104 Aug 13, 2024
301aecc
add doc
Nealium104 Aug 14, 2024
fd93cfc
Add image to doc
Nealium104 Aug 14, 2024
a4d1b75
Create exploreukConfig.js
libmanuk Aug 21, 2024
01f48bf
first iteration for keyboard navigation
Nealium104 Sep 13, 2024
56b5374
fixes #60, menu item select
Nealium104 Sep 13, 2024
21365b5
Update libcalConfig.js to current settings for production
libmanuk Sep 26, 2024
3a14379
Update nkaaConfig.js with current settings for production
libmanuk Sep 26, 2024
8e2f397
Delete js/config/sites/libcal/logo.png, not needed for this config
libmanuk Sep 26, 2024
22f04a5
Update nkaaConfig.js, set hdr_width for production
libmanuk Sep 26, 2024
00fadac
Update libcalConfig.js, set hdr_width for production
libmanuk Sep 26, 2024
c93c963
Delete js/config/sites/nkaa/logo.png, not used with this config
libmanuk Sep 26, 2024
3535e06
Update nkaaConfig.js, standardize config
libmanuk Sep 27, 2024
dde3d1e
Create metsgenConfig.js
libmanuk Sep 27, 2024
1b872c1
Update libcalConfig.js, standardize config
libmanuk Sep 27, 2024
e81c3eb
Create atozConfig.js
libmanuk Sep 27, 2024
47ae46e
Create spokedbConfig.js
libmanuk Sep 27, 2024
2dc4d26
Rename metsgenConfig.js to metgenConfig.js
libmanuk Sep 27, 2024
3699545
Create lhlConfig.js
libmanuk Sep 27, 2024
a662731
Create infokatConfig.js
libmanuk Sep 30, 2024
8b81db2
Create atlasConfig.js
libmanuk Sep 30, 2024
1ab915c
Create spshrtestConfig.js
libmanuk Sep 30, 2024
dd5e98a
add event listeners for menu
Nealium104 Oct 4, 2024
5a5e575
fix event propogation issue in dropdowns
Nealium104 Oct 4, 2024
1523c87
fix mobile layout
Nealium104 Oct 4, 2024
ddbeff5
Create uklfacevalConfig.js
libmanuk Oct 7, 2024
940474d
rework event listeners
Nealium104 Oct 7, 2024
269648f
remove tailwind and add appropriate classes for CSS reset
Nealium104 Oct 7, 2024
137e90d
change all CSS to kebab case in js
Nealium104 Oct 8, 2024
0d4c781
change all CSS to kebab case in css
Nealium104 Oct 8, 2024
f47adf9
added example without tailwind
Nealium104 Oct 8, 2024
a3e3b48
Merge branch 'dev' of https://github.com/uklibraries/UKL_HeaderFooter…
Nealium104 Oct 9, 2024
6077af3
address click behavior
Nealium104 Oct 9, 2024
0ed04d3
basic cleanup
Nealium104 Oct 10, 2024
32ebd09
Create kdnpConfig.js
libmanuk Oct 14, 2024
db99aa2
Fix icon spacing
Nealium104 Oct 14, 2024
fda62a7
add hide empty elements
libmanuk Oct 15, 2024
89f49e9
add ukl-getlink class to elements for :empty CSS rule
libmanuk Oct 15, 2024
6004294
items within menu align left, and extra extra spacing on mobile removed
Nealium104 Oct 15, 2024
e5fb335
add padding back in to keep blue arrow
Nealium104 Oct 15, 2024
74d442a
fix menu on click-away to click-on
Nealium104 Oct 16, 2024
782e876
major refactor and bugfix
Nealium104 Oct 21, 2024
c5db24b
fix typo
Nealium104 Oct 21, 2024
0757426
fix icon spacing
Nealium104 Oct 21, 2024
8bb96f8
fix tab regression
Nealium104 Oct 22, 2024
56e6dca
Use full GitHub profile URLs for username links.
cokernel Oct 31, 2024
947582d
Merge pull request #63 from uklibraries/correct_username_links
libmanuk Nov 4, 2024
53d272a
Merge pull request #64 from uklibraries/click-behavior
Nealium104 Nov 4, 2024
ecf37c3
Revert "Click behavior, fixes #62"
Nealium104 Nov 4, 2024
74cd6f6
Merge pull request #65 from uklibraries/revert-64-click-behavior
Nealium104 Nov 4, 2024
b91fd59
change when the script gets removed and set the base_path dynamically
Nealium104 Nov 6, 2024
0e973a1
added documentation for the HTML script
Nealium104 Nov 6, 2024
18ffe22
fix casing and ambigious naming
Nealium104 Nov 6, 2024
457ad1a
delete irrelevant test file
Nealium104 Nov 6, 2024
dffd9ea
fix casing and rename files for casing
Nealium104 Nov 6, 2024
24f35c4
fix casing in globalConfig.js
Nealium104 Nov 6, 2024
ba363f0
update imports
Nealium104 Nov 6, 2024
bb2af5c
fix merge conflict
Nealium104 Nov 6, 2024
3bb61e7
fix working changes
Nealium104 Nov 6, 2024
f3ea7a4
Revert "update imports"
Nealium104 Nov 6, 2024
74cbad2
update imports
Nealium104 Nov 6, 2024
5f1989e
fix merge error
Nealium104 Nov 7, 2024
8b71838
fix merge error
Nealium104 Nov 7, 2024
5518758
Merge pull request #68 from uklibraries/click-behavior
libmanuk Nov 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Lint

on:
push:
branches: [dev]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: "20.x"

- name: Install ESLint
run: npm install @eslint/js --save-dev

- name: Install globals
run: npm install globals

- name: Run ESLint with recommended rules
run: npx eslint .
54 changes: 37 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,37 @@
# UKL_HeaderFooter
JavaScript used to insert UKYL website headers and footers into 3rd party sites.

# Scripts Location
(https://lib.uky.edu/webparts/ukhdr/2024/css/global_header_footer.css)
(https://lib.uky.edu/webparts/ukhdr/2024/js/universalheader.js)
(https://lib.uky.edu/webparts/ukhdr/2024/js/combofootershared.js)

# Special Server Settings
lib.uky.edu is currently administered by Jay Baker.
Jay has set the http response headers for the ukhdr directory and subdirectories so that they have an immediate expiration to avoid browser caching.

# Usage
[Implementation Guide](https://lib.uky.edu/webparts/ukhdr/2024/dev/doc.html)

# Attribution
Code co-authored by Eric Weig and Neal Powers with contributions by MLE Slone.
# UKL_HeaderFooter
> A configurable header and footer for use across University of Kentucky Libraries web properties

# Usage
_More details about how to structure the HTML for your website as well as more detailed explanations can be found [here](https://lib.uky.edu/webparts/ukhdr/2024/dev/doc.html)._

## Implementation Overview
The current implementation works by taking in a number of configuration files found in `/js/config/[...]` and passing them as objects to the universalheader.js file. For customization, it's recommended to use CSS prefixes to avoid naming conflicts on host websites. There is also a system for fallback versions of the script, configurations for which can be found on branch `cdn-fallback`. Inline JavaScript is included for fallback behavior.

## Section Naming
The header has 6 sections, that we've named from top to bottom.
1. Emergency Messaging
2. University Level Header
3. Website Navigation
4. Disruption Messaging
5. Survey

## CDN Usage
The [CDN](https://www.cloudflare.com/learning/cdn/what-is-a-cdn/) we've chosen is [jsDelivr](https://www.jsdelivr.com/), an open source CDN with backing from [Fastly](https://www.fastly.com/) and [CloudFlare](https://www.cloudflare.com/). We've chosen jsDelivr as a cost-saving measure, but its integrations with GitHub are also useful for our team. One additional note about usage, browser caching from jsDelivr is set to be a week from user usage. This was the primary reason the CDN was chosen as a fallback and not the primary provider. In case of changes to the backup, vendors **must** purge relevant links from the [Purge Cache Tool](https://www.jsdelivr.com/tools/purge) if they wish changes to be reflected within 12 hours. A hard refresh from users is also required.

## Production Script Locations
(https://lib.uky.edu/webparts/ukhdr/2024/css/global_header_footer.css)
(https://lib.uky.edu/webparts/ukhdr/2024/js/universalheader.js)
(https://lib.uky.edu/webparts/ukhdr/2024/js/combofootershared.js)

## Fallback CDN Links
> _TODO: Finalize configurations for both production and fallbacks_

## Special Server Settings
lib.uky.edu is currently administered _(current as of 07/25/24)_ by Jay Baker.
Jay has set the http response headers for the ukhdr directory and subdirectories so that they have an immediate expiration to avoid browser caching.

# Questions?
Please contact any of those listed on attributions below.

# Attribution
Code co-authored by [Eric Weig](https://github.com/libmanuk/) and [Neal Powers](https://github.com/Nealium104/) with contributions by [MLE Slone](https://github.com/cokernel/).
Loading