Browse Source

Misc fixes

imwald
Nuša Pukšič 3 months ago
parent
commit
5376aa261c
  1. 3
      assets/styles/02-layout/header.css
  2. 15
      assets/styles/02-layout/layout.css
  3. 86
      assets/styles/04-pages/forum.css
  4. 3
      templates/components/Header.html.twig
  5. 10
      templates/event/_kind20_picture.html.twig
  6. 4
      templates/event/index.html.twig
  7. 7
      templates/layout.html.twig
  8. 2
      templates/pages/editor.html.twig

3
assets/styles/02-layout/header.css

@ -16,7 +16,8 @@
.header .container { .header .container {
display: flex; display: flex;
flex-direction: column; flex-direction: row;
width: 100%;
} }
.header__categories ul { .header__categories ul {

15
assets/styles/02-layout/layout.css

@ -83,6 +83,10 @@ main {
word-break: break-word; word-break: break-word;
} }
main > section {
padding: 0 var(--spacing-2);
}
main.static { main.static {
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
@ -156,11 +160,7 @@ aside header {
main { main {
margin-top: 60px; margin-top: 60px;
} padding: 0;
section {
padding-left: 20px;
padding-right: 20px;
} }
nav header, nav header,
@ -174,12 +174,9 @@ aside header {
.mobile-toggles { .mobile-toggles {
display: flex; display: flex;
justify-content: space-between;
gap: .5rem;
position: sticky;
top: 61px; /* below main header */
z-index: 1050; z-index: 1050;
padding: .5rem 0; padding: .5rem 0;
margin: 0 var(--spacing-2);
} }
.mobile-toggles .toggle { .mobile-toggles .toggle {

86
assets/styles/04-pages/forum.css

@ -60,76 +60,92 @@
margin: 1rem 0; margin: 1rem 0;
} }
@media (max-width: 960px) {
.subcategories-grid .tags {
justify-content: flex-start;
}
.subcategories-grid .tag {
padding: 0;
background-color: transparent;
color: var(--color-primary);
}
.subcategories-grid .tag:before {
content: '#';
}
}
.sub-card { .sub-card {
border: 1px solid var(--color-primary); border: 1px solid var(--color-primary);
background: #fff; background: #fff;
padding: 1rem; padding: 1rem;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
} }
.sub-card h3 { .sub-card h3 {
margin: 0 0 0.5rem 0; margin: 0 0 0.5rem 0;
} }
.sub-card div { .sub-card div {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
.sub-card .count { .sub-card .count {
align-self: flex-end; align-self: flex-end;
flex-shrink: 0; flex-shrink: 0;
} }
.articles-list { .articles-list {
list-style: none; list-style: none;
padding: 0; padding: 0;
} }
.article-item { .article-item {
border: 1px solid #ddd; border: 1px solid #ddd;
padding: 1rem; padding: 1rem;
margin: 1rem 0; margin: 1rem 0;
background: #fafafa; background: #fafafa;
} }
.article-item h3 { .article-item h3 {
margin: 0 0 0.5rem 0; margin: 0 0 0.5rem 0;
} }
.article-item p { .article-item p {
margin: 0.5rem 0; margin: 0.5rem 0;
} }
.article-item small { .article-item small {
color: #666; color: #666;
} }
.nav-sub-card { .nav-sub-card {
border: 1px solid #333; border: 1px solid #333;
background: #fff; background: #fff;
padding: 0.5rem; padding: 0.5rem;
margin: 0.5rem 0; margin: 0.5rem 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
box-shadow: 1px 1px 3px rgba(0,0,0,0.2); box-shadow: 1px 1px 3px rgba(0,0,0,0.2);
} }
.nav-sub-card h4 { .nav-sub-card h4 {
margin: 0 0 0.25rem 0; margin: 0 0 0.25rem 0;
font-size: 1rem; font-size: 1rem;
} }
.nav-sub-card .tags { .nav-sub-card .tags {
flex: 1; flex: 1;
} }
.nav-sub-card .count { .nav-sub-card .count {
font-size: 1.2rem; font-size: 1.2rem;
font-weight: bold; font-weight: bold;
color: #333; color: #333;
align-self: flex-end; align-self: flex-end;
} }

3
templates/components/Header.html.twig

@ -1,5 +1,8 @@
<header class="header" data-controller="menu" {{ attributes }}> <header class="header" data-controller="menu" {{ attributes }}>
<div class="container"> <div class="container">
<div class="mobile-toggles" data-controller="sidebar-toggle">
<button class="toggle" aria-controls="leftNav" aria-expanded="false" data-action="click->sidebar-toggle#toggle">☰</button>
</div>
<div class="header__logo"> <div class="header__logo">
<h1 class="brand"><a href="/">Decent Newsroom</a></h1> <h1 class="brand"><a href="/">Decent Newsroom</a></h1>
</div> </div>

10
templates/event/_kind20_picture.html.twig

@ -13,10 +13,6 @@
{% set isEmbed = true %} {% set isEmbed = true %}
{% endif %} {% endif %}
{% if title %}
<h2 class="picture-title">{{ title }}</h2>
{% endif %}
{# Content warning #} {# Content warning #}
{% set contentWarning = null %} {% set contentWarning = null %}
{% for tag in event.tags %} {% for tag in event.tags %}
@ -92,9 +88,6 @@
<a href="{{ path('nevent', {nevent: event.id|nEncode }) }}" aria-label="View standalone"> <a href="{{ path('nevent', {nevent: event.id|nEncode }) }}" aria-label="View standalone">
{% endif %} {% endif %}
<picture> <picture>
{% for fallback in main.fallbacks %}
<source srcset="{{ fallback }}" />
{% endfor %}
<img src="{{ main.url }}" <img src="{{ main.url }}"
alt="{{ main.altText|default('Picture') }}" alt="{{ main.altText|default('Picture') }}"
{% if main.dimensions %}data-dimensions="{{ main.dimensions }}"{% endif %} {% if main.dimensions %}data-dimensions="{{ main.dimensions }}"{% endif %}
@ -102,6 +95,9 @@
class="picture-image main-image" class="picture-image main-image"
data-gallery-target="mainImage" data-gallery-target="mainImage"
/> />
{% for fallback in main.fallbacks %}
<source srcset="{{ fallback }}" />
{% endfor %}
</picture> </picture>
{% if images|length > 1 %} {% if images|length > 1 %}

4
templates/event/index.html.twig

@ -339,10 +339,6 @@
.picture-gallery { .picture-gallery {
grid-template-columns: 1fr; grid-template-columns: 1fr;
} }
.picture-title {
font-size: 1.5rem;
}
} }
</style> </style>
{% endblock %} {% endblock %}

7
templates/layout.html.twig

@ -14,6 +14,9 @@
<li> <li>
<a href="{{ path('latest_articles') }}">Latest articles</a> <a href="{{ path('latest_articles') }}">Latest articles</a>
</li> </li>
<li>
<a href="{{ path('forum') }}">Forum</a>
</li>
<li> <li>
<a href="{{ path('media-discovery') }}">Multimedia</a> <a href="{{ path('media-discovery') }}">Multimedia</a>
</li> </li>
@ -40,10 +43,6 @@
</nav> </nav>
</div> </div>
<main> <main>
<div class="mobile-toggles">
<button class="toggle" aria-controls="leftNav" aria-expanded="false" data-action="click->sidebar-toggle#toggle">☰</button>
{# <button class="toggle" aria-controls="rightNav" aria-expanded="false" data-action="click->sidebar-toggle#toggle">Right ☰</button>#}
</div>
{% block body %}{% endblock %} {% block body %}{% endblock %}
{# Floating reading list quick add widget #} {# Floating reading list quick add widget #}

2
templates/pages/editor.html.twig

@ -15,7 +15,7 @@
<div class="w-container"> <div class="w-container">
{% if not is_granted('ROLE_USER') %} {% if not is_granted('ROLE_USER') %}
<div class="notice info"> <div class="notice info">
<p>Login is required to post articles.</p> <p>A Nostr identity is required to post articles.</p>
</div> </div>
{% endif %} {% endif %}
<div {{ stimulus_controller('nostr-publish', { <div {{ stimulus_controller('nostr-publish', {

Loading…
Cancel
Save