From 93a65c3c8227b9a5dd6f74c657ac188862b801c5 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 28 Jul 2012 15:54:23 +0000 Subject: [PATCH] Moved syntax highlight styles to application.css. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10094 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/boards/show.html.erb | 1 - app/views/documents/show.html.erb | 4 -- app/views/issues/new.html.erb | 1 - app/views/issues/show.html.erb | 1 - app/views/messages/edit.html.erb | 4 -- app/views/messages/show.html.erb | 4 -- app/views/welcome/index.html.erb | 1 - app/views/wiki/edit.html.erb | 1 - app/views/wiki/show.html.erb | 4 -- public/stylesheets/application.css | 98 ++++++++++++++++++++++++++++++ public/stylesheets/scm.css | 98 ------------------------------ 11 files changed, 98 insertions(+), 119 deletions(-) diff --git a/app/views/boards/show.html.erb b/app/views/boards/show.html.erb index e61d5b68a..b4d4bd71d 100644 --- a/app/views/boards/show.html.erb +++ b/app/views/boards/show.html.erb @@ -63,5 +63,4 @@ <% content_for :header_tags do %> <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@project}: #{@board}") %> - <%= stylesheet_link_tag 'scm' %> <% end %> diff --git a/app/views/documents/show.html.erb b/app/views/documents/show.html.erb index c18bb07cb..b1d58d522 100644 --- a/app/views/documents/show.html.erb +++ b/app/views/documents/show.html.erb @@ -28,7 +28,3 @@ <% end %> <% html_title @document.title -%> - -<% content_for :header_tags do %> - <%= stylesheet_link_tag 'scm' %> -<% end %> diff --git a/app/views/issues/new.html.erb b/app/views/issues/new.html.erb index 8fdb9d854..1284c5003 100644 --- a/app/views/issues/new.html.erb +++ b/app/views/issues/new.html.erb @@ -45,6 +45,5 @@
<% content_for :header_tags do %> - <%= stylesheet_link_tag 'scm' %> <%= robot_exclusion_tag %> <% end %> diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index fa81e4645..df3b81f30 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -153,7 +153,6 @@ end %> <% content_for :header_tags do %> <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@issue.project} - #{@issue.tracker} ##{@issue.id}: #{@issue.subject}") %> - <%= stylesheet_link_tag 'scm' %> <% end %> <%= context_menu issues_context_menu_path %> diff --git a/app/views/messages/edit.html.erb b/app/views/messages/edit.html.erb index e08d7a297..6371b5c45 100644 --- a/app/views/messages/edit.html.erb +++ b/app/views/messages/edit.html.erb @@ -15,7 +15,3 @@ <%= preview_link({:controller => 'messages', :action => 'preview', :board_id => @board, :id => @message}, 'message-form') %> <% end %>
- -<% content_for :header_tags do %> - <%= stylesheet_link_tag 'scm' %> -<% end %> diff --git a/app/views/messages/show.html.erb b/app/views/messages/show.html.erb index 36737b191..8e9ecceca 100644 --- a/app/views/messages/show.html.erb +++ b/app/views/messages/show.html.erb @@ -84,8 +84,4 @@ <% end %> -<% content_for :header_tags do %> - <%= stylesheet_link_tag 'scm' %> -<% end %> - <% html_title @topic.subject %> diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index dbcf6ed9d..064066ad7 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -32,7 +32,6 @@ <% content_for :header_tags do %> -<%= stylesheet_link_tag 'scm' %> <%= auto_discovery_link_tag(:atom, {:controller => 'news', :action => 'index', :key => User.current.rss_key, :format => 'atom'}, :title => "#{Setting.app_title}: #{l(:label_news_latest)}") %> <%= auto_discovery_link_tag(:atom, {:controller => 'activities', :action => 'index', :key => User.current.rss_key, :format => 'atom'}, diff --git a/app/views/wiki/edit.html.erb b/app/views/wiki/edit.html.erb index db9d1c2ef..6c1c7c53a 100644 --- a/app/views/wiki/edit.html.erb +++ b/app/views/wiki/edit.html.erb @@ -40,7 +40,6 @@
<% content_for :header_tags do %> - <%= stylesheet_link_tag 'scm' %> <%= robot_exclusion_tag %> <% end %> diff --git a/app/views/wiki/show.html.erb b/app/views/wiki/show.html.erb index 90c1cc006..7227870ec 100644 --- a/app/views/wiki/show.html.erb +++ b/app/views/wiki/show.html.erb @@ -61,10 +61,6 @@ <%= f.link_to 'TXT', :url => {:id => @page.title, :version => params[:version]} %> <% end if User.current.allowed_to?(:export_wiki_pages, @project) %> -<% content_for :header_tags do %> - <%= stylesheet_link_tag 'scm' %> -<% end %> - <% content_for :sidebar do %> <%= render :partial => 'sidebar' %> <% end %> diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 8a3e14072..956f66ef3 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -1075,6 +1075,104 @@ h2 img { vertical-align:middle; } .hascontextmenu { cursor: context-menu; } +/************* CodeRay styles *************/ +.syntaxhl div {display: inline;} +.syntaxhl .line-numbers { + padding: 2px 4px 2px 4px; background-color: #eee; margin:0px 5px 0px 0px; + user-select: none; + -moz-user-select: none; + -o-user-select: none; + -ms-user-select: none; + -webkit-user-select: none; +} +.syntaxhl .code pre { overflow: auto } +.syntaxhl .debug { color: white !important; background: blue !important; } + +.syntaxhl .annotation { color:#007 } +.syntaxhl .attribute-name { color:#b48 } +.syntaxhl .attribute-value { color:#700 } +.syntaxhl .binary { color:#509 } +.syntaxhl .char .content { color:#D20 } +.syntaxhl .char .delimiter { color:#710 } +.syntaxhl .char { color:#D20 } +.syntaxhl .class { color:#B06; font-weight:bold } +.syntaxhl .class-variable { color:#369 } +.syntaxhl .color { color:#0A0 } +.syntaxhl .comment { color:#777 } +.syntaxhl .comment .char { color:#444 } +.syntaxhl .comment .delimiter { color:#444 } +.syntaxhl .complex { color:#A08 } +.syntaxhl .constant { color:#036; font-weight:bold } +.syntaxhl .decorator { color:#B0B } +.syntaxhl .definition { color:#099; font-weight:bold } +.syntaxhl .delimiter { color:black } +.syntaxhl .directive { color:#088; font-weight:bold } +.syntaxhl .doc { color:#970 } +.syntaxhl .doc-string { color:#D42; font-weight:bold } +.syntaxhl .doctype { color:#34b } +.syntaxhl .entity { color:#800; font-weight:bold } +.syntaxhl .error { color:#F00; background-color:#FAA } +.syntaxhl .escape { color:#666 } +.syntaxhl .exception { color:#C00; font-weight:bold } +.syntaxhl .float { color:#60E } +.syntaxhl .function { color:#06B; font-weight:bold } +.syntaxhl .global-variable { color:#d70 } +.syntaxhl .hex { color:#02b } +.syntaxhl .imaginary { color:#f00 } +.syntaxhl .include { color:#B44; font-weight:bold } +.syntaxhl .inline { background-color: hsla(0,0%,0%,0.07); color: black } +.syntaxhl .inline-delimiter { font-weight: bold; color: #666 } +.syntaxhl .instance-variable { color:#33B } +.syntaxhl .integer { color:#00D } +.syntaxhl .key .char { color: #60f } +.syntaxhl .key .delimiter { color: #404 } +.syntaxhl .key { color: #606 } +.syntaxhl .keyword { color:#080; font-weight:bold } +.syntaxhl .label { color:#970; font-weight:bold } +.syntaxhl .local-variable { color:#963 } +.syntaxhl .namespace { color:#707; font-weight:bold } +.syntaxhl .octal { color:#40E } +.syntaxhl .operator { } +.syntaxhl .predefined { color:#369; font-weight:bold } +.syntaxhl .predefined-constant { color:#069 } +.syntaxhl .predefined-type { color:#0a5; font-weight:bold } +.syntaxhl .preprocessor { color:#579 } +.syntaxhl .pseudo-class { color:#00C; font-weight:bold } +.syntaxhl .regexp .content { color:#808 } +.syntaxhl .regexp .delimiter { color:#404 } +.syntaxhl .regexp .modifier { color:#C2C } +.syntaxhl .regexp { background-color:hsla(300,100%,50%,0.06); } +.syntaxhl .reserved { color:#080; font-weight:bold } +.syntaxhl .shell .content { color:#2B2 } +.syntaxhl .shell .delimiter { color:#161 } +.syntaxhl .shell { background-color:hsla(120,100%,50%,0.06); } +.syntaxhl .string .char { color: #b0b } +.syntaxhl .string .content { color: #D20 } +.syntaxhl .string .delimiter { color: #710 } +.syntaxhl .string .modifier { color: #E40 } +.syntaxhl .string { background-color:hsla(0,100%,50%,0.05); } +.syntaxhl .symbol .content { color:#A60 } +.syntaxhl .symbol .delimiter { color:#630 } +.syntaxhl .symbol { color:#A60 } +.syntaxhl .tag { color:#070 } +.syntaxhl .type { color:#339; font-weight:bold } +.syntaxhl .value { color: #088; } +.syntaxhl .variable { color:#037 } + +.syntaxhl .insert { background: hsla(120,100%,50%,0.12) } +.syntaxhl .delete { background: hsla(0,100%,50%,0.12) } +.syntaxhl .change { color: #bbf; background: #007; } +.syntaxhl .head { color: #f8f; background: #505 } +.syntaxhl .head .filename { color: white; } + +.syntaxhl .delete .eyecatcher { background-color: hsla(0,100%,50%,0.2); border: 1px solid hsla(0,100%,45%,0.5); margin: -1px; border-bottom: none; border-top-left-radius: 5px; border-top-right-radius: 5px; } +.syntaxhl .insert .eyecatcher { background-color: hsla(120,100%,50%,0.2); border: 1px solid hsla(120,100%,25%,0.5); margin: -1px; border-top: none; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; } + +.syntaxhl .insert .insert { color: #0c0; background:transparent; font-weight:bold } +.syntaxhl .delete .delete { color: #c00; background:transparent; font-weight:bold } +.syntaxhl .change .change { color: #88f } +.syntaxhl .head .head { color: #f4f } + /***** Media print specific styles *****/ @media print { #top-menu, #header, #main-menu, #sidebar, #footer, .contextual, .other-formats { display:none; } diff --git a/public/stylesheets/scm.css b/public/stylesheets/scm.css index e06090302..603cac03c 100644 --- a/public/stylesheets/scm.css +++ b/public/stylesheets/scm.css @@ -98,101 +98,3 @@ table.annotate td.line-code { background-color: #fafafa; } div.action_M { background: #fd8 } div.action_D { background: #f88 } div.action_A { background: #bfb } - -/************* CodeRay styles *************/ -.syntaxhl div {display: inline;} -.syntaxhl .line-numbers { - padding: 2px 4px 2px 4px; background-color: #eee; margin:0px 5px 0px 0px; - user-select: none; - -moz-user-select: none; - -o-user-select: none; - -ms-user-select: none; - -webkit-user-select: none; -} -.syntaxhl .code pre { overflow: auto } -.syntaxhl .debug { color: white !important; background: blue !important; } - -.syntaxhl .annotation { color:#007 } -.syntaxhl .attribute-name { color:#b48 } -.syntaxhl .attribute-value { color:#700 } -.syntaxhl .binary { color:#509 } -.syntaxhl .char .content { color:#D20 } -.syntaxhl .char .delimiter { color:#710 } -.syntaxhl .char { color:#D20 } -.syntaxhl .class { color:#B06; font-weight:bold } -.syntaxhl .class-variable { color:#369 } -.syntaxhl .color { color:#0A0 } -.syntaxhl .comment { color:#777 } -.syntaxhl .comment .char { color:#444 } -.syntaxhl .comment .delimiter { color:#444 } -.syntaxhl .complex { color:#A08 } -.syntaxhl .constant { color:#036; font-weight:bold } -.syntaxhl .decorator { color:#B0B } -.syntaxhl .definition { color:#099; font-weight:bold } -.syntaxhl .delimiter { color:black } -.syntaxhl .directive { color:#088; font-weight:bold } -.syntaxhl .doc { color:#970 } -.syntaxhl .doc-string { color:#D42; font-weight:bold } -.syntaxhl .doctype { color:#34b } -.syntaxhl .entity { color:#800; font-weight:bold } -.syntaxhl .error { color:#F00; background-color:#FAA } -.syntaxhl .escape { color:#666 } -.syntaxhl .exception { color:#C00; font-weight:bold } -.syntaxhl .float { color:#60E } -.syntaxhl .function { color:#06B; font-weight:bold } -.syntaxhl .global-variable { color:#d70 } -.syntaxhl .hex { color:#02b } -.syntaxhl .imaginary { color:#f00 } -.syntaxhl .include { color:#B44; font-weight:bold } -.syntaxhl .inline { background-color: hsla(0,0%,0%,0.07); color: black } -.syntaxhl .inline-delimiter { font-weight: bold; color: #666 } -.syntaxhl .instance-variable { color:#33B } -.syntaxhl .integer { color:#00D } -.syntaxhl .key .char { color: #60f } -.syntaxhl .key .delimiter { color: #404 } -.syntaxhl .key { color: #606 } -.syntaxhl .keyword { color:#080; font-weight:bold } -.syntaxhl .label { color:#970; font-weight:bold } -.syntaxhl .local-variable { color:#963 } -.syntaxhl .namespace { color:#707; font-weight:bold } -.syntaxhl .octal { color:#40E } -.syntaxhl .operator { } -.syntaxhl .predefined { color:#369; font-weight:bold } -.syntaxhl .predefined-constant { color:#069 } -.syntaxhl .predefined-type { color:#0a5; font-weight:bold } -.syntaxhl .preprocessor { color:#579 } -.syntaxhl .pseudo-class { color:#00C; font-weight:bold } -.syntaxhl .regexp .content { color:#808 } -.syntaxhl .regexp .delimiter { color:#404 } -.syntaxhl .regexp .modifier { color:#C2C } -.syntaxhl .regexp { background-color:hsla(300,100%,50%,0.06); } -.syntaxhl .reserved { color:#080; font-weight:bold } -.syntaxhl .shell .content { color:#2B2 } -.syntaxhl .shell .delimiter { color:#161 } -.syntaxhl .shell { background-color:hsla(120,100%,50%,0.06); } -.syntaxhl .string .char { color: #b0b } -.syntaxhl .string .content { color: #D20 } -.syntaxhl .string .delimiter { color: #710 } -.syntaxhl .string .modifier { color: #E40 } -.syntaxhl .string { background-color:hsla(0,100%,50%,0.05); } -.syntaxhl .symbol .content { color:#A60 } -.syntaxhl .symbol .delimiter { color:#630 } -.syntaxhl .symbol { color:#A60 } -.syntaxhl .tag { color:#070 } -.syntaxhl .type { color:#339; font-weight:bold } -.syntaxhl .value { color: #088; } -.syntaxhl .variable { color:#037 } - -.syntaxhl .insert { background: hsla(120,100%,50%,0.12) } -.syntaxhl .delete { background: hsla(0,100%,50%,0.12) } -.syntaxhl .change { color: #bbf; background: #007; } -.syntaxhl .head { color: #f8f; background: #505 } -.syntaxhl .head .filename { color: white; } - -.syntaxhl .delete .eyecatcher { background-color: hsla(0,100%,50%,0.2); border: 1px solid hsla(0,100%,45%,0.5); margin: -1px; border-bottom: none; border-top-left-radius: 5px; border-top-right-radius: 5px; } -.syntaxhl .insert .eyecatcher { background-color: hsla(120,100%,50%,0.2); border: 1px solid hsla(120,100%,25%,0.5); margin: -1px; border-top: none; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; } - -.syntaxhl .insert .insert { color: #0c0; background:transparent; font-weight:bold } -.syntaxhl .delete .delete { color: #c00; background:transparent; font-weight:bold } -.syntaxhl .change .change { color: #88f } -.syntaxhl .head .head { color: #f4f } -- 2.39.5