Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1668 drupalconsole rd #54

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions config/sync/block.block.dynamiccopyrightblock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
uuid: 809306ac-6e92-4183-9b42-fd33e69c617f
langcode: en
status: true
dependencies:
module:
- dynamic_copyright_block
theme:
- jameel_theme
id: dynamiccopyrightblock
theme: jameel_theme
region: footer_first
weight: 0
provider: null
plugin: dynamic_copyright_block
settings:
id: dynamic_copyright_block
label: 'Dynamic copyright block'
provider: dynamic_copyright_block
label_display: '0'
visibility: { }
28 changes: 27 additions & 1 deletion config/sync/core.entity_view_display.node.page.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,31 @@ third_party_settings:
id: 'extra_field_block:node:page:links'
additional: { }
weight: 1
ac6348b6-0057-46b6-aae4-d142377409b9:
uuid: ac6348b6-0057-46b6-aae4-d142377409b9
region: content
configuration:
label_display: '0'
context_mapping:
entity: layout_builder.entity
id: 'field_block:node:page:body'
formatter:
label: hidden
type: text_default
settings: { }
third_party_settings: { }
additional: { }
weight: 2
e0ba6e82-421f-4aba-af42-b8bc8efe5d25:
uuid: e0ba6e82-421f-4aba-af42-b8bc8efe5d25
region: content
configuration:
label_display: '0'
context_mapping:
entity: layout_builder.entity
id: 'extra_field_block:node:page:links'
additional: { }
weight: 3
allow_custom: true
enabled: true
_core:
Expand All @@ -62,4 +87,5 @@ content:
region: content
settings: { }
third_party_settings: { }
hidden: { }
hidden:
layout_builder__layout: true
1 change: 1 addition & 0 deletions config/sync/core.extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module:
datetime: 0
datetime_range: 0
dblog: 0
dynamic_copyright_block: 0
dynamic_page_cache: 0
editor: 0
field: 0
Expand Down
14 changes: 14 additions & 0 deletions web/modules/custom/dynamic_copyright_block/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "drupal/dynamic_copyright_block",
"type": "drupal-module",
"description": "Provides copyright block",
"keywords": ["Drupal"],
"license": "GPL-2.0+",
"homepage": "https://www.drupal.org/project/dynamic_copyright_block",
"minimum-stability": "dev",
"support": {
"issues": "https://www.drupal.org/project/issues/dynamic_copyright_block",
"source": "http://cgit.drupalcode.org/dynamic_copyright_block"
},
"require": { }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: 'Dynamic Copyright Block'
type: module
description: 'Provides copyright block'
core: 8.x
package: 'Custom'
dependencies:
- block
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

/**
* @file
* Contains dynamic_copyright_block.module.
*/

use Drupal\Core\Routing\RouteMatchInterface;

/**
* Implements hook_help().
*/
function dynamic_copyright_block_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help for the dynamic_copyright_block module.
case 'help.page.dynamic_copyright_block':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('Provides copyright block') . '</p>';
return $output;

default:
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

namespace Drupal\dynamic_copyright_block\Plugin\Block;

use Drupal\Core\Block\BlockBase;

/**
* Provides a 'DynamicCopyrightBlock' block.
*
* @Block(
* id = "dynamic_copyright_block",
* admin_label = @Translation("Dynamic copyright block"),
* )
*/
class DynamicCopyrightBlock extends BlockBase {

/**
* {@inheritdoc}
*/
public function build() {
$year = date("Y");
$build = [];
$build['dynamic_copyright_block']['#markup'] = "© $year. All rights reserved.";

return $build;
}

}
2 changes: 1 addition & 1 deletion web/themes/custom/jameel_theme/css/bootstrap.css

Large diffs are not rendered by default.

Loading