SPIP-Contrib

SPIP-Contrib

عربي | Deutsch | English | Español | français | italiano | Nederlands

286 Plugins, 197 contribs On SPIP-Zone, 308 visitors now

Home > Site navigation > Menus réactifs > Menu animé > Animated dropdown menu

Animated dropdown menu

12 September 2015 – by Louis Possoz

All the versions of this article: [English] [français]

Very simple display of a multilevel animated dropdown menu!

As this plugin is still brand new, would you be kind enough to let me know of any anomaly or imperfection!

The plugin is suitable for small screens (mobile)!
The color themes and dimensions are modifiable, as explained in the last section below.

Introduction

Flexibility and simplicity are the main keywords for this menu displayer. See an example on our Repair Café website.
It uses (all?) the potential of the various browsers: colour gradients, shadow for boxes and texts, as well as rounded corners, not to mention the dynamic menu boxes!

For smaller screens, the plugin reacts differently and displays a vertical drop down menu. The menu can also be discrete, disappearing at printing!

This animated dropdown menu is essentially based on a simple (!) style sheet (menu_anime.css). It does all the work!
This plugin is an ideal complement to the menus plugin but it is convenient for all menus containing a selector class="menu_anime".

The plugin is also designed to simplify the adjustment of colours and dimensions to each particular site. A method for doing it is described in detail at the end of this article.

The original idea of ​​this menu is linked to the work of Catalin Rosu (his demo). This plugin has originally been derived from his elegant and talented handling of style sheets.

Installation

Choose a manual or automatic method provided by SPIP. The plugin has no dependencies.

Use

The simplest and most general use of this plugin is through the plugin menus. After enabling this plugin (if not already), simply create a menu (or edit an existing menu) ensuring to assign the CSS class menu_anime as can be seen on the following screen-shot.

Here, the identifier “barrenav” causes the menu to display as the main navigation bar. No other intervention is necessary!

More generally, the plugin will display an entire list of links (of one or several levels) of which the first level contains the selector .menu_anime (ie <ul class="menu_anime">) and whose immediate parent belongs to the class .menu container (eg <div class="menu-container">).

Of course and as usual, the menu_anime.css stylesheet can be modified (by placing the modified copy in the squelettes/css/ directory) or overwritten (eg in the perso.css sheet). You certainly will be impatient to change the menu colours. However, direct intervention on the style sheet itself is particularly complex and daunting. That is why an alternative method has been developed (see below).

Changing colours and sizes

The plugin contains a file menu_anime.less allowing easy (?) adaptation to the specific characteristics of each website.
Although the process may seem a little daunting, it is infinitely easier than direct edition of the menu_anime.css style sheet.

Step by step procedure:

-  # Open the file menu_anime.less for editing. This file is contained in the package.
-  # In this file, change the colour ​​and/or size values as desired. They are at the beginning of the file.
-  # Compile the resulting file using a compiler Less compiler, eg online compiler.
-  # Create a menu_anime.css empty file and copy-paste the result of the compilation in it.
-  # Place the new file in the squelettes/css/ directory or replace the one located in the directory plugins/auto/menu_anime/css/.

Example: changing the base colour of the menu

-  # Select a new colour using an online color utility.
-  # Open the file menu_anime.less in a text editor.
-  # Replace the colour value (#b0422c) in the line @theme-basic: #b0422c; / * ... * / with the one that was chosen.
-  # Compile the content of this new file through an online compiler.
-  # Create a new empty file menu_anime.css and place the entire result of the compilation (copy and paste).
-  # Set the resulting file menu_anime.css in the squelettes/css/ your favourite SPIP.

Simple, isn’t it?

Another solution would perhaps be to use the LESS CSS plugin. But I’m not sure it would give any advantage. Changing colours of a website menu is a very infrequent operation once it has been installed. To be discussed...

View online : http://plugins.spip.net/menu_anime

updated on 13 September 2015

Back to top

Comment on this article

Who are you?
  • [Log in]

To show your avatar with your message, register it first on gravatar.com (free et painless) and don’t forget to indicate your Email addresse here.

Enter your comment here Les choses à faire avant de poser une question (Prolégomènes aux rapports de bugs. )
Add a document

Back to top

Here they're talking

  • (fr) Plugin Logo SVG : pouvoir utiliser des logos SVG

    17 octobre – commentaires

    Le SVG est un format vectoriel donc très léger et redimensionnable sans pertes, mais SPIP ne l’acceptait pas sur les logos. Ce plugin comble ce manque. Comment ça fonctionne ? Vous installez ce plugin, vous l’activez, et c’est tout. Crédits Une (...)

  • (fr) Utilisez le framework Foundation dans vos squelettes !

    13 août 2013 – 58 commentaires

    Foundation est un framework CSS et Javascript très complet pour réaliser des sites sur une grille propre et homogène. Mais surtout, il permet de rendre un site responsive très facilement ! Ce plugin ajoute le framework Foundation sur l’espace (...)

  • (fr) LinkCheck : vérificateur de liens

    13 février 2015 – 65 commentaires

    Ce plugin permet de chercher et tester l’ensemble des liens présents dans les objets. Vous pourrez donc en quelques clics connaître les liens brisés ou défectueux qui se sont immiscés dans le contenu de votre site SPIP. La vérification s’effectue en (...)

  • (fr) GIS 4

    11 août 2012 – 1288 commentaires

    Présentation et nouveautés La version 4 de GIS abandonne la libraire Mapstraction au profit de Leaflet. Cette librairie permet de s’affranchir des librairies propriétaires tout en gardant les mêmes fonctionnalités, elle propose même de nouvelles (...)

  • (fr) Metas +

    3 décembre – commentaires

    Améliorez l’indexation de vos articles dans les moteurs et leur affichage sur les réseaux sociaux grâce aux métadonnées Dublin Core, Open Graph et Twitter Card. Installation Activer le plugin dans le menu dédié. Dans le panel de configuration, (...)