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

Task/gh 35 redesign home page #39

Merged
merged 33 commits into from
Apr 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
a85f3c0
GH-33: Noop: Add home template and stylesheet
wesleyboar Mar 26, 2021
7f84fc0
Merge branch 'master' into task/GH-35-redesign-home-page
wesleyboar Mar 26, 2021
715be2c
GH-35: Fix sysmon table cell border removal
wesleyboar Mar 29, 2021
767c3dd
GH-35: Homepage CSS Architecture & Initial Styles
wesleyboar Mar 29, 2021
faeebee
GH-35: Homepage banner CSS
wesleyboar Mar 30, 2021
0ed6556
GH-35: Remove need for `s-home` teplate class
wesleyboar Mar 30, 2021
2ce77d2
GH-35: Support `s-home` responsive style
wesleyboar Mar 30, 2021
a932529
GH-35: Temp `_imports.s-home.css` for production
wesleyboar Mar 30, 2021
4991fe7
GH-35: Initial Home News CSS
wesleyboar Mar 30, 2021
c9252b9
GH-35: Extract F home banner CSS to Core o-section
wesleyboar Mar 30, 2021
07e18bb
GH-35: Use long rel. paths to include site_shared
wesleyboar Mar 30, 2021
69d7837
GH-35: Frontera Accent color
wesleyboar Mar 30, 2021
c5d02a5
GH-35: Remove unnecessary temp file
wesleyboar Mar 30, 2021
52c2e5d
GH-35: Frontera: Load new Core article stylesheets
wesleyboar Mar 30, 2021
7a786dd
GH-35: Frontera: Add font BentonSansRegular
wesleyboar Mar 31, 2021
ed9b716
GH-35: Frontera: Improve s-home responsiveness
wesleyboar Mar 31, 2021
e0d6672
GH-35: Frontera: Reduce home template complexity
wesleyboar Mar 31, 2021
2c6303d
GH-35: Frontera: Use standard font (Core 1cfbb59)
wesleyboar Mar 31, 2021
15e6139
GH-35: Frontera: minor cleanup
wesleyboar Apr 1, 2021
3c07435
GH-35: Frontera: Update sysmon to use global hues
wesleyboar Apr 1, 2021
c41dca2
GH-35: Frontera: Home's News & Other section space
wesleyboar Apr 2, 2021
0f7722f
GH-35: Frontera: Rename `s-home-X` to `s-home__X`
wesleyboar Apr 2, 2021
a4d2480
GH-35: Frontera: Restore space below news article
wesleyboar Apr 2, 2021
f7f56b6
GH-35: Frontera: Limit vw range of banner offset
wesleyboar Apr 2, 2021
8643627
GH-35: Frontera: Fix banner+intro large font size
wesleyboar Apr 2, 2021
c758241
GH-35: Frontera: More "large base font size" fixes
wesleyboar Apr 2, 2021
bcd0d0b
GH-35: Frontera: Relocate homepage html style
wesleyboar Apr 2, 2021
bd30be2
GH-35: Frontera: Min-height for section below news
wesleyboar Apr 8, 2021
a998d52
Merge branch 'master' into task/GH-35-redesign-home-page
wesleyboar Apr 8, 2021
786416c
GH-35: Frontera: Hide `.o-section-…` overflow
wesleyboar Apr 9, 2021
eabaa7d
GH-35: Frontera: User Guides list has row priority
wesleyboar Apr 9, 2021
601339d
Merge branch 'master' into task/GH-35-redesign-home-page
wesleyboar Apr 13, 2021
8abeb61
Merge branch 'master' into task/GH-35-redesign-home-page
wesleyboar Apr 14, 2021
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
3 changes: 3 additions & 0 deletions frontera-cms/secrets.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
_CMS_TEMPLATES = (
('frontera-cms/templates/fullwidth.html', 'Fullwidth'),
('fullwidth.html', 'DEPRECATED Fullwidth'),

('frontera-cms/templates/home.html', 'Homepage'),

('guide.html', 'Guide'),
('guides/getting_started.html', 'Guide: Getting Started'),
('guides/data_transfer.html', 'Guide: Data Transfer'),
Expand Down
30 changes: 11 additions & 19 deletions frontera-cms/snippets/system-monitor.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
<style>
<p class="u-empty"><style>
/* Container */

.s-sysmon {
--color--x-light: #ffffff;
--color--light: #B7B7B7;
--color--normal: #707070;
--color--dark: #222222;
--color--x-dark: #000000;

--color--warning: #c7ce1d;

font-size: 1.4rem;
min-width: 320px;
}
Expand All @@ -20,7 +12,7 @@
/* vert. `padding` + vert. `border-spacing` + `border-width` = 14px */
padding: 6px 0;

border: 1px solid var(--color--x-light);
border: 1px solid var(--global-color-primary--xx-light);
border-radius: 9px;
border-spacing: 14px 7px; /* Overwrite Bootstrap 3 */
border-collapse: separate; /* Overwrite Bootstrap 4 */
Expand All @@ -30,27 +22,27 @@
margin-right: 5px;
}
.s-sysmon th {
font-family: BentonSansBold;
font-weight: var(--bold);
}
.s-sysmon td {
font-family: BentonSansMedium;
font-weight: var(--medium);
}

/* Overwrite Bootstrap Class */
.s-sysmon .table {
margin-bottom: 0px;
}
.s-sysmon .table-dark {
color: var(--color--light);
background-color: var(--color--dark);
color: var(--global-color-primary--normal);
background-color: var(--global-color-primary--xx-dark);
}
.s-sysmon .table thead th {
border-bottom: 1px solid var(--color--normal);
border-bottom: 1px solid var(--global-color-primary--dark);
}
.s-sysmon .table th,
.s-sysmon .table td {
vertical-align: middle;
border-top: none;
border: none;
padding: 0 0 5px;
}
.s-sysmon .table td {
Expand All @@ -70,15 +62,15 @@
font-weight: normal;
}
.s-sysmon .badge-warning {
background-color: var(--color--warning);
color: var(--color--x-light);
background-color: var(--global-color-warning--normal);
color: var(--global-color-primary--xx-light);
}

/* Overwrite IconWorks */
.s-sysmon .iconworks:before {
padding-right: 0.5em;
}
</style>
</style></p>

<div class="s-sysmon">
<table class="table table-dark">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* SETTINGS: Color */

:root {
/* Distinct Hues */
--global-color-accent--normal: #877453;
}
112 changes: 112 additions & 0 deletions frontera-cms/static/frontera-cms/css/src/_imports/trumps/s-home.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
/* TACC TRUMPS: Home (Page) */
@import url("../../../../../../../../taccsite_cms/static/site_shared/css/src/_imports/tools/x-center.css");
@import url("../../../../../../../../taccsite_cms/static/site_shared/css/src/_imports/tools/media-queries.css");



/* Banner */
/* Introduction */

.s-home__banner,
.s-home__intro {
--banner-margin-horz: 25px;
}



/* Banner */

.s-home__banner {
position: relative; /* for `position: absolute` children */
}
@media (--medium-and-below) {
.s-home__banner { height: auto; }
}
@media (--medium-and-above) {
.s-home__banner { height: 40.5rem; }
}

.s-home__banner .o-section__banner-overlay {
font-size: 2.4rem;
font-weight: var(--bold);

padding: 1em 3.0rem; /* GH-99: Use standard spacing value */
margin: 0 var(--banner-margin-horz);

@extend .x-center--vert-inline-multiline--flex;
}
.s-home__banner .o-section__banner-overlay p {
@extend .x-truncate--many-lines;
--lines: 11 !important; /* WARNING: Fixing unclear specificity issue */
}
@media (--wide-and-above) {
.s-home__banner .o-section__banner-image {
/* The offset is to align image at 1200px to position in design */
top: calc(50% - 6%); /* overwrite `.o-section__banner-image` */
}
}



/* Introduction */

.s-home__intro p {
font-size: 1.8rem;
font-weight: var(--bold);
}
@media (--wide-and-above) {
.s-home__intro p {
/* Forces width to match design */
padding-right: 3.0rem; /* GH-99: Use standard spacing value */
}
}

.s-home__intro .s-sysmon {
align-self: center;

display: flex;
align-items: center;
justify-items: center;

overflow-x: auto;
}
@media (--narrow-and-below) {
.s-home__intro .s-sysmon {
padding-top: 0.5rem; /* GH-99: Use standard spacing value */
padding-bottom: 0.5rem; /* GH-99: Use standard spacing value */
}
}
@media (--narrow-and-above) {
.s-home__intro div {
/* Forces smaller width, like design */
/* Uses consistent space, unlike design */
padding: 1.0rem; /* GH-99: Use standard spacing value */

margin: 0 var(--banner-margin-horz);
}
}



/* News */

.s-home__news {
padding-top: 2.0rem;
padding-bottom: 2.5rem;
}
.s-home__news article {
margin-bottom: 3.0rem;
}



/* Other */

.s-home__other [class*="s-article-list--"] {
min-height: 45.0rem;
}

/* To make user guides links take entire row when layout is 50/50 */
@media (--narrow-to-medium), (--x-narrow-to-narrow) {
.s-home__other > :first-child { grid-column: 1 / -1; }
}
2 changes: 1 addition & 1 deletion frontera-cms/static/frontera-cms/css/src/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* SEE: https://confluence.tacc.utexas.edu/x/IAA9Cw */

/* SETTINGS */
/* … */
@import url("_imports/settings/color.css");

/* GENERICS */
/* … */
Expand Down
12 changes: 12 additions & 0 deletions frontera-cms/static/frontera-cms/css/src/template.home.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* DO NOT ADD STYLES HERE; ONLY IMPORT OTHER STYLESHEETS */


/* NOTE: This file exists so that the Portal and User Guide can load isolated header styles */

/* Organize via ITCSS */
/* SEE: https://confluence.tacc.utexas.edu/x/IAA9Cw */

/* TRUMPS */
@import url("_imports/trumps/s-home.css");
@import url("../../../../../../taccsite_cms/static/site_cms/css/src/_imports/trumps/s-article-list.css");
@import url("../../../../../../taccsite_cms/static/site_cms/css/src/_imports/trumps/s-article-preview.css");
Comment on lines +11 to +12
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Short-Term vs. Long-Term

  • Now, these styles depend on HTML tags from markup built with Django plugins (thus they are "scope" a.k.a. s- styles, which makes them "trumps" that overwrite any existing styles).
  • Later, these styles would depend on markup class names only from markup built with TACC plugins (thus they will be "component" a.k.a. c- styles, which makes them more easily re-usable).

Binary file not shown.
24 changes: 24 additions & 0 deletions frontera-cms/templates/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{% extends "./fullwidth.html" %}
{% load cms_tags staticfiles %}

{% block assets_custom %}
<link rel="stylesheet" href="{% static 'frontera-cms/css/build/site.css' %}">
<link rel="stylesheet" href="{% static 'frontera-cms/css/build/site.header.css' %}">
Comment on lines +5 to +6
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why Not Make fullwidth.html Use These?
Because the rest of Frontera's pages are not ready for the redesign changes these bring.


<style>
/* To simplify calculation of `rem` values */
/* WARNING: This MUST ONLY be loaded on homepage */
/* FAQ: The Core and the rest of Frontera is NOT ready for this change */
html { font-size: 62.5%; /* 1rem = 10px */ }

/* To hide `.o-section--style-…` and `.o-section__banner-image` overflow */
/* FAQ: Isolate from Core and Frontera to avoid unexpected side-effects */
main,
/* HACK: Using ID until upstream updates markup via `quick/create-and-document-element-stylesheets` */
#content-wrap { overflow: hidden; }
</style>
<link rel="stylesheet" href="{% static 'frontera-cms/css/build/template.home.css' %}">
{% endblock assets_custom %}

{# FAQ: Common practice but unused, and template is unnecessary long-term #}
{# {% block page_type_class %}s-home{% endblock page_type_class %} #}
Comment on lines +23 to +24
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why Unnecessary Logn-Term?
Because the homepage will eventually be build with TACC plugins available for any page. Right now, the homepage is built with Django and Bootstrap plugins that have TACC class names tacked on.