Giter Site home page Giter Site logo

ceteicean's Introduction

CETEIcean 🐳

/sɪˈti:ʃn/

build:passed

What is this?

tl;dr: CETEIcean lets you display unmodified TEI documents in a web browser! Examples may be found here.

CETEIcean is a Javascript (ES6) library that allows TEI documents to be displayed in a web browser without converting them to HTML. It uses the emerging Web Components standards, especially Custom Elements, and Shadow DOM. It works by loading the TEI file dynamically, renaming the elements to follow the Custom Elements conventions, and registering them with the browser. Browsers that support Web Components will use them to add the appropriate display and behaviors to the TEI elements; other browsers will use fallback methods to achieve the same result.

Because it preserves the full structure and information from your TEI data model, CETEIcean allows you to build rich web applications from your source documents using standard tools like CSS and Javascript.

CETEIcean was inspired by TEI Boilerplate, which also displays TEI in the browser, but differs from it in a couple of important ways. CETEIcean does not rely on an in-browser XSLT transformation, triggered by an XSLT directive in the source, so no modification to the source XML is necessary for it to work. Because it follows the Custom Elements standard, the HTML it produces is valid and there are no possibilities of element name collisions (like HTML <p> vs. TEI <p> for example).

Usage

You can use CETEIcean in your projects just by grabbing the CETEI.js. file from the latest release and linking to it in an HTML file like the examples do. If you want to build and play with it on your own, follow the steps below.

Install

Get NodeJS.

Run

npm i

Build

npm run build

puts a copy of CETEI.js in the dist/ folder

Develop

npm run dev

runs a local web server on port 8888. Browse to the examples in the test/ folder. Make changes and they'll show up when you reload.

Use

Run the build process and then include the generated CETEI.js file in an HTML document like the simpleTest.html file in the test/ folder. Or, use the server-side language and framework of your choice to generate such files on demand.

Customize

TEI documents displayed using CETEIcean can be customized via CSS or by specifying behaviors for individual elements. For documentation on behaviors see the wiki.

ceteicean's People

Contributors

hcayless avatar raffazizzi avatar

Watchers

Jérôme Blanchard avatar James Cloos avatar cyrillus avatar Frédéric Pierre 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.