Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Adullact
Theme-WordPress-Adullact-org
Commits
c7cec319
Commit
c7cec319
authored
Feb 12, 2020
by
N. Peraldi
Browse files
style: generate parallax effect with css
parent
f31b1236
Changes
3
Hide whitespace changes
Inline
Side-by-side
functions.php
View file @
c7cec319
...
...
@@ -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
index.php
View file @
c7cec319
...
...
@@ -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"
>
...
...
style.css
View file @
c7cec319
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment