make repl and doc styles more similar

This commit is contained in:
Felix Roos 2022-12-22 22:49:41 +01:00
parent 9aaaa755c7
commit f18a2a11fa
9 changed files with 42 additions and 18 deletions

View File

@ -9,6 +9,7 @@ out/**
postcss.config.js
postcss.config.cjs
tailwind.config.js
tailwind.config.cjs
vite.config.js
/**/dist/**/*
!**/*.mjs

View File

@ -5,6 +5,7 @@ import * as CONFIG from '../../config';
import SidebarToggle from './SidebarToggle';
// import LanguageSelect from './LanguageSelect';
import Search from './Search';
import CommandLineIcon from '@heroicons/react/20/solid/CommandLineIcon';
type Props = {
currentPage: string;
@ -14,21 +15,28 @@ const { currentPage } = Astro.props as Props;
// const lang = getLanguageFromURL(currentPage);
---
<nav class="flex justify-between py-2 items-center h-full" title="Top Navigation">
<nav class="flex justify-between py-2 px-4 items-center h-25 bg-header" title="Top Navigation">
<!-- <div class="menu-toggle">
<SidebarToggle client:idle />
</div> -->
<div class="flex overflow-visible items-center" style="overflow:visible">
<div class="flex overflow-visible items-center grow" style="overflow:visible">
<a href="/" class="flex items-center text-2xl space-x-2">
<div>🌀</div>
<h1>{CONFIG.SITE.title ?? 'Documentation'}</h1>
<h1 class="text-white font-bold flex space-x-2 items-baseline text-xl">
<span>🌀</span>
<div class="flex space-x-1 items-baseline">
<span class="">strudel</span>
<span class="text-sm">DOCS</span>
</div>
</h1>
</a>
</div>
<div style="flex-grow: 1;"></div>
{/* KNOWN_LANGUAGE_CODES.length > 1 && <LanguageSelect lang={lang} client:idle /> */}
<div class="search-item h-10">
<!-- <Search client:idle /> -->
</div>
<a href=".." class="cursor-pointer items-center flex space-x-1"
><CommandLineIcon className="w-5 h-5" /><span>go to REPL</span>
</a>
</nav>
<style>

View File

@ -25,8 +25,8 @@ const sidebar = SIDEBAR[langCode];
return (
<li class="">
<a
class={`pl-4 py-0.5 w-full hover:bg-gray-900 block${
currentPageMatch === child.link ? ' bg-gray-900' : ''
class={`pl-4 py-0.5 w-full hover:bg-header block${
currentPageMatch === child.link ? ' bg-header' : ''
}`}
href={url}
aria-current={currentPageMatch === child.link ? 'page' : false}

View File

@ -75,9 +75,9 @@ const TableOfContents: FunctionalComponent<{ headings: MarkdownHeading[] }> = ({
<a
href={`#${heading.slug}`}
onClick={onLinkClick}
className={`py-0.5 block cursor-pointer w-full border-l-4 border-gray-900 hover:bg-gray-900 ${
className={`py-0.5 block cursor-pointer w-full border-l-4 border-header hover:bg-header ${
['pl-4', 'pl-9', 'pl-12'][heading.depth - minDepth]
} ${currentID === heading.slug ? 'bg-gray-900' : ''}`.trim()}
} ${currentID === heading.slug ? 'bg-header' : ''}`.trim()}
>
{unescape(heading.text)}
</a>

View File

@ -30,9 +30,9 @@ const githubEditUrl = `${CONFIG.GITHUB_EDIT_URL}/${currentFile}`;
</title>
</head>
<body class="h-screen text-gray-50 bg-gray-800">
<body class="h-screen text-gray-50 ">
<div class="w-full h-full space-y-4 flex flex-col">
<header class="max-w-full px-4 fixed h-16 top-0 w-full z-[100]">
<header class="max-w-full fixed top-0 w-full z-[100]">
<Header currentPage={currentPage} />
</header>
<main class="relative pt-16">

View File

@ -36,7 +36,7 @@ export function Header({ context }) {
!isZen && 'bg-header',
)}
>
<div className="px-4 flex items-center space-x-2 pt-2 md:pt-0 select-none">
<div className="px-4 flex space-x-2 pt-2 md:pt-0 select-none">
{/* <img
src={logo}
className={cx('Tidal-logo', isEmbedded ? 'w-8 h-8' : 'w-10 h-10', started && 'animate-pulse')} // 'bg-[#ffffff80] rounded-full'
@ -46,7 +46,7 @@ export function Header({ context }) {
className={cx(
isEmbedded ? 'text-l' : 'text-xl',
// 'bg-clip-text bg-gradient-to-r from-primary to-secondary text-transparent font-bold',
'text-white font-bold flex space-x-2',
'text-white font-bold flex space-x-2 items-center',
)}
>
<div

View File

@ -1,9 +1,5 @@
@import '@strudel.cycles/react/dist/style.css';
body {
background-color: #222;
}
.darken::before {
content: ' ';
position: fixed;

View File

@ -1,5 +1,9 @@
@import '@strudel.cycles/react/dist/style.css';
body {
background-color: #222;
}
.cm-gutters {
display: none !important;
}

View File

@ -2,7 +2,22 @@
module.exports = {
content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
theme: {
extend: {},
extend: {
colors: {
primary: '#c792ea',
secondary: '#c3e88d',
tertiary: '#82aaff',
highlight: '#ffcc00',
linegray: '#8a91991a',
lineblack: '#00000095',
bg: '#222222',
// header: '#8a91991a',
// footer: '#8a91991a',
header: '#00000050',
// header: 'transparent',
footer: '#00000050',
},
},
},
plugins: [require('@tailwindcss/typography')],
};