HackSheffield / old-website

The code that powered our website for HS3 and HS4
4 stars 1 forks source link

Team Page #1

Closed dannycjones closed 6 years ago

dannycjones commented 7 years ago

Okay but we're using the GitHub API to load committee data. Somehow. Just saying.

robjtede commented 7 years ago

y'all need to get a gravatar then

mattburman commented 7 years ago

POST https://api.github.com/graphql with "Authorization: bearer " header set graphql query in JSON body in {"query": "query { ... }"} see https://developer.github.com/v4/guides/forming-calls

there's even more stuff you can query that i left out but here's an example

query {
  organization(login:"hacksheffield") {
    avatarUrl
    databaseId
    teams (first: 100){
      edges {
        node{
          description
          teamsUrl
          url
          name
          members (first: 100){
            edges {
              node {
                name
                bio
                url
                login
                location
                bioHTML
                email
                avatarUrl
                websiteUrl
                isCampusExpert
              }
            }
          }
        }
      }
    }
  }
}

  "data": {
    "organization": {
      "avatarUrl": "https://avatars2.githubusercontent.com/u/18171947?v=4",
      "databaseId": 18171947,
      "teams": {
        "edges": [
          {
            "node": {
              "description": "The entire committee.",
              "teamsUrl": "https://github.com/orgs/HackSheffield/teams/committee/teams",
              "url": "https://github.com/orgs/HackSheffield/teams/committee",
              "name": "committee",
              "members": {
                "edges": [
                  {
                    "node": {
                      "name": "Rob Ede",
                      "bio": "President of Sheffield CompSoc (@shefcompsoc) & Creator of @thecodeplatform ",
                      "url": "https://github.com/robjtede",
                      "login": "robjtede",
                      "location": "",
                      "bioHTML": "<div>President of Sheffield CompSoc (<a href=\"https://github.com/shefcompsoc\" class=\"user-mention\">@shefcompsoc</a>) &amp; Creator of <a href=\"https://github.com/thecodeplatform\" class=\"user-mention\">@thecodeplatform</a> </div>",
                      "email": "",
                      "avatarUrl": "https://avatars3.githubusercontent.com/u/3316789?v=4",
                      "websiteUrl": "https://robjte.de",
                      "isCampusExpert": false
                    }
                  },
                  {
                    "node": {
                      "name": "Daniel Carl Jones",
                      "bio": "Committee Member @HackSheffield. Computer Science Student.",
                      "url": "https://github.com/dannycjones",
                      "login": "dannycjones",
                      "location": "Sheffield, UK",
                      "bioHTML": "<div>Committee Member <a href=\"https://github.com/hacksheffield\" class=\"user-mention\">@HackSheffield</a>. Computer Science Student.</div>",
                      "email": "",
                      "avatarUrl": "https://avatars1.githubusercontent.com/u/4976211?v=4",
                      "websiteUrl": "http://www.danielcarl.info",
                      "isCampusExpert": false
                    }
                  },
                  {
                    "node": {
                      "name": "Borja Leiva",
                      "bio": "CS Student | President @HackSheffield  | StartUps | 18",
                      "url": "https://github.com/P3rzival",
                      "login": "P3rzival",
                      "location": "",
                      "bioHTML": "<div>CS Student | President <a href=\"https://github.com/hacksheffield\" class=\"user-mention\">@HackSheffield</a>  | StartUps | 18</div>",
                      "email": "",
                      "avatarUrl": "https://avatars0.githubusercontent.com/u/7519952?v=4",
                      "websiteUrl": "leyvaborja.com",
                      "isCampusExpert": false
                    }
                  },
                  {
                    "node": {
                      "name": "Will Humphreys",
                      "bio": "Current CompSci student at Sheffield University. Made 4 games, on the hunt for opportunities to make more. I can draw things.",
                      "url": "https://github.com/TheWispy",
                      "login": "TheWispy",
                      "location": "Sheffield, UK",
                      "bioHTML": "<div>Current CompSci student at Sheffield University. Made 4 games, on the hunt for opportunities to make more. I can draw things.</div>",
                      "email": "",
                      "avatarUrl": "https://avatars2.githubusercontent.com/u/10480715?v=4",
                      "websiteUrl": "",
                      "isCampusExpert": false
                    }
                  },
                  {
                    "node": {
                      "name": null,
                      "bio": null,
                      "url": "https://github.com/Ben-Dixon1",
                      "login": "Ben-Dixon1",
                      "location": null,
                      "bioHTML": "",
                      "email": "",
                      "avatarUrl": "https://avatars1.githubusercontent.com/u/22520958?v=4",
                      "websiteUrl": null,
                      "isCampusExpert": false
                    }
                  },
                  {
                    "node": {
                      "name": "",
                      "bio": "",
                      "url": "https://github.com/LLRiebel",
                      "login": "LLRiebel",
                      "location": "",
                      "bioHTML": "",
                      "email": "llriebel1@sheffield.ac.uk",
                      "avatarUrl": "https://avatars2.githubusercontent.com/u/22855819?v=4",
                      "websiteUrl": "",
                      "isCampusExpert": false
                    }
                  },
                  {
                    "node": {
                      "name": "",
                      "bio": "",
                      "url": "https://github.com/SanzianaCh",
                      "login": "SanzianaCh",
                      "location": "",
                      "bioHTML": "",
                      "email": "",
                      "avatarUrl": "https://avatars2.githubusercontent.com/u/23139642?v=4",
                      "websiteUrl": "",
                      "isCampusExpert": false
                    }
                  }
                ]
              }
            }
          },
          {
            "node": {
              "description": "",
              "teamsUrl": "https://github.com/orgs/HackSheffield/teams/organisers/teams",
              "url": "https://github.com/orgs/HackSheffield/teams/organisers",
              "name": "organisers",
              "members": {
                "edges": [
                  {
                    "node": {
                      "name": "jacob",
                      "bio": "",
                      "url": "https://github.com/jacobwalkr",
                      "login": "jacobwalkr",
                      "location": "",
                      "bioHTML": "",
                      "email": "",
                      "avatarUrl": "https://avatars2.githubusercontent.com/u/2103207?v=4",
                      "websiteUrl": "",
                      "isCampusExpert": false
                    }
                  },
                  {
                    "node": {
                      "name": "Rob Ede",
                      "bio": "President of Sheffield CompSoc (@shefcompsoc) & Creator of @thecodeplatform ",
                      "url": "https://github.com/robjtede",
                      "login": "robjtede",
                      "location": "",
                      "bioHTML": "<div>President of Sheffield CompSoc (<a href=\"https://github.com/shefcompsoc\" class=\"user-mention\">@shefcompsoc</a>) &amp; Creator of <a href=\"https://github.com/thecodeplatform\" class=\"user-mention\">@thecodeplatform</a> </div>",
                      "email": "",
                      "avatarUrl": "https://avatars3.githubusercontent.com/u/3316789?v=4",
                      "websiteUrl": "https://robjte.de",
                      "isCampusExpert": false
                    }
                  },
                  {
                    "node": {
                      "name": "Daniel Carl Jones",
                      "bio": "Committee Member @HackSheffield. Computer Science Student.",
                      "url": "https://github.com/dannycjones",
                      "login": "dannycjones",
                      "location": "Sheffield, UK",
                      "bioHTML": "<div>Committee Member <a href=\"https://github.com/hacksheffield\" class=\"user-mention\">@HackSheffield</a>. Computer Science Student.</div>",
                      "email": "",
                      "avatarUrl": "https://avatars1.githubusercontent.com/u/4976211?v=4",
                      "websiteUrl": "http://www.danielcarl.info",
                      "isCampusExpert": false
                    }
                  },
                  {
                    "node": {
                      "name": "Matt Burman",
                      "bio": "Developer  |  CS Student @sheffielduni  |  Currently @oakgroup   |  Founder @HackSheffield  | 20",
                      "url": "https://github.com/mattburman",
                      "login": "mattburman",
                      "location": "Derby/Sheffield, England, UK",
                      "bioHTML": "<div>Developer  |  CS Student <a href=\"https://github.com/sheffielduni\" class=\"user-mention\">@SheffieldUni</a>  |  Currently <a href=\"https://github.com/oakgroup\" class=\"user-mention\">@oakgroup</a>   |  Founder <a href=\"https://github.com/hacksheffield\" class=\"user-mention\">@HackSheffield</a>  | 20</div>",
                      "email": "matt@mattburman.com",
                      "avatarUrl": "https://avatars2.githubusercontent.com/u/7336329?v=4",
                      "websiteUrl": "https://mattburman.com",
                      "isCampusExpert": true
                    }
                  },
                  {
                    "node": {
                      "name": "Borja Leiva",
                      "bio": "CS Student | President @HackSheffield  | StartUps | 18",
                      "url": "https://github.com/P3rzival",
                      "login": "P3rzival",
                      "location": "",
                      "bioHTML": "<div>CS Student | President <a href=\"https://github.com/hacksheffield\" class=\"user-mention\">@HackSheffield</a>  | StartUps | 18</div>",
                      "email": "",
                      "avatarUrl": "https://avatars0.githubusercontent.com/u/7519952?v=4",
                      "websiteUrl": "leyvaborja.com",
                      "isCampusExpert": false
                    }
                  },
                  {
                    "node": {
                      "name": "Christopher McIntyre",
                      "bio": "Computer Science student at University of Sheffield | Interested in Linux, Docker and Python",
                      "url": "https://github.com/cgmcintyr",
                      "login": "cgmcintyr",
                      "location": "Sheffield, UK",
                      "bioHTML": "<div>Computer Science student at University of Sheffield | Interested in Linux, Docker and Python</div>",
                      "email": "me@cgmcintyre.com",
                      "avatarUrl": "https://avatars3.githubusercontent.com/u/10052586?v=4",
                      "websiteUrl": "cgmcintyre.com",
                      "isCampusExpert": false
                    }
                  },
                  {
                    "node": {
                      "name": "Will Humphreys",
                      "bio": "Current CompSci student at Sheffield University. Made 4 games, on the hunt for opportunities to make more. I can draw things.",
                      "url": "https://github.com/TheWispy",
                      "login": "TheWispy",
                      "location": "Sheffield, UK",
                      "bioHTML": "<div>Current CompSci student at Sheffield University. Made 4 games, on the hunt for opportunities to make more. I can draw things.</div>",
                      "email": "",
                      "avatarUrl": "https://avatars2.githubusercontent.com/u/10480715?v=4",
                      "websiteUrl": "",
                      "isCampusExpert": false
                    }
                  },
                  {
                    "node": {
                      "name": null,
                      "bio": null,
                      "url": "https://github.com/Ben-Dixon1",
                      "login": "Ben-Dixon1",
                      "location": null,
                      "bioHTML": "",
                      "email": "",
                      "avatarUrl": "https://avatars1.githubusercontent.com/u/22520958?v=4",
                      "websiteUrl": null,
                      "isCampusExpert": false
                    }
                  },
                  {
                    "node": {
                      "name": "",
                      "bio": "",
                      "url": "https://github.com/LLRiebel",
                      "login": "LLRiebel",
                      "location": "",
                      "bioHTML": "",
                      "email": "llriebel1@sheffield.ac.uk",
                      "avatarUrl": "https://avatars2.githubusercontent.com/u/22855819?v=4",
                      "websiteUrl": "",
                      "isCampusExpert": false
                    }
                  },
                  {
                    "node": {
                      "name": "Tekevwe",
                      "bio": "",
                      "url": "https://github.com/Tekevwe",
                      "login": "Tekevwe",
                      "location": "",
                      "bioHTML": "",
                      "email": "tkwakpovwe1@sheffield.ac.uk",
                      "avatarUrl": "https://avatars1.githubusercontent.com/u/22857528?v=4",
                      "websiteUrl": "",
                      "isCampusExpert": false
                    }
                  },
                  {
                    "node": {
                      "name": "",
                      "bio": "",
                      "url": "https://github.com/SanzianaCh",
                      "login": "SanzianaCh",
                      "location": "",
                      "bioHTML": "",
                      "email": "",
                      "avatarUrl": "https://avatars2.githubusercontent.com/u/23139642?v=4",
                      "websiteUrl": "",
                      "isCampusExpert": false
                    }
                  },
                  {
                    "node": {
                      "name": "",
                      "bio": "",
                      "url": "https://github.com/gregives",
                      "login": "gregives",
                      "location": "",
                      "bioHTML": "",
                      "email": "gjives1@sheffield.ac.uk",
                      "avatarUrl": "https://avatars0.githubusercontent.com/u/23280125?v=4",
                      "websiteUrl": "",
                      "isCampusExpert": false
                    }
                  }
                ]
              }
            }
          },
          {
            "node": {
              "description": "Members authorised to make changes to the VM",
              "teamsUrl": "https://github.com/orgs/HackSheffield/teams/vm-administrators/teams",
              "url": "https://github.com/orgs/HackSheffield/teams/vm-administrators",
              "name": "VM Administrators",
              "members": {
                "edges": [
                  {
                    "node": {
                      "name": "Rob Ede",
                      "bio": "President of Sheffield CompSoc (@shefcompsoc) & Creator of @thecodeplatform ",
                      "url": "https://github.com/robjtede",
                      "login": "robjtede",
                      "location": "",
                      "bioHTML": "<div>President of Sheffield CompSoc (<a href=\"https://github.com/shefcompsoc\" class=\"user-mention\">@shefcompsoc</a>) &amp; Creator of <a href=\"https://github.com/thecodeplatform\" class=\"user-mention\">@thecodeplatform</a> </div>",
                      "email": "",
                      "avatarUrl": "https://avatars3.githubusercontent.com/u/3316789?v=4",
                      "websiteUrl": "https://robjte.de",
                      "isCampusExpert": false
                    }
                  },
                  {
                    "node": {
                      "name": "Daniel Carl Jones",
                      "bio": "Committee Member @HackSheffield. Computer Science Student.",
                      "url": "https://github.com/dannycjones",
                      "login": "dannycjones",
                      "location": "Sheffield, UK",
                      "bioHTML": "<div>Committee Member <a href=\"https://github.com/hacksheffield\" class=\"user-mention\">@HackSheffield</a>. Computer Science Student.</div>",
                      "email": "",
                      "avatarUrl": "https://avatars1.githubusercontent.com/u/4976211?v=4",
                      "websiteUrl": "http://www.danielcarl.info",
                      "isCampusExpert": false
                    }
                  },
                  {
                    "node": {
                      "name": "Matt Burman",
                      "bio": "Developer  |  CS Student @sheffielduni  |  Currently @oakgroup   |  Founder @HackSheffield  | 20",
                      "url": "https://github.com/mattburman",
                      "login": "mattburman",
                      "location": "Derby/Sheffield, England, UK",
                      "bioHTML": "<div>Developer  |  CS Student <a href=\"https://github.com/sheffielduni\" class=\"user-mention\">@SheffieldUni</a>  |  Currently <a href=\"https://github.com/oakgroup\" class=\"user-mention\">@oakgroup</a>   |  Founder <a href=\"https://github.com/hacksheffield\" class=\"user-mention\">@HackSheffield</a>  | 20</div>",
                      "email": "matt@mattburman.com",
                      "avatarUrl": "https://avatars2.githubusercontent.com/u/7336329?v=4",
                      "websiteUrl": "https://mattburman.com",
                      "isCampusExpert": true
                    }
                  },
                  {
                    "node": {
                      "name": "Borja Leiva",
                      "bio": "CS Student | President @HackSheffield  | StartUps | 18",
                      "url": "https://github.com/P3rzival",
                      "login": "P3rzival",
                      "location": "",
                      "bioHTML": "<div>CS Student | President <a href=\"https://github.com/hacksheffield\" class=\"user-mention\">@HackSheffield</a>  | StartUps | 18</div>",
                      "email": "",
                      "avatarUrl": "https://avatars0.githubusercontent.com/u/7519952?v=4",
                      "websiteUrl": "leyvaborja.com",
                      "isCampusExpert": false
                    }
                  },
                  {
                    "node": {
                      "name": "Christopher McIntyre",
                      "bio": "Computer Science student at University of Sheffield | Interested in Linux, Docker and Python",
                      "url": "https://github.com/cgmcintyr",
                      "login": "cgmcintyr",
                      "location": "Sheffield, UK",
                      "bioHTML": "<div>Computer Science student at University of Sheffield | Interested in Linux, Docker and Python</div>",
                      "email": "me@cgmcintyre.com",
                      "avatarUrl": "https://avatars3.githubusercontent.com/u/10052586?v=4",
                      "websiteUrl": "cgmcintyre.com",
                      "isCampusExpert": false
                    }
                  }
                ]
              }
            }
          },
          {
            "node": {
              "description": "Founding Committee",
              "teamsUrl": "https://github.com/orgs/HackSheffield/teams/committee-16/teams",
              "url": "https://github.com/orgs/HackSheffield/teams/committee-16",
              "name": "committee-16",
              "members": {
                "edges": [
                  {
                    "node": {
                      "name": "jacob",
                      "bio": "",
                      "url": "https://github.com/jacobwalkr",
                      "login": "jacobwalkr",
                      "location": "",
                      "bioHTML": "",
                      "email": "",
                      "avatarUrl": "https://avatars2.githubusercontent.com/u/2103207?v=4",
                      "websiteUrl": "",
                      "isCampusExpert": false
                    }
                  },
                  {
                    "node": {
                      "name": "Daniel Carl Jones",
                      "bio": "Committee Member @HackSheffield. Computer Science Student.",
                      "url": "https://github.com/dannycjones",
                      "login": "dannycjones",
                      "location": "Sheffield, UK",
                      "bioHTML": "<div>Committee Member <a href=\"https://github.com/hacksheffield\" class=\"user-mention\">@HackSheffield</a>. Computer Science Student.</div>",
                      "email": "",
                      "avatarUrl": "https://avatars1.githubusercontent.com/u/4976211?v=4",
                      "websiteUrl": "http://www.danielcarl.info",
                      "isCampusExpert": false
                    }
                  },
                  {
                    "node": {
                      "name": "Matt Burman",
                      "bio": "Developer  |  CS Student @sheffielduni  |  Currently @oakgroup   |  Founder @HackSheffield  | 20",
                      "url": "https://github.com/mattburman",
                      "login": "mattburman",
                      "location": "Derby/Sheffield, England, UK",
                      "bioHTML": "<div>Developer  |  CS Student <a href=\"https://github.com/sheffielduni\" class=\"user-mention\">@SheffieldUni</a>  |  Currently <a href=\"https://github.com/oakgroup\" class=\"user-mention\">@oakgroup</a>   |  Founder <a href=\"https://github.com/hacksheffield\" class=\"user-mention\">@HackSheffield</a>  | 20</div>",
                      "email": "matt@mattburman.com",
                      "avatarUrl": "https://avatars2.githubusercontent.com/u/7336329?v=4",
                      "websiteUrl": "https://mattburman.com",
                      "isCampusExpert": true
                    }
                  },
                  {
                    "node": {
                      "name": "Christopher McIntyre",
                      "bio": "Computer Science student at University of Sheffield | Interested in Linux, Docker and Python",
                      "url": "https://github.com/cgmcintyr",
                      "login": "cgmcintyr",
                      "location": "Sheffield, UK",
                      "bioHTML": "<div>Computer Science student at University of Sheffield | Interested in Linux, Docker and Python</div>",
                      "email": "me@cgmcintyre.com",
                      "avatarUrl": "https://avatars3.githubusercontent.com/u/10052586?v=4",
                      "websiteUrl": "cgmcintyre.com",
                      "isCampusExpert": false
                    }
                  },
                  {
                    "node": {
                      "name": "",
                      "bio": "",
                      "url": "https://github.com/SanzianaCh",
                      "login": "SanzianaCh",
                      "location": "",
                      "bioHTML": "",
                      "email": "",
                      "avatarUrl": "https://avatars2.githubusercontent.com/u/23139642?v=4",
                      "websiteUrl": "",
                      "isCampusExpert": false
                    }
                  }
                ]
              }
            }
          },
          {
            "node": {
              "description": "Publicity Team",
              "teamsUrl": "https://github.com/orgs/HackSheffield/teams/publicity-team/teams",
              "url": "https://github.com/orgs/HackSheffield/teams/publicity-team",
              "name": "publicity-team",
              "members": {
                "edges": [
                  {
                    "node": {
                      "name": "Rob Ede",
                      "bio": "President of Sheffield CompSoc (@shefcompsoc) & Creator of @thecodeplatform ",
                      "url": "https://github.com/robjtede",
                      "login": "robjtede",
                      "location": "",
                      "bioHTML": "<div>President of Sheffield CompSoc (<a href=\"https://github.com/shefcompsoc\" class=\"user-mention\">@shefcompsoc</a>) &amp; Creator of <a href=\"https://github.com/thecodeplatform\" class=\"user-mention\">@thecodeplatform</a> </div>",
                      "email": "",
                      "avatarUrl": "https://avatars3.githubusercontent.com/u/3316789?v=4",
                      "websiteUrl": "https://robjte.de",
                      "isCampusExpert": false
                    }
                  },
                  {
                    "node": {
                      "name": "Daniel Carl Jones",
                      "bio": "Committee Member @HackSheffield. Computer Science Student.",
                      "url": "https://github.com/dannycjones",
                      "login": "dannycjones",
                      "location": "Sheffield, UK",
                      "bioHTML": "<div>Committee Member <a href=\"https://github.com/hacksheffield\" class=\"user-mention\">@HackSheffield</a>. Computer Science Student.</div>",
                      "email": "",
                      "avatarUrl": "https://avatars1.githubusercontent.com/u/4976211?v=4",
                      "websiteUrl": "http://www.danielcarl.info",
                      "isCampusExpert": false
                    }
                  }
                ]
              }
            }
          }
        ]
      }
    }
  }
}```
boardfish commented 6 years ago

Necromancing this to say we've now got teams. Never dealt with Node before so I'd struggle to port it across quickly. I'd be happy to try, by any means, but I couldn't give you an ETA on when it'd be done.

Question as well - what benefits does running the site on Node.js give us? I'd have thought it just needs to be static.

robjtede commented 6 years ago

Gives us scope to expand it in future if needed. Templating engine, too. Could have used static site gen but honestly, for the amount of traffic, this is easier.

dannycjones commented 6 years ago

At the current and next stage, absolutely no point in having Node other than to demo Express.

However, I'd quite like to see a system eventually implemented where people can register interest in events via the website without the need for a Google form. This could make it a one click RSVP/unRSVP for trips, perhaps with an optional question if required "Did you grab a ticket already?". Things like if the student has a railcard would be saved already.

Regarding the website itself (society page #8), I planned to do it over this break but I've had multiple setbacks and haven't even begun revision yet so I've made an issue with what plans I'd made for the new page and push any progress I had made. Feel free for anyone to pick it up, although I'm fairly sure most of us all have exams!

mattburman commented 6 years ago

It's very satisfying looking at http://mygit.club/ and seeing the new people ;)(a currently hosted version of teams)