Giter Club home page Giter Club logo

paws's Introduction

paws

The "method" for finding your new best friend. Project by Chris Chan, Natalia Hess, and Toby Zitsman GA WDI 32.

Description

paws is a website designed for users who are looking to either adopt a new pet or put their pet up for adoption.

The user is able to search for a pet by name or by type (dog, cat, other). If the user wishes to request additional information or express interest in adoption, he or she can click on the owner's name to send an email.

On the other hand, if a user wishes to list his or her pet for adoption, he or she may simply click the "add a pet" button. This will navigate the user to a form where he or she can enter the information required to add the furry friend into our paws database.

See the published project on Heroku.

The original wireframes for the profile card created with Moqups


Technologies Used

  • JavaScript
  • jQuery
  • HTML
  • CSS
  • AJAX
  • MongoDB
  • Bootstrap

Screenshots

Homepage view listing all pets currently available for adoption


Profile "card" listing name, age, gender, location, description, medical information, contact information, and how many people are interested


Search by name


Search by type (dog, cat, other)


Post a pet modal

About us page

Code Highlights

// Post a pet modal

$('#addThePet').on('click', function(e) {
  e.preventDefault();
  // Pet info added and submitted
  if ($('#newPetName').val() == "") {
    alert('please enter valid name for pet');
  } else if ($('#petPicture').val() == "") {
    alert('picture is not valid. please enter url for picture');
  } else if ($('#petAge').val() == "") {
    alert ('Not a valid age');
  } else {
    newPet.name = $('#newPetName').val();
    newPet.picture = $('#petPicture').val();
    newPet.age = $('#petAge').val();
                
    if ($('#petFixed').prop('checked') == true) {
      newPet.fixed = true;
    } else {
      newPet.fixed = false;
    }

    if ($('#petVaccination').prop('checked') == true) {
      newPet.vaccination = true;
    } else {
      newPet.vaccination = false;
    }
                
    if ($('#petGenderM').prop('checked') == true) {
      newPet.gender = 'male';
    } else if ($('#petGenderF').prop('checked') == true) {
      newPet.gender = 'female';
    } else {
      alert('Please choose a gender');
      return;
    }
                
    $('#newPet').toggle();
    newPet.type = $('#petType').val();
                
    $.ajax({
      method: 'POST',
      url: '/api/pets',
      data: newPet,
      success: newPetSuccess,
      error: newPetError
    });
    console.log("New animal created");
  }
});

Links

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.