Giter Site home page Giter Site logo

stungeye-rrc / pre-exam-test-repo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from oharanan/pre-exam-test-repo

0.0 2.0 0.0 191 KB

Rails app for WEBD-2000 students to clone & run while studying. See README for details.

Ruby 67.41% JavaScript 2.07% CoffeeScript 0.66% CSS 10.28% HTML 19.58%

pre-exam-test-repo's Introduction

Clone This Repo

git clone https://github.com/stungeye/Pre-Exam-Test-Repo.git
cd Pre-Exam-Test-Repo
bundle install
rails s

Test The Install

When you load up localhost:3000 you should see four ghosts of different colours.

Limitations

The ghost CSS (found here) depends on the names of the ghosts. Therefore adding ghosts with new names will break the display. The colour property was added to address this but is currently unused.

Ghost Partial

The ghost partial app/views/ghosts/_ghost.html.erb:

<div class="ghost <%= ghost.name.downcase %>"> <!-- Ghost colour set using downcased name as class. -->
  <div class="eyes">
    <div class="eye leftEye"><div class="iris"></div></div>
    <div class="eye rightEye"><div class="iris"></div></div>
  </div>
  <div class="ghostTail"></div>
</div>

<div>
  <h3><%= ghost.name %></h3>
  <p>Nickname: <%= ghost.nickname %></p>
  <p>Favourite Thing: <%= ghost.favourite_thing %></p>
  <p>
    <%= link_to 'Edit', edit_ghost_path(ghost) %> - 
    <%= link_to 'Destroy', ghost, method: :delete, data: { confirm: 'Are you sure?' } %>
  </p>
</div>

<hr>

Database Schema

ActiveRecord::Schema.define(version: 20140425201401) do
  create_table "ghosts", force: true do |t|
    t.string   "name"
    t.string   "nickname"
    t.string   "favourite_thing"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "colour" # Currently unused. CSS colours derived from name property.
  end
end

UNLICENSE

This is free and unencumbered software released into the public domain. See: unlicense.org

pre-exam-test-repo's People

Contributors

stungeye avatar

Watchers

 avatar 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.