Move css and img to assets dir and set an expires policy

This commit is contained in:
Victor LABORIE 2018-01-27 23:30:25 +01:00
parent 3ffd218af5
commit 5a910ad63a
9 changed files with 19 additions and 5 deletions

13
htdocs/assets/.htaccess Normal file
View File

@ -0,0 +1,13 @@
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule "^([^/]+)/(.+)$" "$2" [PT]
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 year"
<IfModule mod_headers.c>
Header unset ETag
Header set Cache-Control "public, max-age=30672000"
</IfModule>
</IfModule>

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

@ -33,7 +33,7 @@ if (!empty($_POST['login'])) {
<div class="loginpage">
<div class="loginbox">
<div class="illustration">
<img src="img/logo.png" class="img-responsive" alt="Responsive image">
<img src="assets/<?php print VERSION; ?>/logo.png" class="img-responsive" alt="Responsive image">
</div>
<form method="POST" action="auth.php" method="post" name="auth">
<div class="form-group has-feedback has-feedback-left">

View File

@ -1 +0,0 @@
img/favicon.ico

View File

@ -2,7 +2,7 @@
<div id="top" class="container">
<div class="navbar-brand logo">
<a href="https://evolix.com/" target="_blank">
<img src="img/logo.png" alt="Evolix" class="img-responsive"/>
<img src="assets/<?php print VERSION; ?>/logo.png" alt="Evolix" class="img-responsive"/>
</a>
</div>
<ul class="nav navbar-nav">

View File

@ -5,8 +5,8 @@
<meta name="robots" content="noindex,nofollow"/>
<meta name="referrer" content="same-origin"/>
<title><?php print $config['global']['name']; ?></title>
<link rel="stylesheet" href="css/main.css" type="text/css"/>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" href="assets/<?php print VERSION; ?>/main.css"/>
<link rel="shortcut icon" href="assets/<?php print VERSION; ?>/favicon.ico"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/datatables/1.10.16/css/dataTables.bootstrap.min.css" integrity="sha256-PbaYLBab86/uCEz3diunGMEYvjah3uDFIiID+jAtIfw=" crossorigin="anonymous"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>

View File

@ -1,5 +1,7 @@
<?php
define("VERSION", "2.0.0");
spl_autoload_register(function ($class) {
$class = strtolower($class);
include_once("lib/class.$class.php");