fix: вернуть ленту и семантику main/article

This commit is contained in:
2026-04-12 17:11:09 +03:00
parent 038b53e74d
commit 082a0704a3
4 changed files with 23 additions and 19 deletions

View File

@@ -41,7 +41,8 @@
</script>{% endblock %}
</head>
<body>{% block BODY %}
{% block Top_CSS1 %}{% endblock %}{% block Top_CSS2 %}{% endblock %}{% block Top_CSS3 %}{% endblock %}{% include "blocks/header_nav.jinja2" %}{% block CONTENT %}{% endblock %}
{% block Top_CSS1 %}{% endblock %}{% block Top_CSS2 %}{% endblock %}{% block Top_CSS3 %}{% endblock %}{% include "blocks/header_nav.jinja2" %}
<main id="main-content">{% block CONTENT %}{% endblock %}</main>
{% include "blocks/footer.jinja2" %}{% if COOKIES %}
{% include "blocks/accept-cookies.jinja2" %}{% endif %}
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>

View File

@@ -79,15 +79,15 @@
</div>{#<!-- ХЛЕБНЫЕ КРОШКИ: КОНЕЦ -->#}
{#<!-- POINT-СРАНИЦА: НАЧАЛО -->#}<div class="container news">
<div class="row">
<div class="col-12 col-md-9">
<article class="col-12 col-md-9" aria-labelledby="article-title">
<time datetime="{{ ITEM.tdContentPublishUp|date:'Y-m-d' }}">{{ ITEM.tdContentPublishUp|date:'d E Y' }} <small>({{ ITEM.tdContentPublishUp|date:'l'|lower }}) <small title="Число просмотров"><i class="bi bi-eye-fill"></i>&nbsp;{{ ITEM.iContentHits }}</small></small> </time>
<h1>{{ ITEM.szContentHead|safe }}</h1>
<h1 id="article-title">{{ ITEM.szContentHead|safe }}</h1>
{{ ITEM.szContentIntro|safe }}
{{ ITEM.szContentBody|safe }}
{{ ITEM.szPointDes|safe }}{# Текст страницы или приамбула перед списком #}
<hr />
<nav class="sm-tags">{% for t in ITEM.tags.all%}<a href="/tag_{{ t.slug|lower }}"><i class="bi bi-tag" title="тег"></i> {{ t.name|lower }}</a> &nbsp; &#8198; {% endfor %}</nav>
</div>
</article>
{#<!-- БОКОВАЯ НАВИГАЦИЯ: НАЧАЛО-->#}<nav class="col order-last order-md-first">
<div></div>{% for i in ITEMS_BEFORE reversed %}{% if i.id != ITEM.id %}<div>
<time datetime="{{ i.tdContentPublishUp|date:'Y-m-d' }}">{{ i.tdContentPublishUp|date:'d E Y' }}</time>

View File

@@ -181,6 +181,7 @@ class AllTagsPageTests(TestCase):
response = self.client.get(reverse('web_alltags'))
self.assertEqual(response.status_code, 200)
self.assertContains(response, '<main id="main-content">')
self.assertContains(response, 'Все теги сайта')
self.assertContains(response, '/tag_alpha')
self.assertContains(response, '/tag_beta')
@@ -345,6 +346,8 @@ class TypographTests(TestCase):
response = self.client.get(f'/item/{item.id}-wrong-slug')
self.assertEqual(response.status_code, 200)
self.assertContains(response, '<main id="main-content">')
self.assertContains(response, '<article class="col-12 col-md-9" aria-labelledby="article-title">')
self.assertContains(response, '<title>Проверка просмотра | CADpoint</title>')
self.assertContains(
response,

View File

@@ -87,7 +87,7 @@ div.lenta > div.row > div[class^="col"] div.row > div[class^="col"] > h3 > a {
div.lenta > div.row > div[class^="col"] div.row > div[class^="col"] > nav.sm-tags { margin-bottom: 2ex; }
div.lenta > div.row > div[class^="col"] div.row > div[class^="col"] > nav.sm-tags > a,
div.lenta > div.row > div[class^="col"] div.row > div[class^="col"] > nav.sm-tags > span.active,
div.news > div.row > div[class^="col"] > nav.sm-tags > a {
div.news > div.row > article[class^="col"] > nav.sm-tags > a {
font-family: 'Ubuntu Condensed', sans-serif;
font-size: smaller;
display: inline-block;
@@ -101,13 +101,13 @@ div.lenta > div.row > div[class^="col"] div.row > div[class^="col"] > nav.sm-tag
}
div.lenta > div.row > div[class^="col"] div.row > div[class^="col"] > h3 > a:hover,
div.lenta > div.row > div[class^="col"] div.row > div[class^="col"] > nav.sm-tags > a:hover,
div.news > div.row > div[class^="col"] > nav.sm-tags > a:hover {
div.news > div.row > article[class^="col"] > nav.sm-tags > a:hover {
color: #008DD2;
border-bottom: 1px solid #008DD2;
transition:0.6s;
}
div.lenta > div.row > div[class^="col"] div.row > div[class^="col"] > nav.sm-tags > a:hover,
div.news > div.row > div[class^="col"] > nav.sm-tags > a:hover {
div.news > div.row > article[class^="col"] > nav.sm-tags > a:hover {
animation-name: scaleUpDown2;
animation-duration: 0.6s;
animation-timing-function: ease-in-out; -webkit-animation-timing-function: ease-in-out;
@@ -150,33 +150,33 @@ div.lenta > div.row > div[class^="col"] > div.row:not(:last-child) { border-bott
/****************************
** ОФОРМЛЕНИЕ НОВОСТИ *********
****************************/
div.news > div.row > div[class^="col"] > time {
div.news > div.row > article[class^="col"] > time {
font-family: 'Ubuntu Condensed', sans-serif;
color: #888;
font-size: 120%;
font-weight: 100;
}
div.news > div.row > div[class^="col"] > time > small > small {
div.news > div.row > article[class^="col"] > time > small > small {
font-size: x-small;
color: #006799;
padding-left: 4em;
}
div.news > div.row > div[class^="col"] > p,
div.news > div.row > div[class^="col"] > ul > li,
div.news > div.row > div[class^="col"] > ol > li {
div.news > div.row > article[class^="col"] > p,
div.news > div.row > article[class^="col"] > ul > li,
div.news > div.row > article[class^="col"] > ol > li {
font-size: 115%;
font-weight: 100;
}
div.news > div.row > div[class^="col"] > p > img,
div.news > div.row > div[class^="col"] > p > iframe {
div.news > div.row > article[class^="col"] > p > img,
div.news > div.row > article[class^="col"] > p > iframe {
width: 100%;
border: solid #006799 1px;
border-radius: 4px;
border-bottom: solid white 12px;
border-image: url('/static/svgs/logo_cadpoint-2021-border.svg') 0 0 600 0 round;
}
div.news > div.row > div[class^="col"] > p > iframe { aspect-ratio: calc( 19 / 9); }
div.news > div.row > div[class^="col"] > blockquote {
div.news > div.row > article[class^="col"] > p > iframe { aspect-ratio: calc( 19 / 9); }
div.news > div.row > article[class^="col"] > blockquote {
font-family: 'Ubuntu Condensed', sans-serif;
font-weight: 100;
color: #006799;
@@ -189,7 +189,7 @@ div.news > div.row > div[class^="col"] > blockquote {
background:#EDEDED;
border-radius: 10px 35px 35px 10px;
}
div.news > div.row > div[class^="col"] > blockquote:before{
div.news > div.row > article[class^="col"] > blockquote:before{
/*content: "\201C";*/
content: "«";
color:gray;
@@ -197,11 +197,11 @@ div.news > div.row > div[class^="col"] > blockquote:before{
position: absolute;
left: 0; top:-1ex;
}
div.news > div.row > div[class^="col"] > hr {
div.news > div.row > article[class^="col"] > hr {
margin: -30px auto 20px; padding: 0; color: transparent; height: 50px;
border: none; border-bottom: 1px dashed #006799; box-shadow: 0 20px 20px -20px gray;
}
div.news > div.row > div[class^="col"] > nav.sm-tags {
div.news > div.row > article[class^="col"] > nav.sm-tags {
padding-bottom: 2em;
}
div.news > div.row > nav[class^="col"] {