re-bonjour, toujours de vous fatiguer. ok j’ai essayé dans la vue comme suite
<% if(docs === true) {%>
<div class="agent-video">
<div class="gridrow">
<div class="colnomarg span_1_of_4 menu">
<div class="logo"><p>Suivre<br>Votre<br>Apprentissage!</p></div>
<div class="links link1 active"><span>01.</span> test 1 </div>
<div class="links link2"><span>02.</span> test 2 </div>
<div class="links link3"><span>03.</span> test 3</div>
<div class="links link4"><span>04.</span> test 4 </div>
<div class="links link5"><span>05.</span> test 5 </div>
</div>
<div class="colnomarg span_3_of_4 content">
<div class="pages page1 active">
<div class="wistia_responsive_padding" style="padding:56.25% 0 0 0;position:relative;">
<div class="wistia_responsive_wrapper" style="height:100%;left:0;position:absolute;top:0;width:100%;">
<div class="videoFoam=true" style="height:100%;width:100%">
<video width="100%" height="100%" controls>
<source src="../public/video/test.mp4" type="video/mp4">
</video>
</div>
</div>
</div>
<div class="gridrow">
<div class="col span_2_of_3">
<h2>Lorem Ipsum Page 1</h2>
<p>Morbi in nibh elementum, consectetur ligula non, efficitur libero. Cras tincidunt libero non felis venenatis, non mattis neque eleifend. Fusce pharetra at odio eu accumsan. Duis viverra tincidunt ante in vestibulum. Donec eu commodo lectus, quis egestas massa. Duis sit amet purus euismod, sodales felis id, lacinia leo. Praesent pulvinar non dolor in condimentum. Suspendisse ex est, finibus vitae sapien eu, posuere aliquam eros. Aenean quis mauris sit amet metus sagittis vestibulum vel vel sem. Suspendisse urna tortor, tempus sit amet sagittis quis, mattis ac magna.</p>
</div>
<div class="col span_1_of_3">
<div class="btn link2">> Continue</div>
<div class="btn gray">< Go Back</div>
</div>
</div>
</div>
<!-- VIDEO 2 -->
<div class="pages page2">
<div class="wistia_responsive_padding" style="padding:56.25% 0 0 0;position:relative;"><div class="wistia_responsive_wrapper" style="height:100%;left:0;position:absolute;top:0;width:100%;"><div class="wistia_embed wistia_async_avk9twrrbn videoFoam=true" style="height:100%;width:100%"> </div></div></div>
<div class="gridrow">
<div class="col span_2_of_3">
<h2>Lorem Ipsum Page 2</h2>
<p>Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nullam sem sapien, porta eu sodales sed, finibus finibus velit. Suspendisse blandit leo eros, eget sollicitudin massa posuere eu. Phasellus viverra id arcu sit amet consectetur. Curabitur consectetur venenatis magna in bibendum. Nam eget leo sit amet nisi commodo congue. Aenean lobortis dignissim lorem, quis suscipit purus maximus eget. Etiam nec euismod ante, id tempus risus. In hac habitasse platea dictumst. Pellentesque dolor diam, pellentesque eget justo non, volutpat iaculis felis. Sed sed sagittis nisl. Vivamus iaculis vestibulum nunc ac pulvinar. Nam in ipsum risus.</p>
</div>
<div class="col span_1_of_3">
<div class="btn link3">> Continue</div>
<div class="btn link1">< Go Back</div>
</div>
</div>
</div>
<!-- FIN VIDEO2 -->
<!-- VIDEO3 -->
<div class="pages page3">
<div class="wistia_responsive_padding" style="padding:56.25% 0 0 0;position:relative;"><div class="wistia_responsive_wrapper" style="height:100%;left:0;position:absolute;top:0;width:100%;"><div class="wistia_embed wistia_async_pukozq6xf0 videoFoam=true" style="height:100%;width:100%"> </div></div></div>
<div class="gridrow">
<div class="col span_2_of_3">
<h2>Lorem Ipsum Page 3</h2>
<p>Ut tincidunt tortor at tortor rutrum, scelerisque commodo nulla imperdiet. Nunc tincidunt porttitor mi at iaculis. Cras semper tortor et ante fermentum, non sollicitudin ante venenatis. Etiam ornare commodo tortor iaculis congue. Cras hendrerit sollicitudin felis, vitae hendrerit tortor mattis eget. Quisque vel pulvinar massa. Suspendisse aliquam nisi in ipsum laoreet, et sollicitudin nisl congue. Praesent consectetur velit quis pulvinar eleifend. Nam a mollis mauris, eget placerat erat. Nulla facilisi. Pellentesque iaculis convallis elit sit amet finibus. Vivamus convallis, felis nec vulputate scelerisque, eros elit elementum purus, nec eleifend urna diam euismod sapien.</p>
</div>
<div class="col span_1_of_3">
<div class="btn link4">> Continue</div>
<div class="btn link2">< Go Back</div>
</div>
</div>
</div>
<!-- FIN VIDEO 3 -->
<!-- VIDEO 4 -->
<div class="pages page4">
<div class="wistia_responsive_padding" style="padding:56.25% 0 0 0;position:relative;"><div class="wistia_responsive_wrapper" style="height:100%;left:0;position:absolute;top:0;width:100%;"><div class="wistia_embed wistia_async_efsrxlup84 videoFoam=true" style="height:100%;width:100%"> </div></div></div>
<div class="gridrow">
<div class="col span_2_of_3">
<h2>Lorem Ipsum Page 4</h2>
<p>Ut feugiat nibh dui, vel aliquet mauris bibendum in. Aenean vulputate at mauris vulputate mollis. Donec sit amet tempus mi. Morbi iaculis leo nec feugiat interdum. Aenean tempus pretium libero. Morbi dapibus maximus velit eu gravida. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis pulvinar vestibulum erat, sit amet volutpat leo bibendum vel. Nullam eleifend convallis ex eget gravida.</p>
</div>
<div class="col span_1_of_3">
<div class="btn link5">> Continue</div>
<div class="btn link3">< Go Back</div>
</div>
</div>
</div>
<!-- VIDEO 5 -->
<div class="pages page5">
<div class="wistia_responsive_padding" style="padding:56.25% 0 0 0;position:relative;"><div class="wistia_responsive_wrapper" style="height:100%;left:0;position:absolute;top:0;width:100%;"><div class="wistia_embed wistia_async_hs0fhkxyk5 videoFoam=true" style="height:100%;width:100%"> </div></div></div>
<div class="gridrow">
<div class="col span_2_of_3">
<h2>Lorem Ipsum Page 5</h2>
<p>Maecenas at iaculis dui. Morbi et placerat dui. Pellentesque laoreet tortor nec auctor placerat. Phasellus suscipit finibus ante, ullamcorper pellentesque ligula tincidunt nec. Phasellus quis felis ex. Aliquam elementum, velit eu gravida pharetra, lorem turpis scelerisque lectus, et iaculis sem nunc at nunc. Mauris id odio condimentum, blandit nisi id, blandit tellus.</p>
</div>
<div class="col span_1_of_3">
<div class="btn gray">> Continue</div>
<div class="btn link4">< Go Back</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
//ES6 'let' loop yo
for (let i = 1; i < 6; i++) {
$('.link' + i).click( function(){
$('.links').removeClass('active');
$('.pages').removeClass('active');
$('.link'+i).addClass('active');
$('.page'+i).addClass('active');
});
}
//does this for every .links div on the left side and every 'continue' or 'go back' button with the same classes
});
</script>
<%} else {%>
<h1>not access</h1>
<%} %>
////////// Dans nodejs
const getPass = (req, res) =>{
Payment.findOne({nomid: req.user}, (err, docs) =>{
if(err) console.log(err);
res.render('tutorial', {docs: docs})
})
}
Et la il me fait Not access alors que cet utilisateur à access parce qu’il a payé
+0
-0