Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More restyling #1257

Merged
merged 4 commits into from
Jan 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 23 additions & 14 deletions css/GlobalBar.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
display: flex;
justify-content: space-between;
background: var(--footer-background-color);
min-height: var(--bar-height); /* So .square is square */

--focus-offset: calc(2 * var(--focus-offset-in)); /* Don't clip focus ring. */

Expand Down Expand Up @@ -51,35 +52,43 @@
.global-links {
flex: 1 1 100%;
display: flex;
padding: 0 1rem;
gap: 2rem;
@media (max-width: 45rem) {
gap: 1rem;
}
@media (max-width: 30rem) {
gap: 0.5rem;
}
}

.global-link {
--focus-offset: var(--focus-offset-in); /* Don't clip focus ring. */
padding: 1rem; /* Ensure spacing between */
display: flex;
flex-flow: row wrap;
align-items: baseline;
text-align: center;
justify-content: center;
gap: 0.5rem;
padding: 0.5rem 0.25rem;

font-variant: small-caps;
font-variation-settings: "opsz" 25;

.icon {
--icon-color: var(--selected-color);
}

span {
padding: 0 0 0 0.25rem;
white-space: nowrap;

@media (max-width: 45rem) {
font-size: smaller;
--icon-size: smaller;
}
}

@media (max-width: 30rem) {
display: flex;
padding: 0.25rem;
flex-flow: column nowrap;
align-items: center;

&.secondary {
display: none;
}

span {
padding: 0.25rem 0 0 0;
font-size: smaller;
}
}
}
4 changes: 3 additions & 1 deletion css/icons.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
display: none;
}

/* Icons have this class by default, which makes them a generic gray. */
.icon {
color: var(--icon-color);
}

.icon-inline {
transform: translateY(0.075em);
}

Expand Down
61 changes: 7 additions & 54 deletions css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

--background-color: white;
--text-color: black;
--quiet-text-color: lighten(black, 40%);
--quiet-text-color: #2f2f2f;
--footer-background-color: #fafafa;
--foter-text-color: #141414;

Expand Down Expand Up @@ -44,7 +44,7 @@
:root {
--background-color: black;
--text-color: white;
--quiet-text-color: darken(white, 40%);
--quiet-text-color: #cecece;
--footer-background-color: #111;
--footer-text-color: #eee;

Expand Down Expand Up @@ -256,60 +256,13 @@ select[multiple] {
}
}

/* Mostly used for the login page. */
form.small-form {
display: block;
margin: 0 auto;
padding: 0.5rem 1rem;

.errorlist {
padding: 0;
list-style: none;
hyphens: auto;
}
/* Django form errors */
.errorlist {
padding: 0;
list-style: none;
hyphens: auto;
}

.login-page {
display: flex;
flex-flow: column nowrap;
align-items: stretch;

margin: 0 auto;
max-width: 32rem;

h1 {
margin: 0;
padding: 1rem 1rem 0 0;
flex: 100 1 auto;

font: 3.5rem Montez, sans-serif;

text-align: center;

img {
display: block;
margin: 0 auto;
filter: var(--logo-filter);
}
}

form {
flex: 1 1 100%;
min-width: 0;
margin: 0;
}

/* Desktop layout */
@media screen and (min-width: 32rem) {
flex-flow: row nowrap;
align-items: center;
min-height: 90vh;

form {
flex-basis: 15rem;
}
}
}

#footer {
padding: 3em 0.25em;
Expand Down
26 changes: 21 additions & 5 deletions yarrharr/templates/feed_add.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,32 @@
{% block title %}Add Feed{% endblock %}

{% block content %}
<div id="yarrharr" class="layout-narrow">

<style>
.feed-add {
margin: 2rem auto;
padding: 1.5rem 2rem 2rem 2rem;
max-width: var(--layout-max-width);
background: var(--footer-background-color);
border: 2px solid var(--border-color);

border-radius: 0.5rem;
}
h1 {
margin: 0 0 1rem 0;
}

</style>


<div id="yarrharr">

{% include "header.html" %}

<div class="feed-header">
<div class="feed-add">
<h1>Add Feed</h1>
</div>

<div class="inventory-centered">
<form action="{% url 'feed-add' %}" method="POST" name="feed-add">
<form action="{% url 'feed-add' %}" method="POST" name="feed-add" class="small-form">
{% csrf_token %}
{{ form.as_p }}
<div class="inventory-tools">
Expand Down
8 changes: 4 additions & 4 deletions yarrharr/templates/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@

<nav class="global-links">
<a class="global-link no-underline" href="{% url 'all-show' 'unread' %}">
<svg width="1em" height="1em" class="icon" aria-hidden="true">
<svg width="1em" height="1em" class="icon icon-inline" aria-hidden="true">
<use xlink:href="#icon-all" />
</svg>
<span>All</span>
</a>
<a class="global-link no-underline" href="{% url 'label-list' %}">
<svg width="1em" height="1em" class="icon" aria-hidden="true">
<svg width="1em" height="1em" class="icon icon-inline" aria-hidden="true">
<use xlink:href="#icon-label" />
</svg>
<span>Labels</span>
</a>
<a class="global-link no-underline" href="{% url 'feed-list' %}">
<svg width="1em" height="1em" class="icon" aria-hidden="true">
<svg width="1em" height="1em" class="icon icon-inline" aria-hidden="true">
<use xlink:href="#icon-feed" />
</svg>
<span>Feeds</span>
</a>
<a class="global-link secondary no-underline" href="{% url 'feed-add' %}">
<svg width="1em" height="1em" class="icon" aria-hidden="true">
<svg width="1em" height="1em" class="icon icon-inline" aria-hidden="true">
<use xlink:href="#icon-plus" />
</svg>
<span>Add Feed</span>
Expand Down
6 changes: 1 addition & 5 deletions yarrharr/templates/label_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
{% block title %}Labels{% endblock %}

{% block content %}
<style>
/* TODO */
</style>

<div id="yarrharr" class="layout-narrow">
<div id="yarrharr">

{% include "header.html" %}

Expand Down
46 changes: 46 additions & 0 deletions yarrharr/templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,52 @@
{% block title %}Login{% endblock %}

{% block content %}

<style>
.login-page {
display: flex;
flex-flow: column nowrap;
align-items: stretch;

margin: 0 auto;
max-width: 32rem;

h1 {
margin: 0;
padding: 1rem 1rem 0 0;
flex: 100 1 auto;

font: 3.5rem Montez, sans-serif;

text-align: center;

img {
display: block;
margin: 0 auto;
filter: var(--logo-filter);
}
}

form {
flex: 1 1 100%;
min-width: 0;
margin: 0;
padding: 0.5rem 1rem;
}

/* Desktop layout */
@media screen and (min-width: 32rem) {
flex-flow: row nowrap;
align-items: center;
min-height: 90vh;

form {
flex-basis: 15rem;
}
}
}
</style>

<div class="login-page">
<h1>Yarrharr</h1>

Expand Down