{"id":28495477,"url":"https://github.com/topbitdu/repres-hyper_text","last_synced_at":"2025-07-02T08:30:48.707Z","repository":{"id":56891843,"uuid":"56842416","full_name":"topbitdu/repres-hyper_text","owner":"topbitdu","description":"Repres (REsource PRESentation) is a series of resource representation engines. The HyperText resource presentation engine includes HyperText-based resource presentation templates \u0026 snippets. Repres (资源表现)是一系列的资源表现引擎。超文本资源表现引擎包括基于超文本的资源表现模版和片段。","archived":false,"fork":false,"pushed_at":"2017-05-15T07:04:35.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-08T11:11:32.142Z","etag":null,"topics":["hypertext","presentation","rails","repres","resource","restful"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/topbitdu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-22T09:08:43.000Z","updated_at":"2017-05-04T20:03:53.000Z","dependencies_parsed_at":"2022-08-20T16:00:56.341Z","dependency_job_id":null,"html_url":"https://github.com/topbitdu/repres-hyper_text","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/topbitdu/repres-hyper_text","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topbitdu%2Frepres-hyper_text","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topbitdu%2Frepres-hyper_text/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topbitdu%2Frepres-hyper_text/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topbitdu%2Frepres-hyper_text/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/topbitdu","download_url":"https://codeload.github.com/topbitdu/repres-hyper_text/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topbitdu%2Frepres-hyper_text/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263102411,"owners_count":23414107,"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":["hypertext","presentation","rails","repres","resource","restful"],"created_at":"2025-06-08T11:10:38.079Z","updated_at":"2025-07-02T08:30:48.685Z","avatar_url":"https://github.com/topbitdu.png","language":"Ruby","readme":"# Repres HyperText 超文本资源表现引擎\n\n[![Documentation](http://img.shields.io/badge/docs-rdoc.info-blue.svg)](http://www.rubydoc.info/gems/repres-hyper_text/frames)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](http://opensource.org/licenses/MIT)\n\n[![Gem Version](https://badge.fury.io/rb/repres-hyper_text.svg)](https://badge.fury.io/rb/repres-hyper_text)\n[![Dependency Status](https://gemnasium.com/badges/github.com/topbitdu/repres-hyper_text.svg)](https://gemnasium.com/github.com/topbitdu/repres-hyper_text)\n\nRepres (REsource PRESentation) is a series of resource presentation engines. The Hyper Text resource presentation engine includes HyperText-based resource presentation templates \u0026 snippets.\nRepres (资源表现)是一系列的资源表现引擎。超文本资源表现引擎包括基于超文本的资源表现模版和片段。\n\n\n\n## Recent Update\n\nCheck out the [Road Map](ROADMAP.md) to find out what's the next.\nCheck out the [Change Log](CHANGELOG.md) to find out what's new.\n\n\n\n## Usage in Gemfile\n\n```ruby\ngem 'repres-hyper_text'\n```\n\n\n\n## Include the Helper in your Application Controller before Render the Style or Script\n\n```ruby\nhelper Repres::HyperText::ApplicationHelper\n```\n\n\n\n## Render the Pre-defined Partials\n\n```erb\n\u003chtml\u003e\n\n  \u003chead\u003e\n\n    \u003c%= render partial: 'repres/hyper_text/meta' %\u003e\n    \u003c!-- or the following line works identically --\u003e\n    \u003c%= hyper_text_meta %\u003e\n\n    \u003c%= render partial: 'repres/hyper_text/icon' %\u003e\n    \u003c!-- or the following line works identically --\u003e\n    \u003c%= hyper_text_icon %\u003e\n\n    \u003c%= render partial: 'repres/hyper_text/style', locals: { options: { 'font-awesome' =\u003e true } } %\u003e\n    \u003c!-- or the following line works identically --\u003e\n    \u003c%= hyper_text_style 'font-awesome' =\u003e true %\u003e\n\n  \u003c/head\u003e\n\n  \u003cbody\u003e\n    \u003cdiv id='main'\u003e\u003c/div\u003e\n    \u003cdiv id='alpha-dialog'\u003e\u003c/div\u003e\n    \u003cdiv id='beta-dialog'\u003e\u003c/div\u003e\n    \u003cdiv id='gammar-dialog'\u003e\u003c/div\u003e\n\n    \u003c%= render partial: 'repres/hyper_text/script', locals: { options: { jquery: true } } %\u003e\n    \u003c!-- or the following line works identically --\u003e\n    \u003c%= hyper_text_script jquery: true %\u003e\n\n  \u003c/body\u003e\n\n\u003c/html\u003e\n```\n\n### Render the Meta\n\nThe Meta partial includes the HTML meta tags for HTML 5.\n```erb\n\u003c%= render partial: 'repres/hyper_text/meta' %\u003e\n\u003c!-- or the following line works identically --\u003e\n\u003c%= hyper_text_meta %\u003e\n```\n\nThe source codes of the Meta partial:\n```html\n\u003cmeta charset=\"UTF-8\" /\u003e\n\u003cmeta name=\"format-detection\" content=\"telephone=no\" /\u003e\n\u003cmeta name=\"msapplication-tap-highlight\" content=\"no\" /\u003e\n\u003cmeta name=\"viewport\" content=\"user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height\" /\u003e\n\u003cmeta name=\"renderer\" content=\"webkit\" /\u003e\n\u003cmeta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" /\u003e\n```\n\n### Render the Favorite Icon\n\nThe Icon partial includes the HTML link tags for Favorite Icons.\n```erb\n\u003c%= render partial: 'repres/hyper_text/icon',\n           locals: {\n             options: {\n               safari_mask_icon_color:            '#5bbad5',\n               microsoft_application_title_color: '#da532c',\n               theme_color:                       '#ffffff'\n             }\n           }\n%\u003e\n\u003c!-- or the following line works identically --\u003e\n\u003c%= hyper_text_icon safari_mask_icon_color: '#5bbad5', microsoft_application_title_color: '#da532c', theme_color: '#ffffff' %\u003e\n```\n\n### Render the Script\n\nThe Script partial includes the HTML script tags. The [Boot CDN](http://cdn.bootcss.com/) server is supported by default. However, the :cdn option could be passed in to support other CDN servers. The CDN servers must syncrhonize with [cdnjs](https://github.com/cdnjs/cdnjs).\n\nThe following code snippet does not load any JavaScript library.\n```erb\n\u003c%= render partial: 'repres/hyper_text/script' %\u003e\n\u003c!-- or the following line works identically --\u003e\n\u003c%= hyper_text_script %\u003e\n```\n\nThe following code snippet loads the latest jQuery.\n```erb\n\u003c%= render partial: 'repres/hyper_text/script', locals: { options: { jquery: true } } %\u003e\n\u003c!-- or the following line works identically --\u003e\n\u003c%= hyper_text_script jquery: true %\u003e\n```\n\nThe following code snippet loads the jQuery with the given version.\n```erb\n\u003c%= render partial: 'repres/hyper_text/script', locals: { options: { jquery: { version: '2.2.0', cdn: 'cdn.server.com' } } } %\u003e\n\u003c!-- or the following line works identically --\u003e\n\u003c%= hyper_text_script jquery: { version: '2.2.0', cdn: 'cdn.server.com' } %\u003e\n```\n\nThe following JavaScript libraries are switchable, and the version can be configurable:\n- :modernizr\n- :jquery\n- :buttons\n\n### Render the Style\n\nThe Style partial includes the HTML style tags. The [Boot CDN](http://cdn.bootcss.com/) server is supported by default. However, the :cdn option could be passed in to support other CDN servers. The CDN servers must syncrhonize with [cdnjs](https://github.com/cdnjs/cdnjs).\n\nThe following code snippet does not load any CSS library.\n```erb\n\u003c%= render partial: 'repres/hyper_text/style' %\u003e\n\u003c!-- or the following line works identically --\u003e\n\u003c%= hyper_text_style %\u003e\n```\n\nThe following code snippet loads the latest Font Awesome.\n```erb\n\u003c%= render partial: 'repres/hyper_text/script', locals: { options: { :'font-awesome' =\u003e true } } %\u003e\n\u003c!-- or the following line works identically --\u003e\n\u003c%= hyper_text_style :'font-awesome' =\u003e true %\u003e\n```\n\nThe following code snippet loads the Font Awesome with the given version.\n```erb\n\u003c%= render partial: 'repres/hyper_text/style', locals: { options: { :'font-awesome' =\u003e { version: '4.4.0', cdn: 'cdn.server.com' } } } %\u003e\n\u003c!-- or the following line works identically --\u003e\n\u003c%= hyper_text_style :'font-awesome' =\u003e { version: '4.4.0', cdn: 'cdn.server.com' } %\u003e\n```\n\nThe following CSS libraries are switchable, and the version can be configurable:\n- :'font-awesome'\n- :buttons\n- :'animate.css'\n\n\n\n## RSpec examples\n\n```ruby\n# spec/models/repres_spec.rb\nrequire 'repres/hyper_text/models_rspec'\n\n# spec/types/repres_spec.rb\nrequire 'repres/hyper_text/types_rspec'\n\n# spec/validators/repres_spec.rb\nrequire 'repres/hyper_text/validators_rspec'\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftopbitdu%2Frepres-hyper_text","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftopbitdu%2Frepres-hyper_text","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftopbitdu%2Frepres-hyper_text/lists"}