Skip to content

Commit

Permalink
Merge branch 'main' into feat/add-instagram-to-social-media
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleyboar authored Mar 8, 2024
2 parents 46c7ec8 + bede7fc commit 0d435f8
Show file tree
Hide file tree
Showing 22 changed files with 149 additions and 174 deletions.
3 changes: 1 addition & 2 deletions apps/tup-cms/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ COPY . /code/
RUN npx nx build tup-ui
RUN npx nx build tup-cms-react

# TACC/Core-CMS#v4.6.0 (Python 3.11)
FROM taccwma/core-cms:8a56b9d
FROM taccwma/core-cms:v4.8.3

WORKDIR /code

Expand Down
23 changes: 22 additions & 1 deletion apps/tup-cms/src/apps/user_news/cms_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class UserNewsListPlugin(CMSPluginBase):
module = 'TUP CMS'
name = _('User News List')
render_template = 'user_news/list_for_plugin.html'
render_template = 'user_news/list__short.html'

cache = False
text_enabled = False
Expand All @@ -32,3 +32,24 @@ def render(self, context, instance, placeholder):
'urls': urls
})
return context


@plugin_pool.register_plugin
class FullUserNewsListPlugin(CMSPluginBase):
module = 'TUP CMS'
name = _('Full User News List')
render_template = 'user_news/list__full.html'

def render(self, context, instance, placeholder):
context = super().render(context, instance, placeholder)
request = context['request']

should_sanitize = True
articles = get_latest_articles(None, should_sanitize)

context.update({
'articles': articles,
'has_markup_content': not should_sanitize,
'urls': urls
})
return context

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
{{ article.subtitle }}
</{{ subtitle_tag|default:"h4" }}>
{% endif %}
{% include './item_data.html' %}
{% include './metadata.html' %}
</header>
{% if has_markup_content %}
<div class="c-news__abstract has-markup">{{ article.content|safe }}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h1 class="c-news__title">
{% if article.subtitle %}
<h2 class="c-news__subtitle">{{ article.subtitle }}</h2>
{% endif %}
{% include './item_data.html' %}
{% include './metadata.html' %}
</header>

{# <img class="c-news__media" ... /> #}
Expand Down
30 changes: 14 additions & 16 deletions apps/tup-cms/src/apps/user_news/templates/user_news/list.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{% extends "fullwidth.html" %}
{# @var title_tag, subtitle_tag, is_for_short_list #}
{% load i18n %}

{% block content %}
{% include 'djangocms_blog/tacc/layout-choice-form.html' with list_selector=".c-news--list" %}
<div class="container">
{% include "nav_cms_breadcrumbs.html" %}
<section class="c-news c-news--list">
<h1 class="c-news__name">{% trans "User Updates" %}</h1>
{% include './includes/content_styles.html' %}

{% with title_tag="h3" subtitle_tag="h4" %}
{% include './includes/list.html' %}
{% endwith %}

</section>
</div>
{% endblock content %}
{% if articles %}
{% for article in articles %}
{% if is_for_short_list %}
{% include "./includes/list_item__short.html" %}
{% else %}
{% include "./includes/list_item__full.html" %}
{% endif %}
{% endfor %}
{% else %}
<article>
<p>{% trans "No recent updates found." %}</p>
</article>
{% endif %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{% load i18n %}


<section class="c-news c-news--list">
{% include './includes/styles.html' %}

{% with title_tag="h3" subtitle_tag="h4" %}
{% include './list.html' %}
{% endwith %}
</section>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% with title_tag="h4" subtitle_tag="h5" is_for_short_list=True %}
{% include './list.html' %}
{% endwith %}

This file was deleted.

4 changes: 2 additions & 2 deletions apps/tup-cms/src/apps/user_news/templates/user_news/read.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

{% block content %}
<div class="container">
{% include "./includes/list_item_breadcrumbs.html" with article=article urls=urls only %}
{% include "./includes/breadcrumbs.html" with article=article urls=urls only %}
<section class="c-news c-news--read">
{% include './includes/content_styles.html' %}
{% include './includes/styles.html' %}
{% include './includes/read_item.html' %}
</section>
</div>
Expand Down
3 changes: 1 addition & 2 deletions apps/tup-cms/src/apps/user_news/urls.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
from django.urls import path

from .defaults import urls
from .views import UserNewsListView, UserNewsReadView
from .views import UserNewsReadView

app_name = 'user_news'
urlpatterns = [
path('', UserNewsListView.as_view(), name='index'),
path('<id>/', UserNewsReadView.as_view(), name='read'),

# To support legacy TACC site URLs
Expand Down
13 changes: 0 additions & 13 deletions apps/tup-cms/src/apps/user_news/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,6 @@
from .defaults import urls
from .utils import get_latest_articles, get_article

class UserNewsListView(TemplateView):
template_name = 'user_news/list.html'

def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
should_sanitize = True

context['articles'] = get_latest_articles(None, should_sanitize)
context['has_markup_content'] = not should_sanitize
context['urls'] = urls

return context

class UserNewsReadView(TemplateView):
template_name = 'user_news/read.html'

Expand Down
6 changes: 3 additions & 3 deletions apps/tup-cms/src/taccsite_cms/templates/assets_custom.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@


{# COPIED FROM CORE #}
{# https://github.com/TACC/Core-CMS/blob/c8844e1/taccsite_cms/templates/assets_custom.html #}
{# https://github.com/TACC/Core-CMS/blob/v4.8.3/taccsite_cms/templates/assets_custom.html #}

{% load static %}

<!-- Custom Site Assets: Favicon. -->
{% with settings.FAVICON as favicon %}
<link rel="icon" href="{% static favicon.img_file_src %}" type="image/x-icon" />
{% with settings.PORTAL_FAVICON as favicon %}
<link rel="icon" href="{% if favicon.is_remote %}{{ favicon.img_file_src }}{% else %}{% static favicon.img_file_src %}{% endif %}" type="image/x-icon" />
{% endwith %}


Expand Down
49 changes: 23 additions & 26 deletions libs/tup-components/src/accounts/ManageAccount.module.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import url('@tacc/core-styles/src/lib/_imports/tools/media-queries.css');

.account-layout{
.account-layout {
padding: var(--global-space--section);
padding-right: 30px;
}
Expand All @@ -16,54 +16,51 @@
}

.account-body {
padding-top: 10px;
display: flex;
flex-direction: row;
gap: 3%;
}
.account-body > section {
display: flex;
flex-direction: column;
gap: 20px;
height: 100%;
gap: var(--global-space--section-left);
}
.account-body > section:nth-of-type(1) {
flex: 1.5;
}
.account-body > section:nth-of-type(2) {
flex: 1;
}
.account-body dfn {
font-style: normal;
}

.tap-feature,
.tap-separator {
margin-top: 1em;
}

.tap-header {
padding-top: 10px;
padding-bottom: 10px;
border-bottom: 1px solid #707070;
}

.tap-description {
font-size: 1rem;
font-style: italic;
color: #484848;
.tap-header:is(h2) {
font-size: var(--global-font-size--small);
}

.tap-button {
width: 200px;
.tap-description {
margin-block: 1em 1.5em;
}

.tap-href {
width: fit-content;
.tap-action {
/* To place actions inline and add space between them */
display: inline-block;
margin-right: 1em;
margin-bottom: 1em;
}

.mfa-options {
/* no styles needed yet */
.tap-action:is(button),
.tap-action > button {
width: 200px;
}

@media (--narrow-and-above) {
.tap-separator {
border-right: 1px solid #707070;
margin-top: 10px;
}

}

@media (--narrow-and-below) {
Expand All @@ -75,4 +72,4 @@
.tap-separator {
display: none;
}
}
}
Loading

0 comments on commit 0d435f8

Please sign in to comment.