A NodeJS app generating an iframe based on information about your repository, so you can show off your portfolio in an elegant way.
This repository is licensed under MIT License
- Languages:
- JavaScript
- HTML
- CSS
- Pug
- NodeJS Libraries:
- Express
- Octokit
- Pug
/gh/:user/:repo
- Send a request to this route in order to generate an iframe based on:user
and:repo
parameters.
Example:
/gh/Cimlah/Repo-Share
will send you:
but not in a form of an iframe. The goal here is to only generate an HTML. Iframe customisation is up to end-user.
/raw/:user/:repo
- Get source code of iframe's HTML. For example, if you used/gh/Cimlah/Repo-Share
, it is the same, but gives you an unrendered HTML./iframe-css
- Get source code of the iframe CSS/icon/:icon
- Get icon files used in the iframe. Possible values:star
gitfork
script
/
- Display the main page/about
- Display the ABOUT subpage
Here is only one file, an encrypted JSON with my GitHub API key. Delete it if you want to clone this repo, since in encrypted state, it won't work properly
Here are files needed to create an HTML for the iframe. It consists of:
icons
directorycreate-iframe.js
, which passes data to a function generating an HTML out of Pug fileiframe.css
- a design for the generated HTMLiframe.pug
- a Pug file, which takes arguments fromcreate-iframe.js
in order to generate an HTML with proper data
octokit.js - connect to the GitHub API and get needed data, which is:
- Owner of a repository
- Name of a repository
- Link to a repository
- Description of a repository
- Owner's avatar
- Count of stargazers
- Count of forks
- Main language of a repository
CSS files for the frontend
Actually Pug files for the frontend
Images used in HTML files on the frontend
JavaScript files used for the frontend
.gitattributes
.gitignore
index.js
- HTTP server code with all the routes in APILICENSE
- a MIT LICENSE filepackage-lock.json
- information about this Node packagepackage.json
- information about this Node packageREADME.md
- a README file (the file you're reading right now)