Plugin Directory

Changeset 773096


Ignore:
Timestamp:
09/16/2013 06:34:32 AM (13 years ago)
Author:
LiangShao
Message:

Hover action is replaced by flip action; minor UI improvements

Location:
flashcard/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • flashcard/trunk/flashcard.css

    r469646 r773096  
    1212}
    1313
    14 .flashcard-container li div {
     14.flashcard-container li>div {
    1515    overflow: hidden;
    1616    position: absolute;
     
    1818    border-radius:10px;
    1919    -webkit-border-radius:10px;
    20     padding: 10px;
     20    padding: 0;
    2121    background: lightGray;
     22    text-align: center;
    2223}
    2324
    24 .flashcard-container li div.back {
     25.flashcard-container li>div.back {
    2526    left: -999em;
    2627    background: black;
    27 
     28    color: white;
    2829}
    2930
    30 .flashcard-container li div h2{
     31.flashcard-container li>div>div{
    3132    display: block;
    3233    padding: 10px;
    3334}
    3435
    35 .flashcard-container li div.back h2{
    36     color: white;
    37 }
    3836
  • flashcard/trunk/flashcard.js

    r765021 r773096  
    1414    }
    1515   
    16     $('.flashcard-container li').hover(
     16    /* Replaced hover action with click action as Daniel Clarke suggested */
     17    $('.flashcard-container li').click(
    1718        function () {
    18             $(this).find('div').stop().rotate3Di('flip', 250, {direction: 'clockwise', sideChange: mySideChange});
    19         },
    20         function () {
    21             $(this).find('div').stop().rotate3Di('unflip', 500, {sideChange: mySideChange});
     19            $(this).find('div').stop().rotate3Di('toggle', 150, {direction: 'clockwise', sideChange: mySideChange});
    2220        }
    2321    );
  • flashcard/trunk/flashcard.php

    r765029 r773096  
    44 * Plugin Name: Flashcard Plugin
    55 * Plugin URI: http://www.myapps4ipad.com/flashcard-wp-plugin/
    6  * Version: 0.2
     6 * Version: 0.3
    77 * Author: Liang Shao
    88 * Author URI: http://www.myapps4ipad.com
     
    9191
    9292    //define default appearance
    93     $padding = 10;
    9493    $width = 130;
    9594    $height = 130;
     
    130129    if(is_numeric($options['width'])) $width = $options['width'];
    131130    if(is_numeric($options['height'])) $height = $options['height'];
    132     $outerWidth = $width+$padding*2;
    133     $outerHeight = $height+$padding*2;
    134131    if(isset($options['front_bg_color'])) $front_bg_color = $options['front_bg_color'];
    135132    if(isset($options['front_text_color'])) $front_text_color = $options['front_text_color'];
     
    164161    $i = 0;
    165162    foreach ($result as $r){
    166         $fc_content .= '<li style="width:'.$outerWidth.'px;height:'.$outerHeight.'px;">';
     163        $fc_content .= '<li style="width:'.$width.'px;height:'.$height.'px;">';
    167164
    168165        //flip sides if requested
     
    174171            $back = $r[1];
    175172        }
    176         $fc_content .= '<div class="front" style="width:'.$width.'px;height:'.$height.'px;background:'.$front_bg_color.';"><h2 style="font-size:'.$front_text_size.'px;color:'.$front_text_color.';">'.$front.'</h2></div>';
    177         $fc_content .= '<div class="back" style="width:'.$width.'px;height:'.$height.'px;background:'.$back_bg_color.';"><h2 style="font-size:'.$back_text_size.'px;color:'.$back_text_color.';">'.$back.'</h2></div>';
     173        $fc_content .= '<div class="front" style="width:'.$width.'px;height:'.$height.'px;background:'.$front_bg_color.';"><div style="font-size:'.$front_text_size.'px;color:'.$front_text_color.';">'.$front.'</div></div>';
     174        $fc_content .= '<div class="back" style="width:'.$width.'px;height:'.$height.'px;background:'.$back_bg_color.';"><div style="font-size:'.$back_text_size.'px;color:'.$back_text_color.';">'.$back.'</div></div>';
    178175        $fc_content .= '</li>';
    179176       
Note: See TracChangeset for help on using the changeset viewer.