Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
179 changes: 49 additions & 130 deletions assets/css/source.scss
Original file line number Diff line number Diff line change
@@ -1,39 +1,58 @@
// Bootstrap
@import 'node_modules/bootstrap/scss/bootstrap';
@import url(https://fonts.googleapis.com/css2?family=Nunito:wght@200;300;700&display=swap);
@import 'node_modules/hover.css/scss/hover';

// Color Variables
$color1-main: #ab394a;
$color2-secondary: #eeeeee;
$color3-hover: #c6e4ce;
$red1: #cb9ba3;
$red2: #c68792;
$red3: #ae99ae;
// Font Variables
$main-font: 'Nunito';


//Ici, il faut aussi variabiliser la graisse de police

// General styling
article.home-article .entry-header .entry-title {
padding-left: 18px;
padding-top: 15px;
font-size: 30px;
font-weight: bold;
color: white;
h2.entry-title {
font-family: $main-font;
font-weight: 700;
padding: 1em;
a {
&:hover{
text-decoration: none;
font-size: 40px;
}
&:focus{

}
}
}

p {
font-family: $main-font;
padding: 1em;
}

//General style, body
body {
overflow-x: hidden;
//ACF
.acf-field-5ed77549450e8{

}
.acf-field-5ed77561450e9{
display: none;
}
.acf-field-5ed7705947aee{
display: none;
}
.acf-field-5ed77578450ea{
display: none;
}
.acf-field-5ed7769c0e7a9{
display: none;
}
input.acf-button.button.button-primary.button-large {
display: block;
}
//End ACF



//Menus

Expand Down Expand Up @@ -98,7 +117,7 @@ div#menu-container {
.main-navigation div.nav-menu > ul {
display: none;
}

.main-navigation ul.nav-menu.toggled-on,
.menu-toggle {
display: inline-block;
Expand All @@ -107,7 +126,7 @@ div#menu-container {
// CSS to use on mobile devices

@media screen and (min-width: 800px) {

.main-navigation ul.nav-menu,
.main-navigation div.nav-menu > ul {
display: inline-block !important;
Expand Down Expand Up @@ -191,69 +210,18 @@ div#menu-container {
.menu-toggle {
display: none;
}

}



}

/* Home */

a#home-article-permalink {
text-decoration: none;
}

article.home-article {
p {
color: white;
}
&.imagetext {
background-color: $red1;
}
&.text {
background-color: $red2;
img {
display:none;
}
}
&.image {
background-color: $red3;
p {
display: none;
}
}
}

/*Notifications*/

h2#notification-title {
font-weight: 700;
}

.row.notification-bar {
background-color: cadetblue;
color: white;
}

a#cross-notification {
color: white;
font-weight: 700;
&:focus {
color: transparent;
}
&:hover {
color: transparent;
}
}


/*Logo*/

/*!! à améliorer en sass*/
img.attachment-post-thumbnail.size-post-thumbnail.wp-post-image {
width: 100%;
height: auto;
padding: 20px;
width: 100%;
height: auto;
}

img.custom-logo {
Expand Down Expand Up @@ -304,10 +272,11 @@ section.widget {

//End sidebar

section#grid-container article.home-article {
width: 28%;
section#grid-container article {
width: 30%;
margin-left: 2em;
margin-top: 2em;
background-color: #eaeaea;
}

.site-info {
Expand All @@ -319,36 +288,32 @@ section#grid-container article.home-article {

//Grid Responsive


@media screen and (max-width: 1200px) {
section#grid-container article.home-article {
width: 45%;
section#grid-container article {
width: 30%;
margin-left: 1em;
margin-top: 1em;
background-color: #eaeaea;
}
}

@media screen and (max-width: 768px) {
section#grid-container article.home-article {
section#grid-container article {
width: 100%;
margin-left: 1em;
margin-top: 1em;
margin-right: 1em;
}
#navdesktop {
display: none;
}
}

@media screen and (min-width: 768px) {
#navmobile {
display: none;
@media screen and (max-width: 1200px) {
aside#secondary {

}
}




/* -------------------------------------------------------------------------- */

/* 10. Blocks
Expand Down Expand Up @@ -1086,49 +1051,3 @@ figure.wp-block-table.is-style-stripes {
.wp-block-latest-posts.has-dates:not(.is-grid) li:first-child {
margin-top: 0;
}

//hover effects


/* Bounce To Right */
.hvr-bounce-to-right {
display: inline-block;
vertical-align: middle;
-webkit-transform: perspective(1px) translateZ(0);
transform: perspective(1px) translateZ(0);
box-shadow: 0 0 1px rgba(0, 0, 0, 0);
position: relative;
-webkit-transition-property: color;
transition-property: color;
-webkit-transition-duration: 0.5s;
transition-duration: 0.5s;
}
.hvr-bounce-to-right:before {
content: "";
position: absolute;
z-index: -1;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: $color1-main;
-webkit-transform: scaleX(0);
transform: scaleX(0);
-webkit-transform-origin: 0 50%;
transform-origin: 0 50%;
-webkit-transition-property: transform;
transition-property: transform;
-webkit-transition-duration: 0.5s;
transition-duration: 0.5s;
-webkit-transition-timing-function: ease-out;
transition-timing-function: ease-out;
}
.hvr-bounce-to-right:hover, .hvr-bounce-to-right:focus, .hvr-bounce-to-right:active {
color: white;
}
.hvr-bounce-to-right:hover:before, .hvr-bounce-to-right:focus:before, .hvr-bounce-to-right:active:before {
-webkit-transform: scaleX(1);
transform: scaleX(1);
-webkit-transition-timing-function: cubic-bezier(0.52, 1.64, 0.37, 0.66);
transition-timing-function: cubic-bezier(0.52, 1.64, 0.37, 0.66);
}
28 changes: 15 additions & 13 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,21 @@
?>

<footer id="colophon" class="site-footer">
<div class="site-info">
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'test' ) ); ?>">
<?php
/* translators: %s: CMS name, i.e. WordPress. */
printf( esc_html__( 'Proudly powered by %s', 'test' ), 'WordPress' );
?>
</a>
<span class="sep"> | </span>
<?php
/* translators: 1: Theme name, 2: Theme author. */
printf( esc_html__( 'Theme: %1$s by %2$s.', 'test' ), 'test', '<a href="http://underscores.me/">Underscores.me</a>' );
?>
</div><!-- .site-info -->

<div class="row">
<div class="col-md-4">
<?php dynamic_sidebar( 'footer-1' ); ?>
</div>

<div class="col-md-4">
<?php dynamic_sidebar( 'footer-2' ); ?>
</div>

<div class="col-md-4">
<?php dynamic_sidebar( 'footer-3' ); ?>
</div>
</div>


</footer><!-- #colophon -->
</div><!-- #page -->
Expand Down
76 changes: 76 additions & 0 deletions form.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@

//présentation du formulaire en front
public function output_shortcode() {
ob_start();

if ( ! function_exists( 'acf_form' ) ) {
return ob_get_clean();
}

// User is currently filling the form, we display it.
if ( ! $this->current_multiform_is_finished() ) {
$this->output_acf_form( [
'post_type' => $this->post_type,
] );

// Form has been filled entirely, we display a thanks message.
} else {
_e( 'Thanks for your submission, we will get back to you very soon!' );
}

return ob_get_clean();
}

private function output_acf_form( $args = [] ) {
$requested_post_id = $this->get_request_post_id();
$requested_step = $this->get_request_step();

$args = wp_parse_args(
$args,
[
'post_id' => $requested_post_id,
'step' => 'new_post' === $requested_post_id ? 1 : $requested_step,
'post_type' => 'post',
'post_status' => 'publish',
]
);


//créer ou éditer un post

$submit_label = $args['step'] < count( $this->metabox_ids ) ? __( 'Next step' ) : __( 'Finish' );
$current_step_metaboxes = ( $args['post_id'] !== 'new_post' && $args['step'] > 1 ) ? $this->metabox_ids[ (int) $args['step'] - 1 ] : $this->metabox_ids[0];

acf_form(
[
'id' => $this->id,
'post_id' => $args['post_id'],
'new_post' => [
'post_type' => $args['post_type'],
'post_status' => $args['post_status'],
],
'field_groups' => $current_step_metaboxes,
'submit_value' => $submit_label,
'html_after_fields' => $this->output_hidden_fields( $args ),
'uploader' => 'basic',
]
);
}


//token aléatoire qui sert de sécurité

public function process_acf_form( $post_id ) {
if ( is_admin() || ! isset( $_POST['ame-multiform-id'] ) || $_POST['ame-multiform-id'] !== $this->id ) {
return;
}

$current_step = $this->get_request_step();

if ( $current_step === 1 ) {
$token = wp_generate_password( rand( 10, 20 ), false, false );
update_post_meta( (int) $post_id, 'secret_token', $token );
}

...
}
Loading