Skip to content

Commit 12ac270

Browse files
committed
managed_projects page fix fir tablet and mobile
1 parent c01192d commit 12ac270

10 files changed

+167
-24
lines changed

app/assets/stylesheets/accounts/languages.sass

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,14 @@
2323
.contributors
2424
background-color: #237b46 !important
2525
.commits
26-
background-color: #8f908f !important
26+
background-color: #8f908f !important
27+
28+
@media (max-width: 767px)
29+
#language_detail
30+
overflow-x: auto
31+
-webkit-overflow-scrolling: touch
32+
width: 100%
33+
table
34+
min-width: 600px
35+
width: max-content
36+
display: table
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
// Managed Projects Responsive Layout using Bootstrap grid
2+
3+
#managed_projects_list, #projects_index_list {
4+
.well {
5+
// Use Bootstrap's grid for main project block
6+
@media (min-width: 768px) {
7+
flex-wrap: wrap;
8+
align-items: flex-start;
9+
}
10+
@media (max-width: 767px) {
11+
display: block;
12+
}
13+
14+
h2.title {
15+
@media (min-width: 768px) {
16+
width: 100%;
17+
display: block;
18+
}
19+
@media (max-width: 767px) {
20+
width: 100%;
21+
display: block;
22+
float: none !important;
23+
}
24+
}
25+
26+
#inner_content {
27+
@media (min-width: 1200px) {
28+
flex-wrap: nowrap;
29+
width: 100%;
30+
}
31+
@media (min-width: 768px) and (max-width: 1199px) {
32+
flex-wrap: wrap;
33+
width: 100%;
34+
}
35+
@media (max-width: 767px) {
36+
display: block;
37+
width: 100%;
38+
}
39+
40+
.logo {
41+
@media (min-width: 768px) {
42+
flex: 0 0 64px;
43+
max-width: 64px;
44+
margin-right: 15px;
45+
}
46+
@media (max-width: 767px) {
47+
display: block;
48+
margin: 0 auto 10px;
49+
text-align: center;
50+
}
51+
}
52+
53+
.info, .stats, .reviews-and-pai {
54+
@media (min-width: 1200px) {
55+
flex: 1 1 0;
56+
min-width: 0;
57+
}
58+
@media (min-width: 768px) and (max-width: 1199px) {
59+
flex: 1 1 100%;
60+
min-width: 0;
61+
}
62+
@media (max-width: 767px) {
63+
display: block;
64+
}
65+
}
66+
67+
.info {
68+
@media (min-width: 1200px) {
69+
margin-left: 10px;
70+
width: 980px;
71+
}
72+
@media (max-width: 767px) {
73+
margin: 0 0 10px 0;
74+
}
75+
76+
i {
77+
float: right !important;
78+
}
79+
}
80+
81+
.stats, .reviews-and-pai {
82+
@media (min-width: 768px) {
83+
margin-left: 10px;
84+
}
85+
}
86+
}
87+
88+
.add-info, .tags {
89+
@media (max-width: 767px) {
90+
width: 100%;
91+
display: block;
92+
margin-bottom: 10px;
93+
}
94+
}
95+
96+
.licenses {
97+
@media (max-width: 767px) {
98+
text-align: left;
99+
width: 100%;
100+
display: block;
101+
margin-bottom: 10px;
102+
}
103+
}
104+
}
105+
}

app/assets/stylesheets/projects.sass

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,6 @@ $pai_levels: (('very_high',0), ('high', 1), ('moderate', 2), ('low', 3), ('very_
6161
color: #fff
6262
.logo
6363
margin: 25px 20px 25px 0
64-
.info
65-
width: 490px
66-
i
67-
float: right
6864
.claimed-by-org
6965
margin: 0 15px 0 10px
7066
.desc
@@ -77,7 +73,6 @@ $pai_levels: (('very_high',0), ('high', 1), ('moderate', 2), ('low', 3), ('very_
7773
span
7874
margin-left: 10px
7975
a
80-
width: 80px
8176
text-align: right
8277
display: inline-block
8378
font-weight: bold
@@ -105,8 +100,6 @@ $pai_levels: (('very_high',0), ('high', 1), ('moderate', 2), ('low', 3), ('very_
105100
.add-info
106101
clear: left
107102
width: 574px
108-
.main_language
109-
margin-left: 85px
110103
a
111104
text-decoration: underline
112105
.tags

app/assets/stylesheets/search-dingus.sass

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,18 @@
9999
font-size: 8px !important
100100
.global_top_search_icon
101101
font-size: 10px !important
102+
103+
@media (max-width: 767px)
104+
#search-dingus
105+
#sort_chosen
106+
width: 84px !important;
107+
108+
@media (min-width: 1200px)
109+
#search-dingus
110+
#sort_chosen
111+
width: auto !important;
112+
113+
@media (min-width: 768px) and (max-width: 1199px)
114+
#search-dingus
115+
#sort_chosen
116+
width: auto !important;

app/assets/stylesheets/streamgraph.sass

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
#ohloh_streamgraph
22
&.languages
33
height: 300px !important
4-
#ohloh_stream
5-
width: 940px !important
6-
width: 715px
4+
width: 940px
75
height: 350px !important
86
float: left
9-
margin-left: 15px
10-
margin-right: 10px
7+
margin-left: 90px
118
.highlight
12-
stroke: #663300
9+
stroke: #777472ff
1310
stroke-width: 2px
1411
.x_axis
1512
path
@@ -63,17 +60,15 @@
6360
background: asset_url('charts/watermark_692.png') no-repeat center left
6461
@media only all and (min-width: 320px) and (max-width: 480px)
6562
#ohloh_streamgraph
66-
&.languages
67-
height: 150px !important
6863
#ohloh_stream
69-
width: auto !important
70-
width: auto !important
64+
width: inherit !important
65+
width: inherit !important
7166
#streamgraph_legend
7267
font-size: 13px !important
7368
@media (min-width: 540px) and (max-width: 1024px)
7469
#ohloh_streamgraph
7570
#ohloh_stream
76-
width: auto !important
77-
width: auto !important
71+
width: inherit !important
72+
width: inherit !important
7873
#streamgraph_legend
7974
margin-right: 48px
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/* Language Graph Responsive Alignment */
2+
3+
/* Desktop view - Center the stream graph */
4+
@media (min-width: 1025px)
5+
#ohloh_streamgraph
6+
float: left !important
7+
margin-left: 120px !important
8+
margin-right: auto !important
9+
display: block
10+
.nomargin
11+
margin-left: 120px !important
12+
13+
/* Tablet and Mobile - Keep left alignment with title */
14+
@media (max-width: 1024px)
15+
#ohloh_streamgraph
16+
float: left
17+
margin-left: 0 !important
18+
margin-right: 0
19+
20+
/* Mobile specific adjustments */
21+
@media (max-width: 768px)
22+
#ohloh_streamgraph
23+
width: 100% !important
24+
margin-left: 0 !important
25+
float: none

app/views/positions/_commits_by_individual_project_highchart.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
- chart_data = ChartDecorator.new.project_commit_history(@account, position.project_id)
44
.margin_bottom_5
55
.chart-with-data{ id: "project_contributions_#{position.project_id}", 'data-value' => chart_data.as_json,
6-
'data-pname' => pname, style: 'width: 910px; height: 170px' }
6+
'data-pname' => pname, style: 'height: 170px' }

app/views/positions/_commits_by_individual_projects.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.col-xs-12.col-sm-12.col-md-6.position-item
1+
.col-xs-12.col-sm-12.col-md-12.position-item
22
%div{ class: position.decorate.analyzed_class_name }
33
%div
44
.col-xs-6.col-sm-6.col-md-6.one-project-header-left
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.padding_one_top
22
- chart_data = ChartDecorator.new.combined_commit_history(@account)
3-
.chart-with-data#all_projects{ 'data-value' => chart_data.as_json, style: 'width: 940px; height: 300px' }
3+
.chart-with-data#all_projects{ 'data-value' => chart_data.as_json, style: 'height: 300px' }

app/views/positions/index.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#positions-index-page
1414
- if @account.positions.exists?
1515
= render 'commits_by_projects_extended'
16-
.row.mezzo.padding_one_top
16+
.mezzo.padding_one_top
1717
- @positions.each do |position|
1818
= render 'commits_by_individual_projects', position: position
1919
= will_paginate @positions

0 commit comments

Comments
 (0)