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

Feature: theming enhancements and additions #459

Merged
merged 27 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b397682
adding theme store, adjusting colors, fixing unsplash images
stephiescastle Jun 10, 2024
b6e8ad6
merging in latest main
stephiescastle Jun 10, 2024
b3e4958
adding more options to the nuxt module, adding PageEventDetail component
stephiescastle Jun 10, 2024
6bc8ff9
cleanup
stephiescastle Jun 11, 2024
d3274db
lint
stephiescastle Jun 11, 2024
ae41148
wip fixing nuxt module build
stephiescastle Jun 11, 2024
907ba8b
updating package.json and updating nuxt module tsconfig
stephiescastle Jun 11, 2024
a50b9be
fixing typescript errors in nuxt module
stephiescastle Jun 11, 2024
90605ab
fixing nuxt module build error
stephiescastle Jun 11, 2024
8dbf8e5
fixing type error in PageEventDetail
stephiescastle Jun 11, 2024
a8aa48d
adding reverse-primary button variation, adding bg-stars
stephiescastle Jun 11, 2024
9825c70
updating gitignore
stephiescastle Jun 11, 2024
8350274
deleting files that shouldn't be tracked
stephiescastle Jun 11, 2024
f6ab1be
gitignore
stephiescastle Jun 11, 2024
4e817eb
cleaning up files that should be ignored
stephiescastle Jun 11, 2024
41816d8
gitignore
stephiescastle Jun 11, 2024
f31294b
rebuilding packages
stephiescastle Jun 11, 2024
a5c697e
updating color tokens in components
stephiescastle Jun 11, 2024
e1bea1f
cleaning up star backgrounds
stephiescastle Jun 11, 2024
98c6d0d
lint
stephiescastle Jun 11, 2024
efd8a32
fixing html-storybook
stephiescastle Jun 11, 2024
91c0c1c
updating type styles for EDU theme
stephiescastle Jun 11, 2024
0b5039b
adding foundational docs to vue-storybook, adding mixinCarousel story
stephiescastle Jun 12, 2024
c14eb68
cleaning up some storybook assets
stephiescastle Jun 12, 2024
90a281a
fixing order of operations when building nuxt module
stephiescastle Jun 12, 2024
46ba811
adding assets to vue-storybook public folder
stephiescastle Jun 12, 2024
eb1e6f8
adding PageListingIndex template component
stephiescastle Jun 12, 2024
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
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,18 @@ storybook_compiled
# copied assets when preparing builds
apps/**/.storybook/static/dist
packages/**/src/assets/fonts
apps/**/public/explorer-1/
apps/**/public/edu/explorer-1/
packages/**/public/explorer-1/
packages/**/public/edu/explorer-1/
!public/explorer-1/**/.gitkeep
!packages/common/src/public/explorer-1
apps/vue-storybook/public/fonts
apps/vue-storybook/public/css

# dist
dist
!packages/**/dist
!packages/**/dist


!.gitkeep
2 changes: 1 addition & 1 deletion apps/html-storybook/.storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import '@explorer-1/html/src/assets/scss/styles.scss'
import './../public/dist/css/font-face.css'
import '@explorer-1/html/src/main.js'
import '@explorer-1/common-storybook/src/config/canvas.css'
import { withGlobals } from '@explorer-1/common-storybook/src/config/withGlobals'
import { withGlobals } from './withGlobals'

// viewports that match our tailwind config
const customViewports = {
Expand Down
4 changes: 2 additions & 2 deletions apps/html-storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"prettier": "@explorer-1/prettier-config",
"scripts": {
"dev": "pnpm run storybook",
"prepare": "npm run prepare:clean && npm run prepare:public",
"prepare": "npm run prepare:clean && npm run prepare:assets",
"prepare:clean": "rimraf ./public/dist",
"prepare:public": "cp -R ./node_modules/@explorer-1/html/dist/assets/ ./public/dist",
"prepare:assets": "cp -R ./node_modules/@explorer-1/html/dist/assets/ ./public/dist",
"storybook": "pnpm run prepare && storybook dev -c .storybook -p 7007 --ci",
"lint": "eslint .storybook",
"lint:fix": "eslint .storybook --fix",
Expand Down
24 changes: 22 additions & 2 deletions apps/vue-storybook/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
/** @type { import('@storybook/vue3-vite').StorybookConfig } */
import remarkGfm from 'remark-gfm'
const config = {
stories: ['./../stories/**/*.stories.@(js|jsx|ts|tsx)'],
stories: [
'./../stories/**/*.stories.@(js|jsx|ts|tsx)',
'./../stories/**/*.docs.mdx',
'./../docs/**/*.stories.@(js|jsx|ts|tsx)',
'./../docs/**/*.docs.mdx'
],
addons: [
{
name: '@storybook/addon-essentials',
Expand All @@ -10,11 +16,25 @@ const config = {
outlines: false
}
},
{
name: '@storybook/addon-docs',
options: {
mdxPluginOptions: {
mdxCompileOptions: {
remarkPlugins: [remarkGfm]
}
}
}
},
'@storybook/addon-a11y',
'@whitespace/storybook-addon-html',
'storybook-addon-vue-slots'
],

staticDirs: [
'./../public',
'./../node_modules/@explorer-1/common-storybook/src/public',
'./../node_modules/@explorer-1/common/src'
],
framework: {
name: '@storybook/vue3-vite',
options: {}
Expand Down
40 changes: 40 additions & 0 deletions apps/vue-storybook/.storybook/manager-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<style type="text/css">
/* styles for the storybook sidebar */
@import 'css/font-face.css';

.sidebar-item {
font-family: Metropolis, sans-serif !important;
line-height: 1.2rem !important;
display: flex !important;
align-items: center !important;
}
.sidebar-item svg:not([type='document']) {
color: inherit !important;
}

/* www should be in uppercase */
.sidebar-item#www {
text-transform: uppercase;
}

/* create illusion of hrs between sidebar sections */
.sidebar-item#www,
.sidebar-item#appendix {
border-radius: 0;
border-top: 2px solid rgba(0, 0, 0, 0.1);
margin-top: 0.5rem;
padding-top: 1rem !important;
}

/* logo placement tweaks */
.sidebar-header > div {
margin-right: 0 !important;
}
.sidebar-header a {
margin: 6px 0 !important;
}
.sidebar-header a > img {
max-width: none !important;
max-height: none !important;
}
</style>
11 changes: 11 additions & 0 deletions apps/vue-storybook/.storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// customizing Storybook's manager UI
// see config options: https://storybook.js.org/docs/vue/configure/features-and-behavior

import { addons } from '@storybook/manager-api'
import customTheme from '@explorer-1/common-storybook/src/config/customTheme'

// to collapse all sections and use custom theme
addons.setConfig({
theme: customTheme,
sidebar: { showRoots: false }
})
146 changes: 146 additions & 0 deletions apps/vue-storybook/.storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
<style type="text/css">
/* styles for docs tab */
/* @import 'dist/css/font-face.css'; */

#storybook-docs
.sbdocs
.sbdocs-content
*:not(.sbdocs-preview, .sbdocs-preview *, pre, pre *, code, code *) {
font-family: Metropolis, sans-serif !important;
}
/* make docs have full width iframes
** rescopes width to all nested divs, not the container wrapper */
.sbdocs.sbdocs-content {
max-width: 1950px;
}
.sbdocs.sbdocs-content > * {
width: 100%;
max-width: 950px;
margin-left: auto;
margin-right: auto;
}
.sbdocs.sbdocs-content > div[id*='anchor--'],
.sbdocs.sbdocs-content .reactdocs-content {
max-width: none;
}
.sbdocs.sbdocs-content > div[id*='anchor--'] > *,
.sbdocs.sbdocs-content .reactdocs-content > div,
.reactdocs-container {
width: 100%;
max-width: 950px;
margin-left: auto;
margin-right: auto;
}

/* .sbdocs.sbdocs-content .sbdocs-pre {
margin-left: auto;
margin-right: auto;
} */
.sbdocs.sbdocs-content > pre {
margin-left: auto;
margin-right: auto;
}

.sbdocs .sbdocs-content ol:not(.list-none) {
list-style-type: decimal;
}

/* custom border color for h2 to match gray-light-mid */
.sbdocs.sbdocs-h2 {
border-bottom: 1px solid rgba(216, 216, 216, 1);
}

/* .sbdocs-preview-full-width overrides max width in doc view
** use this class via the `className` prop on Canvas
*/
.sbdocs.sbdocs-content .sbdocs-preview-full-width,
.sbdocs-preview-full-width .sbdocs.sbdocs-content .sbdocs-preview,
.sbdocs.sbdocs-content .sb-anchor .sbdocs-preview {
max-width: none !important;
margin-top: 2rem;
margin-bottom: 2rem;
}

/* unset the mysterious height that storybook adds to Canvas doc blocks rendered via a React component */
.sbdocs.sbdocs-content .reactdocs-content .sbdocs-preview .docs-story div[height='20'] {
height: unset;
}

/* sometimes inline stories still need an explicit height set */
.sbdocs-inline-height .docs-story {
height: 500px !important;
}
.sbdocs-inline-height-2xs .docs-story {
height: 200px !important;
}
.sbdocs-inline-height-xs .docs-story {
height: 300px !important;
}
.sbdocs-inline-height-sm .docs-story {
height: 400px !important;
}
.sbdocs-inline-height-lg .docs-story {
height: 600px !important;
}
.sbdocs-inline-height-xl .docs-story {
height: 700px !important;
}
.sbdocs-inline-height-2xl .docs-story {
height: 800px !important;
}
.sbdocs-inline-height .docs-story > div:first-child {
height: inherit !important;
}

/* sbdocs link style */
.sbdocs.sbdocs-a {
font-weight: 600;
border-bottom: 1px solid #489fdf;
color: black;
}
.sbdocs.sbdocs-a:hover {
border-bottom-color: black;
}

/* sbdocs table styles */
.sbdocs.sbdocs-table {
margin-top: 24px;
margin-bottom: 24px;
}
.sbdocs.sbdocs-table tr:nth-of-type(2n) {
background: white;
}
.sbdocs.sbdocs-table tr th,
.sbdocs.sbdocs-table tr td {
border-left: none;
border-right: none;
}

/* tag or image alignment */
.sbdocs.sbdocs-content img[src*='#left'] {
float: left;
}
.sbdocs.sbdocs-content img[src*='#right'] {
float: right;
}
.sbdocs.sbdocs-content img[src*='#center'] {
display: block;
margin: auto;
}
.sbdocs.sbdocs-content img[src*='#inline'] {
display: inline;
}

/* background color for code blocks */
.sbdocs .docblock-source {
background-color: #f5f5f5;
}

/* make details > summary text appear clickable in docs */
.sbdocs details > summary {
cursor: pointer;
}
.sbdocs details > summary > .sbdocs-span {
font-size: unset !important;
}
</style>
Loading