mirror of https://github.com/dyne/webnomad.git
123 lines
3.4 KiB
Bash
Executable File
123 lines
3.4 KiB
Bash
Executable File
#!/usr/bin/env zsh
|
|
#
|
|
# Jaro Web, your slick and static website publisher
|
|
#
|
|
# Copyleft (C) 2012 Denis Roio <jaromil@dyne.org>
|
|
#
|
|
# This source code is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU Public License as published by
|
|
# the Free Software Foundation; either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This source code is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
# Please refer to the GNU Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Public License along with
|
|
# this source code; if not, write to:
|
|
# Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
source jaroweb/utils
|
|
|
|
mkdir -p views
|
|
cat <<EOF > views/index.html
|
|
<h1>Hello world</h1>
|
|
|
|
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
|
|
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
|
|
minim veniam, quis nostrud exercitation ullamco laboris nisi ut
|
|
aliquip ex ea commodo consequat. Duis aute irure dolor in
|
|
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
|
|
culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
|
|
EOF
|
|
mkdir -p tmpl
|
|
|
|
cat <<EOF > tmpl/header.html
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="Generator" content="Jaro Web http://jaroweb.dyne.org" />
|
|
<meta name="MSSmartTagsPreventParsing" content="True" />
|
|
|
|
<!-- Bootstrap -->
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<link href="css/bootstrap.min.css" rel="stylesheet">
|
|
<link href="css/bootstrap-responsive.css" rel="stylesheet">
|
|
|
|
<link rel="shortcut icon" href="/favicon.ico">
|
|
|
|
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
|
<!--[if lt IE 9]>
|
|
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
|
<![endif]-->
|
|
|
|
<!-- pad down for the header -->
|
|
<style type="text/css">
|
|
body {
|
|
padding-top: 3em;
|
|
padding-bottom: .5em;
|
|
}
|
|
.brand { padding: 1em 1em 1em 1em; }
|
|
.sidebar-nav { padding: 40px; }
|
|
</style>
|
|
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
EOF
|
|
|
|
cat <<EOF > tmpl/footer.html
|
|
<hr>
|
|
<footer style="padding: 1em;">
|
|
<div class="pull-left">
|
|
<small>All information found on this page is free to copy</small>
|
|
</div>
|
|
|
|
<small class="pull-right">Website made<br />with <a
|
|
href="http://jaroweb.dyne.org" target="_blank">Jaro
|
|
Web</a></small>
|
|
|
|
|
|
|
|
</footer>
|
|
</div><!--/.container-->
|
|
|
|
<script src="js/bootstrap.js"></script>
|
|
|
|
</body>
|
|
</html>
|
|
|
|
EOF
|
|
|
|
notice "Downloading and installing Bootstrap"
|
|
curl http://twitter.github.com/bootstrap/assets/bootstrap.zip -o bootstrap.zip
|
|
unzip -q bootstrap.zip
|
|
rsync -r bootstrap/css views/
|
|
rsync -r bootstrap/js views/
|
|
rsync -r bootstrap/img views/
|
|
rm -rf bootstrap bootstrap.zip
|
|
act "Bootstrap installed"
|
|
|
|
cat <<EOF > config.zsh
|
|
TITLE="A new website made with Jaro Web."
|
|
BRAND="Jaro Web"
|
|
DESCRIPTION="Jaro Web, your slick and static website publisher, powered by HTML5, Zsh and Bootstrap"
|
|
KEYWORDS="web, design, html"
|
|
|
|
# Sections must be matching existing files in views/
|
|
typeset -al sections
|
|
sections=(contact)
|
|
|
|
|
|
EOF
|
|
cat <<EOF > Makefile
|
|
all:
|
|
@./jaroweb/render
|
|
|
|
clean:
|
|
rm -rf pub
|
|
|
|
upload:
|
|
@scp -r pub/.htaccess pub/* online.server.org:/var/www
|