Skip to content
Snippets Groups Projects
Commit 5ceed26c authored by Nono Martinez's avatar Nono Martinez
Browse files

Issue #3322140: Replace README.txt with README.md

parent cb234f3a
No related branches found
No related tags found
No related merge requests found
CONTENTS OF THIS FILE
---------------------
## CONTENTS OF THIS FILE
* Introduction
* Requirements
......@@ -9,8 +8,7 @@ CONTENTS OF THIS FILE
* Maintainers
INTRODUCTION
------------
## INTRODUCTION
This is a lightweight mobile detection based on the Mobile_Detect.php library,
which can be obtained from the GitHub repository.This module is intended to aid
......@@ -25,8 +23,7 @@ showing (or hiding) a block or content pane to a particular device.
https://drupal.org/project/issues/mobile_detect
REQUIREMENTS
------------
## REQUIREMENTS
* As noted, this module does not include the actual Mobile_Detect library.
This should be downloaded or cloned from one of the links above and
......@@ -39,8 +36,7 @@ REQUIREMENTS
sites/example.com/libraries/Mobile_Detect
INSTALLATION
------------
## INSTALLATION
* Install as you would normally install a contributed Drupal module. See:
https://www.drupal.org/docs/8/extending-drupal-8/installing-modules
......@@ -60,22 +56,21 @@ INSTALLATION
composer require drupal/mobile_detect
CONFIGURATION
-------------
## CONFIGURATION
* The base module just provides a service for use in themes and other modules:
$md = \Drupal::service('mobile_detect');
$md->isMobile();
$md->isTablet()
$md = \Drupal::service('mobile_detect');
$md->isMobile();
$md->isTablet()
* It adds common Twig extensions to work with html.twig templates:
{% if is_mobile() %}
{% if is_tablet() %}
{% if is_device('iPhone') %}
{% if is_ios() %}
{% if is_android_ios() %}
{% if is_mobile() %}
{% if is_tablet() %}
{% if is_device('iPhone') %}
{% if is_ios() %}
{% if is_android_ios() %}
See the documentation for the Mobile_Detect library for more information.
......@@ -85,8 +80,7 @@ CONFIGURATION
page selection rules, place the Table variant before the Mobile variant.
TROUBLESHOOTING
---------------
## TROUBLESHOOTING
* Problems with the actual Mobile_Detect library should be directed to the
GitHub issue queue.
......@@ -104,8 +98,7 @@ TROUBLESHOOTING
* https://www.drupal.org/docs/drupal-apis/cache-api/cache-contexts
MAINTAINERS
-----------
## MAINTAINERS
Current maintainers:
* Darryl Norris (darol100) - https://www.drupal.org/u/darol100
......@@ -113,4 +106,5 @@ Current maintainers:
* Sora_tm - https://www.drupal.org/u/sora_tm
* Viktor Vilyus (VVVi) - https://www.drupal.org/u/vvvi
* Matt Chapman (chapabu) - https://www.drupal.org/u/chapabu
* Antonio Martinez (nonom) - https://www.drupal.org/u/nonom
* Nono Martinez (nonom) - https://www.drupal.org/u/nonom
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment