Giter Club home page Giter Club logo

nuxt-typo3-skin's Introduction

nuxt-typo3-skin

Proof of concept additional theming for nuxt-typo3

Features

  • Storybook
  • Tailwind.css
  • Postcss
  • Ready to use as nuxt module

Theme installation

in your nuxt-typo3 project

yarn add nuxt-typo3-skin

nuxt.config.js:

...
modules: [
    'nuxt-typo3-skin',
    // Doc: https://github.com/TYPO3-Initiatives/nuxt-typo3
    'nuxt-typo3'
],
...

And use our layouts/default.vue

<template>
  <div class="wrapper">
    <header-main>
      <template v-slot:before>
        <language-switcher
          :active="currentLanguage"
          :languages="availableLanguages"
          class="container flex justify-end"
        />
      </template>
      <template v-slot:logo>
        <nuxt-link :to="navMain.link" class="flex h-full items-center">
          <logo />
        </nuxt-link>
      </template>
      <template v-slot:navigation>
        <navigation-main :links="navMain.children" />
      </template>
    </header-main>
    <div class="section-main">
      <div v-if="breadcrumbs" class="border-b mb-20px">
        <breadcrumbs :links="breadcrumbs" class="container" />
      </div>
      <nuxt />
    </div>
    <footer-main>
      <template v-slot:credits>
        <nuxt-link :to="navMain.link" class="flex h-full items-center">
          <logo />
        </nuxt-link>
      </template>
    </footer-main>
  </div>
</template>
<script>
import {
  NavigationMain,
  Logo,
  HeaderMain,
  FooterMain,
  Breadcrumbs,
  LanguageSwitcher
} from 'nuxt-typo3-skin/components'
import { mapState } from 'vuex'
export default {
  components: {
    NavigationMain,
    HeaderMain,
    FooterMain,
    Logo,
    Breadcrumbs,
    LanguageSwitcher
  },
  computed: {
    ...mapState({
      navMain: (state) => state.typo3.initial.navigation[0] || [], // get first instance from root tree,
      breadcrumbs: (state) => state.typo3.page.page.breadcrumbs || [], // get breadcrumbs for current page,
      currentLanguage: (state) => state.typo3.locale,
      availableLanguages: (state) => state.typo3.page.languages
    })
  }
}
</script>

nuxt-typo3-skin's People

Contributors

mercs600 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.