css:wrap_avillepreux

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
css:wrap_avillepreux [2024/07/02 16:40] avillepreuxcss:wrap_avillepreux [2024/12/12 17:40] (Version actuelle) avillepreux
Ligne 5: Ligne 5:
 .wrap_username { .wrap_username {
     background-color: color-mix(in srgb, var(--color, black) 20%, black 10%);     background-color: color-mix(in srgb, var(--color, black) 20%, black 10%);
 +}
 +div.wrap_username {
     box-shadow: 0 0 3px 2px #00000017;     box-shadow: 0 0 3px 2px #00000017;
 } }
Ligne 21: Ligne 23:
     gap: 0.3em;     gap: 0.3em;
     padding: 0 0.3em;     padding: 0 0.3em;
 +    vertical-align: bottom;
 } }
 .wrap_username:before { .wrap_username:before {
Ligne 29: Ligne 32:
     display: inline-block;     display: inline-block;
     border-radius: 50%;     border-radius: 50%;
-    border: 2px solid var(--color, #AAB); 
 } }
 div.wrap_username:before { div.wrap_username:before {
 +    border: 2px solid var(--color, #AAB);
     width: 24px;     width: 24px;
     height: 24px;     height: 24px;
Ligne 49: Ligne 52:
 } }
 span.wrap_username:before { span.wrap_username:before {
-    width: 16px+    width: 18px
-    height: 16px;+    height: 18px;
 } }
  
Ligne 96: Ligne 99:
                   ' div.wrap_'+username+':after  { content: "'+username+'" }' +                   ' div.wrap_'+username+':after  { content: "'+username+'" }' +
                   ' div.wrap_'+username+'        { --color: '+color+'; border: 2px solid var(--color); }' +                   ' div.wrap_'+username+'        { --color: '+color+'; border: 2px solid var(--color); }' +
-                  ' span.wrap_'+username+'       { --color: '+color+'; border: 2px solid var(--color); }'+                  ' span.wrap_'+username+'       { --color: '+color+'; }'
  
                   + ' </style>');                   + ' </style>');
Ligne 115: Ligne 118:
  
     console.log("Init usernames...");     console.log("Init usernames...");
 +    
 +    function is_valid_username(username) {
 +    
 +    if (jQuery.isNumeric(username)) return false;    
 +    username = username.trim().toLowerCase();
 +    if (jQuery.isNumeric(username)) return false;
 +    if (username.length < 2) return false;
 +
 +    if (jQuery.inArray(username,
 +
 + "must", "must", "should", "could", "wont",
 + "collapsed", "block", "plugin_wrap", "column", "lexicon", "title", "nav", "nav_group", "filters", "toc",
 + "img-grid", "note", "node", "fetch", "1-2", "1-3", "1-4", "2-1", "2-2", "2-3", "2-4"
 +
 + ]) >= 0) return false;
 +
 + return true;
 +    }
          
     jQuery('.plugin_wrap, [class*="wrap_"]:not([class*="plugin_include_"])').each(function() {      jQuery('.plugin_wrap, [class*="wrap_"]:not([class*="plugin_include_"])').each(function() { 
Ligne 124: Ligne 145:
         if (typeof id !== "undefined")         if (typeof id !== "undefined")
  {  {
- if (id.length >= 2 && !jQuery.isNumeric(id)) {+ if (is_valid_username(id)) {
         init_username_wrap(wrap_element, id);         init_username_wrap(wrap_element, id);
         }         }
Ligne 136: Ligne 157:
           var username = className.replace("wrap_", "");           var username = className.replace("wrap_", "");
                      
-          init_username_wrap(wrap_element, username); +          if (is_valid_username(username)) { 
 + 
 +          init_username_wrap(wrap_element, username);  
 +          }
           } );           } );
         }         }
  • css/wrap_avillepreux.1719931210.txt.gz
  • Dernière modification : 2024/07/02 16:40
  • de avillepreux