create-niche-app
v1.0.0
Published
A mini framework designed to ease the workflow for developers working on the Tacit application. It provides a more organized and maintainable way of creating presentations for the Tacit application.
Downloads
1
Readme
Tacit Framework
A mini framework designed to ease the workflow for developers working on the Tacit application. It provides a more organized and maintainable way of creating presentations for the Tacit application.
Background
Tacit application provides companies with a digital platform for their medical representatives to use. The application includes presentations for the company's products, which are graphical aids for the medical representative during his calls with doctors.
The presentations are created using HTML, CSS, and JS with the help of the RevealJS library. However, putting all the presentation slides in a single index.html file caused many problems such as very long files that could reach up to 7000 lines, and the lack of support for components.
The Tacit Framework aims to solve these problems by splitting the index.html file into multiple ejs templates stored in the slides directory. Each template represents a slide and is named according to its slide number.
General Flow
Each slide should contain a section element with the data-section-name attribute. The data-slide-name attribute is added to each slide automatically according to its order. If you deleted a slide from between the slides, you won't have to rename the following slides accordingly because they will be automatically renamed by the dev server. You also won't need to write the presentation sections as the framework will collect the sections and add them automatically with their slide numbers to the nav.
The nav (previously called overlay-content) has been removed from the left and added as an overlay above the whole screen screen and adds a blur backdrop when opened. The nav includes the sections of the presentation (which are collected and added automatically as stated earlier), the references button, and the smpc button. The smpc button only appears if an smpc.pdf file exists in the assets directory. The references button only appears if there are references in the current slide. Putting the smpc and reference buttons in the nav eliminated the need for the senondary-menu element that existed on the right of the screen.
EJS Templates
The use of ejs templates brings many benefits compared to using only HTML files. Components can be included in a slide as follows:
<%- include("/components/pathTo/component.ejs") -%>
Parameters can be passed to a component also:
<%- include("/components/pathTo/component.ejs", { section: "cover" }) -%>
These parameters can then be used in the component or template as follows:
<%= section %>
For more information on the ejs syntax, visit https://ejs.co/.
CSS and Styles
The Tacit Framework uses SCSS instead of CSS for a more intuitive way of writing styles with features such as nesting. The CSS is automatically prefixed using PostCSS Autoprefixer for increased browser support.
The default font-size
of the heading element is overridden with font-size
values that uses the vh
(viewport height) unit.
Slides overflow is hidden by default, to keep the all the elements inside the boundaries of the viewport eleminating the need for scrolling, it's recommended to set the width
and height
values using the vw
and vh
units or percentages values.
Getting Started
To get started with the Tacit Framework, follow these steps:
- Run
npm run dev
to boot the dev server. - Add slides as you need to the slides directory.
The dev server is still in development so if it doesn't reload on a certain event please report it.
You are now ready to start creating your presentation using the Tacit Framework!