Skip to content
Closed
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
1 change: 1 addition & 0 deletions dist/djangocms-blog/blog-latest-entries.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

77 changes: 77 additions & 0 deletions src/lib/_imports/djangocms-blog/blog-latest-entries.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/* To Replicate Manual "Latest News" Feed on CTRN Homepage */
/* TODO: Use News styles once migrated from TACC to Core */
/* https://tacc-main.atlassian.net/browse/CMD-93 */

/* settings from core-cms */
/* https://github.com/TACC/Core-CMS/blob/v4.29.0/taccsite_cms/static/site_cms/css/src/_imports/components/django.cms.blog.app.css#L23-L27 */
.blog-latest-entries {
--article-buffer: 20px;
}

/* to enable container queries */
.blog-latest-entries {
container-type: inline-size;
}

/* to style h3 like an h4 */
.blog-latest-entries article header h3 {
margin-bottom: 0.5rem; /* Bootstrap _type.css */

font-size: var(--global-font-size--medium);
font-weight: var(--bold);
}

/* lay out image left of the header over the abstract */
.blog-latest-entries article {
display: grid;
}
@container (min-width: 768px) {
.blog-latest-entries article {
column-gap: var(--global-space--bootstrap-gap);
grid-template-columns: minmax(0, max-content) 1fr;
grid-template-rows: min-content 1fr;
grid-template-areas:
"media head"
"media desc";
}
}
@container (max-width: 767px) {
.blog-latest-entries article {
grid-auto-rows: min-content;
grid-template-areas:
"media"
"head"
"desc";
}

.blog-latest-entries article .blog-visual {
margin-bottom: 15px;
}
.blog-latest-entries article .blog-visual img {
height:auto;
max-width: 100%
}
}
.blog-latest-entries article header { grid-area: head; }
.blog-latest-entries article .blog-visual { grid-area: media; }
.blog-latest-entries article .blog-lead { grid-area: desc; }

/* to add line and space between articles */
.blog-latest-entries article + article {
border-top: var(--global-border-width--normal) solid var(--global-color-primary--light);
margin-top: var(--article-buffer);
padding-top: var(--article-buffer);
}

/* to remove extra space at bottom of article */
.blog-latest-entries article .blog-lead p:last-child {
margin-bottom: 0;
}

/* to hide stuff that is not in a simple feed */
.blog-latest-entries article *:where(
header > *:not(h3) /* everything in header that is not the title */,
.read-more /* the footer link to article (header link is adequate) */
) {
display: none;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<div class="plugin plugin-blog">
<div class="blog-latest-entries">
<article id="post-interested-in-participating-in-tx-ctrn" class="post-item ">
<header>
<h3><a href="/news/2025/05/08/interested-in-participating-in-tx-ctrn/">Interested in Participating in
TX-CTRN?</a></h3>
<ul class="post-detail attrs">
<li class="date date-published"><time datetime="May 8, 2025, 4:51 p.m." title="May 8, 2025, 4:51 p.m."> May 8, 2025 </time></li>
</ul>
<ul class="post-detail categories">
<li class="category_none">Uncategorized</li>
</ul>
<ul class="post-detail tags"></ul>
</header>
<div class="blog-visual"><img
src="/media/filer_public_thumbnails/filer_public/e5/98/e5984154-64fc-429c-855a-16c710151044/istock-1373621705.jpg__300x200_q85_crop_subsampling-2.jpg"
alt="None" width="300" height="200"></div>
<div class="blog-lead"><cms-plugin
class="cms-plugin-text-node cms-plugin cms-plugin-djangocms_blog-post-abstract-6 cms-render-model">The
Texas Childhood Trauma Research Network is currently recruiting participants ages 8-20 who have
recently been exposed to trauma which includes....&nbsp;</cms-plugin></div>
<footer class="read-more"><a href="/news/2025/05/08/interested-in-participating-in-tx-ctrn/">open
article</a></footer>
</article>
<article id="post-news-from-spencers-desk" class="post-item ">
<header>
<h3><a href="/news/2025/05/08/news-from-spencers-desk/">News from Spencer's Desk</a></h3>
<h4>Notes from the May 9, 2025 Hub Meeting</h4>
<ul class="post-detail attrs">
<li class="date date-published"><time datetime="May 8, 2025, 4:06 p.m."
title="May 8, 2025, 4:06 p.m."> May 8, 2025 </time></li>
</ul>
<ul class="post-detail categories">
<li class="category_none">Uncategorized</li>
</ul>
<ul class="post-detail tags"></ul>
</header>
<div class="blog-visual"><img
src="/media/filer_public_thumbnails/filer_public/d2/1f/d21f715c-df20-43c6-9be6-aa0a2442b2d7/istock-1090477204.jpg__300x200_q85_crop_subsampling-2.jpg"
alt="None" width="300" height="200"></div>
<div class="blog-lead"><cms-plugin
class="cms-plugin-text-node cms-plugin cms-plugin-djangocms_blog-post-abstract-5 cms-render-model">This
is my first post...and an opportunity to demonstrate adding news content to the new texasctrn.org
website. We are doing a walkthrough of the website with CTRN Hub on May 9th to gather feedback for
what needs to be added prior to the public launch.</cms-plugin></div>
<footer class="read-more"><a href="/news/2025/05/08/news-from-spencers-desk/">open article</a></footer>
</article>
<article id="post-announcing-launch-of-the-texasctrnorg-website" class="post-item">
<header>
<h3><a href="/news/2025/03/14/announcing-launch-of-the-texasctrnorg-website/">Announcing Launch of the
TexasCTRN.org Website</a></h3>
<h4>Resources for understanding and addressing childhood trauma</h4>
<ul class="post-detail attrs">
<li class="date date-published"><time datetime="March 14, 2025, 9:36 a.m."
title="March 14, 2025, 9:36 a.m."> March 14, 2025 </time></li>
</ul>
<ul class="post-detail categories">
<li class="category_none">Uncategorized</li>
</ul>
<ul class="post-detail tags"></ul>
</header>
<div class="blog-visual"><img
src="/media/filer_public_thumbnails/filer_public/c5/82/c582d5a4-5e43-4eda-b682-2012ae3954b6/texas_regions_map.png__300x200_crop_subsampling-2.png"
alt="None" width="300" height="200"></div>
<div class="blog-lead"><cms-plugin
class="cms-plugin-text-node cms-plugin cms-plugin-djangocms_blog-post-abstract-3 cms-render-model">The
Texas Childhood Trauma Research Network launched its website, texasctrn.org, on July 1,
2025.....</cms-plugin></div>
<footer class="read-more"><a href="/news/2025/03/14/announcing-launch-of-the-texasctrnorg-website/">open
article</a></footer>
</article>
</div>
</div>
12 changes: 12 additions & 0 deletions src/lib/_imports/djangocms-blog/blog-latest-entries/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
variants:
- name: default
label: Unstyled
status: reference
context:
shouldSkipBase: true
- name: tacc-cms
label: TACC (CMS)
status: wip
context:
shouldSkipPattern: false
shouldLoadCMS: true