-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathactus.php
More file actions
138 lines (111 loc) · 4.02 KB
/
actus.php
File metadata and controls
138 lines (111 loc) · 4.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<?php include("../phpinc/includes/connexionDB.php"); ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="css/styles.css">
<link rel="stylesheet" href="css/static-menu.css">
<link rel="stylesheet" href="css/main-content-actus.css">
<link href="https://fonts.googleapis.com/css?family=Titillium+Web|Patua+One|Lato|Palanquin+Dark|Open+Sans" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="slick/slick.css"/>
<link rel="stylesheet" type="text/css" href="slick/slick-theme.css"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Actualités</title>
</head>
<body>
<div class="entire-body">
<header class="header-wrapper">
<h1 class="header-text">atou'ce</h1>
<div class="logo-wrapper">
<img src="images/atouce.png" alt="logo atouce"/>
</div>
</header>
<nav class="menu">
<div class="menu-button">
<a class="threelines-button" href="#menu">
</a>
</div>
<ul>
<?php
$menu_request = 'SELECT * FROM menu';
foreach($db->query($menu_request) as $row) {
?>
<li><a href="<?php echo $row['link']; ?>"><p><?php echo $row['name']; ?></p></a></li>
<?php
}
?>
</ul>
</nav>
<div class="entire-page">
<div class="main">
<div class="important-news">
<div class="news-slider">
<?php
$important_news = 'SELECT * FROM news WHERE news.priority = "1" ORDER BY date DESC';
foreach($db->query($important_news) as $row) {
?>
<div class="news-slider-content">
<div class="news-slider-img" style="background: url('<?php echo $row['img']; ?>'); background-size: cover;"> </div>
<h3><?php echo $row['titre']; ?></h3>
<p><?php echo $row['texte_desc']; ?></p>
<a class="news-button" id="important-news-<?php echo $row['num']; ?>" href="#">Lire la suite</a>
</div>
<?php
}
?>
</div>
</div>
<div class="liste-news">
<?php
$news = 'SELECT * FROM news ORDER BY date DESC';
foreach($db->query($news) as $row) {
?>
<div class="liste-news-item" id="liste-news-item<?php echo $row['num']; ?>">
<img src="<?php echo $row['img']; ?>"/>
<h3><?php echo $row['titre']; ?></h3>
<p><?php echo $row['texte_desc']; ?></p>
<a class="news-button" id="news-<?php echo $row['num']; ?>" href="#">Lire la suite</a>
</div>
<?php
}
?>
</div>
</div>
<div class="main-news">
<button class="back-button">Retour</button>
<?php
$entire_news = 'SELECT * FROM news';
foreach ($db->query($entire_news) as $row) {
?>
<div class="full-news fadeOut" id="full-news-<?php echo $row['num']; ?>">
<img src="<?php echo $row['img']; ?>"/>
<h3><?php echo $row['titre']; ?></h3>
<p><?php echo $row['texte']; ?></p>
</div>
<?php
}
?>
</div>
</div>
</div>
<footer>
<div class="mini-footer">
<ul>
<li>NOM DU CE</li>
<li>Adresse</li>
<li>Ville</li>
<li>Téléphone</li>
</ul>
<p class="mini-foot-r">atou'CE, un produit atoucom</p>
</div>
</footer>
<script
src="https://code.jquery.com/jquery-3.2.1.min.js"
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
crossorigin="anonymous"></script>
<script src="js/mobile-menu.js"></script>
<script type="text/javascript" src="slick/slick.min.js"></script>
<script src="js/slick.js"></script>
<script src="js/page-actus.js"></script>
</body>
</html>