From 0ba081947deaf773fbc3d62186669c0e9a91e105 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 12 Jan 2012 09:28:57 +0200 Subject: [PATCH] prototype styled. home button added --- app/assets/images/Gear-UI.PNG | Bin 0 -> 1335 bytes app/assets/stylesheets/projects.css.scss | 79 +++++++++++++++++++++-- app/assets/stylesheets/style.scss | 9 +-- app/views/layouts/_head_panel.html.haml | 14 +++- app/views/layouts/project.html.haml | 3 +- 5 files changed, 90 insertions(+), 15 deletions(-) create mode 100644 app/assets/images/Gear-UI.PNG diff --git a/app/assets/images/Gear-UI.PNG b/app/assets/images/Gear-UI.PNG new file mode 100644 index 0000000000000000000000000000000000000000..1b4291ad8fb3be13ac030f650fb54741aa7b159e GIT binary patch literal 1335 zcmV-71<3k|P)Hjgqq;XGJ`;K&vZ zh68$9&X;dE2BP4KDgrQl;Cr(^DMATAY&a(17yS!g`%>ro$NKHk zAZ=2M)QQ@F;I(kRz`L-psORUlIduf2_@O=m@td!2===?ar9U75Vln`@gAa<@4y;=N z5Ri8RyZdlWWD+GfHs}9o z5)Oh7r5TAjkh;>nRRr(@mq>79vni^=H=HSC2!OBRGc5@s28cWImlpwy*|fC_n~6crnat~rA3T2=!oJ|6*qve%W` z1C<5?&UFLV02r{=*!H^AA=9G>u#mldoeyj$HUJX8oWjuicfF2OtZbe%csRTB0tg$t zrX7_`Mj^Bk#n7Zn58cudmGk0Qp{aR;^I%_qK#RmpspmN^b(QLi<(Z0lVtz;mBuDp~@Bc)XrNDaGecbCyoJt#%8T@UKT=zba4T|u1!1KC(mwm&evhC ziG*86-C@}Xz~aMRnEGLd)>4?Sndwe9fG~5|pdAAMQ&ikoEC`#UDSqC}MhFQY%p7!s zM*vKSbKV3(qT&Pv>r>7HYVjlU(DwTJ`UrsBA>&R_gv9tgIo<^jIhR;5LUtHoQ(2_j zEjlFtA~DA7G;_wnv{mLQ0NAn5W0~myPga3!d>f+LcD#O$!8QVz!?JS@1K!DXy@aY4 z*h-MOEzFgU)Kph2llJj6&B6Tg3A>X$=Pi3MKM5lQoF{*I6LuwDQt z1{gLEPDQvX#{h)7mfA37IwnEY!41T?MD$fpZbw4cJz>R29q~qpX}Px?u#k`-6Pyd! z{~IZZBIh=i^0~s}GW?vlZxq;CpRF-)4mMIAFcSLwv<;$Ut&p!K)fw0johtxpqxel< z+0c(fn%bXIR3+DAaa&U*>Q>R3SM2Z*)k>HDr;GrKa;8g-nrkwl=9Aee09Xm4rCw7Z thjlyBdsPcdX%}Dp*W(`h;`Ud70RYkezTZ1iE71S|002ovPDHLkV1gm?X4C)x literal 0 HcmV?d00001 diff --git a/app/assets/stylesheets/projects.css.scss b/app/assets/stylesheets/projects.css.scss index 1ed7a512..ab30ea2f 100644 --- a/app/assets/stylesheets/projects.css.scss +++ b/app/assets/stylesheets/projects.css.scss @@ -548,7 +548,7 @@ h4.middle-panel { font-size:16px; font-weight:bold; padding:5px 7px; - color:#777; + color:#333; } .git_url_wrapper { @@ -560,12 +560,50 @@ h4.middle-panel { padding:0px; margin:0px; font-size: 12px; - border-radius: 5px; + + border-radius: 0px; + -moz-border-radius: 0px; + + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-topleft: 4px; + + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; + color: #666; - box-shadow: 0 1px 2px rgba(0,0,0,.2) inset; - padding: 7px 0 5px 30px; - background: white url('images.png') no-repeat 8px -40px; - width: 250px; + border: 1px solid #AAA; + padding: 0 0 0 30px; + background: white url('images.png') no-repeat 8px -42px; + width: 160px; + height:26px; + } + } +} + +.top_panel_holder .chzn-container { + position:relative; + + .chzn-drop { + margin:7px 0; + border: 1px solid #CCC; + min-width: 300px; + + .chzn-results { + max-height:300px; + } + } + + .chzn-single { + background:white; + -moz-border-radius: 0; + border-radius: 0; + -moz-border-radius-bottomright: 4px; + -moz-border-radius-topright: 4px; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + + div { + background:white; } } } @@ -762,3 +800,32 @@ tr.line_notes_row { } } } +.top_links_holder { + width:124px; + float:left; + + .top_link { + position: relative; + float:left; + + &.home { + width:28px; + height:27px; + top: -12px; + border: 1px solid #474D57; + border-radius: 3px; + background: #fff; + + margin-right:15px; + padding: 6px 7px; + } + + &.admin { + top: -3px; + padding: 3px; + width: 21px; + height: 21px; + } + } +} + diff --git a/app/assets/stylesheets/style.scss b/app/assets/stylesheets/style.scss index 748e3f53..52b4b8ff 100644 --- a/app/assets/stylesheets/style.scss +++ b/app/assets/stylesheets/style.scss @@ -611,7 +611,7 @@ body.project-page h2.icon .project-name i.arrow{float: right; body.project-page h2.icon span{ background-position: -78px -68px; } body.project-page .project-container{ position: relative; float: left; width: 100%; height: 100%; padding-bottom: 10px;} body.project-page .page-title{margin-bottom: 0} -body.project-page .project-sidebar {width: 110px; left: 0; top: 0; height: 100%; bottom: 0; position: absolute; background-color: #eee; float: left; display: inline-block; background: #eee; padding: 20px 0 20px 2%; margin: 0; } +body.project-page .project-sidebar {width: 110px; left: 0; top: 0; height: 100%; bottom: 0; position: absolute; background-color: #eee; float: left; display: inline-block; background: #eee; padding: 20px 0 20px 2%; margin: 0; border-right: 1px solid #ddd; } body.projects-page input.text.git-url { font-size: 12px; border-radius: 5px; color: #666; box-shadow: 0 1px 2px rgba(0,0,0,.2) inset; padding: 8px 0 8px 30px; margin-bottom: 20px; background: white url('images.png') no-repeat 8px -40px; width: 136px} body.projects-page input.text.git-url {margin:10px 0 0 } @@ -621,13 +621,14 @@ body.projects-page input.text.git-url {margin:10px 0 0 } body.project-page .project-sidebar aside{width: 109px} body.project-page .project-sidebar aside a{ - display: block; position: relative; background: white; padding: 15px 10px; border-bottom: 1px solid #eee; margin: 10px 20px 0 0; + display: block; position: relative; background: #F5F5F5; padding: 15px 10px; + border: 1px solid #ccc; margin: 10px 20px 0 0; border-radius:5px; } body.project-page .project-sidebar aside a:hover{background-color: #eee;} body.project-page .project-sidebar aside a span.number{float: right; border-radius: 5px; text-shadow: none; background: rgba(0,0,0,.12); text-align: center; padding: 5px 8px; position: absolute; top: 10px; right: 10px} -body.project-page .project-sidebar aside a.current{border: 2px solid #79c3e0; } -body.project-page .project-content{ padding: 20px; display: block; margin-left: 125px; min-height: 600px} +body.project-page .project-sidebar aside a.current{border: 2px solid #79c3e0; background:white; } +body.project-page .project-content{ padding: 20px; display: block; margin-left: 130px; min-height: 600px} body.project-page .project-content h2{ margin-top: 6px} body.project-page .project-content .button.right{margin-left: 20px} body.project-page table .commit a{color: #{$blue_link}} diff --git a/app/views/layouts/_head_panel.html.haml b/app/views/layouts/_head_panel.html.haml index 0d5ae07c..6c0e6e00 100644 --- a/app/views/layouts/_head_panel.html.haml +++ b/app/views/layouts/_head_panel.html.haml @@ -1,15 +1,23 @@ / Page Header -%header +%header.top_panel_holder + %div.top_links_holder + = link_to root_path, :class => "top_link home", :title => "Home" do + = image_tag "Home-UI.PNG", :width => 26 + - if current_user.is_admin? + = link_to admin_root_path, :class => "top_link admin", :title => "Admin" do + = image_tag "Gear-UI.PNG", :width => 20 + + - if @project && !@project.new_record? .project_name = truncate @project.name, :length => 20 .git_url_wrapper %input.git-url.text{:id => "", :name => "", :readonly => "", :type => "text", :value => @project.url_to_repo, :class => "one_click_select"} - = yield :rss_icon - - if @project.repo_exists? .left{:style => "margin-left:5px;"} = render :partial => "projects/refs", :locals => { :destination => controller.controller_name == "commits" ? "commits" : "tree" } + = yield :rss_icon + .account-box = link_to profile_path, :class => "pic" do = image_tag gravatar_icon(current_user.email) diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml index 589041be..0cdf62f3 100644 --- a/app/views/layouts/project.html.haml +++ b/app/views/layouts/project.html.haml @@ -24,8 +24,7 @@ .fixed %aside = link_to project_path(@project), :class => project_tab_class do - = image_tag "Home-UI.PNG", :width => 26 - %span{ :class => "number" } Pr + Project = link_to "Repository", project_repository_path(@project), :class => repository_tab_class = link_to "Tree", tree_project_ref_path(@project, @project.root_ref), :class => tree_tab_class