Skip to content

Commit

Permalink
Generate font page with Hugo
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed May 1, 2021
1 parent 21cd84e commit 47a9a11
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 5,583 deletions.
2 changes: 1 addition & 1 deletion .fantasticonrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
inputDir: './icons', // (required)
outputDir: './font', // (required)
fontTypes: ['woff2', 'woff'],
assetTypes: ['css', 'json', 'html'],
assetTypes: ['css', 'json'],
name: 'bootstrap-icons',
codepoints: codepoints,
prefix: 'bi',
Expand Down
53 changes: 0 additions & 53 deletions build/font/html.hbs

This file was deleted.

5 changes: 5 additions & 0 deletions docs/content/font.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Font
description: TBF
layout: font
---
27 changes: 27 additions & 0 deletions docs/layouts/_default/font.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!doctype html>
<html lang="en">
<head>
{{ partial "head" . }}

<link rel="stylesheet" href="bootstrap-icons.css">
</head>
<body id="icons-body" class="text-center">
{{ partialCached "skippy" . }}
{{ partialCached "navbar" . }}

<main class="container" id="content">
<nav aria-label="breadcrumb">
<ol class="breadcrumb my-4 p-0">
<li class="breadcrumb-item"><a href="/">Icons</a></li>
<li class="breadcrumb-item active" aria-current="page">Font</li>
</ol>
</nav>
{{ partialCached "icons" . "fonts" }}

{{ .Content }}
</main>

{{- partialCached "footer" . }}
{{- partialCached "scripts" . "fonts" }}
</body>
</html>
2 changes: 1 addition & 1 deletion docs/layouts/_default/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{{ partialCached "home/hero" . }}

<main class="container" id="content">
{{ partialCached "icons" . }}
{{ partialCached "icons" . "home" }}

{{ .Content }}
</main>
Expand Down
4 changes: 4 additions & 0 deletions docs/layouts/partials/icons.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@ <h2 id="icons" class="mb-0">Icons</h2>
<li class="col mb-4"{{ with .Params.tags }} data-tags="{{ delimit . " " }}"{{ end }}{{ with .Params.categories }} data-categories="{{ delimit . " " | lower }}"{{ end }}>
<a class="d-block text-dark text-decoration-none" href="{{ .RelPermalink }}">
<div class="p-3 py-4 mb-2 bg-light text-center rounded">
{{ if $.IsHome -}}
<svg class="bi" width="1em" height="1em" fill="currentColor">
<use xlink:href="bootstrap-icons.svg#{{ $filename }}"/>
</svg>
{{- else -}}
<i class="bi bi-{{ $filename }}"></i>
{{- end }}
</div>
<div class="name text-muted text-decoration-none text-center pt-1">{{ $filename }}</div>
</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/layouts/partials/scripts.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script src="/assets/js/bootstrap.min.js" async></script>
{{- if .IsHome }}
{{- if or .IsHome (eq .Page.Layout "font") }}
<script src="/assets/js/list.min.js"></script>
<script>
new List('icons-body', {
Expand Down
Loading

0 comments on commit 47a9a11

Please sign in to comment.