Skip to content

Commit

Permalink
💄 (project) : Adapt colors (theme)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephane-Pires committed Jul 19, 2023
1 parent 51ce388 commit 4d74b8f
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 32 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,14 +316,14 @@ To use it you just need to add it to your `slides` like this:
To use it you just need to add it to your `slides` like this:

```markdown
<Variant type='highlight'>
<Variant type='info'>
Some text
</Variant>
```

The props `type` give access to the theme of the application.

- `type` is one of `highlight` | `info` | `accent` | `warning`
- `type` is one of `info` | `accent` | `warning`


### Card `<Card> ... </Card>`
Expand All @@ -337,14 +337,14 @@ The props `type` give access to the theme of the application.
To use it you just need to add it to your `slides` like this:

```markdown
<Card type='highlight' title='My Title'>
<Card type='info' title='My Title'>
Some text, components, images
</Card>
```

The props `type` give access to the theme of the application.

- `type` is one of `highlight` | `info` | `accent` | `warning`
- `type` is one of | `info` | `accent` | `warning`
- `title` is a `string`

### Note `<Note> ... </Note>`
Expand All @@ -365,5 +365,5 @@ To use it you just need to add it to your `slides` like this:

The props `type` give access to the theme of the application.

- `type` is one of `highlight` | `info` | `accent` | `warning`
- `type` is one of | `info` | `accent` | `warning`
- `title` is a `string`
10 changes: 1 addition & 9 deletions components/card.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
const props = defineProps(
{
type: 'accent' | 'highlight' | 'info' | 'warning',
type: 'accent' | 'info' | 'warning',
title: String,
}
)
Expand Down Expand Up @@ -33,14 +33,6 @@ const props = defineProps(
@apply text-2xl text-dark-warning dark:text-light-warning mb-4
}
}
.highlight {
@apply border-dark-highlight border-5 bg-light-highlight p-6 bg-opacity-15 border-opacity-15;
h1 {
@apply text-2xl text-dark-highlight dark:text-light-highlight mb-4
}
}
.info {
Expand Down
5 changes: 1 addition & 4 deletions components/variant.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
const props = defineProps(
{
type: 'accent' | 'highlight' | 'info' | 'warning',
type: 'accent' | 'info' | 'warning',
}
)
</script>
Expand All @@ -16,9 +16,6 @@ const props = defineProps(
.warning {
@apply text-light-warning dark:text-dark-warning;
}
.highlight {
@apply text-light-highlight dark:text-dark-highlight;
}
.accent {
@apply text-brand-dark dark:text-brand-logo;
Expand Down
2 changes: 1 addition & 1 deletion layouts/cover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
font-family: 'Merienda'
}
h1 + p {
@apply opacity-60 -mt-4 text-2xl;
@apply -mt-4 text-2xl;
}
}
</style>
8 changes: 4 additions & 4 deletions layouts/roti.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<template>
<div class="slidev-layout w-full h-full flex items-center">
<h1>
<Variant type="highlight">R</Variant>eturn
<Variant type="highlight">O</Variant>n
<Variant type="highlight">T</Variant>ime
<Variant type="highlight">I</Variant>nvested
<Variant type="info">R</Variant>eturn
<Variant type="info">O</Variant>n
<Variant type="info">T</Variant>ime
<Variant type="info">I</Variant>nvested
</h1>
<div class="-mt-15 flex flex-row w-full justify-between content-center items-end">
<img class="rounded-xl" src="/images/plant-1.png" />
Expand Down
12 changes: 6 additions & 6 deletions setup/windicss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ export default defineWindiSetup(() => ({
},
dark: {
background: {
left: '#23272F',
right: '#23272F',
left: '#0f172a',
right: '#0f172a',
},
title: '#76c893',
text: {
base: colors.white,
base: '#faedcd',
contrast: colors.black
} ,
warning: '#ff7b00',
warning: '#f81ce5',
accent: '#86EFAC',
highlight: '#C0B2F8',
info: '#33BDEB'
highlight: '#faedcd',
info: '#93c5fd'
},
light: {
background: {
Expand Down
2 changes: 1 addition & 1 deletion slides/card.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

<Card type="info" title="Some card">
<Text>
Card have access to the type props : "<Variant type="accent">accent</Variant>" | "<Variant type="highlight">highlight</Variant>" | "<Variant type="warning">warning</Variant>" | "<Variant type="info">info</Variant>"
Card have access to the type props : "<Variant type="accent">accent</Variant>" | "<Variant type="warning">warning</Variant>" | "<Variant type="info">info</Variant>"
</Text>
</Card>
1 change: 0 additions & 1 deletion slides/variants.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ Using Variants, you have access to different colors of the application

* <Variant type="warning" v-click> WARNING : for important things </Variant>
* <Variant type="accent" v-click> ACCENT : to get main color of the theme</Variant>
* <Variant type="highlight" v-click> HIGHLIGHT : to create focus around something </Variant>
* <Variant type="info" v-click> INFO: to specify something is an extra info</Variant>
2 changes: 1 addition & 1 deletion styles/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ html.dark {
}

.slidev-toc-item {
@apply light:hover:text-light-highlight dark:hover:text-brand-logo transition ease-in-out duration-300
@apply dark:hover:text-brand-logo transition ease-in-out duration-300
}


Expand Down

0 comments on commit 4d74b8f

Please sign in to comment.