Code Monkey home page Code Monkey logo

individual-project-sorting-hat's Introduction

screneshot of welcome page

Hogwarts Sorting Hat

Deployed App

Project Board

Video Demo

Project Overview

In this project, I recreated the famous Sorting Hat experience from Harry Potter. Using a random number generator, every new student is sorted at random into one of the four Hogwarts Houses. Every new student is asked to provide their name and preferred pronouns. When a new student is sorted, their card will appear as the first card in the series. Each student's card shows their house crest, their name, and their preferred pronouns.

User and Problem Being Solved

Growing up, Hogwarts was my world. I grew up believing Hogwarts was the safest place on earth, but the author of my childhood is now using her platform to destroy the safety of trans and gender non-conforming people.

So I've created a Hogwarts where everyone is welcome. A Hogwarts where YOU choose who you are and where that choice is respected. The only thing not tolerated here are bigoted Death Eaters. Remember to respect and care for your fellow students, or you'll be expelled.

My Sorting Hat is designed for everyone who wanted to go to Hogwarts but who no longer (or never) felt welcome in that world. It's also an open-source option which means using my Sorting Hat doesn't contribute to the wealth or bloated self-importance of the author.

Features

  • add new student button
  • preferred pronouns
  • expel student button
  • cards displaying all first years
  • cards displaying all expelled students
  • house buttons that will allow the user to only see students from the chosen house
  • mobile friendly

Screenshots

scrennshot of new student form

scrennshot of student cards

scrennshot of expelled student cards

individual-project-sorting-hat's People

Contributors

ursapictura avatar

Watchers

 avatar

individual-project-sorting-hat's Issues

Filter students by house.

-Create 5 buttons in HTML for houses and all filtering.
-create filter function in JS.
-make sure each filter calls cardsOnDom.
-Test functionality.

Add new student HTML

  • Create header in HTML.
  • Add form input for student name.
  • Add Bootstrap class to form.

Optional Bonus

Optional Bonus

  • House Colors: The color of the student's card changes depending on which house they were sorted.
  • Card Ordering: Sort the student cards by some criteria (i.e. alphabetically by name, by house)
  • Voldermort's Army: Create a separate container of cards that hold the cards for students that have been expelled. These should be styled differently from Hogwarts students.

Create EXPEL function

  • add expel button to cardsOnDom.
  • use bootstrap to make button red.
  • create new div in HTML called "expel-container"
  • create expel function.
  • expel function removes student from student array and moves them to expelled array.
    -render both students and expelled.

Plan data array of students.

  • Review provided image for DOM structure and define key-value pairs.
  • Remember to include unique ID for each student.
  • Create data array in JS.
  • Decide if data is stored in main.js or imported from data file.

Create project files and boilerplate

  1. Create project files HTML, CSS, and JS.
  2. Include Boilerplate code and link files.
  3. Test link with HTTP server.
  4. Push to repo and checkout new branch.

Create renderToDom and cardsOnDom functions

  • Build renderToDom function
  • Decide which Bootstrap cards to use.
  • Build cardsOnDom function and paste in Bootstrap code snippet.
  • Change object target tin snippet to match data set.
  • Call renderToDom to test your code in live server!

Create startApp function

  • Create the startApp function.
  • Remove test call of cardsOnDom.
  • Call startApp function.
  • Test your project in live server.

Technical Requirements

Technical Requirements

  • You MUST plan your project and create issue tickets and a project board fro your project
  • You MAY use the renderToDom() function that we worked on in class, but you also need to be able to explain it if you use it
  • You have to create a data structure for your project. Review all the elements that need to be on the DOM and create the structure accordingly
  • You must use Boostrap to style your page components
  • You must use a loop other than a for loop
  • Your JS file should be comprised of functions, no actions should happen in your code outside of a function except for your initial init() function
  • Your code MUST be YOUR code. Do not copy and paste code into your project. Type every bit of it out
  • Your HTML and JS should all have proper indentation
  • Helpful Form: An error message shows if a user tries to sort a student without filling out the form
  • You should apply responsive design to your page (aka your app should be designed to work on small screens)

Add Button Hints

When a new student is added an object should be created and that object should be pushed into an array of students that then prints to the dom.

Expel Button Hints

Think of a way you can expel students without just hiding those divs on the page. This would mean when the button is clicked you modify the array of students and pass the new array into your print to dom function. Double hint - put a unique id in the student object when you create them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.