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

factor out themes into their own files #46

Merged
merged 4 commits into from
Feb 12, 2024
Merged
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
Binary file added assets/data-frame.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/spectrumai-wordmark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions code-examples/initial-data-table.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<template>
<div>
<DataChart :data="data" :error="error" :loading-state="loadingState" />
<DataTable :data="data" :error="error" :loading-state="loadingState">
<template #paginator>
<Paginator v-model="paginator" />
</template>
<template #csv>
<CSVDownloadButton @click="downloadCSV" />
</template>
</DataTable>
</div>
</template>

<script setup>
import { useDataTablePaginator, useDataTableApiMethod } from '@/composables/DataTable';

const { paginator } = useDataTablePagination({
perPageOptions: [10, 25, 50, 75, 100]
});

const { data, error, loadingState, downloadCSV } = useDataTableMethod({
method: ApiService.Example.dataTable
});
</script>
15 changes: 15 additions & 0 deletions code-examples/redesign-data-table.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<template>
<ApiDataProvider endpoint="/foo" namespace="namespace">
<div class="row">
<CSVDownloadButton namespace="namespace" />
</div>
<DataTable namespace="namespace" />
<div class="row">
<Paginator namespace="namespace" options={[10, 25, 50, 75, 100]} />
</div>
</ApiDataProvider>
</template>

<script setup>
const namespace = "example-namespace"
</script>
7 changes: 1 addition & 6 deletions presentation/core-web-vitals.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@ import {
UnorderedList,
} from "spectacle";

const theme = {
fonts: {
header: '"Open Sans Condensed", Helvetica, Arial, sans-serif',
text: '"Open Sans Condensed", Helvetica, Arial, sans-serif'
}
};
import theme from "../themes/default";

import cypressWebVitalsTest from "../code-examples/cypress-web-vitals-test.example";

Expand Down
34 changes: 2 additions & 32 deletions presentation/course-platform-vnext.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,10 @@ import {
UnorderedList,
} from "spectacle";

import nightOwl from "react-syntax-highlighter/dist/esm/styles/prism/night-owl.js";

import "normalize.css";

const theme = {
colors: {
primary: "#4D94DB",
secondary: "#CCE0F5",
orange: "#FB7544",
purple: "#6150AC",
white: "#ffffff",
yellow: "#F4C050",
green: "#63CE9A",
turquoise: "#47C1BF",
red: "#FB4451",
tertiary: "#001429",
},
fonts: {
header: '"Open Sans Condensed", Helvetica, Arial, sans-serif',
text: '"Open Sans Condensed", Helvetica, Arial, sans-serif',
},
};
import theme from "../themes/skilljar";
import tinyCodeTheme from "../themes/tiny-code";

import butWhy from "../assets/but-why.gif";
import cssBoxModel from "../assets/css-box-model.png";
Expand All @@ -57,18 +39,6 @@ import legacyAnnouncementBanner from "../code-examples/legacy-announcement-banne
import searchBoxHtml from "../code-examples/search-box-html.example";
import styledButtonComponent from "../code-examples/styled-button-component.example";

const tinyCodeTheme = {
...nightOwl,
'code[class*="language-"]': {
...nightOwl['code[class*="language-"]'],
fontSize: ".5em",
},
'pre[class*="language-"]': {
...nightOwl['pre[class*="language-"]'],
lineHeight: ".5",
},
};

const Presentation = () => (
<Deck theme={theme}>
<Slide>
Expand Down
7 changes: 1 addition & 6 deletions presentation/css-the-future-parts.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@ import {

import "normalize.css";

const theme = {
fonts: {
header: '"Open Sans Condensed", Helvetica, Arial, sans-serif',
text: '"Open Sans Condensed", Helvetica, Arial, sans-serif',
},
};
import theme from "../themes/default";

import cssModularModel from "../assets/css-modular-model.png";
import newCssFeatures from "../assets/new-css-features.png";
Expand Down
9 changes: 2 additions & 7 deletions presentation/data-table-strawman.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import {

import "normalize.css";

import theme from "../themes/default";

import csvDownloadButton from "../code-examples/csv-download-button.example";
import customCellComponent from "../code-examples/custom-cell-component.example";
import customCellUsage from "../code-examples/custom-cell-usage.example";
Expand All @@ -22,13 +24,6 @@ import sharingStateWithCharts from "../code-examples/sharing-state-with-charts.e
import useDataTableApiMethod from "../code-examples/use-data-table-api-method.example";
import useDataTablePaginator from "../code-examples/use-data-table-paginator.example";

const theme = {
fonts: {
header: '"Open Sans Condensed", Helvetica, Arial, sans-serif',
text: '"Open Sans Condensed", Helvetica, Arial, sans-serif',
},
};

const Presentation = () =>(
<Deck theme={theme}>
<Slide>
Expand Down
9 changes: 2 additions & 7 deletions presentation/debugging-javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import {

import "normalize.css";

import theme from "../themes/default";

import breakpoint from "../assets/breakpoint.png";
import breakpointRebinds from "../assets/const-rebinds-in-console.png";
import debuggerSidebar from "../assets/debugger-sidebar.png";
Expand All @@ -21,13 +23,6 @@ import overridesTab from "../assets/overrides-tab.png";
import saveForOverrides from "../assets/save-for-overrides.png";
import selectFolderForOverrides from "../assets/select-folder-for-overrides.png";

const theme = {
fonts: {
header: '"Open Sans Condensed", Helvetica, Arial, sans-serif',
text: '"Open Sans Condensed", Helvetica, Arial, sans-serif',
},
};

const Presentation = () => (
<Deck theme={theme}>
<Slide>
Expand Down
14 changes: 1 addition & 13 deletions presentation/dual-publish-node-deno.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,7 @@ import dntTypeCheckFailure from "../code-examples/dnt-build-type-check-failure.e
import dntPublishAction from "../code-examples/dnt-publish-action.example";

import "normalize.css";

const theme = {
colors: {
primary: '#f4f1de',
secondary: '#e07a5f',
tertiary: '#3d405b',
quaternary: '#c5e478',
},
fonts: {
header: '"Open Sans Condensed", Helvetica, Arial, sans-serif',
text: '"Open Sans Condensed", Helvetica, Arial, sans-serif',
},
};
import theme from "../themes/electrique";

const Presentation = () => (
<Deck theme={theme}>
Expand Down
2 changes: 1 addition & 1 deletion presentation/getting-git.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
Text
} from "spectacle";

import theme from "react-syntax-highlighter/dist/esm/styles/prism/night-owl.js";
import theme from "../themes/night-owl";

import "normalize.css";

Expand Down
9 changes: 2 additions & 7 deletions presentation/glue-and-campsite-work.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import {

import "normalize.css";

import theme from "../themes/default";

import supportingRun from "../assets/supporting-run.png";
import glueWork from "../assets/glue-work.png";
import problemContinuum from "../assets/problem-continuum.png";
Expand All @@ -23,13 +25,6 @@ import wingers from "../assets/4-3-3-formation.png";
import pieCharts from "../assets/pie-charts.png";
import tent from "../assets/tent.jpg";

const theme = {
fonts: {
header: '"Open Sans Condensed", Helvetica, Arial, sans-serif',
text: '"Open Sans Condensed", Helvetica, Arial, sans-serif',
},
};

const Presentation = () => (
<Deck theme={theme}>
<Slide>
Expand Down
2 changes: 1 addition & 1 deletion presentation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
Text
} from "spectacle";

import theme from "react-syntax-highlighter/dist/esm/styles/prism/night-owl.js";
import theme from "../themes/night-owl";

import "normalize.css";

Expand Down
Loading
Loading