Description:
tidy up bootstrap navbar
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r568:8640c8596caa - - 3 files changed: 111 inserted, 7 deleted

@@ -1,112 +1,181
1 1 /*
2 2 * This is a manifest file that'll be compiled into application.css, which will include all the files
3 3 * listed below.
4 4 *
5 5 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6 6 * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7 7 *
8 8 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9 9 * compiled file so the styles you add here take precedence over styles defined in any styles
10 10 * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11 11 * file per style scope.
12 12 *
13 13 // bootstrap says that we should not do this, but @import each file instead
14 14 # *= require_tree .
15 15 # *= require_self
16 16 */
17 17
18 18 @import jquery.ui.all
19 19 @import jquery.ui.core
20 20 @import jquery.ui.core
21 21 @import jquery.ui.theme
22 22 @import jquery.ui.datepicker
23 23 @import jquery.ui.slider
24 24 @import jquery-ui-timepicker-addon
25 25 @import jquery-tablesorter/theme.metro-dark
26 26 @import tablesorter-theme.cafe
27 27
28 28 //bootstrap
29 29 @import bootstrap-sprockets
30 30 @import bootstrap
31 31 @import select2
32 32 @import select2-bootstrap
33 33 //@import bootstrap3-switch
34 34 @import bootstrap-toggle
35 35
36 + //bootstrap navbar color (from)
37 + $bgDefault : #19197b
38 + $bgHighlight : #06064b
39 + $colDefault : #8e8eb4
40 + $colHighlight : #ffffff
41 + $dropDown : false
42 + .navbar-default
43 + background-color: $bgDefault
44 + border-color: $bgHighlight
45 + .navbar-brand
46 + color: $colDefault
47 + &:hover, &:focus
48 + color: $colHighlight
49 + .navbar-text
50 + color: $colDefault
51 + .navbar-nav
52 + > li
53 + > a
54 + color: $colDefault
55 + &:hover, &:focus
56 + color: $colHighlight
57 + @if $dropDown
58 + > .dropdown-menu
59 + background-color: $bgDefault
60 + > li
61 + > a
62 + color: $colDefault
63 + &:hover, &:focus
64 + color: $colHighlight
65 + background-color: $bgHighlight
66 + > .divider
67 + background-color: $bgHighlight
68 + @if $dropDown
69 + .open .dropdown-menu > .active
70 + > a, > a:hover, > a:focus
71 + color: $colHighlight
72 + background-color: $bgHighlight
73 + > .active
74 + > a, > a:hover, > a:focus
75 + color: $colHighlight
76 + background-color: $bgHighlight
77 + > .open
78 + > a, > a:hover, > a:focus
79 + color: $colHighlight
80 + background-color: $bgHighlight
81 + .navbar-toggle
82 + border-color: $bgHighlight
83 + &:hover, &:focus
84 + background-color: $bgHighlight
85 + .icon-bar
86 + background-color: $colDefault
87 + .navbar-collapse,
88 + .navbar-form
89 + border-color: $colDefault
90 + .navbar-link
91 + color: $colDefault
92 + &:hover
93 + color: $colHighlight
94 + @media (max-width: 767px)
95 + .navbar-default .navbar-nav .open .dropdown-menu
96 + > li > a
97 + color: $colDefault
98 + &:hover, &:focus
99 + color: $colHighlight
100 + > .active
101 + > a, > a:hover, > a:focus
102 + color: $colHighlight
103 + background-color: $bgHighlight
104 +
36 105 .secondnavbar
37 106 top: 50px
38 107
39 108 .btn-file
40 109 position: relative
41 110 overflow: hidden
42 111
43 112 .btn-file input[type=file]
44 113 position: absolute
45 114 top: 0
46 115 right: 0
47 116 min-width: 100%
48 117 min-height: 100%
49 118 font-size: 100px
50 119 text-align: right
51 120 filter: alpha(opacity=0)
52 121 opacity: 0
53 122 outline: none
54 123 background: white
55 124 cursor: inherit
56 125 display: block
57 126
58 127 body
59 128 background: white image-url("topbg.jpg") repeat-x top center
60 129 //font-size: 13px
61 130 //font-family: Tahoma, "sans-serif"
62 131 margin: 10px
63 132 padding: 10px
64 - padding-top: 100px
133 + padding-top: 40px
65 134
66 135
67 136 input
68 137 font-family: Tahoma, "sans-serif"
69 138
70 139
71 140 h1
72 141 font-size: 24px
73 142 color: #334488
74 143 line-height: 2em
75 144
76 145
77 146 h2
78 147 font-size: 18px
79 148 color: #5566bb
80 149 line-height: 1.5em
81 150
82 151
83 152 hr
84 153 border-top: 1px solid #dddddd
85 154 border-bottom: 1px solid #eeeeee
86 155
87 156
88 157 //#a
89 158 // color: #6666cc
90 159 // text-decoration: none
91 160 //
92 161 // &:link, &:visited
93 162 // color: #6666cc
94 163 // text-decoration: none
95 164 //
96 165 // &:hover, &:focus
97 166 // color: #111166
98 167 // text-decoration: none
99 168
100 169
101 170 div
102 171 &.userbar
103 172 line-height: 1.5em
104 173 text-align: right
105 174 font-size: 12px
106 175
107 176 &.title
108 177 padding: 10px 0px
109 178 line-height: 1.5em
110 179 font-size: 13px
111 180
112 181 span.contest-over-msg
@@ -1,35 +1,70
1 1 %header.navbar.navbar-default.navbar-fixed-top
2 2 %nav
3 3 .container-fluid
4 4 .navbar-header
5 - %a.navbar-brand{href: main_list_path} ΰΈ«ΰΈ™ΰΉ‰ΰΈ²ΰΈ«ΰΈ₯ัก
5 + %a.navbar-brand{href: main_list_path}
6 + %span.glyphicon.glyphicon-home
7 + MAIN
6 8 .collapse.navbar-collapse
7 9 %ul.nav.navbar-nav
8 10 - if (@current_user!=nil) and (GraderConfiguration.show_tasks_to?(@current_user))
9 - = add_menu("#{I18n.t 'menu.tasks'}", 'tasks', 'list')
10 - = add_menu("#{I18n.t 'menu.submissions'}", 'main', 'submission')
11 - = add_menu("#{I18n.t 'menu.test'}", 'test', 'index')
11 + //= add_menu("#{I18n.t 'menu.tasks'}", 'tasks', 'list')
12 + %li.dropdown
13 + %a.dropdown-toggle{href: '#', data: {toggle:'dropdown'}, aria: {haspopup:"true", expanded:"false"}, role: "button"}
14 + = "#{I18n.t 'menu.submissions'}"
15 + %span.caret
16 + %ul.dropdown-menu
17 + = add_menu("View", 'main', 'submission')
18 + = add_menu("Self Test", 'test', 'index')
12 19 - if GraderConfiguration['right.user_hall_of_fame']
13 20 = add_menu("#{I18n.t 'menu.hall_of_fame'}", 'report', 'problem_hof')
21 + - if (@current_user!=nil) and (session[:admin])
22 + %li.dropdown
23 + %a.dropdown-toggle{href: '#', data: {toggle:'dropdown'}, aria: {haspopup:"true", expanded:"false"}, role: "button"}
24 + Manage
25 + %span.caret
26 + %ul.dropdown-menu
27 + = add_menu( 'Announcements', 'announcements', 'index')
28 + = add_menu( 'Problems', 'problems', 'index')
29 + = add_menu( 'Users', 'user_admin', 'index')
30 + = add_menu( 'Graders', 'graders', 'list')
31 + = add_menu( 'Message ', 'messages', 'console')
32 + %li.divider{role: 'separator'}
33 + = add_menu( 'System config', 'configurations', 'index')
34 + %li.divider{role: 'separator'}
35 + = add_menu( 'Sites', 'sites', 'index')
36 + = add_menu( 'Contests', 'contest_management', 'index')
37 + %li.dropdown
38 + %a.dropdown-toggle{href: '#', data: {toggle:'dropdown'}, aria: {haspopup:"true", expanded:"false"}, role: "button"}
39 + Report
40 + %span.caret
41 + %ul.dropdown-menu
42 + = add_menu( 'Results', 'user_admin', 'user_stat')
43 + = add_menu( 'Report', 'report', 'multiple_login')
44 + %button.navbar-btn.btn.btn-default.btn-warning
45 + hahaha
46 +
47 +
14 48 %ul.nav.navbar-nav.navbar-right
15 49 = add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-question-sign')}".html_safe, 'main', 'help')
16 50 = add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-comment')}".html_safe, 'messages', 'list', {title: I18n.t('menu.messages'), data: {toggle: 'tooltip'}})
17 51 - if GraderConfiguration['system.user_setting_enabled']
18 52 = add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-cog')}".html_safe, 'users', 'index', {title: I18n.t('menu.settings'), data: {toggle: 'tooltip'}})
19 53 = add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-log-out')} #{@current_user.full_name}".html_safe, 'main', 'login', {title: I18n.t('menu.log_out'), data: {toggle: 'tooltip'}})
20 54
55 + /
21 56 - if (@current_user!=nil) and (session[:admin])
22 - %nav.navbar.navbar-default.navbar-fixed-top.navbar-inverse.secondnavbar
57 + %nav.navbar.navbar-fixed-top.navbar-inverse.secondnavbar
23 58 .container-fluid
24 59 .collapse.navbar-collapse
25 60 %ul.nav.navbar-nav
26 61 = add_menu( '[Announcements]', 'announcements', 'index')
27 62 = add_menu( '[Msg console]', 'messages', 'console')
28 63 = add_menu( '[Problems]', 'problems', 'index')
29 64 = add_menu( '[Users]', 'user_admin', 'index')
30 65 = add_menu( '[Results]', 'user_admin', 'user_stat')
31 66 = add_menu( '[Report]', 'report', 'multiple_login')
32 67 = add_menu( '[Graders]', 'graders', 'list')
33 68 = add_menu( '[Contests]', 'contest_management', 'index')
34 69 = add_menu( '[Sites]', 'sites', 'index')
35 70 = add_menu( '[System config]', 'configurations', 'index')
@@ -1,70 +1,70
1 1 # Sample localization file for English. Add more files in this directory for other locales.
2 2 # See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3 3
4 4 en:
5 5 cancel: 'Cancel'
6 6
7 7 login_label: 'Login'
8 8 full_name_label: 'Full name'
9 9 email_label: 'E-mail'
10 10 password_label: 'Password'
11 11
12 12 go_ahead_to: "Go ahead to "
13 13 go_back_to: "Go back to "
14 14 login_page: "login page"
15 15 home_page: "home page"
16 16
17 17 menu:
18 18 main: 'Main'
19 19 messages: 'Messages'
20 20 tasks: 'Tasks'
21 21 submissions: 'Submissions'
22 - test: 'Test Interface'
22 + test: 'Test'
23 23 hall_of_fame: 'Hall of Fame'
24 24 help: 'Help'
25 25 settings: 'Settings'
26 26 log_out: 'Log out'
27 27
28 28 title_bar:
29 29 current_time: "Current time is"
30 30 remaining_time: "Time left: "
31 31 contest_not_started: "The contest has not started."
32 32
33 33 login:
34 34 message: 'Please login to see the problem list'
35 35 login_submit: 'Login'
36 36 participation: 'Want to participate?'
37 37 please: 'Please'
38 38 register: 'register'
39 39 forget_password: 'Forget password?'
40 40
41 41 main:
42 42 start_soon: "The contest at your site will start soon. Please wait."
43 43 specified_in_header: "Specified in header"
44 44
45 45 problem_desc: "desc"
46 46 submitted_at: "Submitted at"
47 47 graded_at: "Graded at"
48 48 score: "score: "
49 49 cmp_msg: "compiler msg"
50 50 src_link: "src"
51 51 submissions_link: "submissions"
52 52
53 53 confirm_contest_start:
54 54 box_title: "Contest confirmation"
55 55 contest_list: "You will participate in contest:"
56 56 timer_starts_after_click: "The timer will start after you click the start button."
57 57 start_button: "Start!"
58 58 start_button_confirm: "Are you sure?"
59 59
60 60 test:
61 61 title: "Test Interface"
62 62 intro: "You can test your submission with your own test data on the grading environment using this test interface."
63 63 disabled_at_end_announcement: "<b>Note:</b> Test interface will be disabled in the last 30 minutes of the contest time on your site."
64 64
65 65 registration:
66 66 title: "New user registration"
67 67
68 68 description: "Please enter your information below. Please make sure your e-mail is correct, because you will have to confirm the registration through an e-mail we send to that e-mail address."
69 69
70 70 successful_title: "Registration successful"
You need to be logged in to leave comments. Login now