Skip to content

Commit

Permalink
feat: change icons path
Browse files Browse the repository at this point in the history
  • Loading branch information
st1020 committed Oct 22, 2023
1 parent fca98a8 commit f5faa23
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 73 deletions.
2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ highlight_theme = "base16-ocean-dark"
[extra.profile]
name = "Kita - Zola Theme"
bio = "Kita is a clean, elegant and simple blog theme for Zola."
avatar_url = "github.svg"
avatar_url = "./icons/github.svg"
avatar_invert = true

[[extra.profile.social]]
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
89 changes: 21 additions & 68 deletions static/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -1133,10 +1133,6 @@ body {
z-index: 50;
}

.m-1 {
margin: 0.25rem;
}

.\!my-0 {
margin-top: 0px !important;
margin-bottom: 0px !important;
Expand All @@ -1147,6 +1143,11 @@ body {
margin-right: 0.25rem;
}

.mx-2 {
margin-left: 0.5rem;
margin-right: 0.5rem;
}

.mx-auto {
margin-left: auto;
margin-right: auto;
Expand All @@ -1172,11 +1173,6 @@ body {
margin-bottom: 1rem;
}

.mx-2 {
margin-left: 0.5rem;
margin-right: 0.5rem;
}

.mb-1 {
margin-bottom: 0.25rem;
}
Expand Down Expand Up @@ -1257,6 +1253,10 @@ body {
aspect-ratio: 1 / 1;
}

.h-4 {
height: 1rem;
}

.h-6 {
height: 1.5rem;
}
Expand All @@ -1269,14 +1269,6 @@ body {
height: 100%;
}

.h-10 {
height: 2.5rem;
}

.h-4 {
height: 1rem;
}

.min-h-\[18rem\] {
min-height: 18rem;
}
Expand All @@ -1297,6 +1289,10 @@ body {
width: 4rem;
}

.w-4 {
width: 1rem;
}

.w-6 {
width: 1.5rem;
}
Expand All @@ -1309,14 +1305,6 @@ body {
width: 100%;
}

.w-10 {
width: 2.5rem;
}

.w-4 {
width: 1rem;
}

.max-w-3xl {
max-width: 48rem;
}
Expand Down Expand Up @@ -1409,10 +1397,6 @@ body {
border-radius: 0.5rem;
}

.rounded-md {
border-radius: 0.375rem;
}

.rounded-l-md {
border-top-left-radius: 0.375rem;
border-bottom-left-radius: 0.375rem;
Expand All @@ -1423,16 +1407,6 @@ body {
border-bottom-right-radius: 0.375rem;
}

.rounded-l-lg {
border-top-left-radius: 0.5rem;
border-bottom-left-radius: 0.5rem;
}

.rounded-r-lg {
border-top-right-radius: 0.5rem;
border-bottom-right-radius: 0.5rem;
}

.rounded-t-lg {
border-top-left-radius: 0.5rem;
border-top-right-radius: 0.5rem;
Expand All @@ -1442,27 +1416,18 @@ body {
border-width: 0.5px;
}

.border-l-4 {
border-left-width: 4px;
}

.border-black\/10 {
border-color: rgb(0 0 0 / 0.1);
}

.border-l-\[\#651fff\] {
--tw-border-opacity: 1;
border-left-color: rgb(101 31 255 / var(--tw-border-opacity));
}

.border-l-\[var\(--admonition-border\)\] {
border-left-color: var(--admonition-border);
}

.\!bg-black\/5 {
background-color: rgb(0 0 0 / 0.05) !important;
}

.bg-\[var\(--admonition-bg\)\] {
background-color: var(--admonition-bg);
}

.bg-black {
--tw-bg-opacity: 1;
background-color: rgb(0 0 0 / var(--tw-bg-opacity));
Expand All @@ -1485,12 +1450,8 @@ body {
background-color: rgb(255 255 255 / 0.8);
}

.bg-\[var\(--admonition-bg\)\] {
background-color: var(--admonition-bg);
}

.bg-\[var\(--admonition-color\)\] {
background-color: var(--admonition-color);
.p-1 {
padding: 0.25rem;
}

.p-2 {
Expand All @@ -1509,10 +1470,6 @@ body {
padding: 1.5rem;
}

.p-1 {
padding: 0.25rem;
}

.px-2 {
padding-left: 0.5rem;
padding-right: 0.5rem;
Expand Down Expand Up @@ -1767,18 +1724,14 @@ article {
background-color: rgb(255 255 255 / 0.1);
}

.\[background\:url\(\.\/theme\.svg\)_left_center\/cover_no-repeat\] {
background: url(./theme.svg) left center/cover no-repeat;
.\[background\:url\(\.\/icons\/theme\.svg\)_left_center\/cover_no-repeat\] {
background: url(./icons/theme.svg) left center/cover no-repeat;
}

.\[background\:var\(--url\)_center_center\/cover_no-repeat\] {
background: var(--url) center center/cover no-repeat;
}

.\[background\:var\(--url\)\] {
background: var(--url);
}

.\[background\:var\(--url\)_center_center_no-repeat\] {
background: var(--url) center center no-repeat;
}
Expand Down
Binary file removed static/theme.png
Binary file not shown.
2 changes: 1 addition & 1 deletion templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h1 class="mb-2 text-3xl font-bold">{{ config.extra.profile.name }}</h1>
{% for social in config.extra.profile.social %}
<a
class="h-8 w-8 text-[0] [background:var(--url)_center_center/cover_no-repeat]"
style="--url: url(./{{ social.name }}.svg)"
style="--url: url(./icons/{{ social.name }}.svg)"
href="{{ social.url }}"
target="_blank"
rel="{% if social.name == `rss` %}alternate{% else %}me{% endif %}"
Expand Down
4 changes: 2 additions & 2 deletions templates/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@
{% if config.extra.profile.social %}
<!---->
{% for social in config.extra.profile.social %}
<link rel="preload" as="image" href="{{ get_url(path=social.name ~ `.svg`) }}" />
<link rel="preload" as="image" href="{{ get_url(path=`icons/` ~ social.name ~ `.svg`) }}" />
{% endfor %}
<!---->
{% endif %}
<!---->
{% endif %}

<!-- Dark Icon -->
<link rel="preload" as="image" href="{{ get_url(path=`theme.svg`) }}" />
<link rel="preload" as="image" href="{{ get_url(path=`icons/` ~ `theme.svg`) }}" />

<!-- Math -->
{% if page.extra.math | default(value=config.extra.math) %}
Expand Down
2 changes: 1 addition & 1 deletion templates/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div class="flex items-center">
<a class="text-2xl font-semibold" href="{{ get_url(path=``) }}">{{ config.title }}</a>
<div
class="btn-dark ml-4 h-6 w-6 shrink-0 cursor-pointer text-[0] [background:url(./theme.svg)_left_center/cover_no-repeat] dark:invert dark:[background-position:right]"
class="btn-dark ml-4 h-6 w-6 shrink-0 cursor-pointer text-[0] [background:url(./icons/theme.svg)_left_center/cover_no-repeat] dark:invert dark:[background-position:right]"
role="button"
aria-label="Dark"
></div>
Expand Down

0 comments on commit f5faa23

Please sign in to comment.