Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mobile_detect
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
mobile_detect
Commits
5ceed26c
Commit
5ceed26c
authored
1 year ago
by
Nono Martinez
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3322140
: Replace README.txt with README.md
parent
cb234f3a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+17
-23
17 additions, 23 deletions
README.md
with
17 additions
and
23 deletions
README.
txt
→
README.
md
+
17
−
23
View file @
5ceed26c
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment