Closed clyptomania closed 3 years ago
by Fabio Franchino / A visual exploration on grid system with creative coding blog codepen link
by Jeffrey Gordon demo codepen link
by Benedikt Groß demo github code
Apply bootstrap grid for layout page
problems embedding multiple images and generate images via javascript using current code
https://privat.albicker.org/blog/2017-02-04-hugo-und-php.html
Link to learn PHP in 15 min
Link to script - RESOLVED
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Title</title>
<meta name="language" content="en" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<style type="text/css">
ul li {list-style: none; margin-bottom: 15px;}
ul li img {display: block;}
ul li span {display: block;}
</style>
</head>
<body>
<?php
// open this directory
$myDirectory = opendir("images");
// get each entry
while($entryName = readdir($myDirectory)) {
$dirArray[] = $entryName;
}
// close directory
closedir($myDirectory);
// count elements in array
$indexCount = count($dirArray);
?>
<ul>
<?php
// loop through the array of files and print them all in a list
for($index=0; $index < $indexCount; $index++) {
$extension = substr($dirArray[$index], -3);
if ($extension == 'jpg'){ // list only jpgs
echo '<li><img src="images/' . $dirArray[$index] . '" alt="Image" /><span>' . $dirArray[$index] . '</span>';
}
}
?>
</ul>
</body>
</html>
Hugo is nice because of its blog template system, static site generation abilities and generic framework structure, but sometimes you may want to add extra functionality that requires dynamic content.
If you are also combining static elements with dynamic functions you may want to DRY your views to make everything consistent. It could be that you only want the blog of your website to be static and everything else to operate dynamically.
Hugo Custom Output Format / Media Types A media type (also known as MIME type and content type) is a two-part identifier for file formats and format contents transmitted on the Internet.
Generate Files in .php using Media Types
{{ safeHTML "<?php require $_SERVER['DOCUMENT_ROOT'] . '/..' . '/views/partials/navigator.php'; ?>" }}
Works both localhost and on live server without issues, and allows you to extend the delimited list of allowed file-extensions:
var folder = "images/";
$.ajax({
url : folder,
success: function (data) {
$(data).find("a").attr("href", function (i, val) {
if( val.match(/\.(jpe?g|png|gif)$/) ) {
$("body").append( "<img src='"+ folder + val +"'>" );
}
});
}
});
[ ] #podcast-player
> enquire RSS permission with Anchor Server, embed into css styling | t=5d
| prio ***
[x] #cursor
> create trail effect link to trail effect , link to easing effect | t=max 1d
| prio *
| Only Desktop Version
[x] #cursor
> cursor color: rosa (outline N.A.?) | t=1-2h
| prio *
| real t=0,5h
| Only Desktop Version
[x] #cover page
> text > font size: 150px, line-height 150px | t=1h
| prio ***
| real t=0,2h
[x] #cover page
> viewport > setup full page effect | t=5h
| prio ***
| real t=1h
[x] #programme
> insert collapsible window for each date + create a line indent for consecutive event <br>
| ask feedback
| t=5h
| prio *
[x] #programme
> dot after each event
[x] #artists-list
> fix comma issue | t=1-5h
| real t=1h
[x] #artists-list
> add colored square if no picture found | t=1h
| real t=1h
[x] #artists-list
> increase font size (corresponding to image size 64px) | t=1-3h
| real t=2h
[ ] #artists-list
> insert ALL images (waiting for response) | t=2d
| ask for feedback
[x] #team-list
> on mouse:click > each member name exposes description + picture (effect like artists-list) | t=5h
[ ] #landing page
> toggle dark/light mode (not necessary, but could be a neat feature)
[x] #navigation menu-bar
> header items > programm | about | artists must be in first letter capitalised
[x] #navigation menu-bar
> header items > a:hover a:selected with color: rosa
#navigation menu-bar
> check and fix color difference effect on browser compatibility > solution: make black outline and white writing > UPDATE: pixelated outline#navigation menu-bar
> javascript > improve intersection observer script | t=5h
| real t=3
#navigation menu-bar
> javascript > edit smooth scroll effect for browser compatibility | t=2h
#artists-list
> javascript > defeat the infinite loop! | t=3d
| prio ***
| real t=3h
#programme
> insert animation in collapse#cursor
> it doesn't change if hover link