fixed CSP, meta tags and alt attr

This commit is contained in:
Syed Zayyan Masud 2022-10-31 08:18:16 +00:00
parent dc5c2b7ac9
commit 6166e8dca3
8 changed files with 25 additions and 15 deletions

View file

@ -39,13 +39,25 @@ git submodule add https://github.com/syedzayyan/shadharon themes/shadharon
``` ```
cp -R themes/shadharon/content/. content cp -R themes/shadharon/content/. content
``` ```
4. For customization refer to config.toml files, which has comments.
5. For customizing the banner on the homepage the content/posts/_index.md needs modification. The desc variable under `extra`, specifically. You could delete this as well to remove banner. For an about page or any aditional page an .md file in the "content" directory will do. ## Customization
1. For customization refer to config.toml files, which has comments.
2. For customizing the banner on the homepage the content/posts/_index.md needs modification. The desc variable under `extra`, specifically. You could delete this as well to remove banner. For an about page or any aditional page an .md file in the "content" directory will do.
You can add stylesheets to override the theme:
```toml
[extra]
stylesheets = [
"override.css",
]
```
## Options
These filenames are relative to the root of the site. In this example, the two CSS files would be in the `static` folder. These filenames are relative to the root of the site. In this example, the two CSS files would be in the `static` folder.
## References ## References
This theme takes inspiration from This theme takes inspiration from

View file

@ -37,13 +37,13 @@
--light-border-color: rgba(255, 255, 255, 0.1); --light-border-color: rgba(255, 255, 255, 0.1);
--input-back: #4b4a4a; --input-back: #4b4a4a;
--input-color: #294797; --input-color: #294797;
--meta-color: rgb(198, 197, 197);
} }
[data-theme="light"] { [data-theme="light"] {
--bg-0: #fff; --bg-0: #fff;
--bg-1: #f2f2f2; --bg-1: #f2f2f2;
--bg-2: #fefefe; --bg-2: #fefefe;
--primary-color: #ef5350;
--hover-color: white; --hover-color: white;
--background-color:#fff; --background-color:#fff;
--navbar-color:#e3e3e3; --navbar-color:#e3e3e3;
@ -55,6 +55,7 @@
--input-color: #294797; --input-color: #294797;
--input-back: rgb(158, 158, 158); --input-back: rgb(158, 158, 158);
--input-color: #fbec48; --input-color: #fbec48;
--meta-color: rgb(53, 53, 53);
} }
html { html {

View file

@ -106,7 +106,7 @@ header .main {
} }
.meta { .meta {
color: #999; color: var(--meta-color);
letter-spacing: -0.5px; letter-spacing: -0.5px;
} }

View file

@ -49,11 +49,6 @@ a:hover {
background-color: var(--primary-color); background-color: var(--primary-color);
color: var(--hover-color); color: var(--hover-color);
} }
time {
color: grey;
}
/* Remove post list padding */ /* Remove post list padding */
@media screen and (max-width: 600px) { @media screen and (max-width: 600px) {
.list>ul { .list>ul {

View file

@ -1,7 +1,7 @@
{% import "macros/macros.html" as post_macros %} {% import "macros/macros.html" as post_macros %}
<!DOCTYPE html> <!DOCTYPE html>
<html> <html lang = "en">
{% include "partials/header.html" %} {% include "partials/header.html" %}
<body> <body>

View file

@ -72,7 +72,7 @@
<p id="banner-home-subtitle">{{ desc.text }}</p> <p id="banner-home-subtitle">{{ desc.text }}</p>
</div> </div>
<div class="image-container-home"> <div class="image-container-home">
<img class="banner-home-img" src="{{ desc.img }}" /> <img alt = "the owner" class="banner-home-img" src="{{ desc.img }}" />
</div> </div>
</div> </div>
{% endmacro content %} {% endmacro content %}

View file

@ -60,4 +60,6 @@
<meta property="og:description" content="{{ config.description }}"> <meta property="og:description" content="{{ config.description }}">
<meta property="og:site_name" content="{{ config.title }}"> <meta property="og:site_name" content="{{ config.title }}">
<meta http-equiv="Content-Security-Policy"
content="default-src 'self' ws://127.0.0.1:1024/; img-src 'self' https://*; script-src 'self'; style-src 'self'; font-src 'self'" />
</head> </head>

View file

@ -21,7 +21,7 @@
<nav class="socials nav-navs"> <nav class="socials nav-navs">
{%- if config.extra.socials %} {%- if config.extra.socials %}
{% for social in config.extra.socials %} {% for social in config.extra.socials %}
<a rel="noopener noreferrer" target="_blank" class="nav-links" href="{{ social.url }}" class="social"> <a rel="noopener noreferrer" target="_blank" class="nav-links social" href="{{ social.url }}">
<img alt={{ social.name }} title={{ social.name }} src="/social_icons/{{ social.icon }}.svg"> <img alt={{ social.name }} title={{ social.name }} src="/social_icons/{{ social.icon }}.svg">
</a> </a>
{% endfor %} {% endfor %}
@ -30,8 +30,8 @@
<div class="background"></div> <div class="background"></div>
<input type="checkbox" id="themeswitch"> <input type="checkbox" id="themeswitch">
<div class="switch"> <div class="switch">
<img class="moon" src="/menu_icon/moon.png"> <img alt = "theme switch to dark" class="moon" src="/menu_icon/moon.png">
<img class="sun" src="/menu_icon/sun.png"> <img alt = "theme switch to light" class="sun" src="/menu_icon/sun.png">
</div> </div>
</label> </label>
</nav> </nav>