Giter VIP home page Giter VIP logo

spectacle-theme-nova's Introduction

Spectacle Theme: Nova

Build Status npm

A theme for Spectacle based on the awesome Nova color theme by Trevor D. Miller, Adam Christiansen and Merrick Christensen ๐Ÿ’–

Installation

npm install spectacle-theme-nova

Usage

import { Spectacle, Deck, Slide } from 'spectacle';
import createTheme from 'spectacle-theme-nova';

const theme = createTheme();

const Presentation = () => (
  <Spectacle theme={theme}>
    <Deck>
      <Slide>...</Slide>
    </Deck>
  </Spectacle>
);
  • You can choose between the regular Nova colors and a bright (inversed) version. The later will be generated if you call createTheme with 'avon' as argument.
  • It is possible to overwrite any setting with your custom styles by passing an object as second argument to the createTheme function.

Example:

// Get the "bright" Nova theme
const theme = createTheme('avon');
// Color the background in slategray
const customStyles = {
  global: {
    body: { background: 'slategray' }
  }
};
const theme = createTheme(null, customStyles);

For further information you can also check out the example from this repo. You'll find the source code here:

Important Note

By default the package exposes the "raw" un-transpiled files. Meaning, all fonts and styles are not bundled. This allows you to do whatever you want with the files when you bundle your presentation.

For example, if you're using Melodrama to build your presentation, all fonts can be extracted to have better performance.

If you want a bundled version import 'spectacle-theme-nova/bundle' instead.

Syntax Highlighting

This theme includes a custom color theme for PrismJS. Because not everyone might need syntax highlighting you have to import it yourself:

import 'spectacle-theme-nova/syntax/prism.nova.css';

By default PrismJS doesn't have a different color for globals or certain statement (like return or if). But the Nova color theme does make those distinctions. In order to have a "better" syntax highlighting you can use some custom highlighting. Currently there is support for:

  • JavaScript: import 'spectacle-theme-nova/syntax/prism-javascript'
  • TypeScript: import 'spectacle-theme-nova/syntax/prism-typescript'

You can check out the difference between the highlighting in the below picture.

custom syntax

spectacle-theme-nova's People

Contributors

jwcarroll avatar sebald avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

spectacle-theme-nova's Issues

Publish ES5 compat. build

Hey!

I haven't actually gotten this theme to work quite right yet (still want to do some more testing to verify it's not on my end), but one thing I did notice is that ./lib/index.js is not transpiled to ES5, and so makes it slightly harder to consume by the end user.

Any chance we could move lib to src/ and then create a transpiled dist/ as part of the build step?

I'd be open to opening up a PR when I get some time, as well, if you're open to it.

Thanks and great job!

Improve list styling

Using this currently as a drop-in in a presentation. Makes the list look nicer.
Should this be a default?!

ul {
  list-style: none;
}

li {
  position: relative;
  padding-left: 0.875rem !important;
}

li:before {
  content: '-';
  display: block;

  position: absolute;
  left: -12px;

  color: #899ba6;
}

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.