getfarmcredit.com app written in VueJS
Get a Google API Key then follow instructions inside /config/default.googleMapsApiKey.js
Instructions inside
Edit /config/app.filterConfig.js
./static/agf_config.js
and load in html:
<script src="YOUR_PATH/js/agf_config.js"></script>
You'll need to reference the following:
<!-- place in <HEAD> -->
<!-- You can reference your own typekit that whitelists your domain -->
<link rel="stylesheet" href="https://use.typekit.net/aqh0bgp.css" />
<link href="YOUR_PATH/css/app.css" rel="stylesheet">
<script src="YOUR_PATH/js/agf_config.js"></script>
<!-- Have this somewhere in <body> -->
<div id="app"></div>
<!-- These can be near </body> -->
<script type="text/javascript" src="/YOUR_PATH/js/manifest.js"></script>
<script type="text/javascript" src="/YOUR_PATH/js/vendor.js"></script>
<script type="text/javascript" src="/YOUR_PATH/js/app.js"></script>
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
- before starting, delete contents of the following directories
/web/modules/custom/getfarmcreditmap/js
/web/modules/custom/getfarmcreditmap/css
- run
npm run build
- Copy
dist/getfarmcreditmap.js
into/web/modules/custom/getfarmcreditmap/js
- Copy
dist/getfarmcreditmap.libraries.yml
into/web/modules/custom/getfarmcreditmap/
- Copy contents of
dist/static/js
intoweb/modules/custom/getfarmcreditmap/js
- Copy contents of
dist/static/css
intoweb/modules/custom/getfarmcreditmap/css
fix
- fix app loading strategy. there was a change fromwindow.onLoad
toaddEventListener('DOMContentLoad', function(){})
that cause the app to load sporadically, as it only waited for the DOM to be ready, not waiting on external assets. This update reverts back to originalwindow.onLoad
which does wait for everything to load, including external assets.
new
- add check for "Fax 2".
refactor
: a11y scan revisions
polish
: overlapping 'x' inside input in ie11
fix
- fix IE bug (updated dependency)chore
- update dependencies:vue
,vue-instant
,vue-select
.
fix
- partial county check for zip code searchfeat
- commit #025d73cdbc4afa1f0df6cd198b142e13d40b863a
: text county override.
revision
Info Window shows branch detail url if it exists
feature
- Info Window now has website linkbugfix
- Info Window triple click issuechore
- Removedvue2-google-maps-fixed
. Fixed issue pulled intovue2-google-maps
.
- dev tooling upgrade.
npm run build
now outputsgetfarmcreditmap.js
andgetfarmcreditmap.libraries.yml
files to streamline updates to GetFarmCredit.com.
- allowed HTML in custom intro text (window.AGF_CONFIG.customIntro.text)
- check for
AGF_CONFIG_LOCAL
beforeAGF_CONFIG
. Plumming for plans to serve configuration from theme level in future, to mitigate against possible file conflicts from upstream.
- if the map config is set to filter by association, then websites won't display on locations (only detail page URLs)
- better error handling when fetching branch data
- better handling of
null
values in branch data - branch detail links are pulled from
window.location_lookup
if it exists on the page - county matching is exact (
===
instead ofindexOf
)
- added Zip Code field and zip code search
- county field becomes active when zip code search returns multiple branches so that search can be refined
- branch data now comes from https://www.getfarmcredit.com/locations_feed
- branch data url requires valid
key
parameter to display app (ex: https://www.getfarmcredit.com/locations_feed?key=1234) - switched back to
vue2-google-maps-fixed
because fix isn't working on master
- added drupal_detail_url content to AgSouth branches in appData.json
- removed
vue2-google-maps-fixed
since fix was added to main
customization
- Added logic for drupal url- temporaily using fork
vue2-google-maps-fixed
for ie11 compatibility See GitHub Issue. We'll switch back to main next release.