From 18489218443ea6b8c6fdfd9ab953ff7ef84f69db Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Gray Date: Wed, 7 Dec 2016 17:05:42 -0600 Subject: Remove pages/snippets css --- app/assets/stylesheets/framework.scss | 1 + app/assets/stylesheets/framework/emojis.scss | 2 +- app/assets/stylesheets/framework/snippets.scss | 48 ++++++++++++++++++ app/assets/stylesheets/framework/tw_bootstrap.scss | 6 +-- app/assets/stylesheets/pages/notifications.scss | 14 +----- app/assets/stylesheets/pages/snippets.scss | 58 ---------------------- app/views/projects/snippets/show.html.haml | 5 +- app/views/snippets/show.html.haml | 4 +- 8 files changed, 59 insertions(+), 79 deletions(-) create mode 100644 app/assets/stylesheets/framework/snippets.scss delete mode 100644 app/assets/stylesheets/pages/snippets.scss diff --git a/app/assets/stylesheets/framework.scss b/app/assets/stylesheets/framework.scss index 928ef408722..40bc0579393 100644 --- a/app/assets/stylesheets/framework.scss +++ b/app/assets/stylesheets/framework.scss @@ -46,3 +46,4 @@ @import "framework/broadcast-messages"; @import "framework/emojis.scss"; @import "framework/icons.scss"; +@import "framework/snippets.scss"; diff --git a/app/assets/stylesheets/framework/emojis.scss b/app/assets/stylesheets/framework/emojis.scss index f17797b2381..7158de65143 100644 --- a/app/assets/stylesheets/framework/emojis.scss +++ b/app/assets/stylesheets/framework/emojis.scss @@ -1,4 +1,4 @@ -.emoji-0023-20E3 { background-position: 0 0px; } +.emoji-0023-20E3 { background-position: 0 0; } .emoji-002A-20E3 { background-position: -20px 0; } .emoji-0030-20E3 { background-position: 0 -20px; } .emoji-0031-20E3 { background-position: -20px -20px; } diff --git a/app/assets/stylesheets/framework/snippets.scss b/app/assets/stylesheets/framework/snippets.scss new file mode 100644 index 00000000000..5f7e1b17cc7 --- /dev/null +++ b/app/assets/stylesheets/framework/snippets.scss @@ -0,0 +1,48 @@ +.snippet-row { + .title { + margin-bottom: 2px; + } + + .snippet-filename { + padding: 0 2px; + } +} + +.snippet-form-holder .file-holder .file-title { + padding: 2px; +} + +.markdown-snippet-copy { + position: fixed; + top: -10px; + left: -10px; + max-height: 0; + max-width: 0; +} + +.snippet-file-content { + border-radius: 3px; +} + +.snippet-header { + padding: $gl-padding 0; +} + +.snippet-title { + font-size: 24px; + font-weight: 600; +} + +.snippet-edited-ago { + color: $gray-darkest; +} + +.snippet-actions { + @media (min-width: $screen-sm-min) { + float: right; + } +} + +.snippet-scope-menu .btn-new { + margin-top: 15px; +} diff --git a/app/assets/stylesheets/framework/tw_bootstrap.scss b/app/assets/stylesheets/framework/tw_bootstrap.scss index 1a985ee2a66..d998d654aa4 100644 --- a/app/assets/stylesheets/framework/tw_bootstrap.scss +++ b/app/assets/stylesheets/framework/tw_bootstrap.scss @@ -21,7 +21,7 @@ @import "bootstrap/buttons"; // Components -// @import "bootstrap/component-animations"; +@import "bootstrap/component-animations"; // @import "bootstrap/dropdowns"; @import "bootstrap/button-groups"; @import "bootstrap/input-groups"; @@ -36,8 +36,8 @@ // @import "bootstrap/progress-bars"; @import "bootstrap/list-group"; // @import "bootstrap/wells"; -// @import "bootstrap/close"; -// @import "bootstrap/panels"; +@import "bootstrap/close"; +@import "bootstrap/panels"; // Components w/ JavaScript @import "bootstrap/modals"; diff --git a/app/assets/stylesheets/pages/notifications.scss b/app/assets/stylesheets/pages/notifications.scss index 7d61390a439..bdf07a99daf 100644 --- a/app/assets/stylesheets/pages/notifications.scss +++ b/app/assets/stylesheets/pages/notifications.scss @@ -10,19 +10,7 @@ position: relative; top: 1px; - > .fa { + .fa { font-size: 18px; } } - -.ns-part { - color: $gl-text-green; -} - -.ns-watch { - color: $gl-success; -} - -.ns-mute { - color: $gl-danger; -} diff --git a/app/assets/stylesheets/pages/snippets.scss b/app/assets/stylesheets/pages/snippets.scss deleted file mode 100644 index a6037d76797..00000000000 --- a/app/assets/stylesheets/pages/snippets.scss +++ /dev/null @@ -1,58 +0,0 @@ -.snippet-row { - .title { - margin-bottom: 2px; - } - - .snippet-filename { - padding: 0 2px; - } -} - -.snippet-form-holder .file-holder .file-title { - padding: 2px; -} - -.markdown-snippet-copy { - position: fixed; - top: -10px; - left: -10px; - max-height: 0; - max-width: 0; -} - -.snippet-file-content { - border-radius: 3px; - margin-bottom: $gl-padding; - - .btn-clipboard { - @extend .btn; - } -} - -.project-snippets .awards { - border-bottom: 1px solid $white-normal; - padding-bottom: $gl-padding; -} - -.snippet-header { - padding: $gl-padding 0; -} - -.snippet-title { - font-size: 24px; - font-weight: 600; -} - -.snippet-edited-ago { - color: $gray-darkest; -} - -.snippet-actions { - @media (min-width: $screen-sm-min) { - float: right; - } -} - -.snippet-scope-menu .btn-new { - margin-top: 15px; -} diff --git a/app/views/projects/snippets/show.html.haml b/app/views/projects/snippets/show.html.haml index 9503dbded13..79d87b7db12 100644 --- a/app/views/projects/snippets/show.html.haml +++ b/app/views/projects/snippets/show.html.haml @@ -8,10 +8,11 @@ = blob_icon 0, @snippet.file_name = @snippet.file_name .file-actions - = clipboard_button(clipboard_target: ".blob-content[data-blob-id='#{@snippet.id}']") + = clipboard_button(clipboard_target: ".blob-content[data-blob-id='#{@snippet.id}']", class: "btn btn-sm") = link_to 'Raw', raw_namespace_project_snippet_path(@project.namespace, @project, @snippet), class: "btn btn-sm", target: "_blank" = render 'shared/snippets/blob' - = render 'award_emoji/awards_block', awardable: @snippet, inline: true + .row-content-block.top-block.content-component-block + = render 'award_emoji/awards_block', awardable: @snippet, inline: true %div#notes= render "projects/notes/notes_with_form" diff --git a/app/views/snippets/show.html.haml b/app/views/snippets/show.html.haml index 27d7a6c5bb6..837a1a0cc8c 100644 --- a/app/views/snippets/show.html.haml +++ b/app/views/snippets/show.html.haml @@ -7,9 +7,9 @@ = blob_icon 0, @snippet.file_name = @snippet.file_name .file-actions - = clipboard_button(clipboard_target: ".blob-content[data-blob-id='#{@snippet.id}']") + = clipboard_button(clipboard_target: ".blob-content[data-blob-id='#{@snippet.id}']", class: "btn btn-sm") = link_to 'Raw', raw_snippet_path(@snippet), class: "btn btn-sm", target: "_blank" = link_to 'Download', download_snippet_path(@snippet), class: "btn btn-sm" = render 'shared/snippets/blob' -= render 'award_emoji/awards_block', awardable: @snippet, inline: true \ No newline at end of file += render 'award_emoji/awards_block', awardable: @snippet, inline: true -- cgit v1.2.1