Skip to content

It's only a example of polymer's component, use a link, a image and a filter

Notifications You must be signed in to change notification settings

GDGMonterrey/poly-icon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Poly-icon

Polymer

This is a example using polymer to create a web component to make a image, with a link and css filter.

Contents

Set up

Install bower

npm install -g bower

Install polymer

//Locate in the root's directory of repository and install dependencies
bower install

Run Server

I use python <3

//Run a server o locate this repo in a server
python -m SimpleHTTPServer

Passing Parameters

Use the component

<!DOCTYPE html>
<html>
	<head>
		<!--Import script of web components -->
  		<script src="bower_components/webcomponentsjs/webcomponents.min.js"></script>
  		<!--Import the component poly-icon -->
  		<link rel="import" href="icono-poly.html">
	</head>
	<body>
	
		<!--Use it :) -->
		<icono-poly></icono-poly>
		
		<!-- 
			url : link to web site
			image : image's url
			filter : filter css to add
			amount : accept % or px
		-->
		<icono-poly url="http://yeoman.io/"
			image="http://www.w3schools.com/images/w3logotest2.png"
			filter="grayscale"
			amount="90%">
		</icono-poly>
	</body>
</html>

About

It's only a example of polymer's component, use a link, a image and a filter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages