mirror of
https://github.com/picocms/pico-theme.git
synced 2025-08-22 00:06:02 +02:00
Compare commits
3 Commits
v2.1.4
...
v3.0.0-alp
Author | SHA1 | Date | |
---|---|---|---|
|
85fe74b8db | ||
|
9f2a61a315 | ||
|
6b328f96b0 |
16
CHANGELOG.md
16
CHANGELOG.md
@@ -8,23 +8,13 @@ Pico Default Theme Changelog
|
|||||||
refer to both the UPGRADE and NEWS sections of the docs for more
|
refer to both the UPGRADE and NEWS sections of the docs for more
|
||||||
details.
|
details.
|
||||||
|
|
||||||
### Version 2.1.4
|
### Version 3.0.0-alpha.1
|
||||||
Released: 2020-08-29
|
Released: 2020-03-29
|
||||||
|
|
||||||
```
|
```
|
||||||
* [Changed] Don't setup nav toggle JavaScript when there's no menu
|
* [New] Kick-start development of Pico 3.0
|
||||||
```
|
```
|
||||||
|
|
||||||
### Version 2.1.3
|
|
||||||
Released: 2020-07-10
|
|
||||||
|
|
||||||
No changes
|
|
||||||
|
|
||||||
### Version 2.1.2
|
|
||||||
Released: 2020-04-10
|
|
||||||
|
|
||||||
No changes
|
|
||||||
|
|
||||||
### Version 2.1.1
|
### Version 2.1.1
|
||||||
Released: 2019-12-31
|
Released: 2019-12-31
|
||||||
|
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
* @author Daniel Rudolf
|
* @author Daniel Rudolf
|
||||||
* @link http://picocms.org
|
* @link http://picocms.org
|
||||||
* @license http://opensource.org/licenses/MIT The MIT License
|
* @license http://opensource.org/licenses/MIT The MIT License
|
||||||
* @version 2.1
|
* @version 3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
* {
|
* {
|
||||||
|
22
js/pico.js
22
js/pico.js
@@ -6,7 +6,7 @@
|
|||||||
* @author Daniel Rudolf
|
* @author Daniel Rudolf
|
||||||
* @link http://picocms.org
|
* @link http://picocms.org
|
||||||
* @license http://opensource.org/licenses/MIT The MIT License
|
* @license http://opensource.org/licenses/MIT The MIT License
|
||||||
* @version 2.1
|
* @version 3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function main()
|
function main()
|
||||||
@@ -28,12 +28,10 @@ function main()
|
|||||||
|
|
||||||
// responsive menu
|
// responsive menu
|
||||||
var menu = document.getElementById('nav'),
|
var menu = document.getElementById('nav'),
|
||||||
menuToggle = document.getElementById('nav-toggle');
|
menuToggle = document.getElementById('nav-toggle'),
|
||||||
|
toggleMenuEvent = function (event) {
|
||||||
if (menu && menuToggle) {
|
|
||||||
function toggleMenuEvent(event) {
|
|
||||||
if (event.type === 'keydown') {
|
if (event.type === 'keydown') {
|
||||||
if ((event.keyCode !== 13) && (event.keyCode !== 32)) {
|
if ((event.keyCode != 13) && (event.keyCode != 32)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -51,9 +49,8 @@ function main()
|
|||||||
menuToggle.setAttribute('aria-expanded', 'false');
|
menuToggle.setAttribute('aria-expanded', 'false');
|
||||||
utils.slideUp(menu);
|
utils.slideUp(menu);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
onResizeEvent = function () {
|
||||||
function onResizeEvent() {
|
|
||||||
if (utils.isElementVisible(menuToggle)) {
|
if (utils.isElementVisible(menuToggle)) {
|
||||||
menu.className = 'hidden';
|
menu.className = 'hidden';
|
||||||
menuToggle.addEventListener('click', toggleMenuEvent);
|
menuToggle.addEventListener('click', toggleMenuEvent);
|
||||||
@@ -64,11 +61,10 @@ function main()
|
|||||||
menuToggle.removeEventListener('click', toggleMenuEvent);
|
menuToggle.removeEventListener('click', toggleMenuEvent);
|
||||||
menuToggle.removeEventListener('keydown', toggleMenuEvent);
|
menuToggle.removeEventListener('keydown', toggleMenuEvent);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
window.addEventListener('resize', onResizeEvent);
|
window.addEventListener('resize', onResizeEvent);
|
||||||
onResizeEvent();
|
onResizeEvent();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main();
|
main();
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
* @author Daniel Rudolf
|
* @author Daniel Rudolf
|
||||||
* @link http://picocms.org
|
* @link http://picocms.org
|
||||||
* @license http://opensource.org/licenses/MIT The MIT License
|
* @license http://opensource.org/licenses/MIT The MIT License
|
||||||
* @version 2.1
|
* @version 3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
utils = {};
|
utils = {};
|
||||||
|
Reference in New Issue
Block a user