-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2068 from vrk-kpa/AV-2061_add_links_to_suojattudata
AV-2061: Add links to suojattudata
- Loading branch information
Showing
8 changed files
with
192 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
drupal/modules/avoindata-explore/src/Plugin/Block/ExternalBlock.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace Drupal\avoindata_explore\Plugin\Block; | ||
|
||
use Drupal\Core\Block\BlockBase; | ||
|
||
/** | ||
* Provides a 'Avoindata external' Block. | ||
* | ||
* @Block( | ||
* id = "avoindata_external", | ||
* admin_label = @Translation("Avoindata External"), | ||
* category = @Translation("Avoindata External"), | ||
* ) | ||
*/ | ||
class ExternalBlock extends BlockBase { | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function build() { | ||
return [ | ||
'#language' => \Drupal::languageManager()->getCurrentLanguage()->getId(), | ||
'#theme' => 'avoindata_external', | ||
]; | ||
} | ||
|
||
} |
51 changes: 51 additions & 0 deletions
51
drupal/modules/avoindata-explore/templates/avoindata_external_block.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{# | ||
/** | ||
* @file | ||
* Avoindata External Block | ||
* | ||
* @ingroup themeable | ||
*/ | ||
#} | ||
|
||
<div class="avoindata-external pb-4"> | ||
<div class="avoindata-block-container justify-content-center"> | ||
<div class="row avoindata-block-header-row pt-3"> | ||
<h2> | ||
{% trans %} | ||
All finnish restricted data from one place | ||
{% endtrans %} | ||
</h2> | ||
</div> | ||
|
||
<div class="avoindata-block-items mt-3 mb-3"> | ||
|
||
<div class="avoindata-block-card mt-2"> | ||
<div class="avoindata-block-card-icon avoindata-external-service"> | ||
<img src="/themes/avoindata/images/logo-suomifi.svg"/> | ||
</div> | ||
|
||
<div class="avoindata-block-card-content"> | ||
<div class="avoindata-block-card-title"> | ||
<h3> | ||
{% trans %} | ||
Suomi.fi-suojattudata | ||
{% endtrans %} | ||
</h3> | ||
</div> | ||
|
||
<div class="avoindata-block-card-text"> | ||
<i class="far fa-chevron-right"></i> | ||
<a href="https://suojattudata.fi"> | ||
{% trans %} | ||
Navigate to site | ||
{% endtrans %} | ||
</a> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
drupal/modules/avoindata-theme/config/install/block.block.avoindata_external.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
langcode: fi | ||
status: true | ||
dependencies: | ||
module: | ||
- system | ||
theme: | ||
- avoindata | ||
id: avoindata_external | ||
theme: avoindata | ||
region: content | ||
weight: 5 | ||
provider: null | ||
plugin: avoindata_external | ||
settings: | ||
id: avoindata_external | ||
label: 'Avoindata External' | ||
provider: avoindata_external | ||
label_display: '0' | ||
visibility: | ||
request_path: | ||
id: request_path | ||
pages: '<front>' | ||
negate: false | ||
context_mapping: { } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters