Commit 56ff2264 authored by Angelo Chiacchio's avatar Angelo Chiacchio

Fast optimizationzation of homepage bubble for mobile

parent 2d311b6f
......@@ -45,14 +45,24 @@ svg.D3Bubbles g.bubble-wrapper:hover circle {
fill: rgba(255,255,255,0.9);
font-size: 24px;
cursor: pointer;
@media(max-width:760px) {
font-size: 18px;
}
}
#bubble-wrapper-selected text {
font-size: 16px;
@media(max-width:760px) {
font-size: 14px;
}
}
#bubble-wrapper-main text.label {
fill: rgba(255, 255, 255, 0.3);
font-size: 11px;
cursor: pointer;
@media(max-width:760px) {
font-size: 9px;
}
}
#bubble-wrapper-selected text.label {
......
......@@ -309,7 +309,7 @@ p.navbar-text {
margin-right: 20px;
font-size: 13px;
}
nav.navbar.navbar-inverse {
.navbar-inverse {
border: none;
border-radius: 0;
background-image: none;
......@@ -2397,6 +2397,19 @@ h3.user-mail {
top: 136px;
padding: 0 0 20px;
}
.banner {
height: 420px;
}
.row.show {
margin: 13px 0;
}
div.metrics {
padding: 20px 0;
a {
margin: 0;
font-size: 20px;
}
}
}
\ No newline at end of file
......@@ -546,12 +546,28 @@ function installPolyfill () {
}
var max_r = null;
if ($(window).width() < 768) {
min_r = 20;
max_r = 100;
}
else {
min_r = 30;
max_r = 180;
}
var h = null;
if ($(window).width() < 768) {
h = 358;
}
else {
h = 510;
}
function mount(options) {
var tagcloud = new D3Bubbles({
width: 'auto',
//TEMPORARY: It will be 490px when filter row will be displayed
height: 510,
height: h,
wrapper: '#tag',
container: options.selector,
data: options.data,
......@@ -560,8 +576,8 @@ function mount(options) {
bubbles_max: false,
},
radius: {
min:30,
max:180
min:min_r,
max:max_r
},
colors: {
bubbles:['#656a6e', '#4cc7c8'],
......@@ -581,6 +597,13 @@ function mount(options) {
$(window).off('resize');
$(window).on('resize', function() {
var max_r = null;
if ($(window).width() < 768) {
max_r = 100;
}
else {
max_r = 180;
}
tagcloud.redraw();
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment