Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write Glyphicons to _data, generate Glyphicons markup #11930

Merged
merged 1 commit into from
Dec 19, 2013
Merged

Write Glyphicons to _data, generate Glyphicons markup #11930

merged 1 commit into from
Dec 19, 2013

Conversation

ssorallen
Copy link
Contributor

This generates a glyphicons.yml file from the glyphicons.less source,
and then components.html uses that data to generate the Glyphicons docs
by iterating through the data. The _data directory was introduced in
Jekyll 1.3.0, and GitHub Pages is already on [version 1.4.2][1].

Fixes #11862.

[1] https://github.com/github/pages-gem/blob/master/github-pages.gemspec#L16

This generates a glyphicons.yml file from the glyphicons.less source,
and then components.html uses that data to generate the Glyphicons docs
by iterating through the data. The _data directory was introduced in
Jekyll 1.3.0, and GitHub Pages is already on [version 1.4.2][1].

Fixes #11862.

[1] https://github.com/github/pages-gem/blob/master/github-pages.gemspec#L16
@cvrebert
Copy link
Collaborator

Could you parse it from /fonts/glyphicons-halflings-regular.svg instead? That's the primary source. glyphicons.less itself was mostly semi-automatically generated.

@ssorallen
Copy link
Contributor Author

Aha, I didn't realize that. I will update to use the SVG.

@ssorallen
Copy link
Contributor Author

@cvrebert, the SVG doesn't contain the class names, which is what this page needs. Were those added to glyphicons.less by hand?

@cvrebert
Copy link
Collaborator

Actually, they were parsed from http://glyphicons.com , with some manual editing because Bootstrap changes a handful of the names. I guess the LESS approach will have to do.

@mdo
Copy link
Member

mdo commented Dec 19, 2013

Bootstrap changes a handful of the names

We do?

@cvrebert
Copy link
Collaborator

Bootstrap changes a handful of the names

We do?

Yup:

Glyphicons Name Bootstrap Name
comments comment
collapse collapse-down
collapse-top collapse-up
circle-arrow-top circle-arrow-up
hand-top hand-up

And then there are a bunch where we merely replace underscores with dashes:

Glyphicons Name Bootstrap Name
cloud_download cloud-download
copyright_mark copyright-mark
cloud_upload cloud-upload
credit_card credit-card
floppy_disk floppy-disk
floppy_open floppy-open
floppy_remove floppy-remove
floppy_save floppy-save
floppy_saved floppy-saved
hd_video hd-video
log_in log-in
log_out log-out
new_window new-window
phone_alt phone-alt
registration_mark registration-mark
sd_video sd-video
sound_5_1 sound-5-1
sound_6_1 sound-6-1
sound_7_1 sound-7-1
sound_dolby sound-dolby
sound_stereo sound-stereo
tree_conifer tree-conifer
tree_deciduous tree-deciduous

@mdo
Copy link
Member

mdo commented Dec 19, 2013

Ah, this was probably a legacy thing honestly. We had written CSS for them before they were icon fonts. As for underscores, fuck those 😁.

mdo added a commit that referenced this pull request Dec 19, 2013
Write Glyphicons to _data, generate Glyphicons markup
@mdo mdo merged commit 523eca1 into twbs:master Dec 19, 2013
@mdo
Copy link
Member

mdo commented Dec 19, 2013

Thanks, @ssorallen!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

the Glyphicons list in the docs should be autogenerated
4 participants