Compare commits

...

7 Commits

Author SHA1 Message Date
Matt Walsh
d9092845af 5.9.12 2023-09-20 15:41:45 -05:00
Matt Walsh
3baf6d6870 Merge branch 'HEAD' into main 2023-09-20 15:41:13 -05:00
Matt Walsh
7a457745df fix local forecast pagination when full screen 2023-09-20 15:36:22 -05:00
Matt Walsh
e9b0bef023 add mjs to git attributes 2023-09-19 08:21:00 -05:00
Matt Walsh
cff7dc5b00 Merge pull request #30 from hokey/fix-sass-package-script-reference
Update the script to build the css and minimize it to work with the files checked in
2023-09-04 20:32:20 -05:00
hokey
14ca2935e1 Update the script to build the css and minimize it to work with the files checked in 2023-09-02 21:59:03 -05:00
Matt Walsh
6ebd2a6703 capture dist 2023-08-14 21:32:33 -05:00
12 changed files with 3113 additions and 2834 deletions

1
.gitattributes vendored
View File

@@ -1,4 +1,5 @@
*.js text eol=lf
*.mjs text eol=lf
*.ejs text eol=lf
*.html text eol=lf
*.json text eol=lf

2
dist/index.html vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1043
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,11 +1,11 @@
{
"name": "ws4kp",
"version": "5.9.11",
"version": "5.9.12",
"description": "Welcome to the WeatherStar 4000+ project page!",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build:css": "sass ./server/styles/scss/style.scss ./server/styles/compiled.css",
"build:css": "sass --style=compressed ./server/styles/scss/main.scss ./server/styles/main.css",
"lint": "eslint ./server/scripts/**/*.mjs",
"lint:fix": "eslint --fix ./server/scripts/**/*.mjs"
},
@@ -25,7 +25,7 @@
"eslint": "^8.21.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-sonarjs": "^0.19.0",
"eslint-plugin-sonarjs": "^0.21.0",
"eslint-plugin-unicorn": "^46.0.0",
"express": "^4.17.1",
"gulp": "^4.0.2",

View File

@@ -44,7 +44,7 @@ class LocalForecast extends WeatherDisplay {
forecastsElem.append(...templates);
// increase each forecast height to a multiple of container height
this.pageHeight = forecastsElem.parentNode.getBoundingClientRect().height;
this.pageHeight = forecastsElem.parentNode.scrollHeight;
templates.forEach((forecast) => {
const newHeight = Math.ceil(forecast.scrollHeight / this.pageHeight) * this.pageHeight;
forecast.style.height = `${newHeight}px`;

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -46,12 +46,20 @@
// if the user released on a different target, cancel!
if (startEl !== e.target) return;
var swipeThreshold = parseInt(getNearestAttribute(startEl, 'data-swipe-threshold', '20'), 10); // default 20px
var swipeThreshold = parseInt(getNearestAttribute(startEl, 'data-swipe-threshold', '20'), 10); // default 20 units
var swipeUnit = getNearestAttribute(startEl, 'data-swipe-unit', 'px'); // default px
var swipeTimeout = parseInt(getNearestAttribute(startEl, 'data-swipe-timeout', '500'), 10); // default 500ms
var timeDiff = Date.now() - timeDown;
var eventType = '';
var changedTouches = e.changedTouches || e.touches || [];
if (swipeUnit === 'vh') {
swipeThreshold = Math.round((swipeThreshold / 100) * document.documentElement.clientHeight); // get percentage of viewport height in pixels
}
if (swipeUnit === 'vw') {
swipeThreshold = Math.round((swipeThreshold / 100) * document.documentElement.clientWidth); // get percentage of viewport height in pixels
}
if (Math.abs(xDiff) > Math.abs(yDiff)) { // most significant
if (Math.abs(xDiff) > swipeThreshold && timeDiff < swipeTimeout) {
if (xDiff > 0) {
@@ -139,7 +147,7 @@
*/
function getNearestAttribute(el, attributeName, defaultValue) {
// walk up the dom tree looking for data-action and data-trigger
// walk up the dom tree looking for attributeName
while (el && el !== document.documentElement) {
var attributeValue = el.getAttribute(attributeName);

View File

@@ -1,56 +1,57 @@
{
"folders": [
{
"path": "."
}
],
"settings": {
"search.exclude": {
"**/*.code-search": true,
"**/*.css": true,
"**/*.min.js": true,
"**/bower_components": true,
"**/node_modules": true,
"**/vendor": true,
"dist/**": true
},
"cSpell.enabled": true,
"cSpell.words": [
"'storm",
"arcgis",
"Battaglia",
"devbridge",
"gifs",
"ltrim",
"Noaa",
"nosleep",
"Pngs",
"PRECIP",
"rtrim",
"sonarjs",
"T",
"T'storm",
"uscomp",
"Visib",
"Waukegan"
],
"cSpell.ignorePaths": [
"**/package-lock.json",
"**/node_modules/**",
"**/vscode-extension/**",
"**/.git/objects/**",
".vscode",
".vscode-insiders",
"**/vendor/auto/**",
"**/twc3.js",
],
"editor.tabSize": 2,
"emmet.includeLanguages": {
"ejs": "html",
},
"[html]": {
"editor.defaultFormatter": "j69.ejs-beautify"
},
"files.exclude": {},
},
{
"folders": [
{
"path": "."
}
],
"settings": {
"search.exclude": {
"**/*.code-search": true,
"**/*.css": true,
"**/*.min.js": true,
"**/bower_components": true,
"**/node_modules": true,
"**/vendor": true,
"dist/**": true
},
"cSpell.enabled": true,
"cSpell.words": [
"'storm",
"arcgis",
"Battaglia",
"devbridge",
"gifs",
"ltrim",
"Noaa",
"nosleep",
"Pngs",
"PRECIP",
"rtrim",
"sonarjs",
"T",
"T'storm",
"uscomp",
"Visib",
"Waukegan"
],
"cSpell.ignorePaths": [
"**/package-lock.json",
"**/node_modules/**",
"**/vscode-extension/**",
"**/.git/objects/**",
".vscode",
".vscode-insiders",
"**/vendor/auto/**",
"**/twc3.js",
],
"editor.tabSize": 2,
"emmet.includeLanguages": {
"ejs": "html",
},
"[html]": {
"editor.defaultFormatter": "j69.ejs-beautify"
},
"files.exclude": {},
"files.eol": "\n",
},
}