Giter Club home page Giter Club logo

complimentgenerator's Introduction

WDI Pick-Me-Up

A sample compliment

You have been tasked with creating your own version of Emergency Compliment, except with WDI-themed compliments. When a user visits the site, they should be greeted with a WDI-themed compliment to cheer them up.

Learning Objectives

  • Practice serving static & templated content using Sinatra

Setup

The file directory structure has been provided for you; however, all or most of these files are mostly empty. Look back to your notes from Thursday to see what belongs in each file (hint: Magnum,Blue Steel).

Completion

Completion for tonight's assignment is to get through part 3. More is better, but it's a weekend, enjoy yourselves. We'll try to make ourselves available on Slack to help anyone with questions. If you're really having trouble, stay tuned, a screencast will be coming out Friday night to assist y'all.

Useful Rsources

Part 1: Generate and Serve a Generic Compliment

When you visit the root ("/") of your app, it should render the index view and display:

  • a generic greeting
  • a randomly chosen compliment (sample comments below)
  • an achor (<a>) tag that links back to the root ("/") and displays the text "I'm still emotionally vacant. Give me another compliment."
  • another anchor tag, but this one displaying the text "I'm ready to soldier on.", and takes the user to the Ruby docs when clicked.
# some sample compliments
compliments = [
  "People behind you in class think you are the perfect height.",
  "Your instructors think you're amazing.",
  "Your posture during breaks effectively masks your exhaustion.",
  "Your commit messages are an inspiration to us all",
  "Your fingers are magic on the keys",
  "You are the moon of my life...my sun and stars"
]

Part 2: Personalized Compliment

When you visit "/:name" (ie: "/josh"), the greeting should personalize itself to the provided name. There should still be a random compliment.

Greetings Josh, Your fingers are magic on the keys..

Part 3: Make It Look Good

Style really hard with css.

Bonus

Part 4: Randomize Background Color

Make it so that anytime the page is loaded or refreshed, the background color changes.

Related Readings

complimentgenerator's People

Contributors

donutdespair avatar

Watchers

James Cloos avatar

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.