From c41a5bf3cda51cceb0c52fca44a100294fb75858 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 22 Apr 2015 17:28:44 +0300 Subject: [PATCH] Restyle explore page to sidebar layout Signed-off-by: Dmitriy Zaporozhets --- app/views/explore/projects/trending.html.haml | 8 ++++++- app/views/layouts/explore.html.haml | 22 ++----------------- app/views/layouts/nav/_explore.html.haml | 18 +++++++++++++++ 3 files changed, 27 insertions(+), 21 deletions(-) create mode 100644 app/views/layouts/nav/_explore.html.haml diff --git a/app/views/explore/projects/trending.html.haml b/app/views/explore/projects/trending.html.haml index 9cad9238933..18749ac00ae 100644 --- a/app/views/explore/projects/trending.html.haml +++ b/app/views/explore/projects/trending.html.haml @@ -1,3 +1,9 @@ +.explore-title + %h3 + Explore GitLab + %p.lead + Discover projects and groups. Share your projects with others +%hr .explore-trending-block %p.lead %i.fa.fa-comments-o @@ -7,5 +13,5 @@ %ul.bordered-list = render @trending_projects - .center + .center.append-bottom-20 = link_to 'Show all projects', explore_projects_path, class: 'btn btn-primary' diff --git a/app/views/layouts/explore.html.haml b/app/views/layouts/explore.html.haml index 2bd0b8d85c9..ca79382324e 100644 --- a/app/views/layouts/explore.html.haml +++ b/app/views/layouts/explore.html.haml @@ -1,4 +1,4 @@ -- page_title = 'Explore' +- page_title = 'Explore GitLab' !!! 5 %html{ lang: "en"} = render "layouts/head", title: page_title @@ -8,23 +8,5 @@ = render "layouts/head_panel", title: link_to(page_title, explore_root_path) - else = render "layouts/public_head_panel", title: link_to(page_title, explore_root_path) - .container.navless-container - .content - .explore-title - %h3 - Explore GitLab - %p.lead - Discover projects and groups. Share your projects with others - - %ul.nav.nav-tabs - = nav_link(path: 'projects#trending') do - = link_to 'Trending Projects', explore_root_path - = nav_link(path: 'projects#starred') do - = link_to 'Most Starred Projects', starred_explore_projects_path - = nav_link(path: 'projects#index') do - = link_to 'All Projects', explore_projects_path - = nav_link(controller: :groups) do - = link_to 'All Groups', explore_groups_path - - = yield + = render 'layouts/page', sidebar: 'layouts/nav/explore' diff --git a/app/views/layouts/nav/_explore.html.haml b/app/views/layouts/nav/_explore.html.haml new file mode 100644 index 00000000000..7ab370dbcd0 --- /dev/null +++ b/app/views/layouts/nav/_explore.html.haml @@ -0,0 +1,18 @@ +%ul.nav.nav-sidebar + = nav_link(path: 'projects#trending') do + = link_to explore_root_path do + %i.fa.fa-comments + %span Trending Projects + = nav_link(path: 'projects#starred') do + = link_to starred_explore_projects_path do + %i.fa.fa-star + %span Most Starred Projects + = nav_link(path: 'projects#index') do + = link_to explore_projects_path do + %i.fa.fa-bookmark + %span All Projects + = nav_link(controller: :groups) do + = link_to explore_groups_path do + %i.fa.fa-group + %span All Groups +