Skip to content
Draft
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
145 changes: 3 additions & 142 deletions astro/src/layouts/BareArticleLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import '../styles/global.css';
import '../styles/bootstrap-compat.css'; /* ensure Astro styles */
import '../styles/bare.css';

interface Props {
title: string;
Expand All @@ -27,9 +27,9 @@ const { title, description } = Astro.props;
<!-- Favicon -->
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
</head>
<body class="min-h-screen bg-white text-gray-900">
<body class="min-h-screen bg-white text-gray-700">
<main class="p-4 sm:p-6 lg:p-8">
<article class="prose prose-lg prose-galaxy max-w-none">
<article class="no-prose px-0 max-w-6xl mx-auto">
<slot />
</article>
</main>
Expand Down Expand Up @@ -410,143 +410,4 @@ const { title, description } = Astro.props;
}
}
}

[data-name='/ifb/main2'],
[data-name='/ifb/main3'] {
margin: 4rem 0 2.5rem;

.bs-compat.card-deck {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-bottom: 0;
}

.bs-compat.card {
flex: 1 1 auto;
min-width: 12rem;
max-width: 20rem;
margin: 0;
}

.bs-compat.card-body {
page-break-inside: avoid;
break-inside: avoid;
}

h2 {
font-size: 1.25rem;
margin: 0 0 0.75rem;
border-bottom: none !important;
padding-bottom: 0;
}

.bs-compat.card-text {
font-size: 1rem;
line-height: 1.3;
padding: 0.75rem 1rem 0;
}

.text-center {
font-size: 0.875rem;
line-height: 1.1;
}

.bs-compat.btn {
margin-top: 0.5rem;
}

img {
margin: 1rem auto;
display: block;
height: 100px;

&[alt='microGalaxy'] {
height: 50px;
}
}

br {
display: none !important;
line-height: 0 !important;
font-size: 1px !important;
}
}

[data-name='/ifb/main3'] {
h1 {
font-size: 1.75rem;
margin: 0 0 2.5rem;
font-weight: 400;
color: #2c3143;
}
}

/* Responsive card layouts */
@media (max-width: 767px) {
[data-name='/ifb/main2'] .bs-compat.card,
[data-name='/ifb/main3'] .bs-compat.card {
flex: 1 1 100%;
max-width: 100%;
}
}

@media (min-width: 768px) and (max-width: 991px) {
[data-name='/ifb/main2'] .bs-compat.card {
&:nth-child(-n + 3) {
flex: 1 1 calc(33.333% - 0.333rem);
max-width: calc(33.333% - 0.333rem);
}
&:nth-child(n + 4) {
flex: 1 1 calc(50% - 0.25rem);
max-width: calc(50% - 0.25rem);
}
}
[data-name='/ifb/main3'] .bs-compat.card {
flex: 1 1 calc(50% - 0.25rem);
max-width: calc(50% - 0.25rem);
&:last-child {
flex: 1 1 100%;
max-width: 100%;
}
}
}

@media (min-width: 992px) and (max-width: 1199px) {
[data-name='/ifb/main2'] .bs-compat.card {
&:nth-child(-n + 4) {
flex: 1 1 calc(25% - 0.375rem);
max-width: calc(25% - 0.375rem);
}
&:nth-child(n + 5) {
flex: 1 1 100%;
max-width: 100%;
}
}
[data-name='/ifb/main3'] .bs-compat.card {
flex: 1 1 calc(33.333% - 0.333rem);
max-width: calc(33.333% - 0.333rem);
&:last-child {
flex: 1 1 100%;
max-width: 100%;
}
}
}

@media (min-width: 1200px) {
[data-name='/ifb/main2'] .bs-compat.card {
flex: 1 1 calc(20% - 0.4rem);
max-width: calc(20% - 0.4rem);
min-width: 9rem;
}
[data-name='/ifb/main3'] .bs-compat.card {
flex: 1 1 calc(33.333% - 0.333rem);
max-width: calc(33.333% - 0.333rem);
min-width: 20rem;
&:last-child {
flex: 1 1 100%;
max-width: 100%;
}
}
}
</style>
106 changes: 106 additions & 0 deletions astro/src/styles/bare.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
@import 'tailwindcss'; /* TODO create base.css for Tailwind imports and utilities, then import that here */
@import 'tw-animate-css';
/* @import './bootstrap-compat.css'; */
@import '@fontsource/atkinson-hyperlegible/400.css';
@import '@fontsource/atkinson-hyperlegible/700.css';
@plugin "@tailwindcss/typography";

/* IFB main3 - Tailwind-based card styling with @apply */
@layer components {
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
font-weight: normal;
line-height: 1.2;
margin: 0.75rem 0 0.75rem;
border-bottom: none;
padding-bottom: 0;
}

a:hover {
text-decoration: underline !important;
}

h1,
.h1 {
font-size: 1.5rem;
}

h2,
.h2 {
font-size: 1.3rem;
font-weight: normal !important;
}

h3,
.h3 {
font-size: 1.2rem;
}

h4,
.h4 {
font-size: 1.15rem;
}

h5,
.h5 {
font-size: 1.1rem;
}

h6,
.h6 {
font-size: 1rem;
}

.card-deck {
gap: 0.25rem !important;

.card {
margin-left: 0;
background-color: #f8f9fa !important;
border: 1px solid #dee2e6;
}

.card-body {
padding: 1.25rem;

p {
font-size: 0.9rem;
line-height: 1.2;
margin-bottom: 1rem;
display: block;
margin-block-start: 1em;
margin-block-end: 1em;
margin-inline-start: 0px;
margin-inline-end: 0px;
unicode-bidi: isolate;
padding: 0.75rem 1.25rem 0px;
}

img {
margin: 0 auto;
display: block;
height: 100px;
width: auto;
}

.text-center {
line-height: 0.55rem;
}
}
}

[data-name='/ifb/main3'] .card-deck .card-body img[alt='microGalaxy'] {
height: 50px;
width: auto;
}
}
6 changes: 4 additions & 2 deletions astro/src/styles/bootstrap-compat.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@
position: relative;
display: flex;
flex-direction: column;
flex-grow: 1;
min-width: 12rem;
max-width: 20rem;
flex: 1 1 auto;
max-width: none;
justify-content: space-between;
flex: 1 1 0;
background-color: #fff;
border: 1px solid rgba(0, 0, 0, 0.125);
border-radius: 0.5rem;
Expand Down
Loading