Skip to content

Commit

Permalink
modify generate-css.sh for changes in ryanoasis#1252
Browse files Browse the repository at this point in the history
  • Loading branch information
rszyma authored and Finii committed May 30, 2023
1 parent 18ef23e commit 22b0101
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 24 deletions.
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>
13 changes: 3 additions & 10 deletions bin/scripts/data/cheatsheet-head.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,7 @@ style: container

<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" />

<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

0 comments on commit 22b0101

Please sign in to comment.