AccueilDernières imagesRechercherS'enregistrerConnexion

Forum de graphisme, codage et game design proposant des tutoriels, astuces, libres services et commandes dans les domaines de l'infographie amateur, de l'intégration web (HTML et CSS essentiellement) ainsi que dans la conception de RPG sur forum.

Le Deal du moment :
Funko POP! Jumbo One Piece Kaido Dragon Form : ...
Voir le deal
Le deal à ne pas rater :
Réassort du coffret Pokémon 151 Électhor-ex : où l’acheter ?
Voir le deal

    Catégories rétractables

    JodieCravery
    JodieCravery
    FémininAge : 29Messages : 68

    Mar 7 Juin 2016 - 18:50

    Ma demande



    Bonjour ♥
    Je travaille en ce moment sur un design de forum et je suis face à une jolie épine bien profondément plantée *métaphore off*. Plus sérieusement, j'ai trouvé pas mal de tutoriel pour les catégories rétractables seulement... bah ils ne fonctionnent pas avec le codage hyper modifié sur lequel je travail et je n'y connais absolument rien en javascript donc je sèche totalement. Les catégories et les forums associés prennent beaucoup de place et j'aimerais vraiment qu'ils puissent être réductibles à volonté parce qu'ils sont nombreux. Et autant j'arrive à me dépatouiller à l'arrache avec du CSS et du HTML et à faire un truc fonctionnel, autant au javascript on touche vraiment à quelque chose que je ne comprends pas du tout.

    Bref c'était l'intro éternelle juste pour savoir si :
    1) un code de catégories rétractables serait adaptable à mon code
    2) si quelqu'un aurait le temps et l'envie d'au moins m'expliquer comment ça marche (ou de le faire carrément mais juste m'expliquer clairement suffirait).

    Bref du coup voilà, je reviens supplier .o. Merci d'avance.


    Schéma(s) et Eléments
    Schémas : Que le titre de la catégorie soit la seule chose visible après clic
    Tailles des éléments : Les dimensions de mon titre de catégorie si ça a de l'importance pour le code : 770*67
    Effets voulus : J'aimerais bien de préférence que le bouton du clic soit à côté du titre de la catégorie
    Version de votre forum : PHPBB2


    Ressources
    La totalité de mon template index_box parce qu'il est fait un peu bizarrement et que c'est sûrement pour ça que les codes préfabriqués trouvés sur internet s'y accordent mal :
    Code:
    <table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
     <tr>
     <td class="gensmall" align="right" valign="bottom">
            <!-- BEGIN switch_user_logged_in -->
                      <center><span class="gensmall">{LAST_VISIT_DATE} ▬ {CURRENT_TIME}
                        </span></center>
            <center><a class="gensmall" href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a> ▬ <a class="gensmall" href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a> ▬ <a class="gensmall" href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a></center>
      <!-- END switch_user_logged_in -->
        </td>
     </tr>
    </table>
    <!-- BEGIN catrow --><!-- BEGIN tablehead --><div class="TitreCategorie"><br/><br/><br/>{catrow.tablehead.L_FORUM}</div><table class="forumline" width="100%" border="0" cellspacing="0" cellpadding="0">
     
     <!-- END tablehead -->
     <!-- BEGIN cathead -->
     <tr>
     <!-- BEGIN inc -->
     <td class="{catrow.cathead.inc.INC_CLASS}" width="46"><img src="{SPACER}" height="0" width="46" /></td>
     <!-- END inc -->
     <td class="{catrow.cathead.CLASS_CAT}" colspan="{catrow.cathead.INC_SPAN}" width="100%">
     <h{catrow.cathead.LEVEL} class="hierarchy">
     <span class="cattitle">
     <a class="cattitle" title="{catrow.cathead.CAT_DESC}" href="{catrow.cathead.U_VIEWCAT}">{catrow.cathead.CAT_TITLE}</a>
     </span>
                      </h{catrow.cathead.LEVEL}>
     </td>
     <td class="{catrow.cathead.CLASS_ROWPIC}" colspan="3" align="right"> </td>
     </tr>
     <!-- END cathead -->
     <!-- BEGIN forumrow -->
     <table class="forumline" id="categories" width="100%" border="0" cellspacing="0" cellpadding="0" valign="top">
      <tr><div class="index_fo"><img src="http://i.imgur.com/YEb6oPo.png"/></div>
     <!-- BEGIN inc -->
     <!-- END inc -->
     <td class="row1 over" valign="top" width="100%;" height="50" colspan="4">
                      <center><h{catrow.forumrow.LEVEL} class="hierarchy">
                              <div class="forumlink">
     <a class="forumlink" href="{catrow.forumrow.U_VIEWFORUM}" style="color:#ffffff">{catrow.forumrow.FORUM_NAME}</a>
                              </div></h{catrow.forumrow.LEVEL}></center>
                               </td></tr>
              <tr><td class="{catrow.cathead.inc.INC_CLASS}" width="82"><img src="{SPACER}" height="0" width="82" /></td>
                <td width="455x"><div class="genmed">{catrow.forumrow.FORUM_DESC}</div></td>
                <td valign="top"><div class="forme" id="subforums"><img src="http://i.imgur.com/DOSAQZs.png"/> <span>{catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS} </span> <script type="text/javascript">
                  jQuery('#subforums').html(jQuery('#subforums').html().replace(/, /g,'<br/>')).removeAttr('id');
    </script></div>
                </td><td class="{catrow.cathead.inc.INC_CLASS}" width="82"><img src="{SPACER}" height="0" width="82" /></td></tr></table>
    <table><tr><td class="{catrow.cathead.inc.INC_CLASS}" width="3"><img src="{SPACER}" height="0" width="3" /></td>
      <td><div class="sujet_msg">{catrow.forumrow.TOPICS} sujets, {catrow.forumrow.POSTS} réponses </div></td>
       <td class="row1" align="center" valign="top" height="50" width="100" colspan="4">
                                <div class="gensmall" id="LastPost">
                                
                                {catrow.forumrow.LAST_POST}</div><br/>
                               <div class="no_new"><img title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></div></td>
     </tr>
    <img src="{SPACER}" alt="" height="15" width="1" class="bordures"/>
     <!-- END forumrow -->
     <!-- BEGIN catfoot -->
     <tr>
     <!-- BEGIN inc -->
     <td class="{catrow.catfoot.inc.INC_CLASS}" width="46"><img src="{SPACER}" height="0" width="46" /></td>
     <!-- END inc -->
     <td class="spaceRow" colspan="{catrow.catfoot.INC_SPAN}" height="1"><img src="{SPACER}" alt="" height="1" width="1" /></td>
     </tr>
     <!-- END catfoot -->
     <!-- BEGIN tablefoot -->
    </table><img src="{SPACER}" alt="" height="15" width="1" /><!-- END tablefoot --><!-- END catrow -->


    Autres précisions ?
    Les catégories ressemblent à ça (pour la partie avec le titre), sinon le reste des forums dans les catégories c'est la même chose à partir d'au-dessus du titre.
    Spoiler:



    Dernière édition par JodieCravery le Lun 13 Juin 2016 - 0:34, édité 1 fois
    Nihil Scar Winspeare
    Nihil Scar Winspeare
    Messages : 5244

    Mar 7 Juin 2016 - 23:05

    Coucou :)

    Etant donné qu'il s'agit d'une structure vraiment spéciale, je pense qu'il faudrait aussi le CSS qui va avec !
    Sinon, donner le lien du forum pourrait être un plus aussi, pour regarder directement :)

    JodieCravery
    JodieCravery
    FémininAge : 29Messages : 68

    Mar 7 Juin 2016 - 23:36

    Je code un peu avec les moyens du bord donc c'est bordélique à souhait mais :
    Code:
    /************************************* Titre des catégories **********************************/
    /* Titre des catégories - tableau */
    .TitreCategorie {
       background: url('http://i.imgur.com/Jn2MhWv.png') center no-repeat;
       width:770;
      height:67px;
      valign:center;
        margin-bottom:-65px;
      padding-bottom:90px;
      margin-left:-11px;
      position:relative;
      z-index:5;
    }

    /* Titre des catégories - texte */
    .TitreCategorie h2 {
       margin:0;
       text-align: center;
       letter-spacing:2px;
       font-variant:small-caps;
             font-family: Geneva, Tahoma, Verdana, sans-serif;
         font-size:16px;
      color:#000000;
      text-shadow: #000000 1px 1px 0px;
     }
    /************************************* Fin titre des catégories **********************************/


    /************************************* Sous-forums **********************************/
    /* contenu des catégories*/
    #categories {
      height: 123px;
        overflow: hidden;
        position: relative;
        width: 770px;
      margin-left:8px;
    border-right: 8px solid #717171;
    border-left: 9px solid #717171;
    border-radius-top-left:2px;
    border-radius-top-right:2px;
      box-shadow: -8px 30px 66px -37px rgba(0,0,0,1);
      -webkit-box-shadow: -8px 30px 66px -37px rgba(0,0,0,1);
    -moz-box-shadow: -8px 30px 66px -37px rgba(0,0,0,1);
      background: #CACACA url('http://i.imgur.com/HNl5CqZ.png');
      border-bottom:7px solid #717171;
      padding-bottom:-50px;
      }


    /* Titre forums */
    .forumlink {
       text-align: center;
       letter-spacing:2px;
       font-variant:small-caps;
             font-family: Geneva, Tahoma, Verdana, sans-serif;
      height:20px;
      padding-bottom:5px;
      color:#282828;
      margin-top:-2px;
        text-shadow: #000000 1px 1px 0px;
       padding-top:-10px;
      background: #CACACA url('http://i.imgur.com/4JMEdMQ.png') ;
        margin-right:-5px;
      margin-left:-5px;
      font-size:12pt;
      position:relative;
      z-index:6;
    }

    .index_fo {
      position:relative ;
      z-index:1;
      margin-left:6px;}

    a.forumlink  {
      color:#000000;
    background-image:none;}


    /* descriptions forum */
    .description {
      padding-left:5px;
      text-indent:10px;
    text-align:justify;
    padding-right:10px;
    padding-top:2px;
      margin-top:25px;
     height:95px;
      padding-bottom:2px;
     overflow:auto;
      position:absolute;
      top:0;
      width:440px;
    }

    .forme img { position:absolute;
    top:0;
    left:440;
      z-index:7;
      margin-top:10px;
      margin-left:-20px;
      width:136px;
      height:120px;
       webkit-transition: all 1.5s ease;
       -moz- transition: all 1.5s ease;
       -o-transition: all 1.5s ease;
       transition: all 1.5s ease;
      -webkit-transition-delay: 3s; /* Safari */
        transition-delay: 3s;
    }

    .forme img:hover{    transform: translateX(-139px);
    -moz-transform: translateX(-136px);
    -o-transform: translateX(-136px);
    -webkit-transform: translateX(-136px);
       width:272px;
      height:240px;
      z-index:7;
      margin-top:10px;
      webkit-transition: all 0.3s linear;
       -moz- transition: all 0.3s linear;
       -o-transition: all 0.3s linear;
       transition: all 0.3s linear;
      opacity: 0;
        filter: alpha(opacity=0);
      -webkit-transition-delay: 0s; /* Safari */
        transition-delay: 0s;
    }

    .forme span {
      display:block;
        letter-spacing:2px;
       font-variant:small-caps;
             font-family: Geneva, Tahoma, Verdana, sans-serif;
    margin-left:-14px;
      margin-top:-25px;
      overflow-x:hidden;
      overflow-y:auto;
    line-height:12px;
     color:#cfa950;
      height:100px;
      text-shadow: #000000 1px 1px 0px;
    font-weight:bold;
    width:130px;
    webkit-transition: all 1.5s ease;
       -moz- transition: all 1.5s ease;
       -o-transition: all 1.5s ease;
       transition: all 1.5s ease;
    position:relative;
      z-index:6;
    text-align:center;}


    .forme span a { display:block;
     font-size:16px;
    color:#cfa950;}

    /* Partie basse */

    .sujet_msg {
      background:url('http://i.imgur.com/lMzf5ho.png') no-repeat;
      width:350px;
      height:45px;
      padding-top:10px;
      padding-left:30px;
      margin-left:-14px;
      font-size:16px;
    color:black;
    font-weight:bold;
      padding-bottom:3px;
      box-shadow: -8px 30px 66px -37px rgba(0,0,0,1);
      -webkit-box-shadow: -8px 30px 66px -37px rgba(0,0,0,1);
    -moz-box-shadow: -8px 30px 66px -37px rgba(0,0,0,1);
    }

    #LastPost {
      background : url('http://i.imgur.com/bjPKVE1.png') no-repeat bottom right;
    width:452px;
    height:60px;
    margin-top:-25px;
    position:relative;
    z-index:14;
    margin-left:-54px;
    font-size:12px;
    color:black;
    font-weight:bold;
    padding-top:5px;
    text-align:center;
     box-shadow: -8px 30px 66px -37px rgba(0,0,0,1);
      -webkit-box-shadow: -8px 30px 66px -37px rgba(0,0,0,1);
    -moz-box-shadow: -8px 30px 66px -37px rgba(0,0,0,1);}

    #LastPost a {
      font-size:13px; }
      
    .no_new {
      margin-top:-100px;
      margin-right:-310px;
    }

    .no_new img {
      width:90px;
      height:90px;
    position:relative;
    z-index:15;
      -moz-transition-duration:3s;
    -moz-transition-timing-function:linear;
    -webkit-transition-duration:3s;
    -webkit-transition-timing-function:linear;
    transition-duration:3s;
    transition-timing-function:linear;
    }

    .no_new img:hover{
      -moz-transform:rotate(5400deg);
    -webkit-transform:rotate(5400deg);
    transform:rotate(5400deg);
    -moz-transition-duration:20s;
    -moz-transition-timing-function:linear;
    -webkit-transition-duration:20s;
    -webkit-transition-timing-function:linear;
    transition-duration:20s;
    transition-timing-function:linear;}
    /************************************* Fin sous-forums **********************************/

    Et pour le forum tel qu'il est actuellement (c'est à dire totalement vide) :
    http://discenter.azurforum.com/
    JodieCravery
    JodieCravery
    FémininAge : 29Messages : 68

    Ven 10 Juin 2016 - 22:33

    Up :friends:
    Onyx
    Onyx
    FémininAge : 30Messages : 3350

    Sam 11 Juin 2016 - 3:17

    Hellow!

    Tu peux nous donner ton CSS au complet, pas juste la partie relative aux catégories?
    Et tu utilise un code dans les descriptions de tes catégories? On peut l'avoir?



    JodieCravery
    JodieCravery
    FémininAge : 29Messages : 68

    Sam 11 Juin 2016 - 12:15

    Mon CSS complet change tous les jours vu que je rajoute des morceaux un peu tout le temps ^^ Après je pensais pas que la partie relative à la liste des groupes soit spécialement utile, c'est pour ça que je ne l'avais pas mis en entier. Mais actuellement il ressemble à ça :
    Code:
    /************************************* En-tête du forum **********************************/
    /* Bannière */
    .flag {
        background: url('http://i.imgur.com/EvFxpRO.png') top center no-repeat;
        top: 0px;
        left: 0px;
        width: 100%;
        height: 730px;
        position: absolute;
        cursor: pointer;
      overflow-x:hidden;
    }

    /*fond de cadre et bordures*/
    .bodyline {
        background-image: url('http://img15.hostingpics.net/pics/861151Fonddepage.png');
        padding: 580px 55px 55px;
      margin-top:25px;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    }

    /*Fond de page*/
    body {
        background-color: #ECECDC;
        background: url('http://img15.hostingpics.net/pics/535441Fonddepage2.png') bottom right no-repeat fixed;
        margin: 0px;
      margin-top:10px;
      overflow-x:hidden;
    }

    .cache {
      color:transparent ; }

    .thHead {
      border:none; }

    /* Navigation */
    .barrenav {
     vertical-align:top;
      position:absolute;
      z-index:15;
    height:15px;
    padding-bottom:4px;
      width:790px;
      margin-top:-20px;
    }

    /*Liens*/
    a { text-decoration: none!important; }  
    a:link { text-decoration: none; }
    a:link:hover { text-decoration: none!important;
    font-style:italic;}
    a:hover { text-decoration: none!important;
    font-style:italic;}
    a:visited { text-decoration: none;}
    a:visited:hover { text-decoration: none!important;
    font-style:italic;}
    a.topiclink {text-decoration: none; }
    a.topiclink:hover {text-decoration: none!important;
    font-style:italic;}
    /************************************* Fin en-tête du forum **********************************/

    /************************************* Titre des catégories **********************************/
    /* Titre des catégories - tableau */
    .TitreCategorie {
       background: url('http://i.imgur.com/Jn2MhWv.png') center no-repeat;
       width:770;
      height:67px;
      valign:center;
        margin-bottom:-65px;
      padding-bottom:90px;
      margin-left:-11px;
      position:relative;
      z-index:5;
    }

    /* Titre des catégories - texte */
    .TitreCategorie h2 {
       margin:0;
       text-align: center;
       letter-spacing:2px;
       font-variant:small-caps;
             font-family: Geneva, Tahoma, Verdana, sans-serif;
         font-size:16px;
      color:#000000;
      text-shadow: #000000 1px 1px 0px;
     }
    .TitreCategorie #paperasse {
      color : white;
     }
    .TitreCategorie #koranda {
      color : #BFFF6B;
     }
    .TitreCategorie #ottra {
      color : #AABBBD;
     }
    .TitreCategorie #zchala {
      color : #D971C4;
     }
    .TitreCategorie #ankori {
      color : #916B20;
     }
    .TitreCategorie #mondreo {
      color :  #BD2A2A;
     }
    .TitreCategorie #aquiline {
      color : #FF7A21;
     }
    /************************************* Fin titre des catégories **********************************/

    /************************************* Défilement **********************************/
    ::-webkit-scrollbar {
        width: 12px;
    }
     
    ::-webkit-scrollbar-track {
           background-color:#C8C8C8;
    }
     
    ::-webkit-scrollbar-thumb {
      
          -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
    background-color:#ffac35;
    }

    .forme ::-webkit-scrollbar {
        width: 5px;
    }

    .description ::-webkit-scrollbar {
        width: 5px;
    }
    /************************************* Fin défilement **********************************/

    /************************************* Sous-forums **********************************/
    /* contenu des catégories*/
    #categories {
      height: 123px;
        overflow: hidden;
        position: relative;
        width: 770px;
       margin-left:8px;
    border-right: 8px solid #717171;
    border-left: 9px solid #717171;
    border-radius-top-left:2px;
    border-radius-top-right:2px;
      box-shadow: -8px 30px 66px -37px rgba(0,0,0,1);
      -webkit-box-shadow: -8px 30px 66px -37px rgba(0,0,0,1);
    -moz-box-shadow: -8px 30px 66px -37px rgba(0,0,0,1);
      background: #CACACA url('http://i.imgur.com/HNl5CqZ.png');
      border-bottom:7px solid #717171;
      padding-bottom:-50px;
      }


    /* Titre forums */
    .forumlink {
       text-align: center;
       letter-spacing:2px;
       font-variant:small-caps;
             font-family: Geneva, Tahoma, Verdana, sans-serif;
      height:20px;
      padding-bottom:5px;
      color:#282828;
      margin-top:-2px;
        text-shadow: #000000 1px 1px 0px;
       padding-top:-10px;
      background: #CACACA url('http://i.imgur.com/4JMEdMQ.png') ;
        margin-right:-5px;
      margin-left:-5px;
      font-size:12pt;
      position:relative;
      z-index:6;
    }

    .index_fo {
      position:relative ;
      z-index:1;
      margin-left:6px;}

    a.forumlink  {
      color:#000000;
    background-image:none;}


    /* descriptions forum */
    .description {
      padding-left:5px;
      text-indent:10px;
    text-align:justify;
    padding-right:10px;
    padding-top:2px;
      margin-top:25px;
     height:95px;
      padding-bottom:2px;
     overflow:auto;
      position:absolute;
      top:0;
      width:440px;
    }

    .forme img { position:absolute;
    top:0;
    left:440;
      z-index:7;
      margin-top:10px;
      margin-left:-20px;
      width:136px;
      height:120px;
       webkit-transition: all 1.5s ease;
       -moz- transition: all 1.5s ease;
       -o-transition: all 1.5s ease;
       transition: all 1.5s ease;
      -webkit-transition-delay: 3s; /* Safari */
        transition-delay: 3s;
    }

    .forme img:hover{    transform: translateX(-200px);
    -moz-transform: translateX(-200px);
    -o-transform: translateX(-200px);
    -webkit-transform: translateX(-200px);
       width:235px;
      height:240px;
      z-index:7;
      margin-top:10px;
      webkit-transition: all 0.3s linear;
       -moz- transition: all 0.3s linear;
       -o-transition: all 0.3s linear;
       transition: all 0.3s linear;
      opacity: 0;
        filter: alpha(opacity=0);
      -webkit-transition-delay: 0s; /* Safari */
        transition-delay: 0s;
    }

    .forme span {
      display:block;
        letter-spacing:2px;
       font-variant:small-caps;
             font-family: Geneva, Tahoma, Verdana, sans-serif;
    margin-left:-14px;
      margin-top:-25px;
      overflow-x:hidden;
      overflow-y:auto;
    line-height:12px;
     color:#cfa950;
      height:100px;
      text-shadow: #000000 1px 1px 0px;
    font-weight:bold;
    width:130px;
    webkit-transition: all 1.5s ease;
       -moz- transition: all 1.5s ease;
       -o-transition: all 1.5s ease;
       transition: all 1.5s ease;
    position:relative;
      z-index:6;
    text-align:center;}


    .forme span a { display:block;
     font-size:16px;
      position:relative;
    color:#cfa950;}

    /* Partie basse */

    .sujet_msg {
      background:url('http://i.imgur.com/lMzf5ho.png') no-repeat;
      width:350px;
      height:45px;
      padding-top:10px;
      padding-left:30px;
      margin-left:-14px;
      font-size:16px;
    color:black;
    font-weight:bold;
      padding-bottom:3px;
      box-shadow: -8px 30px 66px -37px rgba(0,0,0,1);
      -webkit-box-shadow: -8px 30px 66px -37px rgba(0,0,0,1);
    -moz-box-shadow: -8px 30px 66px -37px rgba(0,0,0,1);
    }

    #LastPost {
      background : url('http://i.imgur.com/bjPKVE1.png') no-repeat bottom right;
    width:452px;
    height:60px;
    margin-top:-25px;
    position:relative;
    z-index:14;
    margin-left:-54px;
    font-size:12px;
    color:black;
    font-weight:bold;
    padding-top:5px;
    text-align:center;
     box-shadow: -8px 30px 66px -37px rgba(0,0,0,1);
      -webkit-box-shadow: -8px 30px 66px -37px rgba(0,0,0,1);
    -moz-box-shadow: -8px 30px 66px -37px rgba(0,0,0,1);}

    #LastPost a {
      font-size:13px; }
      
    .no_new {
      margin-top:-100px;
      margin-right:-310px;
    }

    .no_new img {
      width:90px;
      height:90px;
    position:relative;
    z-index:15;
    -moz-transition-duration:6s;
    -moz-transition-timing-function:linear;
    -webkit-transition-duration:6s;
    -webkit-transition-timing-function:linear;
    transition-duration:6s;
    transition-timing-function:linear;
    }

    .no_new img:hover{
      -moz-transform:rotate(5400deg);
    -webkit-transform:rotate(5400deg);
    transform:rotate(5400deg);
    -moz-transition-duration:20s;
    -moz-transition-timing-function:linear;
    -webkit-transition-duration:20s;
    -webkit-transition-timing-function:linear;
    transition-duration:20s;
    transition-timing-function:linear;}
    /************************************* Fin sous-forums **********************************/

    /************************************* Liste des groupes **********************************/
    /* QEEL A-Lice adapté */
    .grp_fond {
      height: 270px;
    margin-left: -11px !important;
    margin-right: -11px !important;
    color: black;
    font-size: 11px;
    position: relative;
    }

    .grp_titre {
    font-size: 11px;
    font-family: Verdana;
    text-align: center;
    color: #0ea7a2;
    position: relative;
    top: -15px;
    }

    .grp_bloc {
    width: 120px;
    height: 375px;
    position: absolute;
    left: 580px;
      top:0px;

    }

    .QEEL_bloc {
    }

    /*onglets*/
    .onglet {
    width: 180px;
    padding-top: 15px;
      padding-bottom: 25px;
      margin-left:30px;
         border-left: solid 3px #717171;
       border-right: solid 3px #717171;
      font-weight:bold;
    }


    #onglet_un {
    color: #BFFF6B;
    text-align: center;
      font-famiy: verdana;
      text-transform:uppercase;
    font-size: 9px;
    }

    #onglet_deux {
    color: #AABBBD;
    text-align: center;
      font-famiy: verdana;
      text-transform:uppercase;
    font-size: 9px;
    }

    #onglet_trois {
    color: #BD2A2A;
    text-align: center;
      font-famiy: verdana;
      text-transform:uppercase;
    font-size: 9px;
    }

    #onglet_quatre {
    color: #D971C4;
    text-align: center;
      font-famiy: verdana;
      text-transform:uppercase;
    font-size: 9px;
    }

    #onglet_cinq {
    color: #916B20;
    text-align: center;
      font-famiy: verdana;
      text-transform:uppercase;
    font-size: 9px;
    }


    #onglet_six {
    color: #FF7A21;
    text-align: center;
      font-famiy: verdana;
      text-transform:uppercase;
    font-size: 9px;
      height:33px;
    }


    .contenu_onglet {
    color: black;
    position: relative;
      width:350px;
        height:400px;
    left: 235px;
    top: -190px;
    display: none;
    overflow: auto;
    z-index: 20;
    }

    .contenu_onglet a {
      display:block;
      margin-top:10px;
    font-variant:small-caps;
    font-weight:bold;
    font-size:14px;}

    #contenu_onglet_un {
    font-size: 13px;
    text-align: justify;
    font-family: Arial;
    }

    #contenu_onglet_deux{
    font-size: 13px;
    text-align: justify;
    font-family: Arial;
    }

    #contenu_onglet_trois {
    font-size: 13px;
    text-align: justify;
    font-family: Arial;
    }

    #contenu_onglet_quatre {
    font-size: 13px;
    text-align: justify;
    font-family: Arial;
    }

    #contenu_onglet_cinq {
    font-size: 13px;
    text-align: justify;
    font-family: Arial;
    }

    #contenu_onglet_six {
    font-size: 13px;
    text-align: justify;
    font-family: Arial;
    }

    .contenu_onglet2 {
      display:none;
     }
    /*fin onglets*/
    /************************************* Fin liste des groupes **********************************/

    /************************************* Affichage du profil **********************************/
    .bloc_prof {
      background:url('http://i86.servimg.com/u/f86/17/17/90/35/fond_l10.png') ;
       border: 4px solid #4B4B4B;
      width:198px;
      padding:7px;
     margin-left:20px;
      margin-right:15px;
    margin-top:15px;
      }

    .bloc2_prof {
      display:inline:block;
      padding-top:22px;
      float:right;
      margin-left:3px;
      margin-right:3px;
      width:135px;
      font-weight:bold;
    }

     
    .prof_membre {
      float: left;
     margin: 3px;
    }

    #champs_profil img[src*="http://2img.net/i/fa/edit.png"]{
     display:none; }

    #champs_profil ["Contacter par e-mail"] {
      display:none; }

    #prof_ava img{
      width:200px;
      height:320px;
    border : 2px solid #717171;}
    /************************************* Fin affichage du profil **********************************/

    /************************************* Liste des sujets **********************************/
    .bloc_sujets
    {
       width: 788px;
      margin: auto;
    border : 4px solid #717171;
      background:#282828;
      padding: 8px;
    }

    .icones_sujets {
      display:block;
      padding-top:2px;
    margin-left:130px;
    margin-top:-10px;}

    .icones_sujets img{
      width:40px;
      height:40px;
    position:relative;
    z-index:15;
    -moz-transition-duration:3.0s;
    -moz-transition-timing-function:linear;
    -webkit-transition-duration:3.0s;
    -webkit-transition-timing-function:linear;
    transition-duration:3.0s;
    transition-timing-function:linear;
    }

    .icones_sujets img:hover{
      -moz-transform:rotate(5400deg);
    -webkit-transform:rotate(5400deg);
    transform:rotate(5400deg);
    -moz-transition-duration:20s;
    -moz-transition-timing-function:linear;
    -webkit-transition-duration:20s;
    -webkit-transition-timing-function:linear;
    transition-duration:20s;
    transition-timing-function:linear;}

    .sujets
    {
      background:  #CACACA;
       width: 788px;
       padding: 3px;
      border:3px solid white;
    }
    .topictitle
    {
       text-decoration : none !important;
      font-family: Arial !important;
      font-size: 10px !important;
      text-transform: uppercase;
      background: #CACACA;
     
    }

    .topic-title {
      background:  #CACACA;}

    .sujets_auteur
    {
      display: block;
      width: 200px;
      font-size: 11px;
      background: #CACACA;
    }

    .sujet_last
    {
      display: block;
      width: 180px;
      height: 40px;
      padding-top: 10px;
        background: #CACACA;
      font-size: 11px;
    }
    .sujets_stats {
      margin-left:432px;
      text-align: center;
      margin-bottom: 10px;
      margin-top:-3px;
      background:#CACACA;
      border-right :3px solid #ffffff;
      border-left :3px solid #ffffff;
      border-bottom :3px solid #ffffff;
      height:20px;
      padding-top:5px;
      width:350px;
    }

    .sujets_stats_contenu {
      font-size: 8px;
      font-family:verdana;
      text-transform:uppercase;
       color:#000000;
    }
    /************************************* Fin liste des sujets **********************************/

    Pour la description des forums c'est juste :
    Code:
    <div class="description">
      Vous connaissez, c'est le passage essentiel pour tout nouveau joueur ou possible nouveau joueur. Déjà pour savoir si ça vous intéresse. Ensuite parce que quelqu'un qui s'inscrit sans avoir lu le règlement et le contexte, ça se voit. Et c'est pas bien. Bref, jetez un œil histoire de bien savoir comment ça marche (les annexes ne sont pas des lectures obligatoires, on va pas vous forcer à apprendre la géo et le bestiaire par cœur non plus, mais c'est quand même mieux d'y jeter un œil quand vous faites des rps).  
    </div>
    Les titres des catégories ont simplement une id qui définit leur couleur, mais sinon tout le reste est dans le template et dans le css.
    Onyx
    Onyx
    FémininAge : 30Messages : 3350

    Lun 13 Juin 2016 - 0:08

    Salut!

    J'aime bien avoir le CSS en entier parce que parfois un élément d'une autre partie interragit accidentellement ailleurs alors ça peut être important ^^
    Et aussi, j'essayais d'avoir à peu près le même rendu que toi pour bien faire fonctionner le code, mais même en copiant exactement ce que tu me donnes, ça ne donne pas la même chose. Va savoir u_u Enfin, je pense que j'y suis quand même arrivée ^^

    Bref, voilà le template modifié pour que les catégories soient rétractables :
    Code:
    <table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
     <tr>
     <td class="gensmall" align="right" valign="bottom">
            <!-- BEGIN switch_user_logged_in -->
                      <center><span class="gensmall">{LAST_VISIT_DATE} ▬ {CURRENT_TIME}
                        </span></center>
            <center><a class="gensmall" href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a> ▬ <a class="gensmall" href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a> ▬ <a class="gensmall" href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a></center>
      <!-- END switch_user_logged_in -->
        </td>
     </tr>
    </table>
    <!-- BEGIN catrow --><!-- BEGIN tablehead --><div class="TitreCategorie"><br/><br/><br/>{catrow.tablehead.L_FORUM}</div><table class="forumline" width="100%" border="0" cellspacing="0" cellpadding="0">
     
     <!-- END tablehead -->
     <!-- BEGIN cathead -->
     <tr>
     <!-- BEGIN inc -->
     <td class="{catrow.cathead.inc.INC_CLASS}" width="46"><img src="{SPACER}" height="0" width="46" /></td>
     <!-- END inc -->
     <td class="{catrow.cathead.CLASS_CAT}" colspan="{catrow.cathead.INC_SPAN}" width="100%">
     <h{catrow.cathead.LEVEL} class="hierarchy">
     <span class="cattitle">
     <a class="cattitle" title="{catrow.cathead.CAT_DESC}" href="{catrow.cathead.U_VIEWCAT}">{catrow.cathead.CAT_TITLE}</a>
     </span>
                      </h{catrow.cathead.LEVEL}>
     </td>
     <td class="{catrow.cathead.CLASS_ROWPIC}" colspan="3" align="right"> </td>
     </tr>
     <!-- END cathead -->
     <!-- BEGIN forumrow -->
    <tr><td><div class="categoriesfull">
     <table class="forumline" id="categories" width="100%" border="0" cellspacing="0" cellpadding="0" valign="top">
      <tr><div class="index_fo"><img src="http://i.imgur.com/YEb6oPo.png"/></div>
     <!-- BEGIN inc -->
     <!-- END inc -->
     <td class="row1 over" valign="top" width="100%;" height="50" colspan="4">
                      <center><h{catrow.forumrow.LEVEL} class="hierarchy">
                              <div class="forumlink">
     <a class="forumlink" href="{catrow.forumrow.U_VIEWFORUM}" style="color:#ffffff">{catrow.forumrow.FORUM_NAME}</a>
                              </div></h{catrow.forumrow.LEVEL}></center>
                              </td></tr>
              <tr><td class="{catrow.cathead.inc.INC_CLASS}" width="82"><img src="{SPACER}" height="0" width="82" /></td>
                <td width="455x"><div class="genmed">{catrow.forumrow.FORUM_DESC}</div></td>
                <td valign="top"><div class="forme" id="subforums"><img src="http://i.imgur.com/DOSAQZs.png"/> <span>{catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS} </span> <script type="text/javascript">
                  jQuery('#subforums').html(jQuery('#subforums').html().replace(/, /g,'<br/>')).removeAttr('id');
    </script></div>
                </td><td class="{catrow.cathead.inc.INC_CLASS}" width="82"><img src="{SPACER}" height="0" width="82" /></td></tr></table>
    <table><tr><td class="{catrow.cathead.inc.INC_CLASS}" width="3"><img src="{SPACER}" height="0" width="3" /></td>
      <td><div class="sujet_msg">{catrow.forumrow.TOPICS} sujets, {catrow.forumrow.POSTS} réponses </div></td>
      <td class="row1" align="center" valign="top" height="50" width="100" colspan="4">
                                <div class="gensmall" id="LastPost">
                               
                                {catrow.forumrow.LAST_POST}</div><br/>
                              <div class="no_new"><img title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></div></td>
     </tr>
      <img src="{SPACER}" alt="" height="15" width="1" class="bordures"/></table></div></td></tr>
     <!-- END forumrow -->
     <!-- BEGIN catfoot -->
     <tr>
     <!-- BEGIN inc -->
     <td class="{catrow.catfoot.inc.INC_CLASS}" width="46"><img src="{SPACER}" height="0" width="46" /></td>
     <!-- END inc -->
     <td class="spaceRow" colspan="{catrow.catfoot.INC_SPAN}" height="1"><img src="{SPACER}" alt="" height="1" width="1" /></td>
     </tr>
     <!-- END catfoot -->
     <!-- BEGIN tablefoot -->
    </table><img src="{SPACER}" alt="" height="15" width="1" /><!-- END tablefoot --><!-- END catrow -->

    Ensuite, on rejoute ce petit javascript (Placement sur l'index) :
    Code:
    /*On attend que la page charge*/
    $(function(){

      /*Je rajoute un pointer sur le titre pour que les gens comprennent de cliquer dessus*/
      $(".TitreCategorie").css("cursor", "pointer");

      /*On active la fonction toogle au clic sur le titre de catégorie*/
      $(".TitreCategorie").toggle(function(){

      /*Au premier clic, le catégoriefull disparaît*/
        $(this).next().find(".categoriesfull").css("display", "none");

      /*Au premier clic, image derrière le titre de categorie change*/
        $(this).css("background-image", "url('http://img11.hostingpics.net/pics/613722Jn2MhWv.png')");

      /*Au premier clic, la hauteur du titre de categorie change*/
        $(this).css("height", "48px");
      }, function(){

      /*Au deuxième clic, le catégoriefull réapparaît*/
        $(this).next().find(".categoriesfull").css("display", "block");

      /*Au deuxième clic, image derrière le titre de categorie redevient normal*/
        $(this).css("background-image", "url('http://i.imgur.com/Jn2MhWv.png')");

      /*Au deuxième clic, la hauteur redevient normal*/
        $(this).css("height", "67px");
      });
    });


    Explications :
    J'ai entouré le contenu des catégories d'un div à laquelle j'ai donné la classe "categoriesfull".

    Ensuite, j'ai créé le javascript. La fonction "toggle" permet de faire une action quand on clique et une deuxième action quand on clique une deuxième fois. Les explications sont déjà dans le javascript ^^



    JodieCravery
    JodieCravery
    FémininAge : 29Messages : 68

    Lun 13 Juin 2016 - 0:34

    C'est possible qu'on n'ait pas le même résultat parce que j'ai beaucoup d'autres templates modifiés (notamment le header) et que du coup le css seul ne suffit pas ^^

    En tout cas ça fonctionne, merci =D C'est sympa d'avoir pris le temps de m'aider parce que j'avoue que je suis totalement perdue dès que ça touche au javascript. Merci ^-^
    Contenu sponsorisé


      La date/heure actuelle est Sam 27 Avr 2024 - 18:58