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

modify generate-css.sh for changes in #1252 #1254

Merged
merged 2 commits into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions bin/scripts/data/cheatsheet-foot.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
</div>
}
</script>

<h3>Removed Icons</h3>
<h5 align="center">With Release <code>v3.0.0</code> the Material Design Icons were updated and moved to new codepoints (reasons for that are in the release notes).</h5>
<h5 align="center">They are still shown here for reference, but are missing in the actual fonts.</h5>
Expand All @@ -15,7 +17,7 @@

I really <i class="nf nf-fa-heart"></i> <i class="nf nf-custom-vim"></i>
{% endhighlight %}
<span class="nerd-fonts-example-usage">
I really <i class="nf nf-fa-heart ow"></i> <i class="nf nf-custom-vim nfunc"></i>
</span>
<p><span class="nerd-fonts-example-usage">
I really <i class="nf nf-fa-heart ow"></i> <i class="nf nf-custom-vim nfunc"></i>
</span></p>
</div>
15 changes: 4 additions & 11 deletions bin/scripts/data/cheatsheet-head.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,9 @@ style: container

<h1 class="center">Cheat Sheet</h1>

<input type="text" id="glyphSearch" placeholder="Search for glyphs/icons..." title="Type in a glyph name or hex codepoint" class="nerd-font-cheat-sheet-search nerd-font-input tertiary sanity-test" />
<input type="text" id="glyphSearch" placeholder="Search for glyphs/icons here..." title="Type in a glyph name or hex codepoint" class="nerd-font-cheat-sheet-search nerd-font-input tertiary sanity-test" />

<div class="center">
<h5 class="inlineblock nerd-font-button tertiary" id="glyphSearchButton">
<i class="nf nf-fa-search"></i>&nbsp;Search
</h5>
<div id="glyphCheatSheet" class="nerd-font-cheat-sheet"></div>

<h5 class="inlineblock nerd-font-button tertiary" id="glyphSearchAllButton">
<i class="nf nf-mdi-select_all"></i>&nbsp;Show All Icons
</h5>
</div>

<div id="glyphCheatSheet" class="nerd-font-cheat-sheet">
<script>
const glyphs = {
13 changes: 3 additions & 10 deletions bin/scripts/generate-css.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,12 @@ for var in "${!i@}"; do

# generate HTML cheat sheet
{
printf " <div class=\"column\">"
printf "\\n"
if [[ "$glyph_name" = mdi-* ]]; then
printf " <span class=\"corner-red\"></span><span class=\"corner-text\">removed</span>\\n"
printf " <div class=\"nfold nfold-%s center\"></div>" "$glyph_name"
namespace="nfold"
else
printf " <div class=\"nf nf-%s center\"></div>" "$glyph_name"
namespace="nf"
fi
printf "\\n"
printf " <div class=\"class-name\">nf-%s</div><div title=\"Copy Hex Code to Clipboard\" class=\"codepoint\">%s</div>" "$glyph_name" "$glyph_code"
printf "\\n"
printf " </div>"
printf "\\n"
printf " \"%s-%s\": \"%s\",\\n" "$namespace" "$glyph_name" "$glyph_code"
} >> "$output_cheat_sheet_file"

done
Expand Down