Skip to content

Commit

Permalink
Merge pull request #20 from eballo/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
eballo authored Oct 27, 2017
2 parents 2fcfd1d + 0e081fe commit 94eabb7
Show file tree
Hide file tree
Showing 20 changed files with 322 additions and 2,642 deletions.
29 changes: 20 additions & 9 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ module.exports = function(grunt) {
options: {
variables: {
'environment': 'work',
'configuration': 'catalunya-map-options-v2.js',
'style': 'src/css/catalunya-map-v2.css'
'configuration': 'catalunya-map-options-work.js',
'style': 'src/css/catalunya-map-v1.css'
}
}
},
prod: {
options: {
variables: {
'environment': 'production',
'configuration': 'catalunya-map-options-v1.js',
'configuration': 'catalunya-map-options-prod.js',
'style': 'src/css/catalunya-map-v1.css'
}
}
Expand All @@ -38,6 +38,15 @@ module.exports = function(grunt) {
'style': 'src/css/catalunya-map-v2.css'
}
}
},
int: {
options: {
variables: {
'environment': 'int',
'configuration': 'catalunya-map-options-int.js',
'style': 'src/css/catalunya-map-v1.css'
}
}
}
},
"jsbeautifier": {
Expand Down Expand Up @@ -124,16 +133,18 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-compress');

// Task definitions
grunt.registerTask('map', ['config:map', 'clean', 'jsbeautifier', 'uglify', 'copy', 'cssmin']);
grunt.registerTask('demo', ['config:demo', 'clean', 'jsbeautifier', 'uglify', 'copy', 'cssmin']);
grunt.registerTask('work', ['config:work', 'clean', 'jsbeautifier', 'uglify', 'copy', 'cssmin']);
grunt.registerTask('prod', ['config:prod', 'clean', 'jsbeautifier', 'uglify', 'copy', 'cssmin']);
grunt.registerTask('map', ['config:map', 'jsbeautifier', 'uglify', 'copy', 'cssmin']);
grunt.registerTask('demo', ['config:demo', 'jsbeautifier', 'uglify', 'copy', 'cssmin']);
grunt.registerTask('work', ['config:work', 'jsbeautifier', 'uglify', 'copy', 'cssmin']);
grunt.registerTask('prod', ['config:prod', 'jsbeautifier', 'uglify', 'copy', 'cssmin']);
grunt.registerTask('int', ['config:int', 'jsbeautifier', 'uglify', 'copy', 'cssmin']);

grunt.registerTask('demo-compress',['demo','compress']);
grunt.registerTask('work-compress',['work','compress']);
grunt.registerTask('prod-compress',['prod','compress']);
grunt.registerTask('int-compress', ['int','compress']);

grunt.registerTask('release', ['demo-compress','work-compress','prod-compress','default']);
grunt.registerTask('release', ['clean','demo-compress','work-compress','prod-compress','int-compress','default']);

grunt.registerTask('default', ['map']);
grunt.registerTask('default', ['clean','map']);
};
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ Interactive vectorial map of Catalunya based on a SVG/VML and the library Rapha
- [Demo v6.2](http://demo.catalunyamedieval.es/map62)
- [Demo v7.0](http://demo.catalunyamedieval.es/map7)
- [Demo v7.1](http://demo.catalunyamedieval.es/map71)
- [Demo v7.2](http://demo.catalunyamedieval.es/map71)
- [Demo v7.3](http://demo.catalunyamedieval.es/map71)
- [Demo v7.2](http://demo.catalunyamedieval.es/map72)
- [Demo v7.3](http://demo.catalunyamedieval.es/map73)
- [Demo v7.4](http://demo.catalunyamedieval.es/map74)

## How to create a Map using a SVG file

Expand Down Expand Up @@ -186,6 +187,9 @@ v7.3
- refactor
- sonar fixes

v7.4
- configuracion text mes gran.

## Webs using this map:
- [blog cimasdestacables](http://cimasdestacables.blogspot.com/p/mapa-comarcal-de-catalunya.html)
- [catalunya medieval](http://www.catalunyamedieval.es)
Expand Down
2 changes: 1 addition & 1 deletion assets/css/catalunya-map/catalunya-map.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/catalunya-map/bootstrap.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/catalunya-map/catalunya-map-init.min.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/*! Generated 01-09-2017 */
/*! Generated 27-10-2017 */

!function(a,n){$.ajax({url:n.URL_JSON,dataType:"json",async:!0,success:function(a){n.create(n.MAP_OPTIONS,a).loadMapAndText()}})}(window,window.Catmap);
17 changes: 9 additions & 8 deletions assets/js/catalunya-map/catalunya-map-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

catmap.MAP_OPTIONS = {

colorIn: '#fee8cb', //color when the mouse is over
colorIn: '#d1eafe', //color when the mouse is over
colorOut: '#fff', //color when the mouse is not over

scale: 0.8, //scale value
Expand All @@ -33,8 +33,8 @@
newWindow: false, //enable/disable open a page in a new window for onClick functionality

comarcaAttr: { //comarca style configuration
fill: '#fff',
stroke: '#c7ab89', //color for the limit line of comarca (clear brown)
fill: '#fff', //white
stroke: '#abacae', //soft grey
'stroke-width': 0.8,
'stroke-linejoin': 'round',
'font-family': 'Verdana',
Expand All @@ -45,21 +45,21 @@
},

nomComcarcaAttr_in: { //nom comarca style configuration for hover in
fill: '#a07a49', //color for the text of comarca (dark brown)
fill: '#3300FF', //color for the text of comarca (dark blue)
stroke: '#000000', //black
'stroke-width': 0.4,
'font-family': 'Verdana',
'font-size': '12px',
'font-size': '14px',
'font-weight': 'bold',
'cursor': 'pointer',
'z-index': 20
},

nomComcarcaAttr_out: { //nom comarca style configuration for hover out
fill: '#a07a49',
fill: '#686868', // grey
'stroke-width': 0,
'font-family': 'Verdana',
'font-size': '12px',
'font-size': '14px',
'font-weight': 'bold',
'cursor': 'pointer',
'z-index': 20
Expand All @@ -68,7 +68,8 @@
nomCapitalAttr: { //nom capital comarca style configuration
fill: '#FF9900', //orange
"font-family": "Arial, sans-serif",
"font-size": "10px",
"font-size": "12px",
'font-weight': 'bold',
'cursor': 'pointer',
'z-index': 30
}
Expand Down
1,305 changes: 1 addition & 1,304 deletions assets/js/catalunya-map/catalunya-map-path.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/catalunya-map/catalunya-map.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/js/catalunya-map/jquery-3.2.1.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/catalunya-map/scale.raphael.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>

<head>
<title>Interactive Map of Catalunya SVG/VML and RaphaëlJs - Demo V7.3</title>
<title>Interactive Map of Catalunya SVG/VML and RaphaëlJs - Demo V7.4</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="SVG/VML Interactive Catalunya Map">
<meta name="author" content="Enric Ballo">
Expand Down Expand Up @@ -32,7 +32,7 @@

<body>

<h1 class="page-header">Interactive Map of Catalunya SVG/VML and RaphaëlJs - Demo v7.3</h1>
<h1 class="page-header">Interactive Map of Catalunya SVG/VML and RaphaëlJs - Demo v7.4</h1>

<div id="container row">

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "catalunya-map",
"version": "7.0.0",
"version": "7.4.0",
"description": "Interactive vectorial map of Catalunya using GoogleMaps library.",
"main": "index.js",
"scripts": {
Expand Down
27 changes: 27 additions & 0 deletions src/css/catalunya-map-v1.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@
padding: 0 0 10px 0;
}

.llistaComarques{
margin: 0;
padding: 0;
}
.llistaComarques ul{
margin: 0;
padding: 0;
}

.llistat-edificis {
margin: 0;
width: 100%;
Expand Down Expand Up @@ -146,6 +155,24 @@
font-weight: bold;
}

.list-group-item>.badge {
float: right;
}

.badge {
display: inline-block;
min-width: 10px;
padding: 3px 7px;
font-size: 12px;
font-weight: 700;
line-height: 1;
color: #fff;
text-align: center;
white-space: nowrap;
vertical-align: middle;
background-color: #777;
border-radius: 10px;
}

/* Active state animation keyframes below */

Expand Down
9 changes: 9 additions & 0 deletions src/css/catalunya-map-v2.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@
padding: 0 0 10px 0;
}

.llistaComarques{
margin: 0;
padding: 0;
}
.llistaComarques ul{
margin: 0;
padding: 0;
}

.llistat-edificis {
width: 100%;
padding: 0;
Expand Down
77 changes: 77 additions & 0 deletions src/js/catalunya-map-options-int.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
//---------------------------
// Configuration values
//---------------------------

(function(window, catmap) {

catmap.URL_JSON = "https://int.catalunyamedieval.es/wp-content/themes/catalunyamedieval/assets/js/catalunya-map/catalunya-map-path.json";

catmap.MAP_OPTIONS = {

colorIn: '#d1eafe', //color when the mouse is over
colorOut: '#fff', //color when the mouse is not over

scale: 0.8, //scale value

mapInitWidth: 825, //initial map width
mapInitHeight: 800, //initial map height

textInitWidth: 250, //initial text width

mapWidth: 825, //map width variable
mapHeight: 800, //map height variable

debug: false, //enable/disable debug mode
responsive: true, //enable/disable responsive funcionality
useText: true, //enable/disable list text comarques

button: true, //enable/disable button functionality

//if no button functionality
onClick: false, //enable/disable onclick open link
newWindow: false, //enable/disable open a page in a new window for onClick functionality

comarcaAttr: { //comarca style configuration
fill: '#fff', //white
stroke: '#abacae', //soft grey
'stroke-width': 0.8,
'stroke-linejoin': 'round',
'font-family': 'Verdana',
'font-size': '19px',
'font-weight': 'bold',
'cursor': 'pointer',
'z-index': 10
},

nomComcarcaAttr_in: { //nom comarca style configuration for hover in
fill: '#3300FF', //color for the text of comarca (dark blue)
stroke: '#000000', //black
'stroke-width': 0.4,
'font-family': 'Verdana',
'font-size': '14px',
'font-weight': 'bold',
'cursor': 'pointer',
'z-index': 20
},

nomComcarcaAttr_out: { //nom comarca style configuration for hover out
fill: '#686868', // grey
'stroke-width': 0,
'font-family': 'Verdana',
'font-size': '14px',
'font-weight': 'bold',
'cursor': 'pointer',
'z-index': 20
},

nomCapitalAttr: { //nom capital comarca style configuration
fill: '#FF9900', //orange
"font-family": "Arial, sans-serif",
"font-size": "12px",
'cursor': 'pointer',
'font-weight': 'bold',
'z-index': 30
}
};

}(window, window.Catmap || (window.Catmap = {})));
Loading

0 comments on commit 94eabb7

Please sign in to comment.