{"id":15379861,"url":"https://github.com/tdumitrescu/angular-blocky-text","last_synced_at":"2026-05-10T08:40:52.497Z","repository":{"id":12574053,"uuid":"15244631","full_name":"tdumitrescu/angular-blocky-text","owner":"tdumitrescu","description":"AngularJS component which splits text into single-char spans for special display","archived":false,"fork":false,"pushed_at":"2013-12-17T18:27:10.000Z","size":140,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-13T06:19:32.253Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tdumitrescu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-12-17T04:00:03.000Z","updated_at":"2019-01-10T05:51:31.000Z","dependencies_parsed_at":"2022-09-23T08:11:35.815Z","dependency_job_id":null,"html_url":"https://github.com/tdumitrescu/angular-blocky-text","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdumitrescu%2Fangular-blocky-text","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdumitrescu%2Fangular-blocky-text/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdumitrescu%2Fangular-blocky-text/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdumitrescu%2Fangular-blocky-text/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tdumitrescu","download_url":"https://codeload.github.com/tdumitrescu/angular-blocky-text/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241582552,"owners_count":19985845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T14:20:09.190Z","updated_at":"2026-05-10T08:40:52.455Z","avatar_url":"https://github.com/tdumitrescu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/tdumitrescu/angular-blocky-text.png?branch=master)](https://travis-ci.org/tdumitrescu/angular-blocky-text)\n\n# angular-blocky-text\n\nAn AngularJS Bower component which transforms simple text into a character-by-character list of stylable HTML spans.\n\nSometimes a custom font just isn't enough, and you need more intricate CSS control over the appearance and behavior of each character. This works especially well for scoreboard-style numeric values, like this:\n\n![blocky-text sample](sample-img.png \"blocky-text sample\")\n\n## Usage\n\n- Install into your app with Bower:\n\n```sh\n$ bower install --save angular-blocky-text\n```\n\n- Require the component code in `bower_components/angular-blocky-text/blocky-text.js`\n\n- Declare module dependency `tdumitrescu.blocky-text` in your Angular app:\n\n```javascript\nangular.module('myApp', ['tdumitrescu.blocky-text']);\n```\n\n- Use directive `td-blocky-text` in your markup:\n\n```html\n\u003ctd-blocky-text text=\"highScore()\" divider=\".\"/\u003e\n```\n\nThe `divider` attribute is optional and specifies a character which can have special styles applied, e.g., the `:` in `05:13`, or `/` in `12/21/2013`.\n\nThis will expand as follows when `$scope.highScore()` returns 13.2:\n\n```html\n\u003cspan class=\"td-blocky-text\"\u003e\n  \u003cspan class=\"td-blocky-text-char\"\u003e1\u003c/span\u003e\n  \u003cspan class=\"td-blocky-text-char\"\u003e3\u003c/span\u003e\n  \u003cspan class=\"td-blocky-text-char divider\"\u003e.\u003c/span\u003e\n  \u003cspan class=\"td-blocky-text-char\"\u003e2\u003c/span\u003e\n\u003c/span\u003e\n```\n\n- Style the CSS class `td-blocky-text-char` and `td-blocky-text-char divider` as desired to apply a style to each character:\n\n```css\n.td-blocky-text-char {\n  display:       inline-block;\n  width:         1em;\n  height:        1.5em;\n\n  margin-left:   1px;\n  margin-right:  1px;\n  padding:       2px;\n  text-align:    center;\n\n  color:            white;\n  background-color: red;\n  border:           1px solid red;\n }\n\n.td-blocky-text-char.divider {\n  width:  0.5em;\n  border: 0px;\n\n  color:            white;\n  background-color: transparent;\n}\n```\n\n## Running tests\n\n```sh\n$ npm test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftdumitrescu%2Fangular-blocky-text","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftdumitrescu%2Fangular-blocky-text","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftdumitrescu%2Fangular-blocky-text/lists"}