simplyfying into one file
This commit is contained in:
parent
a1eb8d0b27
commit
6c8dee062d
|
@ -40,7 +40,8 @@ header {
|
|||
font-size: 2rem;
|
||||
}
|
||||
|
||||
header img{
|
||||
header img,
|
||||
header svg{
|
||||
height: 90%;
|
||||
}
|
||||
|
||||
|
@ -61,7 +62,6 @@ main {
|
|||
padding: 1rem;
|
||||
}
|
||||
|
||||
|
||||
.flip-card__card {
|
||||
background-color: transparent;
|
||||
/*width: 300px;*/
|
||||
|
|
File diff suppressed because one or more lines are too long
39
index.php
39
index.php
|
@ -1,46 +1,9 @@
|
|||
|
||||
<?php
|
||||
$myCards = array();
|
||||
#array_push($myCards, "item");
|
||||
|
||||
$directory = "./cards/";
|
||||
$sorting_order = SCANDIR_SORT_DESCENDING;
|
||||
#$dir = scandir($directory, $sorting_order);
|
||||
$dir = preg_grep('/^([^.])/', scandir($directory, $sorting_order));
|
||||
/*
|
||||
foreach (array_keys($dir, '.') as $key) {
|
||||
unset($dir[$key]);
|
||||
}
|
||||
|
||||
#foreach (array_keys($dir, '..') as $key) {
|
||||
# unset($dir[$key]);
|
||||
#}
|
||||
|
||||
if (($key = array_search('..', $dir)) !== false) {
|
||||
unset($dir[$key]);
|
||||
}
|
||||
|
||||
echo count($dir);
|
||||
|
||||
print_r($dir);
|
||||
*/
|
||||
|
||||
#for($iterator; $iterator <= count($dir); $iterator += 2) {
|
||||
# if ($dir[$iterator] == "." || $dir[$iterator] == "..") continue;
|
||||
# echo "<p>" . $dir[$iterator] . "</p>";
|
||||
# echo "<p>" . $dir[$iterator+1] . "</p>";
|
||||
#}
|
||||
|
||||
/*
|
||||
foreach ($dir as &$value) {
|
||||
#if ($value == "." || $value == "..") continue;
|
||||
echo "<p> $value </p>";
|
||||
#$cardPair = [
|
||||
# 'front' => ''
|
||||
# 'back' =>
|
||||
#];
|
||||
}
|
||||
*/
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
@ -66,11 +29,9 @@ foreach ($dir as &$value) {
|
|||
<div class='flip-card__inner'>
|
||||
<div class='flip-card__front'>
|
||||
<img class='flip-card__image' src='/cards/{$dir[$iterator]}' alt='Avatar'>
|
||||
<div>front</div>
|
||||
</div>
|
||||
<div class='flip-card__back'>
|
||||
<img class='flip-card__image' src='/cards/{$dir[$iterator+1]}' alt='Avatar'>
|
||||
<div>back</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue