discourse-ai/public/ai-share/share.css

380 lines
7.0 KiB
CSS
Raw Normal View History

:root {
--shadow-header: 0 2px 30px -1px rgba(0, 0, 0, 0.05);
--shadow-content: 0 10px 20px -1px rgba(0, 0, 0, 0.05);
--primary: #333;
--primary-50: #f7f8fa;
--primary-100: #eff2f5;
--primary-200: #e4e9ee;
--primary-300: #c9d2dd;
--primary-400: #aebccb;
--primary-500: #93a5ba;
--primary-600: #778fa9;
--primary-700: #5b7490;
--primary-800: #4e627a;
--primary-900: #344252;
--secondary: #fff;
--tertiary: #08c;
--border-radius-large: 1em;
--border-radius-small: 0.33em;
--font-up-6: 2.296em;
--font-up-5: 2em;
--font-up-4: 1.7511em;
--font-up-3: 1.5157em;
--font-up-2: 1.3195em;
--font-up-1: 1.1487em;
--font-0: 1em;
--font-down-1: 0.8706em;
--font-down-2: 0.7579em;
--font-down-3: 0.6599em;
--font-down-4: 0.5745em;
--font-down-5: 0.5em;
--font-down-6: 0.4355em;
}
* { /* reset */
box-sizing: border-box;
}
body {
font-family: Söhne, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, Helvetica Neue, Arial, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
margin: 0;
font-size: 1.125em; /* root scale */
line-height: 1.8;
color: var(--primary);
background: var(--primary-50);
}
.site-header {
display: grid;
grid-template-columns: 1fr auto 1fr;
grid-template-areas: "logo site llm";
position: sticky;
top: 0;
padding: 0 1em;
align-items: center;
background-color: var(--secondary);
box-shadow: var(--shadow-header);
z-index: 2;
@media screen and (max-width: 768px) {
grid-template-areas: "logo site" "logo llm";
font-size: var(--font-down-1);
padding-bottom: 0.25em;
gap: 0 1em;
align-items: start;
grid-template-columns: auto 1fr;
grid-template-rows: auto 1fr;
}
@media screen and (max-width: 500px) {
position: relative;
grid-template-areas: "logo" "site" "llm";
}
}
.ai-logo {
grid-area: logo
}
.ai-logo .logo {
height: 3.75em;
width: auto;
padding: 0.5em 0;
@media screen and (max-width: 768px) {
padding-bottom: 0;
max-width: 180px;
}
}
@media (prefers-reduced-motion: no-preference) {
.ai-logo:hover #d-sparkles {
animation: d-rainbow-sparkles 1.5s forwards ease-in-out;
}
}
@keyframes d-rainbow-sparkles {
0% {
fill: #f15d22;
}
33% {
fill: #fff9ae;
}
66% {
fill: #00a94f;
}
100% {
fill: #00aeef;
}
}
.site-title {
grid-area: site;
font-size: var(--font-up-2);
color: var(--primary);
padding: 0 1em;
transition: color 0.25s ease-in-out;
text-decoration: none;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-weight: bold;
@media screen and (max-width: 768px) {
margin-top: 0.8em;
line-height: 1.2;
text-align: right;
padding: 0;
}
@media screen and (max-width: 500px) {
font-size: var(--font-up-3);
text-align: left;
margin-top: 0;
}
}
.llm-name {
grid-area: llm;
font-size: var(--font-down-1);
padding: 0.5em 1em;
text-decoration: none;
text-align: right;
line-height: 1.2;
color: var(--primary-600);
@media screen and (max-width: 768px) {
padding: 0;
}
@media screen and (max-width: 500px) {
text-align: left;
margin-top: 0;
margin-bottom: 1.25em;
}
}
section {
max-width: 900px;
margin: 4em auto 8em;
background-color: var(--secondary);
border-radius: var(--border-radius-large);
box-shadow: var(--shadow-content);
@media screen and (max-width: 768px) {
margin-top: 0;
border-radius: 0;
margin-bottom: 0;
box-shadow: none;
}
}
.page-header {
text-align: center;
line-height: 1.2;
padding: 3em 2.5em;
@media screen and (max-width: 768px) {
padding: 2em 1em;
text-align: left;
}
@media screen and (max-width: 500px) {
padding: 1em;
}
}
.page-header h1 {
margin: 0;
font-size: var(--font-up-5);
font-weight: normal;
@media screen and (max-width: 768px) {
font-size: var(--font-up-3);
}
}
.page-header time {
display: block;
color: var(--primary-500);
margin-top: 0.5em;
@media screen and (max-width: 768px) {
font-size: var(--font-down-1);
}
}
article {
border-top: 1px solid transparent;
border-bottom: 1px solid transparent;
transition: border-color 0.25s ease-in-out;
@media screen and (max-width: 768px) {
border-top-color: var(--primary-100);
border-bottom-color: transparent;
}
}
@media screen and (min-width: 769px) {
article:hover {
border-top-color: var(--primary-100);
border-bottom-color: var(--primary-100);
}
article:last-of-type:hover {
border-bottom-color: transparent;
}
}
pre, code {
font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace;
font-size: var(--font-down-1);
background-color: var(--primary-50);
font-size: inherit;
padding: 0;
background-color: transparent;
}
pre {
border-radius: var(--border-radius-small);
overflow-x: auto;
}
code {
padding: 0.2em 0.4em;
border-radius: var(--border-radius-small);
background: var(--primary-50);
}
code.hljs {
background-color: var(--primary-50);
}
h1 h2 h3 h4 h5 h6 {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
margin-bottom: 0.5em;
}
.post {
padding: 1.5em 3em 1.5em;
@media screen and (max-width: 768px) {
padding: 1em;
}
}
.post__header {
display: flex;
flex-wrap: wrap;
align-items: baseline;
justify-content: start;
margin-bottom: 0.5em;
gap: 0 0.5em;
}
.post__user {
font-weight: bold;
color: var(--primary);
}
.post__date, .post__persona {
font-size: 0.8em;
}
.post__persona {
color: var(--primary-600);
}
.post__content {
line-height: 1.4;
color: var(--primary-800);
}
.post__content p:first-child {
margin-top: 0;
}
.post__content p:last-child {
margin-bottom: 0.4em;
}
.post__date {
color: var(--primary-500);
margin-left: auto;
display: none; /* hiding for now */
}
summary {
padding: 1em;
border-radius: var(--border-radius-small);
cursor: pointer;
color: var(--tertiary);
outline: none;
}
summary:hover {
background-color: var(--primary-100);
}
details {
background-color: var(--primary-50);
border-radius: var(--border-radius-small);
transition: background-color 0.3s ease;
}
details[open] {
padding-bottom: 0.75em;
}
details > *:not(summary) {
padding: 0 1em;
}
.post__content details p:last-child {
margin-bottom: 0;
}
details p {
margin-top: 10px;
color: var(--primary-800);
}
details[open] summary {
color: var(--tertiary);
border-radius: var(--border-radius-small) var(--border-radius-small) 0 0;
}
a {
text-decoration: none;
color: var(--tertiary);
transition: color 0.25s ease-in-out;
}
a:hover {
color: var(--tertiary);
text-decoration: underline;
}
ol {
list-style-type: decimal;
}
ul {
list-style-type: disc;
}
@media screen and (max-width: 500px) {
ol, ul {
padding-left: 1.33em;
}
}
li {
margin-bottom: 0.75em;
line-height: 1.6;
}
li:last-child {
margin-bottom: 0;
}
li, p {
overflow-wrap: break-word;
word-wrap: break-word;
word-break: break-word;
}