Remove reduant class

This commit is contained in:
daudix
2024-10-27 03:19:57 +03:00
parent 6b70c103c1
commit 77b16597b0
7 changed files with 84 additions and 59 deletions

View File

@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- **[BREAKING]** Rename `dialog-buttons` class to simply `buttons`.
- **[BREAKING]** Rename `nav-bg` CSS variable to `glass-bg`. - **[BREAKING]** Rename `nav-bg` CSS variable to `glass-bg`.
- **[BREAKING]** Rename the visually hidden `hidden` class to `visually-hidden`. `hidden` is now used to completely hide the elements, including screen readers. - **[BREAKING]** Rename the visually hidden `hidden` class to `visually-hidden`. `hidden` is now used to completely hide the elements, including screen readers.
- Add default width/height to the `icon` class. - Add default width/height to the `icon` class.
@ -47,6 +48,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix hover state of the "Load Comments" button. - Fix hover state of the "Load Comments" button.
- Fix navbar mods having broken border radius. - Fix navbar mods having broken border radius.
### Removed
- Remove `inline-button` class and instead apply button styles by default.
## [5.4.0](https://codeberg.org/daudix/duckquill/compare/v5.3.2...v5.4.0) ## [5.4.0](https://codeberg.org/daudix/duckquill/compare/v5.3.2...v5.4.0)
### Added ### Added

View File

@ -638,15 +638,27 @@ You know, <span class="spoiler solid">Duckquill is a pretty dumb name.</span> I
### Buttons Dialog ### Buttons Dialog
```html.j2 ```html.j2
<div class="dialog-buttons"> <div class="buttons">
<a class="inline-button" href="#top">Go to Top</a> <a href="#top">Go to Top</a>
<a class="inline-button colored external" href="https://example.org">Example</a> <a class="colored external" href="https://example.org">Example</a>
</div> </div>
``` ```
<div class="dialog-buttons"> <div class="buttons">
<a class="inline-button" href="#top">Go to Top</a> <a href="#top">Go to Top</a>
<a class="inline-button colored external" href="https://example.org">Example</a> <a class="colored external" href="https://example.org">Example</a>
</div>
With `centered` and `big` classes:
```html.j2
<div class="buttons centered">
<button class="big colored">Do Something…</button>
</div>
```
<div class="buttons centered">
<button class="big colored">Do Something…</button>
</div> </div>
[^1]: Footnote [^1]: Footnote

View File

@ -6,6 +6,6 @@ title = "Cake Party"
Sadly, the cake is a _lie_ Sadly, the cake is a _lie_
<div class="dialog-buttons"> <div class="buttons">
<a class="inline-button" href="../">Go Crying</a> <a href="../">Go Crying</a>
</div> </div>

View File

@ -1,15 +1,18 @@
.dialog-buttons { .buttons {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
margin-block-start: 4rem; margin-block-start: 4rem;
}
a.inline-button { &.centered {
justify-content: space-around;
}
a {
text-decoration: none; text-decoration: none;
} }
button.inline-button { button {
appearance: none; appearance: none;
cursor: pointer; cursor: pointer;
border: none; border: none;
@ -26,10 +29,10 @@ button.inline-button {
transform: none; transform: none;
} }
} }
} }
a.inline-button, a,
button.inline-button { button {
transition: var(--transition); transition: var(--transition);
box-shadow: var(--edge-highlight); box-shadow: var(--edge-highlight);
border-radius: var(--rounded-corner); border-radius: var(--rounded-corner);
@ -50,13 +53,18 @@ button.inline-button {
} }
&.colored { &.colored {
box-shadow: none; background-color: var(--accent-color-alpha);
background-color: transparent;
color: var(--accent-color); color: var(--accent-color);
&:hover { &:hover {
box-shadow: var(--edge-highlight); background-color: var(--accent-color);
background-color: var(--accent-color-alpha); color: var(--contrast-color);
}
}
&.big {
border-radius: 999px;
padding: 1rem 1.5rem;
} }
} }
} }

View File

@ -20,7 +20,7 @@
} }
} }
.dialog-buttons { .buttons {
justify-content: start; justify-content: start;
gap: 0.25rem; gap: 0.25rem;
margin-block-start: 2rem; margin-block-start: 2rem;

View File

@ -11,10 +11,10 @@
<p>The requested page could not be found.{% if config.extra.issues_url %} If you feel this is not normal, then you can create an issue on the issue tracker.{% endif %}</p> <p>The requested page could not be found.{% if config.extra.issues_url %} If you feel this is not normal, then you can create an issue on the issue tracker.{% endif %}</p>
<div class="dialog-buttons"> <div class="buttons">
<a class="inline-button" href="{{ get_url(path='/', lang=lang) }}">Go Home</a> <a href="{{ get_url(path='/', lang=lang) }}">Go Home</a>
{%- if config.extra.issues_url %} {%- if config.extra.issues_url %}
<a class="inline-button colored external" href="{{ config.extra.issues_url }}" rel="{{ rel_attributes }}">File an Issue</a> <a class="colored external" href="{{ config.extra.issues_url }}" rel="{{ rel_attributes }}">File an Issue</a>
{%- endif %} {%- endif %}
</div> </div>
{% endblock content %} {% endblock content %}

View File

@ -47,11 +47,11 @@
{%- endif -%} {%- endif -%}
<h2>{{ macros_translate::translate(key="comments", default="Comments", language_strings=language_strings) }}</h2> <h2>{{ macros_translate::translate(key="comments", default="Comments", language_strings=language_strings) }}</h2>
<p>{{ macros_translate::translate(key="comments_description", default="You can comment on this blog post by publicly replying to this post using a Mastodon or other ActivityPub/Fediverse account. Known non-private replies are displayed below.", language_strings=language_strings) }}</p> <p>{{ macros_translate::translate(key="comments_description", default="You can comment on this blog post by publicly replying to this post using a Mastodon or other ActivityPub/Fediverse account. Known non-private replies are displayed below.", language_strings=language_strings) }}</p>
<div class="dialog-buttons"> <div class="buttons">
<button id="load-comments" class="inline-button"> <button id="load-comments">
{{- macros_translate::translate(key="load_comments", default="Load Comments", language_strings=language_strings) -}} {{- macros_translate::translate(key="load_comments", default="Load Comments", language_strings=language_strings) -}}
</button> </button>
<a class="inline-button colored external" href="https://{{ host }}/@{{ user }}/{{ id }}" rel="{{ rel_attributes }}"> <a class="colored external" href="https://{{ host }}/@{{ user }}/{{ id }}" rel="{{ rel_attributes }}">
{{- macros_translate::translate(key="open_post", default="Open Post", language_strings=language_strings) -}} {{- macros_translate::translate(key="open_post", default="Open Post", language_strings=language_strings) -}}
</a> </a>
</div> </div>