diff --git a/src/config.toml b/src/config.toml index a416540..21efe64 100644 --- a/src/config.toml +++ b/src/config.toml @@ -30,11 +30,14 @@ main_menu = [ socials = [ { name = "email", url = "mailto:raphael@rbitton.com" }, + { name = "gitea", url = "https://git.rbitton.com/rbitton", new_tab = true }, { name = "github", url = "https://github.com/rbitton1729", new_tab = true}, + { name = "gitlab", url = "https://gitlab.com/rbitton", new_tab = true }, +# { name = "reddit", url = "https://www.reddit.com/user/rbitton/", new_tab = true}, { name = "linkedin", url = "https://www.linkedin.com/in/rbitton1729", new_tab = true}, ] copyright = "© $YEAR $AUTHOR" -favicon_emoji = "🐧" +favicon = "favicon.svg" source_code = "https://git.rbitton.com/rbitton/Website" diff --git a/src/static/favicon.png b/src/static/favicon.png deleted file mode 100644 index 83755d4..0000000 Binary files a/src/static/favicon.png and /dev/null differ diff --git a/src/static/favicon.svg b/src/static/favicon.svg new file mode 100644 index 0000000..c52e541 --- /dev/null +++ b/src/static/favicon.svg @@ -0,0 +1,19710 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/templates/base.html b/src/templates/base.html new file mode 100644 index 0000000..7b5020d --- /dev/null +++ b/src/templates/base.html @@ -0,0 +1,166 @@ +{%- import "macros/feed.html" as feed_macros -%} +{%- import "macros/post.html" as post_macros -%} + + + + + + + + {% include "partials/content_security_policy.html" %} + {%- block title -%}{{ config.title }}{%- endblock -%} + + + + + {%- if page.extra.stylesheets or section.extra.stylesheets %} + {%- for stylesheet in page.extra.stylesheets | default(value=section.extra.stylesheets) %} + + {% endfor -%} + {%- endif %} + + {%- if config.extra.favicon %} + {%- if config.extra.favicon is ending_with(".svg") %} + + {%- else %} + {% set image_meta = get_image_metadata(path=config.extra.favicon) -%} + + {%- if image_meta.mime is ending_with("png") %} + {% set resized_image = resize_image(path=config.extra.favicon, width=180, height=180, op="fit") -%} + + {%- endif -%} + {%- endif -%} + {%- elif config.extra.favicon_emoji %} + + {%- endif %} + + {%- if config.extra.close_responsive_menu_on_resize %} + + {%- endif %} + {%- if page.extra.copy_button | default(value=section.extra.copy_button | default(value=config.extra.copy_button)) %} + + {%- endif %} + + + {# Canonical and alternate links -#} + {% if current_url -%} + + {% endif -%} + {%- if config.generate_feeds %} + {%- for feed in config.feed_filenames -%} + {{ feed_macros::link_alternate(filename=feed, title=config.title) }} + {% endfor -%} + {%- block feeds -%}{%- endblock -%} + {% endif %} + + {#- Standard meta tags -#} + {%- if page.authors -%} + {%- for author in page.authors %} + + {%- endfor -%} + {%- elif page and config.author %} + + {%- endif %} + {%- block description -%} + {%- if config.description %} + + {%- endif %} + {%- endblock %} + {% block robots -%} + + {%- endblock %} + + + + {# Social media meta tags -#} + {#- FIXME: Refactor all of these to blocks/set-blocks when Tera V2 is available. -#} + {#- See this GitHub comment: https://github.com/Keats/tera/issues/637#issuecomment-2974769236 -#} + {%- if current_path and current_path == "/" -%} + {%- set page_title = config.title -%} + + {% elif current_path -%} + {%- set page_title = page.title | default(value=section.title | default(value=taxonomy.name | capitalize | default(value=config.title))) -%} + + {% endif -%} + + {% if page -%} + + {% else -%} + + {% endif -%} + + {%- if page.extra.social_media_image.path or section.extra.social_media_image.path -%} + {%- set relative_path = page.extra.social_media_image.path | default(value=section.extra.social_media_image.path) -%} + {%- set base_path = page.colocated_path | default(value=section.relative_path | trim_end_matches(pat="_index.md")) -%} + {%- set absolute_path = base_path ~ relative_path -%} + {%- set image_meta = get_image_metadata(path=absolute_path) -%} + {%- set resized_image = resize_image(path=absolute_path, width=1200, height=675, op="fit") -%} + + + + + + {% if page.extra.social_media_image.alt_text or page.extra.social_media_image.alt_text -%} + {%- set alt_text = page.extra.social_media_image.alt_text | default(value=page.extra.social_media_image.alt_text) -%} + + {% endif -%} + + {% endif -%} + + {%- if current_url -%} + {% set permalink = page.permalink | default(value=section.permalink | default(value=current_url)) -%} + + {% endif -%} + + {%- if page.description -%} + + {% elif page.summary -%} + {%- set inline_summary = page.summary | linebreaksbr | replace(from="
", to=" ") | striptags -%} + + {%- elif section.description -%} + + {% elif config.description -%} + + {% endif -%} + + + {%- if page.date %} + + {%- endif -%} + {%- if page.updated %} + + {%- endif -%} + {%- if page.taxonomies and page.taxonomies.categories %} + + {%- endif -%} + {%- if page.taxonomies and page.taxonomies.tags -%} + {%- for tag in page.taxonomies.tags %} + + {%- endfor -%} + {%- endif -%} + {%- if config.extra.fediverse_creator %} + + {%- endif %} + + + +
+ {% filter indent -%}{%- filter indent -%} + {%- block header -%} + {% include "partials/header.html" %} + {%- endblock -%} + {%- endfilter -%}{%- endfilter %} +
+
+ {% block main %}{% endblock %} +
+ + + +