From: Christian Weiske Date: Tue, 27 Mar 2012 19:44:13 +0000 (+0200) Subject: use twitter bootstrap for layouting X-Git-Tag: v0.1.0~90 X-Git-Url: https://git.cweiske.de/phorkie.git/commitdiff_plain/271df87bc8c768167889902c455d3c7dfc0f155b use twitter bootstrap for layouting --- diff --git a/.gitignore b/.gitignore index f82ddfd..094fc26 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ README.html repos +data/config.php diff --git a/data/config.default.php b/data/config.default.php index ec68622..ab5c474 100644 --- a/data/config.default.php +++ b/data/config.default.php @@ -2,5 +2,6 @@ $GLOBALS['phorkie']['cfg'] = array( 'repos' => __DIR__ . '/../repos/', 'tpl' => __DIR__ . '/templates/', + 'css' => 'http://twitter.github.com/bootstrap/assets/css/bootstrap.css', ); ?> \ No newline at end of file diff --git a/data/config.php.dist b/data/config.php.dist index e69de29..b213e85 100644 --- a/data/config.php.dist +++ b/data/config.php.dist @@ -0,0 +1,3 @@ + diff --git a/data/templates/base.htm b/data/templates/base.htm index d0c3cee..aaf61da 100644 --- a/data/templates/base.htm +++ b/data/templates/base.htm @@ -1,17 +1,43 @@ + {% block title %}{% endblock %} - Phorkie - -
{% block content %}{% endblock %}
+ + +
+
+
+ {% block content %}{% endblock %} +
+
+ {% block sidebar %}{% endblock %} +
+
+
\ No newline at end of file diff --git a/data/templates/display.htm b/data/templates/display.htm index afdc75c..cabff59 100644 --- a/data/templates/display.htm +++ b/data/templates/display.htm @@ -3,17 +3,28 @@ {% block content %}

{{repo.getDescription}}

- +
+
+ edit +
+
+ fork +
+
+ {% for file in repo.getFiles %} -
-

{{file.getFilename}}

-

- raw -

- {{file.getHighlightedContent|raw}} +
+
+ raw +

{{file.getFilename}}

+
+
+ {{file.getHighlightedContent|raw}} +
{% endfor %} {% endblock %} + +{% block sidebar %} +sidebar FIXME +{% endblock %} \ No newline at end of file diff --git a/data/templates/list.htm b/data/templates/list.htm index 5142a7b..ea71bd6 100644 --- a/data/templates/list.htm +++ b/data/templates/list.htm @@ -12,13 +12,21 @@ diff --git a/www/phorkie.css b/www/phorkie.css index d6d1173..fe41780 100644 --- a/www/phorkie.css +++ b/www/phorkie.css @@ -1,4 +1,9 @@ /* show IDs for anchors */ +a.anchorlink:before { + font-size: smaller; + content: '_'; + color: transparent; +} h1[id]:hover a.anchorlink:before, h2[id]:hover a.anchorlink:before, h3[id]:hover a.anchorlink:before, @@ -14,3 +19,26 @@ a.anchorlink { margin-left: 0.5em; font-size: smaller; } +.navbar .brand { + /*float: right;*/ + color: yellow; + text-shadow: 0 1px 0 rgba(255, 255, 255, .1), 0 0 30px rgba(255, 255, 255, .125); +} + +.file { + margin-top: 2em; + +} +.file .header { + padding: 1.0ex; + margin-bottom: 1em; + background-color: whiteSmoke; + border: 1px solid #EEE; + border: 1px solid rgba(0, 0, 0, 0.05); + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.file .code { + margin-left: 2em; +} \ No newline at end of file diff --git a/www/www-header.php b/www/www-header.php index 5b2fa56..01214d7 100644 --- a/www/www-header.php +++ b/www/www-header.php @@ -45,6 +45,7 @@ $twig = new \Twig_Environment( function render($tplname, $vars) { + $vars['css'] = $GLOBALS['phorkie']['cfg']['css']; $template = $GLOBALS['twig']->loadTemplate($tplname . '.htm'); echo $template->render($vars); }