Skip to content

JaroslawZielinski/TorahVerse-M2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TorahVerse-M2

Magento2 module providing Torah verses/quotes text sliders both for backend (by default) and for frontend.

The length of available space is measured during slider display. Next the number of words for row division is calculated. The first shown rows are presented. If the number of rows exceeds threshold set in configuration, the verse is being scrolled vertically.

Thanks to above the widget is Responsive Web Designed and can be shown on various types of devices.

It is worth mentioning that this module uses library Torah, which is an API client with a caching (SQLite) option. This simple PHP library calls the Bible Info service and can store the response in cache (21 translations available). If you would like to learn more, please see the link...

"Buy Me A Coffee"

How to install

in packagist

cd YourProject
composer require jaroslawzielinski/torahverse-m2

How to Uninstall

excecute in shell the following command (one step before removing the module):

bin/magento torahverse:module:uninstall

in order to restore all database changes

Text Slider Features

Types

Backend part (Admin Panel Slider) is only for magento2 users/supporters but not for customers.

Frontend part is available for magento2 customers in two types. First Type (Homepage Slider) is available only on Homepage in 5 placements (Magento2 container name in layout):

  • 'top.container' - After page header top
  • 'content.top' - Main content top
  • 'content.bottom' - Main content bottom
  • 'page.bottom' - Before page footer
  • 'footer' - Page footer',
  • 'footer-container' - Page Footer Container

There is another frontend type available (Custom Sliders): You may place wherever you want, and as many as you wish. To configure your slider just add it here to the list (name it by 'code' that use only letters (a-z or A-Z), numbers (0-9) or underscore (_) and the first character should be a letter.)

You can insert the slider whatever place you want in Your Shop in Admin Panel [Main Menu -> CONTENT -> Elements -> Pages/Blocks/Widgets] as Torah Verse Custom Slider widget (just add code there - f.e. tv_slider_01, and configure the slider in TorahVerse Configuration part -> Custom Sliders).

Modes

Randomized Auto play infinity loop (by default)

In this mode items positions are random in item array and they are presented one by one in infinite loop. You can pause an element just by moving mouse cursor over it (the cursor will change to ).

Ordered Auto play infinity loop

In this mode items positions in item array are the same as in the admin panel grid. Verses go first, the quotes go after from given group. The rest is similar to mode above.

Random view - static

Only one random verse/quote is displayed per page view. When verse/quote has vertical scroll feature enabled it is scrolled only once. If you would like it to be scrolled again you must hover mouse on it in pause mode and wait. It will be scrolled as many times as it will be in pause mode.

Backend

First steps

Log in to Admin panel

You can see the slider at the top of the screen.

Enable Menu

Save and clear cache See the Torah Verse menu on the left bar.

See the available grids

Groups

Groups grid Possible operations: Add New Group, Delete, Edit

Notice: You can not modify/delete Default Group. Groups grid

Groups/Verses

Verses grid Possible operations: Add New Verse, Delete, Group Assign, Edit Verses grid

Groups/Quotes

Quotes grid Possible operations: Add New Quote, Delete, Group Assign, Edit Quotes grid

Configuration - Torah Verse

General Settings

Enable

Enable module / Disable module and disable menu.

Menu enabled

Enables/disables menu in the left bar (and access to the grids)

Sweep time

Time value in milliseconds between slides (horizontal swipe)

Is vertical sweep possible

Enables feature for vertical scroll (it is triggered when text exceeds 'Number of shown rows')

Vertical Sweep time

Time value in milliseconds between changing current shown row (during vertical scroll)

Is group colours enable

Enables box with group title and group colour

Html Template for Verse Slider Frame

Provides html template for user tweaks. Available keys are listed in comment.

  • {url} - link for bible.info.pl service (target is "_blank")
  • {textColour} - colour for verse text
  • {colour} - colour for group border/group label background
  • {groupName} - name of a group
  • {antiColour} - contrast colour to group border/group label background
  • {content} - verse content
  • {description} - verse description

Html Template for Quote Slider Frame

Provides html template for user tweaks. Available keys are listed in comment.

  • {textColour} - colour for quote text
  • {colour} - colour for group border/group label background
  • {groupName} - name of a group
  • {antiColour} - contrast colour to group border/group label background
  • {content} - quote content
  • {author} - quote author
  • {description} - quote description

Verses ordered

Enables numbering for verses or plain text mode.

Text Colour

Colour for text of sliders

Background Hover Colour

Background colour when slider is being hovered/paused

Mode of slider

Three modes for sliders are available:

  • 'randomautoplayinf' - Randomized Auto play infinity loop
  • 'autoplayinf' - Ordered Auto play infinity loop
  • 'random' - Random view - static

Number of shown rows

Number of shown rows (when 3 - default, please clear 'Custom Styles')

Custom Styles

Provides custom css styles (enables user tweaks (colour change, background, remove cursor etc.))

Admin Panel Slider

Enable

enables/disables the feature.

Override configuration

You may override following settings (from General Settings):

  • Sweep time
  • Is vertical sweep possible
  • Vertical Sweep time
  • Is group colours enable
  • Verses ordered
  • Text Colour
  • Mode of slider

Slider Configuration

In this multi select you may choose groups that you would like to display.

Homepage Slider

Enable

enables/disables the feature.

Override configuration

You may override following settings (from General Settings):

  • Sweep time
  • Is vertical sweep possible
  • Vertical Sweep time
  • Is group colours enable
  • Verses ordered
  • Text Colour
  • Mode of slider

Placement of a slider

There are 5 available placements (Magento2 container name in layout):

  • 'top.container' - After page header top
  • 'content.top' - Main content top
  • 'content.bottom' - Main content bottom
  • 'page.bottom' - Before page footer
  • 'footer' - Page footer',
  • 'footer-container' - Page Footer Container

Slider Configuration

In this multi select you may choose groups that you would like to display.

Custom Sliders

Enable

enables/disables the feature.

Override configuration

You may override following settings (from General Settings):

  • Sweep time
  • Is vertical sweep possible
  • Vertical Sweep time
  • Is group colours enable
  • Verses ordered
  • Text Colour
  • Mode of slider

Slider Configurations

Array for sliders (code, slider configuration). You may add/edit/delete as many configurations as you want. Groups grid

Configuration - Torah

Language Settings

Language

You have two available languages: English and Polish. This settings changes the language of description in Torah siglum.

Translate Preset

You may also update Groups/Verses/Quotes Presets in given language version. Remember to Save before clicking the button unless you prefer the language written in button's label. Groups grid

Torah Input

Division

You may choose division of books in Torah Input (e.g Old Testament\New Testament). Default value is Tanakh/Nevi'im ketuvim/Brithadasha. This feature will be used in the future.

Torah Verse Search enabled

Default value is No. If set to Yes it appears in menu in Search group as Verse Search where Torah input is presented. In the future the input will be customized (you will choose all of the options by just clicking it, without typing anything). The Torah input is also used in Admin Panel in Verse Grid (Add New Verse/Edit action) Groups grid

after clicking it will be opened in new tab (notice little square put next to the link) as a front page:

Groups grid

Frontend

Example uses

Groups grid

Pause mode (cursor changes, and background)

Groups grid Notice: You can configure it in Background Hover Colour, Custom Styles configuration options.

Group Colours enabled

Groups grid

See also

Inspiration for vertical scroll