Commit be1b40802dcbfd59ecdd3c7439fc48d6cec97e2b

Authored by randx
1 parent 6451e837

Api page in help

app/assets/stylesheets/gitlab_bootstrap.scss
... ... @@ -634,3 +634,37 @@ pre.logs {
634 634 line-height:18px;
635 635 }
636 636 }
  637 +
  638 +/**
  639 + * File content holder
  640 + *
  641 + */
  642 +.file_holder {
  643 + border:1px solid #CCC;
  644 + margin-bottom:1em;
  645 + -moz-box-shadow: 0 0 3px #ddd;
  646 + -webkit-box-shadow: 0 0 3px #ddd;
  647 + box-shadow: 0 0 3px #ddd;
  648 +
  649 + .file_title {
  650 + border-bottom: 1px solid #bbb;
  651 + background:#eee;
  652 + background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #eee), to(#dfdfdf));
  653 + background-image: -webkit-linear-gradient(#eee 6.6%, #dfdfdf);
  654 + background-image: -moz-linear-gradient(#eee 6.6%, #dfdfdf);
  655 + background-image: -o-linear-gradient(#eee 6.6%, #dfdfdf);
  656 + margin: 0;
  657 + font-weight: normal;
  658 + font-weight: bold;
  659 + text-align: left;
  660 + color: #666;
  661 + padding: 9px 10px;
  662 + height:18px;
  663 +
  664 + }
  665 + .file_content {
  666 + &.wiki {
  667 + padding:20px;
  668 + }
  669 + }
  670 +}
... ...
app/views/help/api.html.haml 0 → 100644
... ... @@ -0,0 +1,41 @@
  1 +%h3 API
  2 +.back_link
  3 + = link_to help_path do
  4 + ← to index
  5 +%hr
  6 +
  7 +%ol
  8 + %li
  9 + %a{:href => "#README"} README
  10 + %li
  11 + %a{:href => "#Projects"} Projects
  12 + %li
  13 + %a{:href => "#Users"} Users
  14 +
  15 +.file_holder#README
  16 + .file_title
  17 + %i.icon-file
  18 + README
  19 + .file_content.wiki
  20 + = preserve do
  21 + = markdown File.read(Rails.root.join("doc", "api", "README.md"))
  22 +
  23 +%br
  24 +
  25 +.file_holder#projects
  26 + .file_title
  27 + %i.icon-file
  28 + Projects
  29 + .file_content.wiki
  30 + = preserve do
  31 + = markdown File.read(Rails.root.join("doc", "api", "projects.md"))
  32 +
  33 +%br
  34 +
  35 +.file_holder#users
  36 + .file_title
  37 + %i.icon-file
  38 + Users
  39 + .file_content.wiki
  40 + = preserve do
  41 + = markdown File.read(Rails.root.join("doc", "api", "users.md"))
... ...
app/views/help/index.html.haml
... ... @@ -22,3 +22,6 @@
22 22  
23 23 %li
24 24 %h5= link_to "Web Hooks", help_web_hooks_path
  25 +
  26 + %li
  27 + %h5= link_to "API", help_api_path
... ...
config/routes.rb
... ... @@ -26,6 +26,7 @@ Gitlab::Application.routes.draw do
26 26 get 'help' => 'help#index'
27 27 get 'help/permissions' => 'help#permissions'
28 28 get 'help/workflow' => 'help#workflow'
  29 + get 'help/api' => 'help#api'
29 30 get 'help/web_hooks' => 'help#web_hooks'
30 31  
31 32 #
... ...