Description:
tidy up bootstrap navbar
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r568:8640c8596caa - - 3 files changed: 111 inserted, 7 deleted
@@ -24,24 +24,93 | |||||
|
24 | @import jquery-ui-timepicker-addon |
|
24 | @import jquery-ui-timepicker-addon |
|
25 | @import jquery-tablesorter/theme.metro-dark |
|
25 | @import jquery-tablesorter/theme.metro-dark |
|
26 | @import tablesorter-theme.cafe |
|
26 | @import tablesorter-theme.cafe |
|
27 |
|
27 | ||
|
28 | //bootstrap |
|
28 | //bootstrap |
|
29 | @import bootstrap-sprockets |
|
29 | @import bootstrap-sprockets |
|
30 | @import bootstrap |
|
30 | @import bootstrap |
|
31 | @import select2 |
|
31 | @import select2 |
|
32 | @import select2-bootstrap |
|
32 | @import select2-bootstrap |
|
33 | //@import bootstrap3-switch |
|
33 | //@import bootstrap3-switch |
|
34 | @import bootstrap-toggle |
|
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 | .secondnavbar |
|
105 | .secondnavbar |
|
37 | top: 50px |
|
106 | top: 50px |
|
38 |
|
107 | ||
|
39 | .btn-file |
|
108 | .btn-file |
|
40 | position: relative |
|
109 | position: relative |
|
41 | overflow: hidden |
|
110 | overflow: hidden |
|
42 |
|
111 | ||
|
43 | .btn-file input[type=file] |
|
112 | .btn-file input[type=file] |
|
44 | position: absolute |
|
113 | position: absolute |
|
45 | top: 0 |
|
114 | top: 0 |
|
46 | right: 0 |
|
115 | right: 0 |
|
47 | min-width: 100% |
|
116 | min-width: 100% |
@@ -52,25 +121,25 | |||||
|
52 | opacity: 0 |
|
121 | opacity: 0 |
|
53 | outline: none |
|
122 | outline: none |
|
54 | background: white |
|
123 | background: white |
|
55 | cursor: inherit |
|
124 | cursor: inherit |
|
56 | display: block |
|
125 | display: block |
|
57 |
|
126 | ||
|
58 | body |
|
127 | body |
|
59 | background: white image-url("topbg.jpg") repeat-x top center |
|
128 | background: white image-url("topbg.jpg") repeat-x top center |
|
60 | //font-size: 13px |
|
129 | //font-size: 13px |
|
61 | //font-family: Tahoma, "sans-serif" |
|
130 | //font-family: Tahoma, "sans-serif" |
|
62 | margin: 10px |
|
131 | margin: 10px |
|
63 | padding: 10px |
|
132 | padding: 10px |
|
64 |
- padding-top: |
|
133 | + padding-top: 40px |
|
65 |
|
134 | ||
|
66 |
|
135 | ||
|
67 | input |
|
136 | input |
|
68 | font-family: Tahoma, "sans-serif" |
|
137 | font-family: Tahoma, "sans-serif" |
|
69 |
|
138 | ||
|
70 |
|
139 | ||
|
71 | h1 |
|
140 | h1 |
|
72 | font-size: 24px |
|
141 | font-size: 24px |
|
73 | color: #334488 |
|
142 | color: #334488 |
|
74 | line-height: 2em |
|
143 | line-height: 2em |
|
75 |
|
144 | ||
|
76 |
|
145 |
@@ -1,34 +1,69 | |||||
|
1 | %header.navbar.navbar-default.navbar-fixed-top |
|
1 | %header.navbar.navbar-default.navbar-fixed-top |
|
2 | %nav |
|
2 | %nav |
|
3 | .container-fluid |
|
3 | .container-fluid |
|
4 | .navbar-header |
|
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 | .collapse.navbar-collapse |
|
8 | .collapse.navbar-collapse |
|
7 | %ul.nav.navbar-nav |
|
9 | %ul.nav.navbar-nav |
|
8 | - if (@current_user!=nil) and (GraderConfiguration.show_tasks_to?(@current_user)) |
|
10 | - if (@current_user!=nil) and (GraderConfiguration.show_tasks_to?(@current_user)) |
|
9 | - = add_menu("#{I18n.t 'menu.tasks'}", 'tasks', 'list') |
|
11 | + //= add_menu("#{I18n.t 'menu.tasks'}", 'tasks', 'list') |
|
10 | - = add_menu("#{I18n.t 'menu.submissions'}", 'main', 'submission') |
|
12 | + %li.dropdown |
|
11 | - = add_menu("#{I18n.t 'menu.test'}", 'test', 'index') |
|
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 | - if GraderConfiguration['right.user_hall_of_fame'] |
|
19 | - if GraderConfiguration['right.user_hall_of_fame'] |
|
13 | = add_menu("#{I18n.t 'menu.hall_of_fame'}", 'report', 'problem_hof') |
|
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 | %ul.nav.navbar-nav.navbar-right |
|
48 | %ul.nav.navbar-nav.navbar-right |
|
15 | = add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-question-sign')}".html_safe, 'main', 'help') |
|
49 | = add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-question-sign')}".html_safe, 'main', 'help') |
|
16 | = add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-comment')}".html_safe, 'messages', 'list', {title: I18n.t('menu.messages'), data: {toggle: 'tooltip'}}) |
|
50 | = add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-comment')}".html_safe, 'messages', 'list', {title: I18n.t('menu.messages'), data: {toggle: 'tooltip'}}) |
|
17 | - if GraderConfiguration['system.user_setting_enabled'] |
|
51 | - if GraderConfiguration['system.user_setting_enabled'] |
|
18 | = add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-cog')}".html_safe, 'users', 'index', {title: I18n.t('menu.settings'), data: {toggle: 'tooltip'}}) |
|
52 | = add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-cog')}".html_safe, 'users', 'index', {title: I18n.t('menu.settings'), data: {toggle: 'tooltip'}}) |
|
19 | = 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'}}) |
|
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 |
- if (@current_user!=nil) and (session[:admin]) |
|
56 | - if (@current_user!=nil) and (session[:admin]) |
|
22 |
- %nav.navbar.navbar- |
|
57 | + %nav.navbar.navbar-fixed-top.navbar-inverse.secondnavbar |
|
23 | .container-fluid |
|
58 | .container-fluid |
|
24 | .collapse.navbar-collapse |
|
59 | .collapse.navbar-collapse |
|
25 | %ul.nav.navbar-nav |
|
60 | %ul.nav.navbar-nav |
|
26 | = add_menu( '[Announcements]', 'announcements', 'index') |
|
61 | = add_menu( '[Announcements]', 'announcements', 'index') |
|
27 | = add_menu( '[Msg console]', 'messages', 'console') |
|
62 | = add_menu( '[Msg console]', 'messages', 'console') |
|
28 | = add_menu( '[Problems]', 'problems', 'index') |
|
63 | = add_menu( '[Problems]', 'problems', 'index') |
|
29 | = add_menu( '[Users]', 'user_admin', 'index') |
|
64 | = add_menu( '[Users]', 'user_admin', 'index') |
|
30 | = add_menu( '[Results]', 'user_admin', 'user_stat') |
|
65 | = add_menu( '[Results]', 'user_admin', 'user_stat') |
|
31 | = add_menu( '[Report]', 'report', 'multiple_login') |
|
66 | = add_menu( '[Report]', 'report', 'multiple_login') |
|
32 | = add_menu( '[Graders]', 'graders', 'list') |
|
67 | = add_menu( '[Graders]', 'graders', 'list') |
|
33 | = add_menu( '[Contests]', 'contest_management', 'index') |
|
68 | = add_menu( '[Contests]', 'contest_management', 'index') |
|
34 | = add_menu( '[Sites]', 'sites', 'index') |
|
69 | = add_menu( '[Sites]', 'sites', 'index') |
@@ -10,25 +10,25 | |||||
|
10 | password_label: 'Password' |
|
10 | password_label: 'Password' |
|
11 |
|
11 | ||
|
12 | go_ahead_to: "Go ahead to " |
|
12 | go_ahead_to: "Go ahead to " |
|
13 | go_back_to: "Go back to " |
|
13 | go_back_to: "Go back to " |
|
14 | login_page: "login page" |
|
14 | login_page: "login page" |
|
15 | home_page: "home page" |
|
15 | home_page: "home page" |
|
16 |
|
16 | ||
|
17 | menu: |
|
17 | menu: |
|
18 | main: 'Main' |
|
18 | main: 'Main' |
|
19 | messages: 'Messages' |
|
19 | messages: 'Messages' |
|
20 | tasks: 'Tasks' |
|
20 | tasks: 'Tasks' |
|
21 | submissions: 'Submissions' |
|
21 | submissions: 'Submissions' |
|
22 |
- test: 'Test |
|
22 | + test: 'Test' |
|
23 | hall_of_fame: 'Hall of Fame' |
|
23 | hall_of_fame: 'Hall of Fame' |
|
24 | help: 'Help' |
|
24 | help: 'Help' |
|
25 | settings: 'Settings' |
|
25 | settings: 'Settings' |
|
26 | log_out: 'Log out' |
|
26 | log_out: 'Log out' |
|
27 |
|
27 | ||
|
28 | title_bar: |
|
28 | title_bar: |
|
29 | current_time: "Current time is" |
|
29 | current_time: "Current time is" |
|
30 | remaining_time: "Time left: " |
|
30 | remaining_time: "Time left: " |
|
31 | contest_not_started: "The contest has not started." |
|
31 | contest_not_started: "The contest has not started." |
|
32 |
|
32 | ||
|
33 | login: |
|
33 | login: |
|
34 | message: 'Please login to see the problem list' |
|
34 | message: 'Please login to see the problem list' |
You need to be logged in to leave comments.
Login now