JIITODC / website

Main website for JODC
https://jiitodc.netlify.app/
MIT License
13 stars 36 forks source link
frontend hacktoberfest sapper svelte website

![Open Issues](https://img.shields.io/github/issues/JIITODC/website?color=green&style=for-the-badge&logo=github) [![Forks](https://img.shields.io/github/forks/JIITODC/website?style=for-the-badge&logo=github)](https://github.com/JIITODC/jiitodc.github.io/network/members) [![Stars](https://img.shields.io/github/stars/JIITODC/website?style=for-the-badge&logo=reverbnation)](https://github.com/JIITODC/website/stargazers) ![Discord Online](https://img.shields.io/discord/475154983910899722?label=JODC%20Discord&style=for-the-badge) ![Twitter Followers](https://img.shields.io/twitter/follow/jiitodc?label=Twitter&style=for-the-badge)

:ledger: Index

:beginner: About

This is the main website for JODC built with Svelte and Sapper

:page_facing_up: Features

:zap: Usage

$ cd website
$ npm install # or yarn
$ npm run dev

:file_folder: File Structure

.
├── package-lock.json
├── package.json
├── README.md
├── rollup.config.js
├── src
│  ├── client.js
│  ├── components
│  │  ├── EventComponent.svelte
│  │  ├── Nav.svelte
│  │  ├── TeamComponent.svelte
│  │  └── TeamComponent_Old.svelte
│  ├── routes
│  │  ├── _error.svelte
│  │  ├── _layout.svelte
│  │  ├── events.svelte
│  │  ├── index.svelte
│  │  └── team
│  │     ├── index.svelte
│  │     ├── team-2018.svelte
│  │     └── team-2019.svelte
│  ├── server.js
│  ├── service-worker.js
│  └── template.html
├── static
│  ├── Data/
│  ├── favicon.svg
│  ├── global.css
│  ├── manifest.json
│  ├── Photos/
│  └── posters/
└── vercel.json
No File Name Details
1. src The src directory contains the entry points for your app — client.js, server.js and (optionally) a service-worker.js — along with a template.html file and a routes directory.
2. src/routes This is the heart of your Sapper app. There are two kinds of routes — pages, and server routes.
3. Pages Pages are Svelte components written in .svelte files. When a user first visits the application, they will be served a server-rendered version of the route in question, plus some JavaScript that 'hydrates' the page and initialises a client-side router. From that point forward, navigating to other pages is handled entirely on the client for a fast, app-like feel. (Sapper will preload and cache the code for these subsequent pages, so that navigation is instantaneous.)
3. Server Routes Server routes are modules written in .js files, that export functions corresponding to HTTP methods. Each function receives Express request and response objects as arguments, plus a next function. This is useful for creating a JSON API
For example:-

There are three simple rules for naming the files that define your routes:

Static

The static directory contains any static assets that should be available. These are served using sirv.

In your service-worker.js file, you can import these as files from the generated manifest... import { files } from '@sapper/service-worker';

...so that you can cache them (though you can choose not to, for example if you do not want to cache very large files).

Production mode and deployment

To start a production version of your app, run npm run build && npm start. This will disable live reloading, and activate the appropriate bundler plugins.

:fire: Contributions

We welcome contributions from everyone. Here are the guidelines if you are thinking of helping us:

Contributions should be made in the form of GitHub pull requests. Each pull request will be reviewed by someone with permission to land patches and either landed in the main tree or given feedback for changes that would be required. All contributions should follow this format.

Should you wish to work on an issue, please claim it first by commenting on the GitHub issue that you want to work on it. This is to prevent duplicated efforts from contributors on the same issue.

Look for good first issues to find good tasks to start with. Your contributions are always welcome and appreciated. Following are the things you can do to contribute to this project.

  1. Report a bug
    If you think you have encountered a new issue, and we should know about it, feel free to report it and we will take care of it.

  2. Create a pull request
    It cannot get better then this, your pull request will be appreciated by the community. You can get started by picking up any open issues and make a pull request.

If you are new to open-source, make sure to check read more about it here and learn more about creating a pull request here.

:camera: Gallery

The Home Page.

About Us.

The Events Page.

The Team Page.

The Blog Page.

:lock: License

License

:star2: Credit/Acknowledgment

Contributors