Skip to content

Commit

Permalink
Merge pull request #1 from ZsoltMONOLITE/withsearch
Browse files Browse the repository at this point in the history
search test
  • Loading branch information
ZsoltMONOLITE authored Dec 4, 2023
2 parents 2a773dc + d724119 commit 26a6dbb
Show file tree
Hide file tree
Showing 20 changed files with 2,557 additions and 0 deletions.
115 changes: 115 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
'use strict';

module.exports = function(grunt) {

grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks("grunt-remove-logging");
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-todos');

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
meta: {
banner:
'/* \n'+
' * Leaflet Control Search v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %> \n'+
' * \n'+
' * Copyright <%= grunt.template.today("yyyy") %> <%= pkg.author.name %> \n'+
' * <%= pkg.author.email %> \n'+
' * <%= pkg.author.url %> \n'+
' * \n'+
' * Licensed under the <%= pkg.license %> license. \n'+
' * \n'+
' * Demo: \n'+
' * <%= pkg.homepage %> \n'+
' * \n'+
' * Source: \n'+
' * <%= pkg.repository.url %> \n'+
' * \n'+
' */\n'
},
clean: {
dist: {
src: ['dist/*']
}
},
removelogging: {
dist: {
src: 'dist/*.js'
}
},
jshint: {
options: {
esversion: 6,
globals: {
'no-console': true,
module: true
},
'-W099': true,
'-W033': true,
'-W044': true,
'-W104': true,
},
files: ['src/*.js']
},
concat: {
options: {
banner: '<%= meta.banner %>'
},
dist: {
files: {
'dist/leaflet-search.src.js': ['src/leaflet-search.js'],
'dist/leaflet-search.src.css': ['src/leaflet-search.css'],
'dist/leaflet-search.mobile.src.css': ['src/leaflet-search.mobile.css']
}
}
},
uglify: {
dist: {
files: {
'dist/leaflet-search.min.js': ['dist/leaflet-search.src.js']
}
}
},
cssmin: {
combine: {
files: {
'dist/leaflet-search.min.css': ['src/leaflet-search.css'],
'dist/leaflet-search.mobile.min.css': ['src/leaflet-search.mobile.css']
}
},
options: {
banner: '<%= meta.banner %>'
},
minify: {
expand: true,
cwd: 'dist/',
files: {
'dist/leaflet-search.min.css': ['src/leaflet-search.css'],
'dist/leaflet-search.mobile.min.css': ['src/leaflet-search.mobile.css']
}
}
},
watch: {
dist: {
options: { livereload: true },
files: ['src/*'],
tasks: ['clean','concat','cssmin','jshint']
}
}
});

grunt.registerTask('default', [
'clean',
'concat',
'cssmin',
'removelogging',
'jshint',
'uglify'
]);

};
120 changes: 120 additions & 0 deletions css/leaflet-search.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@

.leaflet-container .leaflet-control-search {
position:relative;
float:left;
background:#fff;
color:#1978cf;
border: 2px solid rgba(0,0,0,0.2);
background-clip: padding-box;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
background-color: rgba(255, 255, 255, 0.8);
z-index:1000;
margin-left: 10px;
margin-top: 10px;
}
.leaflet-control-search.search-exp {/*expanded*/
background: #fff;
border: 2px solid rgba(0,0,0,0.2);
background-clip: padding-box;
}
.leaflet-control-search .search-input {
display:block;
float:left;
background: #fff;
border:1px solid #666;
border-radius:2px;
height:22px;
padding:0 20px 0 2px;
margin:4px 0 4px 4px;
}
.leaflet-control-search.search-load .search-input {
background: url('../images/loader.gif') no-repeat center right #fff;
}
.leaflet-control-search.search-load .search-cancel {
visibility:hidden;
}
.leaflet-control-search .search-cancel {
display:block;
width:22px;
height:22px;
position:absolute;
right:28px;
margin:6px 0;
background: url('../images/search-icon.png') no-repeat 0 -46px;
text-decoration:none;
filter: alpha(opacity=80);
opacity: 0.8;
}
.leaflet-control-search .search-cancel:hover {
filter: alpha(opacity=100);
opacity: 1;
}
.leaflet-control-search .search-cancel span {
display:none;/* comment for cancel button imageless */
font-size:18px;
line-height:20px;
color:#ccc;
font-weight:bold;
}
.leaflet-control-search .search-cancel:hover span {
color:#aaa;
}
.leaflet-control-search .search-button {
display:block;
float:left;
width:30px;
height:30px;
background: url('../images/search-icon.png') no-repeat 4px 4px #fff;
border-radius:4px;
}
.leaflet-control-search .search-button:hover {
background: url('../images/search-icon.png') no-repeat 4px -20px #fafafa;
}
.leaflet-control-search .search-tooltip {
position:absolute;
top:100%;
left:0;
float:left;
list-style: none;
padding-left: 0;
min-width:120px;
max-height:122px;
box-shadow: 1px 1px 6px rgba(0,0,0,0.4);
background-color: rgba(0, 0, 0, 0.25);
z-index:1010;
overflow-y:auto;
overflow-x:hidden;
cursor: pointer;
}
.leaflet-control-search .search-tip {
margin:2px;
padding:2px 4px;
display:block;
color:black;
background: #eee;
border-radius:.25em;
text-decoration:none;
white-space:nowrap;
vertical-align:middle;
}
.leaflet-control-search .search-button:hover {
background-color: #f4f4f4;
}
.leaflet-control-search .search-tip-select,
.leaflet-control-search .search-tip:hover {
background-color: #fff;
}
.leaflet-control-search .search-alert {
cursor:pointer;
clear:both;
font-size:.75em;
margin-bottom:5px;
padding:0 .25em;
color:#e00;
font-weight:bold;
border-radius:.25em;
}


67 changes: 67 additions & 0 deletions css/leaflet-search.mobile.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@

/* SEARCH */
.leaflet-control.leaflet-control-search {
z-index:2000;
}
.leaflet-control-search .search-input {
display:block;
float:left;
background: #fff;
border:1px solid #666;
border-radius:2px;
height:24px;
font-size:1.25em;
padding:0 .125em;
margin:3px;
padding-right:30px;
}
.leaflet-control-search .search-button:hover,
.leaflet-control-search .search-button {
background-image: url('../images/search-icon-mobile.png');
-webkit-border-radius: 4px;
border-radius: 4px;
background-position: 1px 1px;
width:32px;
height:32px;
}
.leaflet-control-search.search-load .search-input {
background: url('../images/loader.gif') no-repeat center right #fff;
}
.leaflet-control-search .search-cancel {
background-image: url('../images/search-icon-mobile.png');
-webkit-border-radius: 4px;
border-radius: 4px;
background-position: 0px -62px;
width:26px;
height:26px;
right:34px;
margin:3px;
}
.leaflet-control-search .search-tooltip {
max-height:142px;/*(.search-tip height * 5)*/
}
.leaflet-control-search .search-tip {
font-size:1em;
margin:2px;
padding:2px;
display:block;
color:black;
background: rgba(255,255,255,0.8);
border-radius:.25em;
text-decoration:none;
white-space:nowrap;
vertical-align:center;
}
.leaflet-control-search .search-tip .climbo-icon-mini {
float:right;
display:block;
white-space:nowrap;
}
.leaflet-control-search .search-button:hover,
.leaflet-control-search .search-tip-select,
.leaflet-control-search .search-tip:hover {
background-color: #fff;
}
.leaflet-control-search .search-alert {
font-size:1.2em;
}
83 changes: 83 additions & 0 deletions css/leaflet-search.mobile.src.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/*
* Leaflet Control Search v4.0.0 - 2023-12-04
*
* Copyright 2023 Stefano Cudini
* [email protected]
* https://opengeo.tech/
*
* Licensed under the MIT license.
*
* Demo:
* https://opengeo.tech/maps/leaflet-search/
*
* Source:
* [email protected]:stefanocudini/leaflet-search.git
*
*/

/* SEARCH */
.leaflet-control.leaflet-control-search {
z-index:2000;
}
.leaflet-control-search .search-input {
display:block;
float:left;
background: #fff;
border:1px solid #666;
border-radius:2px;
height:24px;
font-size:1.25em;
padding:0 .125em;
margin:3px;
padding-right:30px;
}
.leaflet-control-search .search-button:hover,
.leaflet-control-search .search-button {
background-image: url('../images/search-icon-mobile.png');
-webkit-border-radius: 4px;
border-radius: 4px;
background-position: 1px 1px;
width:32px;
height:32px;
}
.leaflet-control-search.search-load .search-input {
background: url('../images/loader.gif') no-repeat center right #fff;
}
.leaflet-control-search .search-cancel {
background-image: url('../images/search-icon-mobile.png');
-webkit-border-radius: 4px;
border-radius: 4px;
background-position: 0px -62px;
width:26px;
height:26px;
right:34px;
margin:3px;
}
.leaflet-control-search .search-tooltip {
max-height:142px;/*(.search-tip height * 5)*/
}
.leaflet-control-search .search-tip {
font-size:1em;
margin:2px;
padding:2px;
display:block;
color:black;
background: rgba(255,255,255,0.8);
border-radius:.25em;
text-decoration:none;
white-space:nowrap;
vertical-align:center;
}
.leaflet-control-search .search-tip .climbo-icon-mini {
float:right;
display:block;
white-space:nowrap;
}
.leaflet-control-search .search-button:hover,
.leaflet-control-search .search-tip-select,
.leaflet-control-search .search-tip:hover {
background-color: #fff;
}
.leaflet-control-search .search-alert {
font-size:1.2em;
}
Loading

0 comments on commit 26a6dbb

Please sign in to comment.