├── README.md ├── bower.json ├── hexagon.less ├── hexagon.min.css ├── hexagon.css └── LICENSE /README.md: -------------------------------------------------------------------------------- 1 | css-hexagon 2 | =========== 3 | 4 | A LESS script to generate CSS hexagons with custom size and color. 5 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "name": "css-hexagon", 4 | "main": "hexagon.min.css", 5 | "version": "0.0.0", 6 | "homepage": "http://db0company.github.io/css-hexagon/", 7 | "authors": [ 8 | "db0company " 9 | ], 10 | "description": "A LESS script to generate CSS hexagons with custom size and color.", 11 | "keywords": [ 12 | "css", 13 | "less", 14 | "hexagon" 15 | ], 16 | "license": "Apache2", 17 | "ignore": [ 18 | "**/.*", 19 | "node_modules", 20 | "bower_components", 21 | "test", 22 | "tests" 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /hexagon.less: -------------------------------------------------------------------------------- 1 | /***************************************************************/ 2 | /* Author: db0 (db0company@gmail.com, http://db0.fr/) */ 3 | /* Sources/Licence: https://github.com/db0company/css-hexagon */ 4 | /***************************************************************/ 5 | 6 | @xxs: 14px; 7 | @xs: 22px; 8 | @sm: 44px; 9 | @md: 64px; 10 | @lg: 88px; 11 | @xl: 120px; 12 | 13 | @default: #ebebeb; 14 | @default-hover: #cccccc; 15 | @primary: #428bca; 16 | @primary-hover: #3276b1; 17 | @success: #5cb85c; 18 | @success-hover: #47a447; 19 | @info: #5bc0de; 20 | @info-hover: #39b3d7; 21 | @warning: #f0ad4e; 22 | @warning-hover: #ed9c28; 23 | @danger: #d9534f; 24 | @danger-hover: #d2322d; 25 | 26 | @fontmultiply: 0.7; 27 | 28 | // *********************************************************** // 29 | // Hexagon // 30 | // *********************************************************** // 31 | 32 | .hexagon-content(@size, @color: white) { 33 | color: @color; 34 | text-align: center; 35 | font-size: @size * @fontmultiply; 36 | &:hover { 37 | color: @color; 38 | text-decoration: none; 39 | } 40 | } 41 | 42 | .hexagon(@side : @md, @color : @default) { 43 | .hexagon-content(@side); 44 | @radius: @side * 0.86602540378; 45 | margin: (@side / 2) 0; 46 | width: @radius * 2; 47 | height: @side; 48 | background-color: @color; 49 | position: relative; 50 | display: block; 51 | &:before, &:after { 52 | content: " "; 53 | width: 0; 54 | height: 0; 55 | position: absolute; 56 | border-left: @radius solid transparent; 57 | border-right: @radius solid transparent; 58 | left: 0; 59 | } 60 | &:before { 61 | border-bottom: (@side / 2) solid @color; 62 | top: (@side / 2 * -1); 63 | } 64 | &:after { 65 | border-top: (@side / 2) solid @color; 66 | bottom: (@side / 2 * -1); 67 | } 68 | } 69 | 70 | .hexagon-changecolor(@color) { 71 | background-color: @color; 72 | &:before { 73 | border-bottom-color: @color; 74 | } 75 | &:after { 76 | border-top-color: @color; 77 | } 78 | } 79 | 80 | /***************************************************************/ 81 | /* Sizes */ 82 | /***************************************************************/ 83 | 84 | /* Extra Extra Small */ 85 | .hexagon-xxs { 86 | .hexagon(@xxs); 87 | } 88 | /* Extra Small */ 89 | .hexagon-xs { 90 | .hexagon(@xs); 91 | } 92 | /* Small */ 93 | .hexagon-sm { 94 | .hexagon(@sm); 95 | } 96 | /* Medium */ 97 | .hexagon-md { 98 | .hexagon(@md); 99 | } 100 | /* Large */ 101 | .hexagon-lg { 102 | .hexagon(@lg); 103 | } 104 | /* Extra large */ 105 | .hexagon-xl { 106 | .hexagon(@xl); 107 | } 108 | 109 | /***************************************************************/ 110 | /* Colors */ 111 | /***************************************************************/ 112 | 113 | /* Default */ 114 | .hexagon-default { 115 | .hexagon-changecolor(@default); 116 | &.hexagon-hover:hover { 117 | .hexagon-changecolor(@default-hover); 118 | } 119 | } 120 | /* Primary */ 121 | .hexagon-primary { 122 | .hexagon-changecolor(@primary); 123 | &.hexagon-hover:hover { 124 | .hexagon-changecolor(@primary-hover); 125 | } 126 | } 127 | /* Success */ 128 | .hexagon-success { 129 | .hexagon-changecolor(@success); 130 | &.hexagon-hover:hover { 131 | .hexagon-changecolor(@success-hover); 132 | } 133 | } 134 | /* Info */ 135 | .hexagon-info { 136 | .hexagon-changecolor(@info); 137 | &.hexagon-hover:hover { 138 | .hexagon-changecolor(@info-hover); 139 | } 140 | } 141 | /* Warning */ 142 | .hexagon-warning { 143 | .hexagon-changecolor(@warning); 144 | &.hexagon-hover:hover { 145 | .hexagon-changecolor(@warning-hover); 146 | } 147 | } 148 | /* Danger */ 149 | .hexagon-danger { 150 | .hexagon-changecolor(@danger); 151 | &.hexagon-hover:hover { 152 | .hexagon-changecolor(@danger-hover); 153 | } 154 | } 155 | 156 | /***************************************************************/ 157 | /* Inline */ 158 | /***************************************************************/ 159 | .hexagon-inline { 160 | display: inline-block; 161 | } 162 | -------------------------------------------------------------------------------- /hexagon.min.css: -------------------------------------------------------------------------------- 1 | /***************************************************************/ 2 | /* Author: db0 (db0company@gmail.com, http://db0.fr/) */ 3 | /* Sources/Licence: https://github.com/db0company/css-hexagon */ 4 | /***************************************************************/ 5 | .hexagon-xxs{color:#fff;text-align:center;font-size:9.799999999999999px;margin:7px 0;width:24.24871130584px;height:14px;background-color:#ebebeb;position:relative;display:block}.hexagon-xxs:hover{color:#fff;text-decoration:none}.hexagon-xxs:before,.hexagon-xxs:after{content:" ";width:0;height:0;position:absolute;border-left:12.12435565292px solid transparent;border-right:12.12435565292px solid transparent;left:0}.hexagon-xxs:before{border-bottom:7px solid #ebebeb;top:-7px}.hexagon-xxs:after{border-top:7px solid #ebebeb;bottom:-7px}.hexagon-xs{color:#fff;text-align:center;font-size:15.399999999999999px;margin:11px 0;width:38.10511776632px;height:22px;background-color:#ebebeb;position:relative;display:block}.hexagon-xs:hover{color:#fff;text-decoration:none}.hexagon-xs:before,.hexagon-xs:after{content:" ";width:0;height:0;position:absolute;border-left:19.05255888316px solid transparent;border-right:19.05255888316px solid transparent;left:0}.hexagon-xs:before{border-bottom:11px solid #ebebeb;top:-11px}.hexagon-xs:after{border-top:11px solid #ebebeb;bottom:-11px}.hexagon-sm{color:#fff;text-align:center;font-size:30.799999999999997px;margin:22px 0;width:76.21023553264px;height:44px;background-color:#ebebeb;position:relative;display:block}.hexagon-sm:hover{color:#fff;text-decoration:none}.hexagon-sm:before,.hexagon-sm:after{content:" ";width:0;height:0;position:absolute;border-left:38.10511776632px solid transparent;border-right:38.10511776632px solid transparent;left:0}.hexagon-sm:before{border-bottom:22px solid #ebebeb;top:-22px}.hexagon-sm:after{border-top:22px solid #ebebeb;bottom:-22px}.hexagon-md{color:#fff;text-align:center;font-size:44.8px;margin:32px 0;width:110.85125168384px;height:64px;background-color:#ebebeb;position:relative;display:block}.hexagon-md:hover{color:#fff;text-decoration:none}.hexagon-md:before,.hexagon-md:after{content:" ";width:0;height:0;position:absolute;border-left:55.42562584192px solid transparent;border-right:55.42562584192px solid transparent;left:0}.hexagon-md:before{border-bottom:32px solid #ebebeb;top:-32px}.hexagon-md:after{border-top:32px solid #ebebeb;bottom:-32px}.hexagon-lg{color:#fff;text-align:center;font-size:61.599999999999994px;margin:44px 0;width:152.42047106528px;height:88px;background-color:#ebebeb;position:relative;display:block}.hexagon-lg:hover{color:#fff;text-decoration:none}.hexagon-lg:before,.hexagon-lg:after{content:" ";width:0;height:0;position:absolute;border-left:76.21023553264px solid transparent;border-right:76.21023553264px solid transparent;left:0}.hexagon-lg:before{border-bottom:44px solid #ebebeb;top:-44px}.hexagon-lg:after{border-top:44px solid #ebebeb;bottom:-44px}.hexagon-xl{color:#fff;text-align:center;font-size:84px;margin:60px 0;width:207.8460969072px;height:120px;background-color:#ebebeb;position:relative;display:block}.hexagon-xl:hover{color:#fff;text-decoration:none}.hexagon-xl:before,.hexagon-xl:after{content:" ";width:0;height:0;position:absolute;border-left:103.9230484536px solid transparent;border-right:103.9230484536px solid transparent;left:0}.hexagon-xl:before{border-bottom:60px solid #ebebeb;top:-60px}.hexagon-xl:after{border-top:60px solid #ebebeb;bottom:-60px}.hexagon-default{background-color:#ebebeb}.hexagon-default:before{border-bottom-color:#ebebeb}.hexagon-default:after{border-top-color:#ebebeb}.hexagon-default.hexagon-hover:hover{background-color:#ccc}.hexagon-default.hexagon-hover:hover:before{border-bottom-color:#ccc}.hexagon-default.hexagon-hover:hover:after{border-top-color:#ccc}.hexagon-primary{background-color:#428bca}.hexagon-primary:before{border-bottom-color:#428bca}.hexagon-primary:after{border-top-color:#428bca}.hexagon-primary.hexagon-hover:hover{background-color:#3276b1}.hexagon-primary.hexagon-hover:hover:before{border-bottom-color:#3276b1}.hexagon-primary.hexagon-hover:hover:after{border-top-color:#3276b1}.hexagon-success{background-color:#5cb85c}.hexagon-success:before{border-bottom-color:#5cb85c}.hexagon-success:after{border-top-color:#5cb85c}.hexagon-success.hexagon-hover:hover{background-color:#47a447}.hexagon-success.hexagon-hover:hover:before{border-bottom-color:#47a447}.hexagon-success.hexagon-hover:hover:after{border-top-color:#47a447}.hexagon-info{background-color:#5bc0de}.hexagon-info:before{border-bottom-color:#5bc0de}.hexagon-info:after{border-top-color:#5bc0de}.hexagon-info.hexagon-hover:hover{background-color:#39b3d7}.hexagon-info.hexagon-hover:hover:before{border-bottom-color:#39b3d7}.hexagon-info.hexagon-hover:hover:after{border-top-color:#39b3d7}.hexagon-warning{background-color:#f0ad4e}.hexagon-warning:before{border-bottom-color:#f0ad4e}.hexagon-warning:after{border-top-color:#f0ad4e}.hexagon-warning.hexagon-hover:hover{background-color:#ed9c28}.hexagon-warning.hexagon-hover:hover:before{border-bottom-color:#ed9c28}.hexagon-warning.hexagon-hover:hover:after{border-top-color:#ed9c28}.hexagon-danger{background-color:#d9534f}.hexagon-danger:before{border-bottom-color:#d9534f}.hexagon-danger:after{border-top-color:#d9534f}.hexagon-danger.hexagon-hover:hover{background-color:#d2322d}.hexagon-danger.hexagon-hover:hover:before{border-bottom-color:#d2322d}.hexagon-danger.hexagon-hover:hover:after{border-top-color:#d2322d}.hexagon-inline{display:inline-block} -------------------------------------------------------------------------------- /hexagon.css: -------------------------------------------------------------------------------- 1 | /***************************************************************/ 2 | /* Author: db0 (db0company@gmail.com, http://db0.fr/) */ 3 | /* Sources/Licence: https://github.com/db0company/css-hexagon */ 4 | /***************************************************************/ 5 | /***************************************************************/ 6 | /* Sizes */ 7 | /***************************************************************/ 8 | /* Extra Extra Small */ 9 | .hexagon-xxs { 10 | color: #ffffff; 11 | text-align: center; 12 | font-size: 9.799999999999999px; 13 | margin: 7px 0; 14 | width: 24.24871130584px; 15 | height: 14px; 16 | background-color: #ebebeb; 17 | position: relative; 18 | display: block; 19 | } 20 | .hexagon-xxs:hover { 21 | color: #ffffff; 22 | text-decoration: none; 23 | } 24 | .hexagon-xxs:before, 25 | .hexagon-xxs:after { 26 | content: " "; 27 | width: 0; 28 | height: 0; 29 | position: absolute; 30 | border-left: 12.12435565292px solid transparent; 31 | border-right: 12.12435565292px solid transparent; 32 | left: 0; 33 | } 34 | .hexagon-xxs:before { 35 | border-bottom: 7px solid #ebebeb; 36 | top: -7px; 37 | } 38 | .hexagon-xxs:after { 39 | border-top: 7px solid #ebebeb; 40 | bottom: -7px; 41 | } 42 | /* Extra Small */ 43 | .hexagon-xs { 44 | color: #ffffff; 45 | text-align: center; 46 | font-size: 15.399999999999999px; 47 | margin: 11px 0; 48 | width: 38.10511776632px; 49 | height: 22px; 50 | background-color: #ebebeb; 51 | position: relative; 52 | display: block; 53 | } 54 | .hexagon-xs:hover { 55 | color: #ffffff; 56 | text-decoration: none; 57 | } 58 | .hexagon-xs:before, 59 | .hexagon-xs:after { 60 | content: " "; 61 | width: 0; 62 | height: 0; 63 | position: absolute; 64 | border-left: 19.05255888316px solid transparent; 65 | border-right: 19.05255888316px solid transparent; 66 | left: 0; 67 | } 68 | .hexagon-xs:before { 69 | border-bottom: 11px solid #ebebeb; 70 | top: -11px; 71 | } 72 | .hexagon-xs:after { 73 | border-top: 11px solid #ebebeb; 74 | bottom: -11px; 75 | } 76 | /* Small */ 77 | .hexagon-sm { 78 | color: #ffffff; 79 | text-align: center; 80 | font-size: 30.799999999999997px; 81 | margin: 22px 0; 82 | width: 76.21023553264px; 83 | height: 44px; 84 | background-color: #ebebeb; 85 | position: relative; 86 | display: block; 87 | } 88 | .hexagon-sm:hover { 89 | color: #ffffff; 90 | text-decoration: none; 91 | } 92 | .hexagon-sm:before, 93 | .hexagon-sm:after { 94 | content: " "; 95 | width: 0; 96 | height: 0; 97 | position: absolute; 98 | border-left: 38.10511776632px solid transparent; 99 | border-right: 38.10511776632px solid transparent; 100 | left: 0; 101 | } 102 | .hexagon-sm:before { 103 | border-bottom: 22px solid #ebebeb; 104 | top: -22px; 105 | } 106 | .hexagon-sm:after { 107 | border-top: 22px solid #ebebeb; 108 | bottom: -22px; 109 | } 110 | /* Medium */ 111 | .hexagon-md { 112 | color: #ffffff; 113 | text-align: center; 114 | font-size: 44.8px; 115 | margin: 32px 0; 116 | width: 110.85125168384px; 117 | height: 64px; 118 | background-color: #ebebeb; 119 | position: relative; 120 | display: block; 121 | } 122 | .hexagon-md:hover { 123 | color: #ffffff; 124 | text-decoration: none; 125 | } 126 | .hexagon-md:before, 127 | .hexagon-md:after { 128 | content: " "; 129 | width: 0; 130 | height: 0; 131 | position: absolute; 132 | border-left: 55.42562584192px solid transparent; 133 | border-right: 55.42562584192px solid transparent; 134 | left: 0; 135 | } 136 | .hexagon-md:before { 137 | border-bottom: 32px solid #ebebeb; 138 | top: -32px; 139 | } 140 | .hexagon-md:after { 141 | border-top: 32px solid #ebebeb; 142 | bottom: -32px; 143 | } 144 | /* Large */ 145 | .hexagon-lg { 146 | color: #ffffff; 147 | text-align: center; 148 | font-size: 61.599999999999994px; 149 | margin: 44px 0; 150 | width: 152.42047106528px; 151 | height: 88px; 152 | background-color: #ebebeb; 153 | position: relative; 154 | display: block; 155 | } 156 | .hexagon-lg:hover { 157 | color: #ffffff; 158 | text-decoration: none; 159 | } 160 | .hexagon-lg:before, 161 | .hexagon-lg:after { 162 | content: " "; 163 | width: 0; 164 | height: 0; 165 | position: absolute; 166 | border-left: 76.21023553264px solid transparent; 167 | border-right: 76.21023553264px solid transparent; 168 | left: 0; 169 | } 170 | .hexagon-lg:before { 171 | border-bottom: 44px solid #ebebeb; 172 | top: -44px; 173 | } 174 | .hexagon-lg:after { 175 | border-top: 44px solid #ebebeb; 176 | bottom: -44px; 177 | } 178 | /* Extra large */ 179 | .hexagon-xl { 180 | color: #ffffff; 181 | text-align: center; 182 | font-size: 84px; 183 | margin: 60px 0; 184 | width: 207.8460969072px; 185 | height: 120px; 186 | background-color: #ebebeb; 187 | position: relative; 188 | display: block; 189 | } 190 | .hexagon-xl:hover { 191 | color: #ffffff; 192 | text-decoration: none; 193 | } 194 | .hexagon-xl:before, 195 | .hexagon-xl:after { 196 | content: " "; 197 | width: 0; 198 | height: 0; 199 | position: absolute; 200 | border-left: 103.9230484536px solid transparent; 201 | border-right: 103.9230484536px solid transparent; 202 | left: 0; 203 | } 204 | .hexagon-xl:before { 205 | border-bottom: 60px solid #ebebeb; 206 | top: -60px; 207 | } 208 | .hexagon-xl:after { 209 | border-top: 60px solid #ebebeb; 210 | bottom: -60px; 211 | } 212 | /***************************************************************/ 213 | /* Colors */ 214 | /***************************************************************/ 215 | /* Default */ 216 | .hexagon-default { 217 | background-color: #ebebeb; 218 | } 219 | .hexagon-default:before { 220 | border-bottom-color: #ebebeb; 221 | } 222 | .hexagon-default:after { 223 | border-top-color: #ebebeb; 224 | } 225 | .hexagon-default.hexagon-hover:hover { 226 | background-color: #cccccc; 227 | } 228 | .hexagon-default.hexagon-hover:hover:before { 229 | border-bottom-color: #cccccc; 230 | } 231 | .hexagon-default.hexagon-hover:hover:after { 232 | border-top-color: #cccccc; 233 | } 234 | /* Primary */ 235 | .hexagon-primary { 236 | background-color: #428bca; 237 | } 238 | .hexagon-primary:before { 239 | border-bottom-color: #428bca; 240 | } 241 | .hexagon-primary:after { 242 | border-top-color: #428bca; 243 | } 244 | .hexagon-primary.hexagon-hover:hover { 245 | background-color: #3276b1; 246 | } 247 | .hexagon-primary.hexagon-hover:hover:before { 248 | border-bottom-color: #3276b1; 249 | } 250 | .hexagon-primary.hexagon-hover:hover:after { 251 | border-top-color: #3276b1; 252 | } 253 | /* Success */ 254 | .hexagon-success { 255 | background-color: #5cb85c; 256 | } 257 | .hexagon-success:before { 258 | border-bottom-color: #5cb85c; 259 | } 260 | .hexagon-success:after { 261 | border-top-color: #5cb85c; 262 | } 263 | .hexagon-success.hexagon-hover:hover { 264 | background-color: #47a447; 265 | } 266 | .hexagon-success.hexagon-hover:hover:before { 267 | border-bottom-color: #47a447; 268 | } 269 | .hexagon-success.hexagon-hover:hover:after { 270 | border-top-color: #47a447; 271 | } 272 | /* Info */ 273 | .hexagon-info { 274 | background-color: #5bc0de; 275 | } 276 | .hexagon-info:before { 277 | border-bottom-color: #5bc0de; 278 | } 279 | .hexagon-info:after { 280 | border-top-color: #5bc0de; 281 | } 282 | .hexagon-info.hexagon-hover:hover { 283 | background-color: #39b3d7; 284 | } 285 | .hexagon-info.hexagon-hover:hover:before { 286 | border-bottom-color: #39b3d7; 287 | } 288 | .hexagon-info.hexagon-hover:hover:after { 289 | border-top-color: #39b3d7; 290 | } 291 | /* Warning */ 292 | .hexagon-warning { 293 | background-color: #f0ad4e; 294 | } 295 | .hexagon-warning:before { 296 | border-bottom-color: #f0ad4e; 297 | } 298 | .hexagon-warning:after { 299 | border-top-color: #f0ad4e; 300 | } 301 | .hexagon-warning.hexagon-hover:hover { 302 | background-color: #ed9c28; 303 | } 304 | .hexagon-warning.hexagon-hover:hover:before { 305 | border-bottom-color: #ed9c28; 306 | } 307 | .hexagon-warning.hexagon-hover:hover:after { 308 | border-top-color: #ed9c28; 309 | } 310 | /* Danger */ 311 | .hexagon-danger { 312 | background-color: #d9534f; 313 | } 314 | .hexagon-danger:before { 315 | border-bottom-color: #d9534f; 316 | } 317 | .hexagon-danger:after { 318 | border-top-color: #d9534f; 319 | } 320 | .hexagon-danger.hexagon-hover:hover { 321 | background-color: #d2322d; 322 | } 323 | .hexagon-danger.hexagon-hover:hover:before { 324 | border-bottom-color: #d2322d; 325 | } 326 | .hexagon-danger.hexagon-hover:hover:after { 327 | border-top-color: #d2322d; 328 | } 329 | /***************************************************************/ 330 | /* Inline */ 331 | /***************************************************************/ 332 | .hexagon-inline { 333 | display: inline-block; 334 | } 335 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | --------------------------------------------------------------------------------