Loading config/install/elf.settings.yml +2 −0 Original line number Diff line number Diff line elf_domains: [] elf_icon_class: 'elf-icon' elf_window: false elf_accessible: false elf_redirect: false config/schema/elf.schema.yml +7 −1 Original line number Diff line number Diff line Loading @@ -9,9 +9,15 @@ elf.settings: type: sequence sequence: type: string elf_icon_class: type: text label: 'Icon class to be applied for external links' elf_window: type: boolean label: 'Use JavaScript to open external links in a new window' label: 'Open external links in a new tab' elf_accessible: type: boolean label: 'Provide an accessible indication of external links' elf_redirect: type: boolean label: 'Redirect users to external websites via !url_path' css/styles.css +7 −0 Original line number Diff line number Diff line Loading @@ -6,3 +6,10 @@ a.elf-mailto.elf-icon { background: url(../images/mail.png) right center no-repeat; padding-right: 12px; } a.elf-external .screen-reader-only { position: absolute; width: 1px; clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap; } elf.install +20 −0 Original line number Diff line number Diff line Loading @@ -32,3 +32,23 @@ function elf_requirements($phase) { return $requirements; } /** * Add icon class setting to the schema. */ function elf_update_8001() { $config_factory = \Drupal::configFactory(); $config = $config_factory->getEditable('elf.settings'); $config->set('elf_icon_class', 'elf-icon'); $config->save(TRUE); } /** * Add accessible setting to the schema. */ function elf_update_8002() { $config_factory = \Drupal::configFactory(); $config = $config_factory->getEditable('elf.settings'); $config->set('elf_accessible', false); $config->save(TRUE); } elf.libraries.yml +0 −6 Original line number Diff line number Diff line Loading @@ -2,9 +2,3 @@ elf_css: css: theme: css/styles.css: {} elf_js: js: js/elf.js: {} dependencies: - core/jquery Loading
config/install/elf.settings.yml +2 −0 Original line number Diff line number Diff line elf_domains: [] elf_icon_class: 'elf-icon' elf_window: false elf_accessible: false elf_redirect: false
config/schema/elf.schema.yml +7 −1 Original line number Diff line number Diff line Loading @@ -9,9 +9,15 @@ elf.settings: type: sequence sequence: type: string elf_icon_class: type: text label: 'Icon class to be applied for external links' elf_window: type: boolean label: 'Use JavaScript to open external links in a new window' label: 'Open external links in a new tab' elf_accessible: type: boolean label: 'Provide an accessible indication of external links' elf_redirect: type: boolean label: 'Redirect users to external websites via !url_path'
css/styles.css +7 −0 Original line number Diff line number Diff line Loading @@ -6,3 +6,10 @@ a.elf-mailto.elf-icon { background: url(../images/mail.png) right center no-repeat; padding-right: 12px; } a.elf-external .screen-reader-only { position: absolute; width: 1px; clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap; }
elf.install +20 −0 Original line number Diff line number Diff line Loading @@ -32,3 +32,23 @@ function elf_requirements($phase) { return $requirements; } /** * Add icon class setting to the schema. */ function elf_update_8001() { $config_factory = \Drupal::configFactory(); $config = $config_factory->getEditable('elf.settings'); $config->set('elf_icon_class', 'elf-icon'); $config->save(TRUE); } /** * Add accessible setting to the schema. */ function elf_update_8002() { $config_factory = \Drupal::configFactory(); $config = $config_factory->getEditable('elf.settings'); $config->set('elf_accessible', false); $config->save(TRUE); }
elf.libraries.yml +0 −6 Original line number Diff line number Diff line Loading @@ -2,9 +2,3 @@ elf_css: css: theme: css/styles.css: {} elf_js: js: js/elf.js: {} dependencies: - core/jquery