improve message display

This commit is contained in:
Tom Canac 2015-06-29 23:33:33 +02:00
parent d93f12e825
commit a73f87e787
3 changed files with 30 additions and 10 deletions

View file

@ -433,8 +433,9 @@ for ($y = 0; $y < $offset_start - sizeof($dirs); $y++) {
//-----------------------
if (count($dirs) + count($files) == 0) {
$thumbnails .= "<li>$label_noimages</li>"; //Display 'no images' text
if ($currentdir == "photos")
if ($currentdir == "photos") {
$messages = "It looks like you have just installed MiniGal Nano. Please run the <a href='system_check.php'>system check tool</a>";
}
}
$offset_current = $offset_start;
for ($x = $offset_start; $x < sizeof($dirs) && $x < $offset_end; $x++) {
@ -463,7 +464,7 @@ for ($y = $i; $y < sizeof($files); $y++) {
// OUTPUT MESSAGES
//-----------------------
if ($messages != "") {
$messages = "<div id=\"topbar\">" . $messages . " <a href=\"#\" onclick=\"document.getElementById('topbar').style.display = 'none';\";><img src=\"images/close.png\" /></a></div>";
$messages = $messages . " <a id=\"closeMessage\" class=\"closeMessage\" href=\"#\"><img src=\"images/close.png\" /></a>";
}
// Read folder comment.

View file

@ -1,4 +1,9 @@
/*=== lazyLoading ===*/
window.addEventListener('load', function(){
var bLazy = new Blazy;
}, false);
}, false);
/*=== Message close ===*/
document.getElementById('closeMessage').addEventListener('click', function(){
document.getElementById('Message').style.display = 'none';
});

View file

@ -40,10 +40,21 @@
padding: 1px 0 0 0;
margin-bottom: 1rem;
}
#container, #innerheader{
#container,
#innerheader,
.Message {
max-width: <% gallery_width %>;
margin: 0px auto;
}
.Message {
padding: 1rem;
background-color: #f1c40f;
border-radius: 2px;
}
.closeMessage {
float: right;
padding: 2px;
}
header aside{
padding: 2rem 0;
}
@ -163,21 +174,20 @@
}
}
</style>
<script src="<% gallery_root %>js/lazy.js"></script>
<script src="<% gallery_root %>js/script.js"></script>
<script src="<% gallery_root %>js/mootools1.5.0.js"></script>
<script src="<% gallery_root %>js/mediabox1.5.4.js"></script>
</head>
<body>
<header id="top" role="banner">
<div id="innerheader">
<h1><a href="<% gallery_root %>"><% title %></a></h1>
<% messages %>
<nav role="navigation"><% breadcrumb_navigation %></nav>
<aside><% folder_comment %></aside>
</div>
<div id="Message" class="Message">
<% messages %>
</div>
<br>
</header>
<main id="container">
<ul id="gallery">
<% thumbnails %>
@ -197,5 +207,9 @@
RSS
</a>
</footer>
<script src="<% gallery_root %>js/lazy.js"></script>
<script src="<% gallery_root %>js/script.js"></script>
<script src="<% gallery_root %>js/mootools1.5.0.js"></script>
<script src="<% gallery_root %>js/mediabox1.5.4.js"></script>
</body>
</html>