Discitur Project

1 minute read

Among the features of this sprint was the inclusion of social buttons. The argument is not particularly attractive, in fact, the basic version, it comes to going on the various social networking sites and copy / paste the code presented in the developer. Some examples:  

 

But, frankly, I find the buttons prefabricated pretty ugly. And here comes my daily drama. I’m not a deb designer and these things make me crazy, I’m much too long to torture my css hoping to pull out something decent and most of the time, with poor results.

 

It’s on these occasions that the web is really helpful to me. Especially when I find sites like this: http://ostr.io/code/html-social-like-share-buttons-no-javascript.html

 

The other (more interesting) topic is linked with the directives. In fact a social button bar is a good candidate to end up in a directive, if only to keep clean the template of the page where you want to use, and, of course, to modularize your application. It’s a particularly easy directive because it requires no interaction with the “outside world” and can expose properties to receive input data necessary for sharing on various social networks.

The complete code:

template: https://github.com/williamverdolini/discitur-web/blob/master/app/modules/common/socialBar.html

directive: https://github.com/williamverdolini/discitur-web/blob/master/app/modules/common/socialBarDrv.js

   

Comments