Skip to content

Site Management: Events

Ayush Agarwal edited this page Oct 11, 2018 · 2 revisions

Managing Events

The website at the time of writing this article doesn't store previous events, however, the current event is stored in data/events.json with the possibility of storing all previous events.

Updating Event Data

For updating the current event,

Step 1: Update the content in data/events.json

Params

  • title: Title of the event.
  • cta: Call to Action, contains link of the primary button. Generally used for 'Register Now'.
  • ctaText: Text of Call to Action Button
  • date: Date of Event, must be in format DD Month YYYY e.g. 09 Aug 2018
  • poster: Relative or Absolute URL to event poster, landscape preferred.
  • startTime: Start Time of Event in format HH:MM AM/PM e.g. 2:15 PM
  • endTime: End Time of Event in format HH:MM AM/PM e.g. 2:15 PM
  • location: Room/Venue e.g. E3-309
  • eventOD: Must be 1 or 0, signifying if OD is given or not respectively.
  • description: Event Description, markdown supported content. New Line supported using \n
  • cta2enable: Must be 1 or 0, to turn on or off the extra button in the event box.
  • cta2: Call to Action, contains link of the secondary button. Generally used for 'More Info'. It is only visible if cta2enable is set to 1.
  • cta2Text: Text of Call to Action Secondary Button. It is only visible if cta2enable is set to 1.

Step 2: Run the build script

Once the JSON file is updated, run the build script to generate and update the respective files. You can now add, commit, push and submit the changes.

Default Event Data

[{
    "title": "No Upcoming Event",
    "cta": "https://docs.google.com/forms/d/e/1FAIpQLScpSM7nisQQKlBB5oYdkeo2cMV6I0b__F_KowLgbUJePyyLZg/viewform?usp=sf_link",
    "ctaText": "Want to Host Event?",
    "date": "-",
    "poster": "images/flashbox/default.jpg",
    "startTime": "-",
    "endTime": "-",
    "location": "-",
    "eventOD": 0,
    "description": "No upcoming event for now!!",
    "cta2enable": 0,
    "cta2": "#",
    "cta2Text": "View"
}]