Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: janrito/alejandrogiacometti.com
base: 9faae7de3d
...
head fork: janrito/alejandrogiacometti.com
compare: 5e65f2ea9a
Checking mergeability… Don't worry, you can still create the pull request.
  • 1 commit
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Showing with 42 additions and 6 deletions.
  1. +11 −0 .gitignore
  2. +28 −3 fabfile.py
  3. +3 −3 theme/less/main.less
View
11 .gitignore
@@ -26,4 +26,15 @@ pip-log.txt
#Mr Developer
.mr.developer.cfg
+# osx .DS_Store files
+.DS_Store
+
+# directory where all the html pages
+# are created
output
+
+# directory for compiled bootstrap
+theme/static/bootstrap
+
+# compiled css
+theme/static/css/main.css
View
31 fabfile.py
@@ -1,13 +1,17 @@
import os
-from fabric.api import local, task
+from fabric.api import local, task, lcd
BASEDIR = './' #os.path.abspath(os.path.curdir)
OUTPUTDIR = os.path.join(BASEDIR, 'output')
CONFFILE = os.path.join(BASEDIR, 'pelican.conf.py')
THEMEDIR = os.path.join(BASEDIR, 'theme')
+LIB_DIR = os.path.join(THEMEDIR, 'lib')
+STATIC_DIR = os.path.join(THEMEDIR, 'static')
LESS_DIR = os.path.join(THEMEDIR, 'less')
-CSS_DIR = os.path.join(THEMEDIR, 'static', 'css')
+
+LESS_IMPORT_PATHS = [os.path.join(LIB_DIR, 'bootstrap/less')]
+CSS_DIR = os.path.join(STATIC_DIR, 'css')
CSS_FILENAME = 'main'
@@ -18,14 +22,35 @@ def clean():
@task
def compile_less():
- local('lessc -compress {less_dir}/{main}.less {css_path}/{main}.css'.format(
+ local(('lessc -compress'
+ ' --include-path={import_path}'
+ ' {less_dir}/{main}.less'
+ ' {css_path}/{main}.css').format(
less_dir=LESS_DIR,
css_path=CSS_DIR,
+ import_path=':'.join(LESS_IMPORT_PATHS),
main=CSS_FILENAME))
@task
+def compile_bootstrap():
+ lib_bootstrap = os.path.join(LIB_DIR, 'bootstrap')
+ compiled_bootstrap = os.path.join(STATIC_DIR, 'bootstrap')
+
+ with lcd(lib_bootstrap):
+ local('make bootstrap')
+
+ lib_boostrap_compiled = os.path.join(lib_bootstrap, 'bootstrap')
+
+ local('rm -fr {}*'.format(compiled_bootstrap))
+ local('mv {lib_boostrap_compiled} {compiled_bootstrap}'.format(
+ lib_boostrap_compiled=lib_boostrap_compiled,
+ compiled_bootstrap=compiled_bootstrap))
+
+
+@task
def prepare():
+ compile_bootstrap()
compile_less()
View
6 theme/less/main.less
@@ -1,8 +1,8 @@
-@import "../lib/bootstrap/less/variables.less";
+@import "variables.less";
@import "custom_variables.less";
-@import "../lib/bootstrap/less/no_variables_bootstrap.less";
-@import "../lib/bootstrap/less/no_variables_responsive.less";
+@import "no_variables_bootstrap.less";
+@import "no_variables_responsive.less";
@import "custom.less";

No commit comments for this range

Something went wrong with that request. Please try again.