Snapshot của dhg/Glue: 59★ · JavaScript. Simple prototyping
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Glue.js is for creating quick, beautiful prototypes. Here’s why it’s awesome:
HTML partials served up with AJAX
Glue lets you break up your markup into external HTML files for better organization, much like you would with CSS or JS. That means you can organize your HTML however you like, plus run and share it with just JS. No need for PHP, a Node server or anything like that.
Single-page prototype with page animations
Clicking from page to page in a Glue prototype all works without page refreshes, meaning you can use CSS to add transitions between pages. Don’t worry, you still have working, sensable URLs even though the whole prototype is technically on one page.
It’s stupid fast, easy and lightweight
Link up a single 1.5kb JS file (plus an optional 1kb CSS file) and you’re ready to go. As soon as Glue is loaded, it AJAX's any included HTML and then fades the page in as a whole. Glue's syntax was designed for semantic simplicity, so it’s extremely easy to learn and read.
Using Glue is super simple. There are only 3 things you need to know:
data-glue-src is for partials
Use the “data-glue-src” attribute on any element to replace its content with HTML from the template you specifiy when the page loads.
<div data-glue-src="navbar">
Glue-link is for links to new pages
Put a “data-glue-link” attribute on an anchor to clear the existing page and replace it with the new one you specify.
<a data-glue-link=”page2”>Go to the next page</a>
The .glue-container in your index.html is important
Any content that is going to change from page to page will be loaded into the .glue-container, so leave it in your index.html. Any templates outside of this will persist on every page.
<div class="glue-container"></div>
Get started now with just 3 super simple steps:
Download or clone Glue
You can just download the project with these docs or feel free to check out the Github page and clone it.
Run a server of any kind (don’t worry, it’s easy)
Unfortunately, all browsers consider AJAXing local files to be a security threat if not in a server environment. It’s super easy to solve this though. If you’re on a Mac, just open terminal, drag your prototype folder onto the terminal icon in your doc and run this command:
python -m SimpleHTTPServer
Alternatively, turning on web sharing, using MAMP or any other server will work. If you’re on a Windows machine …
Open your browser and go to your server address
However you set up your simple server, just point your browser at the appropriate localhost port and you should see the Glue docs. For reference, the standard python server URL will be localhost:8000.
dhg/Glue có 59 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/dhg/Glue. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
dhg/Glue có phải mã nguồn mở không?
TopGit chưa ghi nhận license cho dhg/Glue. Phần lớn repo public trên GitHub là mã nguồn mở, nhưng điều khoản khác nhau từng repo — mở file LICENSE để xác nhận.
dhg/Glue còn đang phát triển không?
Commit gần nhất trên dhg/Glue là 14.4 năm trước (theo timestamp GitHub). Repo có 13 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
dhg/Glue là gì?
dhg/Glue (dhg/Glue) là dự án JavaScript trên GitHub. Theo mô tả gốc: Simple prototyping
dhg/Glue viết bằng ngôn ngữ gì?
dhg/Glue chủ yếu viết bằng JavaScript. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc thêm về dhg/Glue ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/dhg/Glue là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về Glue?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về Glue.