diff --git a/src/GergelyPolonkai/FrontBundle/Resources/public/css/front.css b/src/GergelyPolonkai/FrontBundle/Resources/public/css/front.css index 9204958..c13deac 100644 --- a/src/GergelyPolonkai/FrontBundle/Resources/public/css/front.css +++ b/src/GergelyPolonkai/FrontBundle/Resources/public/css/front.css @@ -71,18 +71,37 @@ body { } #menu { + background-color: #b5b5b5; + height: 39px; } #menu ul { - margin: 0; + margin: 8px; padding: 0; list-style-type: none; text-align: right; + vertical-align: middle; } #menu ul li { - display: inline; + float: right; + margin-top: 10px; + margin-bottom: 10px; margin-left: 1em; + height: 30px; +} + +#menu ul li.active { + background-image: url('../images/arrow-up.png'); + background-repeat: no-repeat; + background-position: center bottom; +} + +#menu ul li a { + color: white; + font-weight: bold; + text-decoration: none; + font-size: 12px; } #content { @@ -170,6 +189,7 @@ dd p { #tag-cloud a { color: #b3b3b3; text-decoration: none; + padding: 8px; } #tag-cloud .size0 { @@ -194,4 +214,8 @@ dd p { #tag-cloud .size5 { font-size: 150%; +} + +.clear { + clear: both; } \ No newline at end of file diff --git a/src/GergelyPolonkai/FrontBundle/Resources/public/images/arrow-up.png b/src/GergelyPolonkai/FrontBundle/Resources/public/images/arrow-up.png new file mode 100644 index 0000000..7341693 Binary files /dev/null and b/src/GergelyPolonkai/FrontBundle/Resources/public/images/arrow-up.png differ diff --git a/src/GergelyPolonkai/FrontBundle/Resources/views/Default/front_base.html.twig b/src/GergelyPolonkai/FrontBundle/Resources/views/Default/front_base.html.twig index ba1aefb..30e9fb6 100644 --- a/src/GergelyPolonkai/FrontBundle/Resources/views/Default/front_base.html.twig +++ b/src/GergelyPolonkai/FrontBundle/Resources/views/Default/front_base.html.twig @@ -32,22 +32,23 @@ RSS Feed -
-
+
{% if tagCloud|length > 0 %} -
+
{% for cloudItem in tagCloud %} - {{ cloudItem.name }}{% if not loop.last %} | {% endif %} + {{ cloudItem.name }}{% if not loop.last %} | {% endif %} {% endfor %} -
+
{% endif %} - + +
{% block content %}{% endblock content %}
diff --git a/src/GergelyPolonkai/FrontBundle/Twig/CurrentMenu.php b/src/GergelyPolonkai/FrontBundle/Twig/CurrentMenu.php new file mode 100644 index 0000000..ffff079 --- /dev/null +++ b/src/GergelyPolonkai/FrontBundle/Twig/CurrentMenu.php @@ -0,0 +1,55 @@ +container = $container; + } + + public function getGlobals() + { + $controller = $this->container->get('request')->get('_controller'); + $route = $this->container->get('request')->get('_route'); + + $currentMenu = 'none'; + if (preg_match('/BlogController/', $controller)) { + $currentMenu = 'blog'; + } elseif (preg_match('/_homepage$/', $route)) { + $currentMenu = 'blog'; + } elseif (preg_match('/_resume$/', $route)) { + $currentMenu = 'resume'; + } elseif (preg_match('/_about$/', $route)) { + $currentMenu = 'about'; + } + return array( + 'currentMenu' => $currentMenu, + ); + } + public function getName() + { + return 'gergelypolonkaifront_currentmenu'; + } +}