use separate /img/ and /static/ directories inside wwwroot

This commit is contained in:
mappu 2016-04-18 19:42:40 +12:00
parent da4cf9b528
commit 12eb8a2111
3 changed files with 7 additions and 7 deletions

View File

@ -117,7 +117,7 @@ class CProject {
// Generate image thumbnails
foreach($this->images as $idx => $image) {
$outfile = BASEDIR.'wwwroot/srv/'.$this->projname.'_'.$idx;
$outfile = BASEDIR.'wwwroot/img/'.$this->projname.'_'.$idx;
copy($this->dir.$image, $outfile.'.'.str_ext($image));
mkthumbnail($outfile.'.'.str_ext($image), $outfile.'_thumb.jpg', PAGE_THUMB_W, PAGE_THUMB_H);

View File

@ -9,9 +9,9 @@ function template($title, $content) {
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
<meta name="viewport" content="width=960" >
<link type="text/css" rel="stylesheet" href="normalize.css">
<link type="text/css" rel="stylesheet" href="style.css">
<script type="text/javascript" src="site.js"></script>
<link type="text/css" rel="stylesheet" href="static/normalize.css">
<link type="text/css" rel="stylesheet" href="static/style.css">
<script type="text/javascript" src="static/site.js"></script>
<title><?=hesc($title)?></title>
</head>
<body>

View File

@ -19,15 +19,15 @@ buildsite() {
if [[ -d wwwroot ]] ; then
rm -r wwwroot
fi
mkdir -p wwwroot/srv
mkdir -p wwwroot/{img,srv,static}
echo "Copying static resources..."
if [[ ! -d static ]] ; then
mkdir static
fi
cp "${APP_DIR}/static/"* wwwroot || true
cp static/* wwwroot || true
cp "${APP_DIR}/static/"* wwwroot/static || true
cp static/* wwwroot/static || true
for htm in footer header homepage_blurb ; do
if [[ ! -f "${htm}.htm" ]] ; then