@@ -6,23 +6,49 @@ TutorCruncher Socket frontend
66
77Javascript application for [ TutorCruncher's] ( https://tutorcruncher.com ) web integration.
88
9- ** Work in progress, not ready for use in the wild **
9+ ## How in use
1010
11- Some notes on how it will work:
11+ Simply call Socket on your own website; your own CSS and other styling applies. [ Click here for more information about
12+ setting Socket up] ( https://help.tutorcruncher.com/socket/ ) .
1213
13- You'll be able to embed the javascript in your own page, so your own CSS and other styling applies.
14+ It defaults to use the TutorCruncher Socket backend, but you can use your own if you like. Feel free to fork this repo for help : smile :
1415
15- Defaults to use the TutorCruncher Socket backend, but you can use your own if you like.
16-
17- Alternatively, you can just use TutorCruncher's API (documentation incoming) and build your own frontend. Feel free to fork this repo for help:smile : .
16+ Alternatively, you can just use TutorCruncher's API (documentation incoming) and build your own frontend.
1817
1918Parameters:
2019
21- | Name | Description |
22- | ------| -------------|
23- | ` api_root ` | TutorCruncher Socket Backend |
24- | ` element ` | The id of the element created |
25- | ` router_mode ` | The routing mode when clicking on a tutor's profile. |
26- | ` contact_html ` | Text displayed as the ` <a href={contact_link}> ` 'Click here to contact X tutor'` <\a> ` |
27- | ` contact_link ` | The link included in the above text |
28- | ` skills_label ` | The label for a tutor's skills |
20+ | Name | Default | Description |
21+ | ------| ---------| ------------|
22+ | ` api_root ` | TutorCruncher Socket Backend | The URL of the backend you wish to use. TutorCruncher Socket Backend |
23+ | ` element ` | ` #socket ` | The id of the element created |
24+ | ` router_mode ` | ` hash ` | The routing mode when clicking on a tutor's profile. |
25+ | ` mode ` | ` grid ` | Which mode you want to use (explained below) |
26+ | ` url_root ` | ` \ ` | The root URL of the page you are using Socket from eg. '/our-tutors/'|
27+
28+ We use some strings within Socket that you may want to change by passing them as parameters also.
29+
30+ | Name | Default string |
31+ | ---- | -------------- |
32+ | ` skills_label ` | 'Skills' |
33+ | ` contractor_enquiry_message ` | 'Please enter your details below to enquire about tutoring with {contractor_name}.' |
34+ | ` enquiry_message ` | 'Please enter your details below and we will get in touch with you directly.' |
35+ | ` contractor_enquiry_button ` | 'Contact {contractor_name}' |
36+ | ` contractor_details_button ` | 'Show Profile' |
37+ | ` submit_enquiry ` | 'Submit Enquiry' |
38+ | ` enquiry_submitted_thanks ` | 'Enquiry submitted, thank you.\n\nYou can now close this window.` |
39+ | ` enquiry_button_text ` | 'Get in touch' |
40+
41+ ## Modes
42+
43+ ### grid
44+
45+ Generates a div of your tutors in a grid format, as per the example [ here] ( http://dinotutors.com/#our-tutors ) .
46+
47+ ### enquiry
48+
49+ Generates an enquiry form inside the page using fields you customise within TutorCruncher.
50+
51+ ### enquiry-modal
52+
53+ Generates a button inside the page which, when clicked, will load a modal of the enquiry form.
54+ [ More about modals] ( http://getbootstrap.com/javascript/#live-demo ) .
0 commit comments