mirror of
https://github.com/andwati/andwati.com.git
synced 2026-11-18 22:55:15 +00:00
switched theme
This commit is contained in:
@@ -0,0 +1,100 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}{{ config.title }}{% endblock title %}</title>
|
||||
<meta name="description" content="{% block description %}{{ config.description | default(value="Binary exploitation, reverse engineering, and offensive security blog.") }}{% endblock description %}">
|
||||
|
||||
<!-- Canonical URL -->
|
||||
<link rel="canonical" href="{% block canonical %}{{ config.base_url }}{% endblock canonical %}">
|
||||
|
||||
<!-- Open Graph -->
|
||||
<meta property="og:site_name" content="{{ config.title }}">
|
||||
<meta property="og:title" content="{% block og_title %}{{ config.title }}{% endblock og_title %}">
|
||||
<meta property="og:description" content="{% block og_description %}{{ config.description | default(value="Binary exploitation, reverse engineering, and offensive security blog.") }}{% endblock og_description %}">
|
||||
<meta property="og:url" content="{% block og_url %}{{ config.base_url }}{% endblock og_url %}">
|
||||
<meta property="og:type" content="{% block og_type %}website{% endblock og_type %}">
|
||||
<meta property="og:locale" content="en_US">
|
||||
{% block og_extra %}{% endblock og_extra %}
|
||||
|
||||
<!-- Twitter Card -->
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:site" content="{{ config.extra.twitter_handle | default(value="@andwati_") }}">
|
||||
<meta name="twitter:title" content="{% block twitter_title %}{{ config.title }}{% endblock twitter_title %}">
|
||||
<meta name="twitter:description" content="{% block twitter_description %}{{ config.description | default(value="Binary exploitation, reverse engineering, and offensive security blog.") }}{% endblock twitter_description %}">
|
||||
{% block twitter_extra %}{% endblock twitter_extra %}
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
try {
|
||||
var storedTheme = localStorage.getItem('theme');
|
||||
var prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
var shouldUseDark = storedTheme ? storedTheme === 'dark' : prefersDark;
|
||||
|
||||
if (shouldUseDark) {
|
||||
document.documentElement.classList.add('dark');
|
||||
} else {
|
||||
document.documentElement.classList.remove('dark');
|
||||
}
|
||||
} catch (e) {
|
||||
document.documentElement.classList.add('dark');
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
||||
<!-- SEO: WebSite + Person JSON-LD -->
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@graph": [
|
||||
{
|
||||
"@type": "WebSite",
|
||||
"@id": "{{ config.base_url }}/#website",
|
||||
"url": "{{ config.base_url }}/",
|
||||
"name": "{{ config.title }}",
|
||||
"description": "{{ config.description }}",
|
||||
"inLanguage": "en-US",
|
||||
"potentialAction": {
|
||||
"@type": "SearchAction",
|
||||
"target": {
|
||||
"@type": "EntryPoint",
|
||||
"urlTemplate": "{{ config.base_url }}/posts?q={search_term_string}"
|
||||
},
|
||||
"query-input": "required name=search_term_string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Person",
|
||||
"@id": "{{ config.base_url }}/#author",
|
||||
"name": "{{ config.extra.author | default(value="mockingspectre") }}",
|
||||
"url": "{{ config.base_url }}/about/",
|
||||
"sameAs": [
|
||||
{% if config.extra.github_url %}"{{ config.extra.github_url }}"{% if config.extra.twitter_url or config.extra.youtube_url %},{% endif %}{% endif %}
|
||||
{% if config.extra.twitter_url %}"{{ config.extra.twitter_url }}"{% if config.extra.youtube_url %},{% endif %}{% endif %}
|
||||
{% if config.extra.youtube_url %}"{{ config.extra.youtube_url }}"{% endif %}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
</script>
|
||||
|
||||
{% if config.extra.google_analytics %}
|
||||
<!-- Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ config.extra.google_analytics }}"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', '{{ config.extra.google_analytics }}');
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
<!-- CSS -->
|
||||
<link rel="stylesheet" href="{{ get_url(path="main.css") }}">
|
||||
<link rel="stylesheet" href="{{ get_url(path="css/syntax.css") }}">
|
||||
|
||||
<!-- Fonts (self-hosted) -->
|
||||
<link rel="stylesheet" href="{{ get_url(path="css/fonts.css") }}">
|
||||
|
||||
<!-- RSS Feed -->
|
||||
<link rel="alternate" type="application/rss+xml" title="{{ config.title }} RSS Feed" href="{{ get_url(path="rss.xml") }}">
|
||||
|
||||
{% block head %}{% endblock head %}
|
||||
Reference in New Issue
Block a user