Skip to content

Commit

Permalink
v1.4.1 (#209)
Browse files Browse the repository at this point in the history
* feat: global components (#164)

* feat(lib): register nuxt components:dirs hook

* chore(deps): use nuxt v2.13.x

* chore(example): use global components

* chore(docs): use global components

* docs: add section about global components

* Update docs/package.json

Co-authored-by: Sébastien Chopin <[email protected]>

* docs: update global components

* Update writing.md

* chore: remove commitlint

* docs: update deps

* chore(deps): update

* chore(github): add ci on dev branch

Co-authored-by: Sébastien Chopin <[email protected]>

* chore(deps): update lock

* chore(github): add ci on macos

* feat: plugins compatibility (#183)

* feat(lib): backwards compatibility with `plugins` and `basePlugins`

* docs: update for v1.4.0 instead of v2.0.0

* chore(deps): update dependency consola to ^2.14.0 (#184)

Co-authored-by: Renovate Bot <[email protected]>

* chore(deps): update devdependency nuxt to ^2.13.2 (#186)

Co-authored-by: Renovate Bot <[email protected]>

* feat: handle middleware `where` query params (#190)

* feat(lib): handle where query params

* chore(example): add links

* test: add middleware where query params

* docs: add section for where query params

* feat: add XML support (#182)

* add xml file

* add xml

* add dependencies

* Update index.js

* bugfix

* Create xml.xml

* Update index.vue

* Create xml.xml

* Update writing.md

* Update writing.md

* Update utils.js

* fix dependencies

* fix

* update docs

* add config docs

* Update index.md

Co-authored-by: Benjamin Canac <[email protected]>

* docs: clean writing codeblocks

* chore(deps): update all non-major dependencies to ^7.10.4 (#198)

Co-authored-by: Renovate Bot <[email protected]>

* docs: (en) add example for toc (#196)

add an example for table of contents usage

* chore(deps): update devdependency @nuxtjs/module-test-utils to ^1.6.2 (#203)

Co-authored-by: Renovate Bot <[email protected]>

* chore(deps): update dependency p-queue to v6.5.0 (#204)

Co-authored-by: Renovate Bot <[email protected]>

* chore(deps): try nuxt static

* docs: add code of conduct

* docs: add pull request template

* docs: update readme

* chore(pkg): rename to generate

* chore(deps): update devdependency @nuxtjs/module-test-utils to ^1.6.3 (#205)

Co-authored-by: Renovate Bot <[email protected]>

* docs: improve (#206)

* docs: update

* docs: update

* docs: update

* docs: update design

* docs: update markdown titles scroll position

* docs: small improvements

* docs: add clipboard

* docs: update copy style

Co-authored-by: Sébastien Chopin <[email protected]>

* Add "without" method to type declaration (#208)

* docs: typo + translate EN leftover (#207)

Co-authored-by: Sébastien Chopin <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Sebastian Krüger <[email protected]>
Co-authored-by: Debbie O'Brien <[email protected]>
Co-authored-by: Luke Wiwatowski <[email protected]>
Co-authored-by: jbuiquan <[email protected]>
  • Loading branch information
8 people authored Jul 2, 2020
1 parent c40ef02 commit 86505bb
Show file tree
Hide file tree
Showing 34 changed files with 1,598 additions and 598 deletions.
22 changes: 22 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!--- Provide a general summary of your changes in the title above -->

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (a non-breaking change which fixes an issue)
- [ ] New feature (a non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)


## Description
<!--- Describe your changes in detail -->
<!--- Why is this change required? What problem does it solve? -->
<!--- If it resolves an open issue, please link to the issue here. For example "Resolves: #137" -->


## Checklist:
<!--- Put an `x` in all the boxes that apply. -->
<!--- If your change requires a documentation PR, please link it appropriately -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes (if not applicable, please state why)
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ node_modules
coverage
dist
sw.*
.env
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

> @nuxt/content lets you write in a content/ directory, acting as Git-based Headless CMS
- [🎲 Play on CodeSandbox](https://codesandbox.io/s/nuxtcontent-demo-l164h?)
- [🎬 Demonstration videos](https://content.nuxtjs.org/#videos)
- [✨ Release Notes](https://github.com/nuxt/content/releases)
- [📖 Read the documentation](https://content.nuxtjs.org)
- [🎲 &nbsp;Play on CodeSandbox](https://codesandbox.io/s/nuxtcontent-demo-l164h?)
- [🎬 &nbsp;Demonstration videos](https://content.nuxtjs.org/#videos)
- [&nbsp;Release Notes](https://github.com/nuxt/content/releases)
- [📖 &nbsp;Read the documentation](https://content.nuxtjs.org)

## Features

Expand Down
153 changes: 153 additions & 0 deletions docs/assets/css/content.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
.dark-mode .nuxt-content {
& h2,
& h3,
& blockquote {
@apply border-gray-800;
}

& > code,
& li > code,
& p > code,
& h3 > code {
@apply bg-gray-800;
}
}

.nuxt-content h2 {
@apply text-3xl font-black mb-4 pb-1 border-b -mt-12 pt-16;

& > a {
@apply ml-6;
&::before {
content: "#";
@apply text-green-500 font-normal -ml-6 pr-1 absolute opacity-100;
}
}

&:hover {
& > a::before {
@apply opacity-100;
}
}
}
.nuxt-content h3 {
@apply text-2xl font-extrabold mb-2 pb-1 border-b -mt-12 pt-16;

& > a {
@apply ml-6;
&::before {
content: "#";
@apply text-green-500 font-normal -ml-5 pr-1 absolute opacity-100;
}
}

&:hover {
& > a::before {
@apply opacity-100;
}
}
}

.nuxt-content h4 {
@apply text-xl font-semibold mb-2 pb-1 border-b -mt-16 pt-20;
}

@screen lg {
.nuxt-content h2 a,
.nuxt-content h3 a {
@apply ml-0;
&::before {
@apply opacity-0;
}
}
}

.nuxt-content ul,
.nuxt-content ol {
@apply list-disc list-inside mb-4 pl-2;

& > li {
@apply leading-7;

& > ul {
@apply pl-4;
}
}
}

.nuxt-content ol {
@apply list-decimal;
}

.nuxt-content {
& a {
@apply text-green-500;

&:hover {
@apply underline;
}
}

& p {
@apply mb-4 leading-7;
}

& > blockquote {
@apply py-2 pl-4 mb-4 border-l-4;

& p:last-child {
@apply mb-0;
}
}

& > code,
& li > code,
& p > code {
@apply bg-gray-100 p-1 text-sm shadow-xs rounded;
}

& h3 > code {
@apply bg-gray-100 p-1 text-lg shadow-xs rounded;
}

& pre[class*="language-"] {
@apply rounded mt-0 mb-4 bg-gray-800 text-sm relative;

> code {
@apply bg-gray-800 relative;
text-shadow: none;
}
}

& video {
@apply w-full border rounded shadow-md;
}
}

.nuxt-content-highlight {
@apply relative;

& > .filename {
@apply absolute right-0 top-0 text-gray-600 font-light z-10 mr-2 mt-1 text-sm;
}

& > pre {
& > .copy {
@apply hidden absolute right-0 bottom-0 shadow-lg px-3 py-1 text-white text-sm uppercase font-sans rounded-md bg-transparent border border-white tracking-wide font-semibold mr-3 mb-3;

&:hover {
@apply bg-gray-700;
}

&:focus {
@apply outline-none bg-gray-900;
}
}

&:hover {
& > .copy {
@apply block;
}
}
}
}
12 changes: 9 additions & 3 deletions docs/components/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@
>
<div class="container mx-auto px-4 lg:px-8 flex-1">
<div class="flex items-center justify-between h-16">
<div class="w-1/6" @click.stop="noop">
<div class="w-1/2 lg:w-1/6" @click.stop="noop">
<NuxtLink
:to="localePath('slug')"
class="text-xl font-bold tracking-tight flex items-center flex-shrink-0"
style="width: 104px;"
class="flex items-center flex-shrink-0 w-full"
aria-label="Nuxt Content Logo"
>
<IconLogo v-if="$colorMode.value === 'light'" class="h-8 w-auto" />
<IconLogoDark v-else class="h-8 w-auto" />
<NuxtLink
to="/releases"
class="rounded text-green-500 dark:text-white bg-green-100 dark:bg-green-700 border border-green-200 dark:border-transparent p-1 text-xs font-bold leading-none flex items-center justify-center ml-1"
>{{ lastRelease.name }}</NuxtLink>
</NuxtLink>
</div>
<div class="hidden flex-1 lg:flex justify-center ml-4 mr-2 lg:mx-8 w-4/6">
Expand Down Expand Up @@ -64,6 +67,9 @@ export default {
set (val) {
this.$store.commit('menu/toggle', val)
}
},
lastRelease () {
return this.$store.state.releases[0]
}
},
methods: {
Expand Down
4 changes: 2 additions & 2 deletions docs/components/SearchInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
}"
@click="focus = false"
>
<span class="font-bold hidden sm:block">{{ result.category }}</span>
<IconChevronRight class="w-3 h-3 mx-1 hidden sm:block" />
<span class="font-bold">{{ result.category }}</span>
<IconChevronRight class="w-3 h-3 mx-1" />
{{ result.title }}
</NuxtLink>
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/components/TheFooter.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<footer class="h-24 w-full border-t dark:border-gray-800 bg-white dark:bg-gray-900">
<footer class="h-20 w-full border-t dark:border-gray-800 bg-white dark:bg-gray-900">
<div class="h-full w-full container mx-auto px-4 lg:px-8 flex items-center justify-between">
<div class="flex items-end">
<span class="mr-2 text-sm leading-none">© {{ new Date().getFullYear() }}</span>
Expand Down
36 changes: 14 additions & 22 deletions docs/components/base/Dropdown.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
<template>
<div
v-click-away="'close'"
class="relative"
class="relative inline-block text-left"
@mouseenter="open = true"
@mouseleave="open = false"
@keydown.escape="open = false"
>
<slot name="trigger" :toggle="toggle" :open="open" />

<transition name="dropdown">
<div v-if="open" class="dropdown-wrapper absolute z-50">
<div class="rounded-md shadow-lg bg-white dark:bg-gray-800 overflow-hidden">
<transition
enter-class="transform opacity-0 scale-95"
enter-active-class="transition ease-out duration-100"
enter-to-class="transform opacity-100 scale-100"
leave-class="transform opacity-100 scale-100"
leave-active-class="transition ease-in duration-75"
leave-to-class="transform opacity-0 scale-95"
>
<div
v-show="open"
class="mt-2 w-auto rounded-md shadow-lg z-50 origin-top-right absolute bottom-0 right-0"
>
<div class="rounded-md bg-white dark:bg-gray-800 shadow-xs">
<slot />
</div>
</div>
Expand Down Expand Up @@ -41,21 +51,3 @@ export default {
}
}
</script>

<style scoped>
.dropdown-enter-active,
.dropdown-leave-active {
transform: translateY(0) translateX(-50%) !important;
transition: opacity 150ms linear, transform 150ms cubic-bezier(0.4, 0, 0.6, 1);
}
.dropdown-enter,
.dropdown-leave-to {
opacity: 0;
transform: translateY(5px) translateX(-50%) !important;
}
.dropdown-wrapper {
top: -100%;
left: 50%;
transform: translateY(0) translateX(-50%);
}
</style>
6 changes: 6 additions & 0 deletions docs/components/global/bases/BaseAlert.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ export default {
.alert p {
@apply m-0 !important;
}
.alert a {
@apply text-gray-800 !important;
}
.alert-warning {
@apply bg-orange-100 border-orange-400;
}
Expand All @@ -39,6 +42,9 @@ export default {
.alert-warning .alert-content {
@apply text-orange-700;
}
.dark-mode .alert a {
@apply text-white !important;
}
.dark-mode .alert-warning {
@apply bg-yellow-900 border-yellow-700;
}
Expand Down
Loading

0 comments on commit 86505bb

Please sign in to comment.