-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
117 lines (116 loc) · 4.32 KB
/
index.php
File metadata and controls
117 lines (116 loc) · 4.32 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
<?php
$estaPagina = 'Home';
include_once 'inc/navbar.php';
include_once 'utils/functions.php';
?>
<!DOCTYPE html>
<html lang="es">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>NASCAR</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/styles.php">
<link rel="icon" href="img/favicon.ico">
<style>
body {
visibility: hidden;
}
</style>
</head>
<body class="sitio">
<main class="holder degradeHome">
<div class="homeWallpaper">
<img src="img/home/homeWallpaper7.jpg" class="center">
<div class="textOverlay">
<h1>ENTRADAS YA DISPONIBLES</h1>
<h2><a href="schedule.php">TEMPORADA 2020 <i class="arrowRight"></i></a></h2>
</div>
</div>
<div class="titulo"><h1 style="margin: 0 0.8em">Últimas Noticias</h1></div>
<div class="noticias">
<?php
$noticia = get_noticia(1);
?>
<div class="noticiaPrincipal left" onclick="location.href='article.php?id_noticia=<?php echo $noticia['id_noticia']; ?>'" style="cursor: pointer">
<?php
if (!is_null($noticia['id_noticia'])) {
if (!is_null($noticia['video_preview'])) {
?>
<div class="contenedorVideo" style="position:relative;">
<video src="<?php echo $noticia['video_preview']; ?>" class="watkinsGlenFinalVideo" id="watkinsGlenFinalVideo" width="100%" height="100%;" preload="auto" muted style="object-fit: cover;" onmouseout="this.load();"></video>
<img src="<?php echo $noticia['image_main']; ?>" class="posterImage center" name="posterImage" height="100%;" style="position: absolute; top: 0; left: 0; bottom: 0; right: 0; object-fit: cover; width:100%;">
</div>
<?php } else { ?>
<div class="imagenNoticia"><img src="<?php echo $noticia['image_main']?>" class="center"></div>
<?php } ?>
<h1><?php display($noticia['title']); ?></h1>
<p><?php display($noticia['description']); ?></p>
</div>
<?php } else { ?>
<div class="noticia arriba">
<div class="skeleton skeleton-img"></div>
<div class="skeleton skeleton-title"></div>
<div class="skeleton skeleton-text"></div>
<div class="skeleton skeleton-text" style="margin-top: -4%; width: 80%;"></div>
</div>
<?php } ?>
<div class="noticiasRelacionadas right">
<?php
$noticias_ids = [2, 3];
foreach ($noticias_ids as $index => $id) {
$noticia = get_noticia($id);
if (!is_null($noticia['id_noticia'])) {
?>
<div class="noticia <?php echo $index === 0 ? 'arriba' : ''; ?>" onclick="location.href='article.php?id_noticia=<?php echo $noticia['id_noticia']; ?>'" style="cursor: pointer">
<div class="imagenNoticia"><img src="<?php echo $noticia['image_main']; ?>" class="center"></div>
<h3><?php display($noticia['title']); ?></h3>
<p><?php display($noticia['description']); ?></p>
</div>
<?php } else { ?>
<div class="noticia <?php echo $index === 0 ? 'arriba' : ''; ?>">
<div class="skeleton skeleton-img"></div>
<div class="skeleton skeleton-title"></div>
<div class="skeleton skeleton-text"></div>
</div>
<?php
}
}
?>
</div>
</div>
<div class="otrasNoticias">
<?php
$noticias_ids = [4, 5, 6]; // Array of noticia IDs
foreach ($noticias_ids as $id) {
$noticia = get_noticia($id);
if (!is_null($noticia['id_noticia'])) {
?>
<div class="noticia" onclick="location.href='article.php?id_noticia=<?php echo $noticia['id_noticia']; ?>'" style="cursor: pointer">
<div class="imagenNoticia"><img src="<?php echo $noticia['image_main']; ?>" class="center"></div>
<h3><?php display($noticia['title']); ?></h3>
<p><?php display($noticia['description']); ?></p>
</div>
<?php } else { ?>
<div class="noticia">
<div class="skeleton skeleton-img"></div>
<div class="skeleton skeleton-title"></div>
<div class="skeleton skeleton-text"></div>
</div>
<?php
}
}
?>
</div>
</main>
<?php include 'inc/footer.php'; ?>
<script src="js/jquery.min.js"></script>
<script src="js/video-hover.js"></script>
<script>
// Delay the display of the body content to prevent Flash of Unstyled Content (FOUC)
setTimeout(function() {
document.body.style.visibility = "visible";
}, 10);
</script>
</body>
</html>