السبت، 31 مايو 2014

اضافة سلايد شو الى مدونات بلوجر Slidershow

الكاتب Unknown في 8:35 م 2 تعليق


 اضافة سلايد شو الى مدونات بلوجر




طريقة سهلة جدا لإضافة أداة سلايد الى مدونات blogger التي تقوم بعرض مواضيع المدونة بشكل الي ومميز مثلما نراه تماما في مواقع الأخبار الكبيرة والتي تعطي طابعا احترافي للمدونة.

 

كيفية اضافة الأداة ؟

  • من لوحة التحكم للمدونة نختار التخطيط ثم نختار اضافة أداة ثم نختار اداة HtmlJavaScript

  • نقوم بلصق الكود التالي


<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js' type='text/javascript'></script>

    <script type='text/javascript'>
    //<![CDATA[

    $(document).ready(function() {

    //Execute the slideShow, set 6 seconds for each images
    slideShow(3000);

    });

    function slideShow(speed) {


    //append a LI item to the UL list for displaying caption
    $('ul.slideshow').append('<li id="slideshow-caption" class="caption"><div class="slideshow-caption-container"><h3></h3><p></p></div></li>');

    //Set the opacity of all images to 0
    $('ul.slideshow li').css({opacity: 0.0});

    //Get the first image and display it (set it to full opacity)
    $('ul.slideshow li:first').css({opacity: 1.0});

    //Get the caption of the first image from REL attribute and display it
    $('#slideshow-caption h3').html($('ul.slideshow a:first').find('img').attr('title'));
    $('#slideshow-caption p').html($('ul.slideshow a:first').find('img').attr('alt'));

    //Display the caption
    $('#slideshow-caption').css({opacity: 0.7, bottom:0});

    //Call the gallery function to run the slideshow
    var timer = setInterval('gallery()',speed);

    //pause the slideshow on mouse over
    $('ul.slideshow').hover(
            function () {
                    clearInterval(timer);
            },
            function () {
                    timer = setInterval('gallery()',speed);
            }
    );

    }

    function gallery() {


    //if no IMGs have the show class, grab the first image
    var current = ($('ul.slideshow li.show')?  $('ul.slideshow li.show') : $('#ul.slideshow li:first'));

    //Get next image, if it reached the end of the slideshow, rotate it back to the first image
    var next = ((current.next().length) ? ((current.next().attr('id') == 'slideshow-caption')? $('ul.slideshow li:first') :current.next()) : $('ul.slideshow li:first'));

    //Get next image caption
    var title = next.find('img').attr('title');
    var desc = next.find('img').attr('alt');

    //Set the fade in effect for the next image, show class has higher z-index
    next.css({opacity: 0.0}).addClass('show').animate({opacity: 1.0}, 1000);

    //Hide the caption first, and then set and display the caption
    $('#slideshow-caption').animate({bottom:-70}, 300, function () {
                    //Display the content
                    $('#slideshow-caption h3').html(title);
                    $('#slideshow-caption p').html(desc);
                    $('#slideshow-caption').animate({bottom:0}, 500);
    });

    //Hide the current image
    current.animate({opacity: 0.0}, 2000).removeClass('show');

    }

    //]]>
    </script>

    <style type="text/css">
    ul.slideshow {
    list-style:none;
    width:500px;
    height:350px;
    overflow:hidden;
    position:relative;
    margin:0;
    padding:0;
    font-family:Arial,Helvetica,Trebuchet MS,Verdana;
    ;
    }
    ul.slideshow li {
    position:absolute;
    left:0;
    right:0;
    }
    ul.slideshow li.show {
    z-index:500;
    }
    ul img {
    width:500px;
    height:350px;
    border:none;
    }
    #slideshow-caption {
    width:500px;
    height:70px;
    position:absolute;
    bottom:0;
    left:0;
    color:#fff;
    background:#000;
    z-index:500;
    }
    #slideshow-caption .slideshow-caption-container {
    padding:5px 10px;
    z-index:1000;
    }
    #slideshow-caption h3 {
    margin:0;
    padding:0;
    font-size:16px;
    }
    #slideshow-caption p {
    margin:5px 0 0 0;
    padding:0;
    }
    </style>

    <ul class="slideshow">
    
    <li><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWWbYj1FkJNeKVQni4BoZ_3t0sf4BAlPzY8lkBbSs_f3acbKVUES63Hoc7l2OHx8VIEovo1SBgnePkv5SC4yLV2xSH4vrSEgZHv2-pOVKoaIfQGuQSzyMTt7C9kawaYoD8edHZnK1Ni4A2/h120/7+juni_0063.JPG" title="هنا قم بكتابة عنوان الموضوع1" alt="هنا وصف للموضوع 1" /></a></li>
    
    <li><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGxggxqkFhGnB427T3Nm9-euFqKldjUHtbUN_6eq9TeMowFSAPIx8tsfk1g6pV-0_ZNvn6Gv85b3q2LpwhSdkRkz4xArR2EU0GvdMvO8mkDcXfxnp2fl0JcdjHinYzYuBX4YNF6UkQLUHt/h120/13+-+1.jpg" title="هنا قم بكتابة عنوان الموضوع2" alt="هنا وصف للموضوع 2" /></a></li>
    
    <li><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhivepuDrHyiXClkkj2FqIiVK9EqKjJ-cNg3NGs4hsPys4TVvzwt0oOlhlmpgnXQSBeUmUyoqymcfIqc32XnEmhN6KpWt5IWMSlvs9xx-lsY20lGsScjc4TBQHQ6qHgUtj7oM79jkT_AowK/h120/2008.07.17+020.jpg" title="هنا قم بكتابة عنوان الموضوع3" alt="هنا وصف للموضوع 3" /></a></li>
    
    <li><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_MpSkNDkpFBK9qMoXlno3VNL-_D9FpNR-dPad65Ab9-XkqLr3LCerIrXTg2lDJ_xgxMkxaEfAFLlkAbygBfg-sca9bUNvRAfWWjcOqgn9mb4mCummk-KZPnhze0rO_x06K6MQm_8sNlzP/h120/Afternoon-2.jpg" title="هنا قم بكتابة عنوان الموضوع4" alt="هنا وصف للموضوع 4" /></a></li>
    </ul>

  • ثم نقوم بحفظ الإضافة 
تعديل الإضافة بما يتناسب مع مدونتك 
1- اذا أردنا زيادة عدد المواضيع المعروضة نقوم بزيادة عدد الأكواد التالية

   <li><img src="هنا رابط الصورة" title="هنا قم بكتابة عنوان الموضوع4" alt="هنا وصف للموضوع 4" /></a></li>

اي نقوم بنسخها ولصقها الواحدة تلو الأخرى حسب عدد المواضيع التي نريد عرضها على السلايد شو (Slideshow ).
2- التحكم في ارتفاع وعرض الأداة (الإطار الخارجي) نقوم بالبحث عن الكود التالي :


#slider {
 width: 468px;
 height: 260px;



لتغيير عرض الأداة width 
لتغيير ارتفاع الأداة height

3- تغيير لون السلايدشو الصغيرة (التي يتم بها عرض عنوان الموضوع ) نبحث عن الكود التالي :



 background-color: #0066CC;


ونقوم بتغيير الرمز 0066cc (للحصول على الألوان بصيغة html انتقل للصفحة التالية )

4- تغيير حجم ولون خط عنوان الموضوع (عناوين  المواضيع المعروضة على السلايد شو) ابحث عن الكود التالي :


 font: bold 25px/21px traditional arabic ;


الرمز traditional arabic لإستبدال نوع الخط 

الرمز   25px حجم الخط .

هذه هي اهم التعديلات التي نحتاج اليها لتنسيق الأداة بما يتناسب مع شكل وتصميم المدونة، ولمن يرغب في ادخال تعديلات اخرى ووجد صعوبة في ذالك يترك تعليق وسنحاول الإجابة عنه ان شاء الله السلام عليكم.



هناك تعليقان (2):