Git Product home page Git Product logo

flash_cards's Introduction

Flash Cards

Simple, animated, and imageless flash cards using HTML/CSS/jQuery.

Features

  • Easily tweaked appearance (requires SASS/Compass or old-fashioned overrides)
    Simply edit variables in _flash_cards.scss to update dimensions and colors.
  • Simple markup
    The deck is a list and the cards are list items with a div for each side.
  • No images
    Cards are 100% CSS, and buttons are an icon font consisting only of the icons used.

Dependencies

Browser Support

This has been tested only in Chrome (21.0.1155.2 dev) and Firefox (12.0).

I plan to support all major browsers, but I haven't had the need yet.

Setup & Usage

  1. Put the files in place.

    Files Location
    If you're using SASS/Compass:
    _flash_cards.scss and _fonts.scss
    If you're not using SASS/Compass:
    style.css

    Your SASS directory

    Your CSS directory
    The contents of the js folder Your javascript directory
    resources Your root
  2. Include necessary code.

    .css

    If you're SASSin' and Compassin' it up, @import "flash_cards"; into your .scss. If not, use style.css.

    .js (and font)

    Place the following in your <head>:

     <link href="http://fonts.googleapis.com/css?family=Schoolbell" rel="stylesheet" type="text/css">
     <script src="path/to/modernizr-2.5.3.min.js"></script>
    

    and the following before </body>:

     <script src="path/to/flash_cards.min.js"></script>
    
  3. The Markup

    The Deck

    The deck is a list with an id of deck. Each card is a list item containing a div for each side, each div contains a paragraph.

     <ul id="deck">
       <li class="card">
    
         <div class="side_one">
           <p>How many licks does it take to get to the center of a Tootsie Pop?</p>
         </div>
    
         <div class="side_two">
           <p>The world may never know.</p>
         </div>
    
       </li>
     </ul>
    

    The Navigation

    The navigation uses an icon font put together using IcoMoon, so it contains only the necessary characters to keep file size down.

    The markup follows Jon Hicks' data-icon method.

     <div id="nav_deck">
       <span class="icon" id="prev" data-icon="<"><span class="visuallyhidden">Previous</span></span>
       <span class="icon" id="flipper" data-icon="/"><span class="visuallyhidden">Flip</span></span>
       <span class="icon" id="next" data-icon=">"><span class="visuallyhidden">Next</span></span>
     </div>
    

    The Keyboard Shortcuts

    I created a table to display the available keyboard shortcuts, accessible via clicking an element with an id of icon or hitting the forward-slash/question mark key.

     <div id="keyboard_shortcuts">
       <h1>Keyboard Shortcuts</h1>
       <table>
         <tbody>
           <tr>
             <td>Previous Card</td>
             <td>&larr;</td>
           </tr>
           <tr>
             <td>Next Card</td>
             <td>&rarr;</td>
           </tr>
           <tr>
             <td>Flip Card</td>
             <td>&uarr; <span class="or">/</span> &darr; <span class="or">/</span> Return <span class="or">/</span> Space</td>
           </tr>
           <tr>
             <td>Show/Hide Keyboard Shortcuts</td>
             <td>?</td>
           </tr>
         </tbody>
       </table>
     </div>
    
     <div class="icon" id="keyboard_shortcuts_toggle" data-icon="k"><span class="visuallyhidden">Keyboard Shortcuts</span></div>
    

Icons not displaying properly?

Check the paths to the font files in _fonts.scss or style.css.

License

Creative Commons License
Flash Cards by Curtis Blackwell is licensed under a Creative Commons Attribution 4.0 International License.

flash_cards's People

Contributors

curtisblackwell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

flash_cards's Issues

Cards sometimes fail on IOS/Safari devices

I was having an issue using the flash cards in safari on an IOS device. After several card flips they would stop working.
By adding overflow: hidden to .card class if solved the issue.
.card { -webkit-perspective: 1600; perspective: 1600; color: #222; display: none; font-family: SchoolBell; font-size: 30px; height: 300px; line-height: 60px; position: relative; width: 500px; overflow: hidden; }

CSS for flashcard background

I realize this is an old project but I used it for some practice exercises for my students. I even added text to speech when the card is flipped, and images to the paragraph sections.

Legacy paper flashcards are generally blank on one side and lined on the flip side. The existing CSS puts a red line on the card in general, and side_one and side_two both get the blue lines. Simple change to put all the background line drawing css controlled by .side_two, keep the general css for .card_one and .card_two, and remove the red line from .card. Thus a more realistic card is imaged.

License

Hi is theres a license for this?
Thanks.

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.