diff --git a/CHANGELOG.md b/CHANGELOG.md index 45044ba..a715d55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,20 +1,32 @@ # Headhesive changelog +## v2.0.0 + +- Transitioned from Gulp to Vite build system. +- Refactored JavaScript codebase for improved efficiency and readability. +- Conducted backward compatibility testing. +- Updated the Readme file to reflect changes and provide up-to-date information. + ## v1.2.4 + - Fix resize event when using numerical offset - Fix destroy method for resize event - Changelog corrections ## v1.2.3 + - Readme correction ## v1.2.2 + - Fix UMD support ## v1.2.1 + - Bump version to publish to npm ## v1.2.0 + - Add UMD support - Allow to select either the top or bottom of the offset element - Update the offset position on browser resize @@ -23,11 +35,14 @@ - Make the clone version lower z-index than original. Prevents visual overlap of both when scrolling quickly ## v1.1.1 + - Fix class naming ## v1.1.0 + - Call the init method internally on instance creation - Destroy method to only destroy it's instance ## v1.0.0 + - Initial diff --git a/LICENSE b/LICENSE index 420d665..db99813 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,4 @@ -The MIT License (MIT) - -Copyright (c) 2015 Jim Cowart +# The MIT License (MIT) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 2f5998c..dad696d 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,28 @@ # Headhesive.js + > An on-demand sticky header. ## What is it? + Headhesive.js creates an on-demand sticky header. Specify when you want your header to become fixed and the rest is magic. [View demo](http://markgoodyear.com/labs/headhesive/). ## Install -Install with npm: -``` -npm install headhesive +### Install with npm + +```bash +npm install ``` -Install with Bower: +### Install with yarn -``` -bower install headhesive (or bower install headhesive.js) +```bash +yarn install headhesive ``` ## How to use? -Headhesive.js is a standalone JavaScript plugin with no dependencies. Include the [`headhesive.min.js`](dist/headhesive.min.js) *(from the [`dist/`](dist/) folder)* in the footer of your page and initialise it: + +Headhesive.js is a standalone JavaScript plugin with no dependencies. Include the [`headhesive.mjs`](dist/headhesive.mjs) *(from the [`dist/`](dist/) folder)* in the footer of your page and initialise it: ```javascript // Create a new instance of Headhesive @@ -26,9 +30,11 @@ var header = new Headhesive('.header'); ``` ### Styling Headhesive.js + Headhesive.js doesn't inject any CSS styles so you can use your own to completely control how your sticky element behaves. An [example is provided in the demo](demo/css/headhesive.css). ## Options + Customise how Headhesive.js works by passing in custom options. ```javascript @@ -76,6 +82,7 @@ var header = new Headhesive('.header', options); ``` ## Destroy method + To destroy an instance of Headhesive.js, you can call the destroy method: ```javascript @@ -83,10 +90,13 @@ header.destroy(); ``` ## Browser support + IE9+ and modern browsers. ## License + Headesive.js is licensed under the [MIT License](LICENSE). ## Demo + There is a demo available in the [demo folder](demo/) and online at [http://markgoodyear.com/labs/headhesive/](http://markgoodyear.com/labs/headhesive/). diff --git a/bower.json b/bower.json index 28d9986..5494880 100644 --- a/bower.json +++ b/bower.json @@ -1,11 +1,12 @@ { "name": "Headhesive.js", - "version": "1.2.4", + "version": "2.0.0", "homepage": "http://markgoodyear.com/labs/headhesive/", "authors": [ + "Răzvan Gheorghe (https://ideacat.ro)", "Mark Goodyear (http://markgoodyear.com)" ], - "description": "An on-demand sticky header", + "description": "An on-demand sticky header. 2023 refreshed using Vite", "main": "dist/headhesive.js", "keywords": [ "header", diff --git a/demo/index.html b/demo/index.html index 0f19d8d..3839334 100644 --- a/demo/index.html +++ b/demo/index.html @@ -59,7 +59,7 @@

Scroll to see it in action

- +