PageSourceSearch

https://aidanwhiteley.com/static/js/13.fb0867ca.chunk.js

js aidanwhiteley.com collected 2026-10-04 06:57:07 UTC 9,195 bytes, 2 lines download raw bytes

1(this["webpackJsonphomepage-components"]=this["webpackJsonphomepage-components"]||[]).push([[13],{126:function(t,e,i){},182:function(t,e,i){"use strict";i.r(e);var s=i(0),a=i(62),n=i(1);var c=t=>{const[e,i]=Object(s.useState)(""),[c,o]=Object(s.useState)(""),[l,h]=Object(s.useState)("<em>Getting content about the photos from the CMS...</em>"),[r,d]=Object(s.useState)(null);return t.cmscontent&&t.cmscontent.then((t=>{if(t){const e=a.a(t.data,"PictureGalleryIntro");i(e.title),o(e.introtext),h(e.detailtext)}else d("There was an unexpected response while getting photos from the content management system!"),console.log("Error getting CMS content: "+JSON.stringify(t))})).catch((t=>{d("There was an unexpected error getting text about the photos from the content management system!"),console.log("There was an error getting CMS content: "+t)})),Object(n.jsx)(s.Fragment,{children:Object(n.jsx)("div",{className:"container",children:Object(n.jsx)("div",{className:"row intro",children:Object(n.jsx)("div",{className:"col-lg-12",children:Object(n.jsxs)("div",{className:"text-container",children:[r&&Object(n.jsx)("p",{children:r}),!r&&Object(n.jsxs)("div",{children:[Object(n.jsx)("div",{className:"section-title",children:e}),Object(n.jsx)("h2",{children:c}),Object(n.jsx)("div",{dangerouslySetInnerHTML:{__html:l}})]})]})})})})})},o=(i(126),i(127)),l=i.n(o),h=i(82),r=i.n(h);class d extends l.a{onClickImage(){this.props.onClickImageInParent(this.state.currentImage)}}class m extends s.Component{constructor(t){super(t);const e=window.location.search,i=new URLSearchParams(e),s=i.get("activity")?i.get("activity"):"boats|canoes|dogs|bikes";this.state={error:null,isLoaded:!1,photos:[],onThisDay:[],selectedActivity:s,currentImage:0,viewerIsOpen:!1,width:window.innerWidth,height:window.innerHeight,page:0},this.fetchData=this.fetchData.bind(this),this.onChange=this.onChange.bind(this),this.onClick=this.onClick.bind(this),this.updateWindowDimensions=this.updateWindowDimensions.bind(this),this.onClickImage=this.onClickImage.bind(this)}componentDidMount(){this.updateWindowDimensions(),window.addEventListener("resize",this.updateWindowDimensions),this.fetchData(this.state.selectedActivity,this.state.page)}componentWillUnmount(){window.removeEventListener("resize",this.updateWindowDimensions)}updateWindowDimensions(){this.state.width===window.innerWidth&&this.state.height===window.innerHeight||this.setState({width:window.innerWidth,height:window.innerHeight})}fetchData(t,e){this.setState({isLoaded:!1});const i=window.location.hostname.split(".")[0];fetch("//thegpsblog.com/randomPhotos?types="+t+"&numRqd=30&page="+e+"&siteId="+i).then((t=>t.json())).then((e=>{this.setState({isLoaded:!0,photos:e.photos,onThisDay:e.activtiesOnThisDay,selectedActivity:t})}),(t=>{console.log(t),this.setState({isLoaded:!0,error:t})}))}onChange(t){const e=t.target.id;this.setState({page:0}),e.includes("activitiesAllPics")?this.fetchData("boats|canoes|dogs|bikes",0):e.includes("activitiesBoatsPics")?this.fetchData("boats",0):e.includes("activitiesCanoesPics")?this.fetchData("canoes",0):e.includes("activitiesDogWalksPics")?this.fetchData("dogs",0):e.includes("activitiesCyclingPics")?this.fetchData("bikes",0):e.includes("activitiesOnThisDay")?this.setState({photos:this.state.onThisDay[0].photos,selectedActivity:"activitiesOnThisDay"}):console.log("Unknown id "+e+" was supplied")}onClick(t){this.fetchData(this.state.selectedActivity,this.state.page+1),this.setState({page:this.state.page+1})}onClickImage(t){var e=this.state.photos[t];window.top.location.href=e.activityFriendlyUrl}render(){if(!this.state.isLoaded)return Object(n.jsx)(s.Fragment,{children:Object(n.jsx)("div",{className:"Loader",children:"Getting activity data..."})});if(this.state.error)return Object(n.jsx)(s.Fragment,{children:Object(n.jsx)("div",{className:"AlertInfo",children:Object(n.jsx)("p",{className:"font-italic",children:"There was a problem retrieving photo data from https://thegpsblog.com - please try again later"})})});let t=16;this.state.width<=768?t=3:this.state.width<992?t=6:this.state.width<1200?t=8:this.state.width<=1600&&(t=10);const e=this.state.photos.map((t=>({src:t.imageUrl,thumbnail:t.imageUrl,thumbnailWidth:t.width*(300/t.height),thumbnailHeight:300,caption:t.name+(t.whenTaken>0?" - "+r()(t.whenTaken).format("dddd, MMMM Do YYYY"):""),details:t.activityFriendlyUrl}))).slice(0,t),i=Object(n.jsx)(d,{images:e,enableImageSelection:!1,rowHeight:300,maxRows:2,backdropClosesModal:!0,onClickImageInParent:this.onClickImage}),a=this.state.onThisDay.length>0?"//thegpsblog.com/activities/"+this.state.onThisDay[0].activityWithPictures.friendlyUrl:"";return Object(n.jsxs)(s.Fragment,{children:[Object(n.jsx)("div",{className:"clearfix",children:i}),Object(n.jsx)("div",{className:"picControls",children:Object(n.jsxs)("form",{children:[Object(n.jsx)("span",{className:"selectionName",children:"Display photos from which activity types?"}),Object(n.jsxs)("div",{className:"custom-control custom-radio custom-control-inline",children:[Object(n.jsx)("input",{type:"radio",id:"activitiesAllPics",name:"activitiesToDisplay",onChange:this.onChange,className:"custom-control-input",defaultChecked:"boats|canoes|dogs|bikes"===this.state.selectedActivity}),Object(n.jsx)("label",{className:"custom-control-label",htmlFor:"activitiesAllPics",children:"All activities"})]}),Object(n.jsxs)("div",{className:"custom-control custom-radio custom-control-inline",children:[Object(n.jsx)("input",{type:"radio",id:"activitiesBoatsPics",name:"activitiesToDisplay",onChange:this.onChange,className:"custom-control-input",defaultChecked:"boats"===this.state.selectedActivity}),Object(n.jsx)("label",{className:"custom-control-label",htmlFor:"activitiesBoatsPics",children:"Boats"})]}),Object(n.jsxs)("div",{className:"custom-control custom-radio custom-control-inline",children:[Object(n.jsx)("input",{type:"radio",id:"activitiesCanoesPics",name:"activitiesToDisplay",onChange:this.onChange,className:"custom-control-input",defaultChecked:"canoes"===this.state.selectedActivity}),Object(n.jsx)("label",{className:"custom-control-label",htmlFor:"activitiesCanoesPics",children:"Canoes and kayaks"})]}),Object(n.jsxs)("div",{className:"custom-control custom-radio custom-control-inline",children:[Object(n.jsx)("input",{type:"radio",id:"activitiesDogWalksPics",name:"activitiesToDisplay",onChange:this.onChange,className:"custom-control-input",defaultChecked:"dogs"===this.state.selectedActivity}),Object(n.jsx)("label",{className:"custom-control-label",htmlFor:"activitiesDogWalksPics",children:"Dog walks"})]}),Object(n.jsxs)("div",{className:"custom-control custom-radio custom-control-inline",children:[Object(n.jsx)("input",{type:"radio",id:"activitiesCyclingPics",name:"activitiesToDisplay",onChange:this.onChange,className:"custom-control-input",defaultChecked:"bikes"===this.state.selectedActivity}),Object(n.jsx)("label",{className:"custom-control-label",htmlFor:"activitiesCyclingPics",children:"Cycling"})]}),this.state.onThisDay.length>0&&Object(n.jsx)(s.Fragment,{children:Object(n.jsxs)("div",{className:"custom-control custom-radio custom-control-inline on-this-day-intro",children:[Object(n.jsx)("input",{type:"radio",id:"activitiesOnThisDay",name:"activitiesToDisplay",onChange:this.onChange,className:"custom-control-input",defaultChecked:"onThisDay"===this.state.selectedActivity}),Object(n.jsxs)("label",{className:"custom-control-label",htmlFor:"activitiesOnThisDay",children:[Object(n.jsx)("span",{className:"selectionName",children:"On this day..."}),r()(this.state.onThisDay[0].activityWithPictures.dateStr,"DD MMM YY").format("dddd, MMMM Do YYYY"),",\xa0",this.state.onThisDay[0].activityWithPictures.name,Object(n.jsxs)("div",{style:{display:"activitiesOnThisDay"===this.state.selectedActivity?"block":"none"},children:[Object(n.jsx)("p",{children:this.state.onThisDay[0].activityWithPictures.description}),Object(n.jsxs)("p",{children:[Object(n.jsx)("i",{className:"fas fa-external-link-alt"})," See this activity on ",Object(n.jsx)("a",{href:a,children:"The GPS Blog"}),"."]})]})]})]})}),Object(n.jsx)("button",{id:"activitiesReload",type:"button",onClick:this.onClick,disabled:!this.state.isLoaded||"activitiesOnThisDay"===this.state.selectedActivity,className:"btn btn-primary reload-button btn-sm float-right",children:"More photos?"})]})})]})}}var j=m;e.default=t=>Object(n.jsxs)(s.Fragment,{children:[Object(n.jsx)(c,{cmscontent:t.cmscontent}
1),Object(n.jsx)("div",{id:"details",className:"container basic1a",children:Object(n.jsx)("div",{className:"row content-row",children:Object(n.jsx)("div",{className:"col-lg-12",children:Object(n.jsx)(j,{})})})})]})},62:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var s=i(22);function a(t,e){let i=window.location.hostname,a=s.a;"localhost"===i&&(i=s.d,a=s.e);i===s.c&&(a=s.b);var n=t.filter((function(t){return t.componentname===e&&t.website===a}));if(n.length>0)return n[0];if((n=t.filter((function(t){return t.componentname===e&&"all"===t.website}))).length>0)return n[0];var c="Did not find any content for domain "+i+" and component "+e;throw console.log(c),new Error(c)}}}]);
2//# sourceMappingURL=13.fb0867ca.chunk.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.