diff --git a/assets/bib2yaml.py b/assets/bib2yaml.py new file mode 100644 index 0000000..c1c56d2 --- /dev/null +++ b/assets/bib2yaml.py @@ -0,0 +1,125 @@ +import sys +import re +def remove_comments(text): + return re.sub(r'(?m)^[ \t]*%.*\n?', '', text) + +def find_entries(bibtex_content): + entry_regex = re.compile(r'@(\w+)\s*[{(]', re.IGNORECASE) + positions = [m.start() for m in entry_regex.finditer(bibtex_content)] + entries = [] + for i, start in enumerate(positions): + end = positions[i+1] if i+1 < len(positions) else len(bibtex_content) + entries.append(bibtex_content[start:end].strip()) + return entries + +def parse_bibtex_entry(entry): + entry = entry.strip() + if not entry or entry.startswith('%'): + return None + m = re.match(r'@(\w+)\s*[{(]\s*([^,]+),?', entry, re.DOTALL) + if not m: + return None + entry_type, entry_key = m.groups() + entry_type = entry_type.lower() + if entry_type in ('comment', 'preamble'): + return None + if entry_type == 'string': + return None + body = entry[m.end():] + body = body.rstrip('})').strip() + fields = {} + field_regex = re.compile(r'(\w+)\s*=\s*', re.DOTALL) + pos = 0 + while pos < len(body): + m = field_regex.match(body, pos) + if not m: + break + field = m.group(1) + pos = m.end() + if body[pos] == '{': + brace_level = 1 + val_start = pos + 1 + pos += 1 + while pos < len(body) and brace_level > 0: + if body[pos] == '{': + brace_level += 1 + elif body[pos] == '}': + brace_level -= 1 + pos += 1 + value = body[val_start:pos-1] + elif body[pos] == '"': + val_start = pos + 1 + pos += 1 + while pos < len(body) and body[pos] != '"': + if body[pos] == '\\': + pos += 2 + else: + pos += 1 + value = body[val_start:pos] + pos += 1 + else: + val_start = pos + while pos < len(body) and body[pos] not in ',\n': + pos += 1 + value = body[val_start:pos].strip() + fields[field] = value.replace('\n', ' ').strip() + while pos < len(body) and body[pos] in ', \n\r\t': + pos += 1 + return entry_type, entry_key, fields + +def escape_yaml_string(s): + # Escape double quotes and backslashes, wrap in double quotes if needed + if not s: + return '""' + if any(c in s for c in ':\'"{}[],&*#?|-<>=!%@`\\\n'): + s = s.replace('\\', '\\\\').replace('"', '\\"') + return f'"{s}"' + return s + +def dict_to_yaml(d, indent=0): + lines = [] + for k, v in d.items(): + if isinstance(v, list): + lines.append(' ' * indent + f"{k}:") + for item in v: + lines.append(' ' * (indent + 2) + f"- {escape_yaml_string(item)}") + else: + lines.append(' ' * indent + f"{k}: {escape_yaml_string(v)}") + return '\n'.join(lines) + +def bibtex_to_yaml(bibtex_content): + bibtex_content = remove_comments(bibtex_content) + entries = find_entries(bibtex_content) + yaml_entries = [] + for entry in entries: + parsed = parse_bibtex_entry(entry) + if not parsed: + continue + entry_type, entry_key, fields = parsed + entry_dict = {'key': entry_key} + if "author" in fields: + authors = [a.strip() for a in re.split(r'\s+and\s+', fields["author"])] + entry_dict['author'] = authors + del fields["author"] + entry_dict.update(fields) + yaml_entries.append(entry_dict) + yaml_str = "publications:\n" + for entry in yaml_entries: + yaml_str += " - " + dict_to_yaml(entry, indent=4).lstrip().replace('\n', '\n ') + "\n" + return yaml_str + +def main(): + if len(sys.argv) != 2: + print(f"Usage: {sys.argv[0]} ") + sys.exit(1) + bibfile = sys.argv[1] + with open(bibfile, 'r', encoding='utf-8') as f: + bibtex_content = f.read() + yaml_content = bibtex_to_yaml(bibtex_content) + yamlfile = bibfile.rsplit('.', 1)[0] + '.yaml' + with open(yamlfile, 'w', encoding='utf-8') as f: + f.write(yaml_content) + print(f"YAML exported to {yamlfile}") + +if __name__ == "__main__": + main() diff --git a/assets/css/main.css b/assets/css/main.css deleted file mode 100644 index 166ade9..0000000 --- a/assets/css/main.css +++ /dev/null @@ -1,22 +0,0 @@ -body { - color: #222; - font-family: sans-serif; - line-height: 1.5; - margin: 1rem; - max-width: 768px; -} - -header { - border-bottom: 1px solid #222; - margin-bottom: 1rem; -} - -footer { - border-top: 1px solid #222; - margin-top: 1rem; -} - -a { - color: #00e; - text-decoration: none; -} diff --git a/assets/sass/_fonts.sass b/assets/sass/_fonts.sass new file mode 100644 index 0000000..0f7dd81 --- /dev/null +++ b/assets/sass/_fonts.sass @@ -0,0 +1,81 @@ +$font-path: '/fonts/static/' + +@font-face + font-family: 'Source Sans 3' + font-style: normal + font-display: swap + font-weight: 100 + src: local('Source Sans 3 ExtraLight'), local('SourceSans3-ExtraLight'), url('#{$font-path}SourceSans3-ExtraLight.woff2') format('woff2'), url('#{$font-path}SourceSans3-ExtraLight.ttf') format('truetype') +@font-face + font-family: 'Source Sans 3' + font-style: normal + font-display: swap + font-weight: 200 + src: local('Source Sans 3 ExtraLight'), local('SourceSans3-ExtraLight'), url('#{$font-path}SourceSans3-ExtraLight.woff2') format('woff2'), url('#{$font-path}SourceSans3-ExtraLight.ttf') format('truetype') + +@font-face + font-family: 'Source Sans 3' + font-style: normal + font-display: swap + font-weight: 300 + src: local('Source Sans 3 Light'), local('SourceSans3-Light'), url('#{$font-path}SourceSans3-Light.woff2') format('woff2'), url('#{$font-path}SourceSans3-Light.ttf') format('truetype') + +@font-face + font-family: 'Source Sans 3' + font-style: normal + font-display: swap + font-weight: 400 + src: local('Source Sans 3 Regular'), local('SourceSans3-Regular'), url('#{$font-path}SourceSans3-Regular.woff2') format('woff2'), url('#{$font-path}SourceSans3-Regular.ttf') format('truetype') + +@font-face + font-family: 'Source Sans 3' + font-style: italic + font-display: swap + font-weight: 400 + src: local('Source Sans 3 Italic'), local('SourceSans3-Italic'), url('#{$font-path}SourceSans3-Italic.woff2') format('woff2'), url('#{$font-path}SourceSans3-Italic.ttf') format('truetype') + +@font-face + font-family: 'Source Sans 3' + font-style: normal + font-display: swap + font-weight: 500 + src: local('Source Sans 3 Medium'), local('SourceSans3-Medium'), url('#{$font-path}SourceSans3-Medium.woff2') format('woff2'), url('#{$font-path}SourceSans3-Medium.ttf') format('truetype') + +@font-face + font-family: 'Source Sans 3' + font-style: normal + font-display: swap + font-weight: 600 + src: local('Source Sans 3 SemiBold'), local('SourceSans3-SemiBold'), url('#{$font-path}SourceSans3-SemiBold.woff2') format('woff2'), url('#{$font-path}SourceSans3-SemiBold.ttf') format('truetype') + +@font-face + font-family: 'Source Sans 3' + font-style: normal + font-display: swap + font-weight: 700 + src: local('Source Sans 3 Bold'), local('SourceSans3-Bold'), url('#{$font-path}SourceSans3-Bold.woff2') format('woff2'), url('#{$font-path}SourceSans3-Bold.ttf') format('truetype') + +@font-face + font-family: 'Source Sans 3' + font-style: italic + font-display: swap + font-weight: 700 + src: local('Source Sans 3 Bold Italic'), local('SourceSans3-BoldItalic'), url('#{$font-path}SourceSans3-BoldItalic.woff2') format('woff2'), url('#{$font-path}SourceSans3-BoldItalic.ttf') format('truetype') + +@font-face + font-family: 'Source Sans 3' + font-style: normal + font-display: swap + font-weight: 800 + src: local('Source Sans 3 ExtraBold'), local('SourceSans3-ExtraBold'), url('#{$font-path}SourceSans3-ExtraBold.woff2') format('woff2'), url('#{$font-path}SourceSans3-ExtraBold.ttf') format('truetype') + +@font-face + font-family: 'Source Sans 3' + font-style: normal + font-display: swap + font-weight: 900 + src: local('Source Sans 3 Black'), local('SourceSans3-Black'), url('#{$font-path}SourceSans3-Black.woff2') format('woff2'), url('#{$font-path}SourceSans3-Black.ttf') format('truetype') + + +* + font-family: 'Source Sans 3', sans-serif diff --git a/assets/sass/main.sass b/assets/sass/main.sass new file mode 100644 index 0000000..b449a18 --- /dev/null +++ b/assets/sass/main.sass @@ -0,0 +1,4 @@ +@import "fonts" +* + color: white + background: black \ No newline at end of file diff --git a/content/_index.md b/content/_index.md deleted file mode 100644 index 652623b..0000000 --- a/content/_index.md +++ /dev/null @@ -1,9 +0,0 @@ -+++ -title = 'Home' -date = 2023-01-01T08:00:00-07:00 -draft = false -+++ - -Laborum voluptate pariatur ex culpa magna nostrud est incididunt fugiat -pariatur do dolor ipsum enim. Consequat tempor do dolor eu. Non id id anim anim -excepteur excepteur pariatur nostrud qui irure ullamco. diff --git a/content/posts/_index.md b/content/posts/_index.md deleted file mode 100644 index e7066c0..0000000 --- a/content/posts/_index.md +++ /dev/null @@ -1,7 +0,0 @@ -+++ -title = 'Posts' -date = 2023-01-01T08:30:00-07:00 -draft = false -+++ - -Tempor est exercitation ad qui pariatur quis adipisicing aliquip nisi ea consequat ipsum occaecat. Nostrud consequat ullamco laboris fugiat esse esse adipisicing velit laborum ipsum incididunt ut enim. Dolor pariatur nulla quis fugiat dolore excepteur. Aliquip ad quis aliqua enim do consequat. diff --git a/content/posts/post-1.md b/content/posts/post-1.md deleted file mode 100644 index 3e3fc6b..0000000 --- a/content/posts/post-1.md +++ /dev/null @@ -1,10 +0,0 @@ -+++ -title = 'Post 1' -date = 2023-01-15T09:00:00-07:00 -draft = false -tags = ['red'] -+++ - -Tempor proident minim aliquip reprehenderit dolor et ad anim Lorem duis sint eiusmod. Labore ut ea duis dolor. Incididunt consectetur proident qui occaecat incididunt do nisi Lorem. Tempor do laborum elit laboris excepteur eiusmod do. Eiusmod nisi excepteur ut amet pariatur adipisicing Lorem. - -Occaecat nulla excepteur dolore excepteur duis eiusmod ullamco officia anim in voluptate ea occaecat officia. Cillum sint esse velit ea officia minim fugiat. Elit ea esse id aliquip pariatur cupidatat id duis minim incididunt ea ea. Anim ut duis sunt nisi. Culpa cillum sit voluptate voluptate eiusmod dolor. Enim nisi Lorem ipsum irure est excepteur voluptate eu in enim nisi. Nostrud ipsum Lorem anim sint labore consequat do. diff --git a/content/posts/post-2.md b/content/posts/post-2.md deleted file mode 100644 index 22b8287..0000000 --- a/content/posts/post-2.md +++ /dev/null @@ -1,10 +0,0 @@ -+++ -title = 'Post 2' -date = 2023-02-15T10:00:00-07:00 -draft = false -tags = ['red','green'] -+++ - -Anim eiusmod irure incididunt sint cupidatat. Incididunt irure irure irure nisi ipsum do ut quis fugiat consectetur proident cupidatat incididunt cillum. Dolore voluptate occaecat qui mollit laborum ullamco et. Ipsum laboris officia anim laboris culpa eiusmod ex magna ex cupidatat anim ipsum aute. Mollit aliquip occaecat qui sunt velit ut cupidatat reprehenderit enim sunt laborum. Velit veniam in officia nulla adipisicing ut duis officia. - -Exercitation voluptate irure in irure tempor mollit Lorem nostrud ad officia. Velit id fugiat occaecat do tempor. Sit officia Lorem aliquip eu deserunt consectetur. Aute proident deserunt in nulla aliquip dolore ipsum Lorem ut cupidatat consectetur sit sint laborum. Esse cupidatat sit sint sunt tempor exercitation deserunt. Labore dolor duis laborum est do nisi ut veniam dolor et nostrud nostrud. diff --git a/content/posts/post-3/bryce-canyon.jpg b/content/posts/post-3/bryce-canyon.jpg deleted file mode 100644 index 9a923be..0000000 Binary files a/content/posts/post-3/bryce-canyon.jpg and /dev/null differ diff --git a/content/posts/post-3/index.md b/content/posts/post-3/index.md deleted file mode 100644 index ca42a66..0000000 --- a/content/posts/post-3/index.md +++ /dev/null @@ -1,12 +0,0 @@ -+++ -title = 'Post 3' -date = 2023-03-15T11:00:00-07:00 -draft = false -tags = ['red','green','blue'] -+++ - -Occaecat aliqua consequat laborum ut ex aute aliqua culpa quis irure esse magna dolore quis. Proident fugiat labore eu laboris officia Lorem enim. Ipsum occaecat cillum ut tempor id sint aliqua incididunt nisi incididunt reprehenderit. Voluptate ad minim sint est aute aliquip esse occaecat tempor officia qui sunt. Aute ex ipsum id ut in est velit est laborum incididunt. Aliqua qui id do esse sunt eiusmod id deserunt eu nostrud aute sit ipsum. Deserunt esse cillum Lorem non magna adipisicing mollit amet consequat. - -![Bryce Canyon National Park](bryce-canyon.jpg) - -Sit excepteur do velit veniam mollit in nostrud laboris incididunt ea. Amet eu cillum ut reprehenderit culpa aliquip labore laborum amet sit sit duis. Laborum id proident nostrud dolore laborum reprehenderit quis mollit nulla amet veniam officia id id. Aliquip in deserunt qui magna duis qui pariatur officia sunt deserunt. diff --git a/hugo.toml b/hugo.toml index 5c26950..620fe90 100644 --- a/hugo.toml +++ b/hugo.toml @@ -1,24 +1,5 @@ -baseURL = 'https://example.org/' -languageCode = 'en-US' -title = 'My New Hugo Site' - -[menus] - [[menus.main]] - name = 'Home' - pageRef = '/' - weight = 10 - - [[menus.main]] - name = 'Posts' - pageRef = '/posts' - weight = 20 - - [[menus.main]] - name = 'Tags' - pageRef = '/tags' - weight = 30 - [module] [module.hugoVersion] extended = false min = '0.146.0' + diff --git a/layouts/_partials/favicon.html b/layouts/_partials/favicon.html new file mode 100644 index 0000000..f666b49 --- /dev/null +++ b/layouts/_partials/favicon.html @@ -0,0 +1,5 @@ +{{- $faviconsDir := absURL site.Params.faviconsDir }} + + + + diff --git a/layouts/_partials/head.html b/layouts/_partials/head.html index 02c2240..3eaca12 100644 --- a/layouts/_partials/head.html +++ b/layouts/_partials/head.html @@ -1,5 +1,12 @@ - + + + {{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }} -{{ partialCached "head/css.html" . }} -{{ partialCached "head/js.html" . }} +{{- partial "opengraph" . }} +{{- partialCached "favicon" . }} +{{- partialCached "styles" . }} + + + + diff --git a/layouts/_partials/head/css.html b/layouts/_partials/head/css.html deleted file mode 100644 index d76d23a..0000000 --- a/layouts/_partials/head/css.html +++ /dev/null @@ -1,9 +0,0 @@ -{{- with resources.Get "css/main.css" }} - {{- if hugo.IsDevelopment }} - - {{- else }} - {{- with . | minify | fingerprint }} - - {{- end }} - {{- end }} -{{- end }} diff --git a/layouts/_partials/head/js.html b/layouts/_partials/head/js.html deleted file mode 100644 index 16ffbed..0000000 --- a/layouts/_partials/head/js.html +++ /dev/null @@ -1,16 +0,0 @@ -{{- with resources.Get "js/main.js" }} - {{- $opts := dict - "minify" (not hugo.IsDevelopment) - "sourceMap" (cond hugo.IsDevelopment "external" "") - "targetPath" "js/main.js" - }} - {{- with . | js.Build $opts }} - {{- if hugo.IsDevelopment }} - - {{- else }} - {{- with . | fingerprint }} - - {{- end }} - {{- end }} - {{- end }} -{{- end }} diff --git a/layouts/_partials/head/sass.html b/layouts/_partials/head/sass.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/_partials/header.html b/layouts/_partials/header.html index 7980a00..01c040b 100644 --- a/layouts/_partials/header.html +++ b/layouts/_partials/header.html @@ -1,2 +1,2 @@ -

{{ site.Title }}

+

{{ site.Title }}

{{ partial "menu.html" (dict "menuID" "main" "page" .) }} diff --git a/layouts/_partials/opengraph.html b/layouts/_partials/opengraph.html new file mode 100644 index 0000000..8f5472a --- /dev/null +++ b/layouts/_partials/opengraph.html @@ -0,0 +1,70 @@ +{{- $config := site.Params }} +{{- $permalink := .Permalink }} +{{ $st := site.Title }} +{{- $summary := "" }} +{{- with .Summary }} + {{- $summary = . }} +{{- else }} + {{- $summary = $config.description }} +{{- end }} +{{- $summary = truncate 160 "" $summary }} +{{- $logo := absURL (printf "images/%s" $config.logo) }} +{{- if in $config.logo "https://" }} + {{- $logo = $config.logo }} +{{- end }} +{{ $image := "" }} +{{- with .Params.image }} + {{ if in . "https://" }} + {{- $image = . }} + {{ else }} + {{- $image = absURL (printf "images/%s" .) }} + {{ end }} +{{- else }} + {{- $image = $logo }} +{{- end }} + + + + + + + +{{- if eq .Section $config.blogDir -}} + {{- $date := .Date.Format "2006-02-01" -}} + + + + + + + +{{- end }} + diff --git a/layouts/_partials/styles.html b/layouts/_partials/styles.html new file mode 100644 index 0000000..1120c7a --- /dev/null +++ b/layouts/_partials/styles.html @@ -0,0 +1,4 @@ +{{- $options := (dict "targetPath" "css/styles.css" "outputStyle" "expanded" "enableSourceMap" "true") -}} +{{ $mainSassFile := "sass/main.sass" }} +{{- $styles := resources.Get $mainSassFile | resources.ExecuteAsTemplate $mainSassFile . | css.Sass $options | resources.Fingerprint "sha512" }} + \ No newline at end of file diff --git a/layouts/_partials/term-link.html b/layouts/_partials/term-link.html new file mode 100644 index 0000000..9a38dd3 --- /dev/null +++ b/layouts/_partials/term-link.html @@ -0,0 +1,14 @@ +{{ $name := .name }} +{{ $taxonomy := .taxonomy }} + +{{ $hash := md5 $name }} +{{ $r := printf "0x%s" (substr $hash 0 2) | int }} +{{ $g := printf "0x%s" (substr $hash 2 2) | int }} +{{ $b := printf "0x%s" (substr $hash 4 2) | int }} +{{ $rgba := printf "rgba(%d,%d,%d,0.2)" $r $g $b }} + + {{ $name }} + diff --git a/layouts/_partials/terms.html b/layouts/_partials/terms.html index 8a6ebec..3fa9f09 100644 --- a/layouts/_partials/terms.html +++ b/layouts/_partials/terms.html @@ -1,23 +1,23 @@ -{{- /* -For a given taxonomy, renders a list of terms assigned to the page. -@context {page} page The current page. -@context {string} taxonomy The taxonomy. -@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} -*/}} +{{- .Site }} +
+ +
-{{- $page := .page }} -{{- $taxonomy := .taxonomy }} - -{{- with $page.GetTerms $taxonomy }} - {{- $label := (index . 0).Parent.LinkTitle }} -
-
{{ $label }}:
- -
-{{- end }} diff --git a/layouts/page.html b/layouts/page.html index 7e286c8..3adb32f 100644 --- a/layouts/page.html +++ b/layouts/page.html @@ -6,5 +6,21 @@ {{ .Content }} - {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} + +
+ +
+ + {{ end }} diff --git a/layouts/tools/page.html b/layouts/tools/page.html new file mode 100644 index 0000000..8cb6eec --- /dev/null +++ b/layouts/tools/page.html @@ -0,0 +1,86 @@ +{{ define "main" }} +

{{ .Title }}

+ + {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} + {{ $dateHuman := .Date | time.Format ":date_long" }} + Updated + + {{ with .Params.links }} +
+

Links

+ +
+ {{ end }} + + {{ with .Params.website }} +

+ Website: {{ . }} +

+ {{ end }} + + {{ with .Params.github }} +

+ View on GitHub +

+ {{ end }} + +
+

At a Glance

+ + + + + + + + + {{ range $taxonomyname, $taxonomy := .Site.Taxonomies }} + {{ with $taxonomy }} + + + + + {{ end }} + {{ end }} + +
TaxonomyTerms
{{ $taxonomyname | strings.FirstUpper }} + {{ range $key, $value := $taxonomy }} + {{ partial "term-link.html" (dict "name" $key "taxonomy" $taxonomyname) }} + {{ end }} +
+
+ +
+

Description

+ {{ .Content }} +
+ + {{ with .Params.publications}} +
+

Publications

+ +
+ {{ end }} + +{{ end }} \ No newline at end of file diff --git a/static/fonts/OFL.txt b/static/fonts/OFL.txt new file mode 100644 index 0000000..2f7468b --- /dev/null +++ b/static/fonts/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2010-2020 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://openfontlicense.org + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/static/fonts/README.txt b/static/fonts/README.txt new file mode 100644 index 0000000..ac571ee --- /dev/null +++ b/static/fonts/README.txt @@ -0,0 +1,79 @@ +Source Sans 3 Variable Font +=========================== + +This download contains Source Sans 3 as both variable fonts and static fonts. + +Source Sans 3 is a variable font with this axis: + wght + +This means all the styles are contained in these files: + SourceSans3-VariableFont_wght.ttf + SourceSans3-Italic-VariableFont_wght.ttf + +If your app fully supports variable fonts, you can now pick intermediate styles +that aren’t available as static fonts. Not all apps support variable fonts, and +in those cases you can use the static font files for Source Sans 3: + static/SourceSans3-ExtraLight.ttf + static/SourceSans3-Light.ttf + static/SourceSans3-Regular.ttf + static/SourceSans3-Medium.ttf + static/SourceSans3-SemiBold.ttf + static/SourceSans3-Bold.ttf + static/SourceSans3-ExtraBold.ttf + static/SourceSans3-Black.ttf + static/SourceSans3-ExtraLightItalic.ttf + static/SourceSans3-LightItalic.ttf + static/SourceSans3-Italic.ttf + static/SourceSans3-MediumItalic.ttf + static/SourceSans3-SemiBoldItalic.ttf + static/SourceSans3-BoldItalic.ttf + static/SourceSans3-ExtraBoldItalic.ttf + static/SourceSans3-BlackItalic.ttf + +Get started +----------- + +1. Install the font files you want to use + +2. Use your app's font picker to view the font family and all the +available styles + +Learn more about variable fonts +------------------------------- + + https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts + https://variablefonts.typenetwork.com + https://medium.com/variable-fonts + +In desktop apps + + https://theblog.adobe.com/can-variable-fonts-illustrator-cc + https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts + +Online + + https://developers.google.com/fonts/docs/getting_started + https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide + https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts + +Installing fonts + + MacOS: https://support.apple.com/en-us/HT201749 + Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux + Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows + +Android Apps + + https://developers.google.com/fonts/docs/android + https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts + +License +------- +Please read the full license text (OFL.txt) to understand the permissions, +restrictions and requirements for usage, redistribution, and modification. + +You can use them in your products & projects – print or digital, +commercial or otherwise. + +This isn't legal advice, please consider consulting a lawyer and see the full +license for all details. diff --git a/static/fonts/SourceSans3-Italic-VariableFont_wght.ttf b/static/fonts/SourceSans3-Italic-VariableFont_wght.ttf new file mode 100644 index 0000000..75865b9 Binary files /dev/null and b/static/fonts/SourceSans3-Italic-VariableFont_wght.ttf differ diff --git a/static/fonts/SourceSans3-Italic-VariableFont_wght.woff2 b/static/fonts/SourceSans3-Italic-VariableFont_wght.woff2 new file mode 100644 index 0000000..72179dd Binary files /dev/null and b/static/fonts/SourceSans3-Italic-VariableFont_wght.woff2 differ diff --git a/static/fonts/SourceSans3-VariableFont_wght.ttf b/static/fonts/SourceSans3-VariableFont_wght.ttf new file mode 100644 index 0000000..5b7248b Binary files /dev/null and b/static/fonts/SourceSans3-VariableFont_wght.ttf differ diff --git a/static/fonts/SourceSans3-VariableFont_wght.woff2 b/static/fonts/SourceSans3-VariableFont_wght.woff2 new file mode 100644 index 0000000..bb59b26 Binary files /dev/null and b/static/fonts/SourceSans3-VariableFont_wght.woff2 differ diff --git a/static/fonts/static/SourceSans3-Black.ttf b/static/fonts/static/SourceSans3-Black.ttf new file mode 100644 index 0000000..128d3e7 Binary files /dev/null and b/static/fonts/static/SourceSans3-Black.ttf differ diff --git a/static/fonts/static/SourceSans3-Black.woff2 b/static/fonts/static/SourceSans3-Black.woff2 new file mode 100644 index 0000000..db840bf Binary files /dev/null and b/static/fonts/static/SourceSans3-Black.woff2 differ diff --git a/static/fonts/static/SourceSans3-BlackItalic.ttf b/static/fonts/static/SourceSans3-BlackItalic.ttf new file mode 100644 index 0000000..ab8dfbd Binary files /dev/null and b/static/fonts/static/SourceSans3-BlackItalic.ttf differ diff --git a/static/fonts/static/SourceSans3-BlackItalic.woff2 b/static/fonts/static/SourceSans3-BlackItalic.woff2 new file mode 100644 index 0000000..420c67d Binary files /dev/null and b/static/fonts/static/SourceSans3-BlackItalic.woff2 differ diff --git a/static/fonts/static/SourceSans3-Bold.ttf b/static/fonts/static/SourceSans3-Bold.ttf new file mode 100644 index 0000000..616dd83 Binary files /dev/null and b/static/fonts/static/SourceSans3-Bold.ttf differ diff --git a/static/fonts/static/SourceSans3-Bold.woff2 b/static/fonts/static/SourceSans3-Bold.woff2 new file mode 100644 index 0000000..6c6c071 Binary files /dev/null and b/static/fonts/static/SourceSans3-Bold.woff2 differ diff --git a/static/fonts/static/SourceSans3-BoldItalic.ttf b/static/fonts/static/SourceSans3-BoldItalic.ttf new file mode 100644 index 0000000..ffd4bfb Binary files /dev/null and b/static/fonts/static/SourceSans3-BoldItalic.ttf differ diff --git a/static/fonts/static/SourceSans3-BoldItalic.woff2 b/static/fonts/static/SourceSans3-BoldItalic.woff2 new file mode 100644 index 0000000..f8e2031 Binary files /dev/null and b/static/fonts/static/SourceSans3-BoldItalic.woff2 differ diff --git a/static/fonts/static/SourceSans3-ExtraBold.ttf b/static/fonts/static/SourceSans3-ExtraBold.ttf new file mode 100644 index 0000000..606a798 Binary files /dev/null and b/static/fonts/static/SourceSans3-ExtraBold.ttf differ diff --git a/static/fonts/static/SourceSans3-ExtraBold.woff2 b/static/fonts/static/SourceSans3-ExtraBold.woff2 new file mode 100644 index 0000000..bf2e4bd Binary files /dev/null and b/static/fonts/static/SourceSans3-ExtraBold.woff2 differ diff --git a/static/fonts/static/SourceSans3-ExtraBoldItalic.ttf b/static/fonts/static/SourceSans3-ExtraBoldItalic.ttf new file mode 100644 index 0000000..d2bbf50 Binary files /dev/null and b/static/fonts/static/SourceSans3-ExtraBoldItalic.ttf differ diff --git a/static/fonts/static/SourceSans3-ExtraBoldItalic.woff2 b/static/fonts/static/SourceSans3-ExtraBoldItalic.woff2 new file mode 100644 index 0000000..26fa49d Binary files /dev/null and b/static/fonts/static/SourceSans3-ExtraBoldItalic.woff2 differ diff --git a/static/fonts/static/SourceSans3-ExtraLight.ttf b/static/fonts/static/SourceSans3-ExtraLight.ttf new file mode 100644 index 0000000..36730e3 Binary files /dev/null and b/static/fonts/static/SourceSans3-ExtraLight.ttf differ diff --git a/static/fonts/static/SourceSans3-ExtraLight.woff2 b/static/fonts/static/SourceSans3-ExtraLight.woff2 new file mode 100644 index 0000000..523fb93 Binary files /dev/null and b/static/fonts/static/SourceSans3-ExtraLight.woff2 differ diff --git a/static/fonts/static/SourceSans3-ExtraLightItalic.ttf b/static/fonts/static/SourceSans3-ExtraLightItalic.ttf new file mode 100644 index 0000000..5cb2e98 Binary files /dev/null and b/static/fonts/static/SourceSans3-ExtraLightItalic.ttf differ diff --git a/static/fonts/static/SourceSans3-ExtraLightItalic.woff2 b/static/fonts/static/SourceSans3-ExtraLightItalic.woff2 new file mode 100644 index 0000000..b4ee71b Binary files /dev/null and b/static/fonts/static/SourceSans3-ExtraLightItalic.woff2 differ diff --git a/static/fonts/static/SourceSans3-Italic.ttf b/static/fonts/static/SourceSans3-Italic.ttf new file mode 100644 index 0000000..ce83ec7 Binary files /dev/null and b/static/fonts/static/SourceSans3-Italic.ttf differ diff --git a/static/fonts/static/SourceSans3-Italic.woff2 b/static/fonts/static/SourceSans3-Italic.woff2 new file mode 100644 index 0000000..1db6c04 Binary files /dev/null and b/static/fonts/static/SourceSans3-Italic.woff2 differ diff --git a/static/fonts/static/SourceSans3-Light.ttf b/static/fonts/static/SourceSans3-Light.ttf new file mode 100644 index 0000000..5d78199 Binary files /dev/null and b/static/fonts/static/SourceSans3-Light.ttf differ diff --git a/static/fonts/static/SourceSans3-Light.woff2 b/static/fonts/static/SourceSans3-Light.woff2 new file mode 100644 index 0000000..b230505 Binary files /dev/null and b/static/fonts/static/SourceSans3-Light.woff2 differ diff --git a/static/fonts/static/SourceSans3-LightItalic.ttf b/static/fonts/static/SourceSans3-LightItalic.ttf new file mode 100644 index 0000000..ffb4445 Binary files /dev/null and b/static/fonts/static/SourceSans3-LightItalic.ttf differ diff --git a/static/fonts/static/SourceSans3-LightItalic.woff2 b/static/fonts/static/SourceSans3-LightItalic.woff2 new file mode 100644 index 0000000..af18fd1 Binary files /dev/null and b/static/fonts/static/SourceSans3-LightItalic.woff2 differ diff --git a/static/fonts/static/SourceSans3-Medium.ttf b/static/fonts/static/SourceSans3-Medium.ttf new file mode 100644 index 0000000..4ddaeff Binary files /dev/null and b/static/fonts/static/SourceSans3-Medium.ttf differ diff --git a/static/fonts/static/SourceSans3-Medium.woff2 b/static/fonts/static/SourceSans3-Medium.woff2 new file mode 100644 index 0000000..ca35c48 Binary files /dev/null and b/static/fonts/static/SourceSans3-Medium.woff2 differ diff --git a/static/fonts/static/SourceSans3-MediumItalic.ttf b/static/fonts/static/SourceSans3-MediumItalic.ttf new file mode 100644 index 0000000..dc4f618 Binary files /dev/null and b/static/fonts/static/SourceSans3-MediumItalic.ttf differ diff --git a/static/fonts/static/SourceSans3-MediumItalic.woff2 b/static/fonts/static/SourceSans3-MediumItalic.woff2 new file mode 100644 index 0000000..222d2ef Binary files /dev/null and b/static/fonts/static/SourceSans3-MediumItalic.woff2 differ diff --git a/static/fonts/static/SourceSans3-Regular.ttf b/static/fonts/static/SourceSans3-Regular.ttf new file mode 100644 index 0000000..61521b1 Binary files /dev/null and b/static/fonts/static/SourceSans3-Regular.ttf differ diff --git a/static/fonts/static/SourceSans3-Regular.woff2 b/static/fonts/static/SourceSans3-Regular.woff2 new file mode 100644 index 0000000..3350754 Binary files /dev/null and b/static/fonts/static/SourceSans3-Regular.woff2 differ diff --git a/static/fonts/static/SourceSans3-SemiBold.ttf b/static/fonts/static/SourceSans3-SemiBold.ttf new file mode 100644 index 0000000..9e253ca Binary files /dev/null and b/static/fonts/static/SourceSans3-SemiBold.ttf differ diff --git a/static/fonts/static/SourceSans3-SemiBold.woff2 b/static/fonts/static/SourceSans3-SemiBold.woff2 new file mode 100644 index 0000000..86add16 Binary files /dev/null and b/static/fonts/static/SourceSans3-SemiBold.woff2 differ diff --git a/static/fonts/static/SourceSans3-SemiBoldItalic.ttf b/static/fonts/static/SourceSans3-SemiBoldItalic.ttf new file mode 100644 index 0000000..214c17f Binary files /dev/null and b/static/fonts/static/SourceSans3-SemiBoldItalic.ttf differ diff --git a/static/fonts/static/SourceSans3-SemiBoldItalic.woff2 b/static/fonts/static/SourceSans3-SemiBoldItalic.woff2 new file mode 100644 index 0000000..5be1f4b Binary files /dev/null and b/static/fonts/static/SourceSans3-SemiBoldItalic.woff2 differ diff --git a/static/fonts/static/woff2.sh b/static/fonts/static/woff2.sh new file mode 100755 index 0000000..15241be --- /dev/null +++ b/static/fonts/static/woff2.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# Compress all font files in the current directory using woff2_compress + +for font in *.ttf *.otf; do + if [[ -f "$font" ]]; then + woff2_compress "$font" + fi +done \ No newline at end of file