Commit c7cec319 authored by N. Peraldi's avatar N. Peraldi
Browse files

style: generate parallax effect with css

parent f31b1236
......@@ -40,20 +40,12 @@ function dump_debug($list)
}
}
/**Génère un effet de type parallax avec une image personnalisée.
* @param string $url
* @param $padding : paddig en pixels.
*/
function add_parallax($url,$padding)
{
//génère un "style=" pour l'ajout d'un effet parallax
echo "style=\"background: url('" . $url . "') fixed;width:100%;padding-top:" . $padding . "px;padding-bottom:" . $padding . "px;\"";
}
/**on supprime du texte inutile généré sur certaines pages
* @return string
*/
function wpc_remove_archive_title_prefix() {
function wpc_remove_archive_title_prefix()
{
return "";
}
add_filter('get_the_archive_title', 'wpc_remove_archive_title_prefix');
\ No newline at end of file
......@@ -5,11 +5,8 @@
* que c'est la page d'accueil.
*/
$theme_directory = get_stylesheet_directory_uri();
$adullact_medias_directory = $theme_directory . "/media/adullact/";
$adullact_icons_directory = $theme_directory . "/media/icons/";
$parallax_pic = $adullact_medias_directory . "image_parallax_2.jpg";
$comptoir_icon = $adullact_icons_directory . "comptoir.png";
$faq_icon = $adullact_icons_directory . "faq.png";
$forge_icon = $adullact_icons_directory . "forge.png";
......@@ -80,7 +77,7 @@ get_header(); ?>
</div><!-- .wrap -->
<!-- effet parallax-->
<div <?php add_parallax($parallax_pic,"50") ?>>
<div id="adullact-parallax-1">>
<div class="wrap">
<div class="adullact-cadres-ligne-center">
<div class="adullact-cadre-texte">
......
......@@ -154,6 +154,12 @@ input[type="search"] {
/*************************************************************/
/*Accueil*/
/*************************************************************/
#adullact-parallax-1 {
background: url("media/adullact/image_parallax_2.jpg") fixed;
width: 100%;
padding-top: 50px;
padding-bottom: 50px;
}
.adullact-justify {
text-align: justify;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment