Compare commits

...

7 Commits

27 changed files with 160 additions and 117 deletions

View File

@ -0,0 +1,11 @@
<?php
declare(strict_types=1);
namespace D3\Removegooglefonts\Application\Model;
class Constants
{
public const OXID_MODULE_ID = 'removegooglefonts';
}

View File

@ -4,7 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased](https://git.d3data.de/D3Public/RemoveGoogleFonts/compare/1.0.0.0...rel_1.x)
## [Unreleased](https://git.d3data.de/D3Public/RemoveGoogleFonts/compare/2.0.0.0...rel_2.x)
## [2.0.0.0](https://git.d3data.de/D3Public/RemoveGoogleFonts/releases/tag/2.0.0.0) - 2024-04-11
### Added
- OXID 7 compatibility
## [1.0.0.0](https://git.d3data.de/D3Public/RemoveGoogleFonts/releases/tag/1.0.0.0) - 2022-08-31
### Added

View File

@ -3,7 +3,9 @@
# D³ Remote Font Replacement for OXID eShop
Integrates Google fonts locally in the OXID default themes (Wave, Flow).
[ccm19.de](https://www.ccm19.de/google-fonts-checker/) checks your site for font files loaded from Google servers. ([Alternative](https://sicher3.de/google-fonts-checker/))
If you want to load the fonts from your own server instead, you can use this package. It integrates Google Fonts locally into the OXID standard themes (Wave, Flow).
## contains
@ -14,6 +16,10 @@ Integrates Google fonts locally in the OXID default themes (Wave, Flow).
Other fonts may have to be added individually (e.g. through a patch).
The Google font files can be loaded [here](https://google-webfonts-helper.herokuapp.com/fonts).
Please also check other resources provided by other servers (e.g. Font Awesome icon libraries, jQuery libraries and others).
## Table of content
- [Installation](#installation)
@ -29,10 +35,20 @@ This package requires an OXID eShop installed with Composer in a version defined
Open a command line and navigate to the root directory of the shop (parent directory of source and vendor). Execute the following command. Adapt the path details to your installation environment.
```bash
php composer require d3/removegooglefonts:^1.0
php composer require d3/removegooglefonts:^2.0
```
Console:
// let shop read the module ( necessary! )
php vendor/bin/oe-console oe:modules:install vendor/d3/removegooglefonts
Activate the module in Shopadmin under "Extensions -> Modules".
// activate the module
php vendor/bin/oe-console oe:modules:activate removegooglefonts
// deactivate the module
php vendor/bin/oe-console oe:modules:d3activate removegooglefonts
Activation && Deactivation also possible in Shop-Admin:
Activate the module under "Extensions -> Modules".
## Changelog

View File

@ -3,7 +3,9 @@
# D³ Remote Font Replacement für OXID eShop
Bindet Google Fonts in den OXID Standardthemes (Wave, Flow) lokal ein.
[ccm19.de](https://www.ccm19.de/google-fonts-checker/) prüft Ihre Seite auf von Google-Servern eingebunde Schriftartendateien. ([Alternative](https://sicher3.de/google-fonts-checker/))
Sollen die Schriftarten statt dessen vom eigenen Server geladen werden, kann dieses Paket verwendet werden. Es bindet Google Fonts in den OXID Standardthemes (Wave, Flow) lokal ein.
## enthält
@ -14,6 +16,10 @@ Bindet Google Fonts in den OXID Standardthemes (Wave, Flow) lokal ein.
Weitere Schriftarten sind ggf. individuell zu ergänzen (z.B. durch einen Patch).
Die Google Schriftartendateien können [hier](https://google-webfonts-helper.herokuapp.com/fonts) geladen werden.
Prüfen Sie bitte auch weitere von fremden Servern eingebunden Resourcen (z.B. Font Awesome Iconbibliotheken, jQuery-Bibliotheken und andere).
## Inhaltsverzeichnis
- [Installation](#installation)
@ -29,10 +35,20 @@ Dieses Paket erfordert einen mit Composer installierten OXID eShop in einer in d
Öffnen Sie eine Kommandozeile und navigieren Sie zum Stammverzeichnis des Shops (Elternverzeichnis von source und vendor). Führen Sie den folgenden Befehl aus. Passen Sie die Pfadangaben an Ihre Installationsumgebung an.
```bash
php composer require d3/removegooglefonts:^1.0
```
php composer require d3/removegooglefonts:^2.0
```
Console:
// Einlesen ( nötig! )
php vendor/bin/oe-console oe:modules:install vendor/d3/removegooglefonts
Aktivieren Sie das Modul im Shopadmin unter "Erweiterungen -> Module".
// Aktivierung
php vendor/bin/oe-console oe:modules:activate removegooglefonts
// Deaktivierung
php vendor/bin/oe-console oe:modules:d3activate removegooglefonts
Aktivierung && Deaktivierung auch im Shop-Admin möglich:
Navigieren Sie zu "Erweiterungen > Module".
## Changelog

View File

@ -0,0 +1,85 @@
/* raleway-200 - latin */
@font-face {
font-family: 'Raleway';
font-style: normal;
font-weight: 200;
src: local(''),
url('raleway-v27-latin-200.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('raleway-v27-latin-200.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* raleway-regular - latin */
@font-face {
font-family: 'Raleway';
font-style: normal;
font-weight: 400;
src: local(''),
url('raleway-v27-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('raleway-v27-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* raleway-600 - latin */
@font-face {
font-family: 'Raleway';
font-style: normal;
font-weight: 600;
src: local(''),
url('raleway-v27-latin-600.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('raleway-v27-latin-600.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* raleway-700 - latin */
@font-face {
font-family: 'Raleway';
font-style: normal;
font-weight: 700;
src: local(''),
url('raleway-v27-latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('raleway-v27-latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* raleway-200italic - latin */
@font-face {
font-family: 'Raleway';
font-style: italic;
font-weight: 200;
src: local(''),
url('raleway-v27-latin-200italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('raleway-v27-latin-200italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* raleway-italic - latin */
@font-face {
font-family: 'Raleway';
font-style: italic;
font-weight: 400;
src: local(''),
url('raleway-v27-latin-italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('raleway-v27-latin-italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* raleway-600italic - latin */
@font-face {
font-family: 'Raleway';
font-style: italic;
font-weight: 600;
src: local(''),
url('raleway-v27-latin-600italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('raleway-v27-latin-600italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* raleway-700italic - latin */
@font-face {
font-family: 'Raleway';
font-style: italic;
font-weight: 700;
src: local(''),
url('raleway-v27-latin-700italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('raleway-v27-latin-700italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
body {
font-family:Raleway,"Helvetica Neue",Helvetica,Arial,sans-serif;
font-size:14px;
line-height:1.42857143;
}

View File

@ -21,21 +21,12 @@
"GPL-3.0-or-later"
],
"require": {
"oxid-esales/oxideshop-ce": "^6.2"
},
"extra": {
"oxideshop": {
"blacklist-filter": [
"*.md",
"composer.json"
],
"source-directory": "/src",
"target-directory": "d3/removegooglefonts"
}
"php": "8 - 8.1",
"oxid-esales/oxideshop-ce": "7 - 7.0.3"
},
"autoload": {
"psr-4": {
"D3\\Removegooglefonts\\": "../../../source/modules/d3/removegooglefonts"
"D3\\Removegooglefonts\\": ""
}
}
}

View File

@ -20,9 +20,11 @@
* Metadata version
*/
$sMetadataVersion = '2.0';
use D3\Removegooglefonts\Application\Model\Constants as Constants;
$sModuleId = 'removegooglefonts';
$sMetadataVersion = '2.1';
$sModuleId = Constants::OXID_MODULE_ID;
$sLogo = '<img src="https://logos.oxidmodule.com/d3logo.svg" alt="(D3)" style="height:1em;width:1em"> ';
/**
* Module information
@ -30,25 +32,27 @@ $sModuleId = 'removegooglefonts';
$aModule = [
'id' => $sModuleId,
'title' => '<img src="https://logos.oxidmodule.com/d3logo.svg" alt="(D3)" style="height:1em;width:1em"> Google Fonts lokal einbinden',
'title' => $sLogo.' Google Fonts lokal einbinden',
'description' => [
'de' => 'Bindet Google Fonts lokal ein',
'en' => '',
],
'version' => '1.0.0.0',
'version' => '2.0.0.0',
'author' => 'D&sup3; Data Development (Inh.: Thomas Dartsch)',
'email' => 'support@shopmodule.com',
'url' => 'http://www.oxidmodule.com/',
'blocks' => [
[
'template' => 'layout/base.tpl',
'block' => 'base_style',
'file' => '/Application/views/blocks/layout/d3_base_style.tpl'
'template' => 'layout/base.tpl',
'block' => 'base_style',
'file' => 'views/smarty/blocks/layout/d3_base_style.tpl',
'position' => 10
],
[
'template' => 'layout/base.tpl',
'block' => 'base_fonts',
'file' => '/Application/views/blocks/layout/d3_base_fonts.tpl'
'template' => 'layout/base.tpl',
'block' => 'base_fonts',
'file' => 'views/smarty/blocks/layout/d3_base_fonts.tpl',
'position' => 10
]
],
];

View File

@ -1,2 +0,0 @@
[{$smarty.block.parent}]
[{oxstyle include=$oViewConf->getModuleUrl('removegooglefonts', 'out/src/css/d3_fonts.css')}]

View File

@ -1,85 +0,0 @@
/* raleway-200 - latin */
@font-face {
font-family: 'Raleway';
font-style: normal;
font-weight: 200;
src: local(''),
url('../fonts/raleway-v27-latin-200.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/raleway-v27-latin-200.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* raleway-regular - latin */
@font-face {
font-family: 'Raleway';
font-style: normal;
font-weight: 400;
src: local(''),
url('../fonts/raleway-v27-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/raleway-v27-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* raleway-600 - latin */
@font-face {
font-family: 'Raleway';
font-style: normal;
font-weight: 600;
src: local(''),
url('../fonts/raleway-v27-latin-600.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/raleway-v27-latin-600.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* raleway-700 - latin */
@font-face {
font-family: 'Raleway';
font-style: normal;
font-weight: 700;
src: local(''),
url('../fonts/raleway-v27-latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/raleway-v27-latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* raleway-200italic - latin */
@font-face {
font-family: 'Raleway';
font-style: italic;
font-weight: 200;
src: local(''),
url('../fonts/raleway-v27-latin-200italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/raleway-v27-latin-200italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* raleway-italic - latin */
@font-face {
font-family: 'Raleway';
font-style: italic;
font-weight: 400;
src: local(''),
url('../fonts/raleway-v27-latin-italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/raleway-v27-latin-italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* raleway-600italic - latin */
@font-face {
font-family: 'Raleway';
font-style: italic;
font-weight: 600;
src: local(''),
url('../fonts/raleway-v27-latin-600italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/raleway-v27-latin-600italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* raleway-700italic - latin */
@font-face {
font-family: 'Raleway';
font-style: italic;
font-weight: 700;
src: local(''),
url('../fonts/raleway-v27-latin-700italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/raleway-v27-latin-700italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
body {
font-family:Raleway,"Helvetica Neue",Helvetica,Arial,sans-serif;
font-size:14px;
line-height:1.42857143;
}

View File

@ -0,0 +1,3 @@
[{$smarty.block.parent}]
[{assign var="d3ViewConfObject" value=$oView->getViewConfig()}]
[{oxstyle include=$d3ViewConfObject->getModuleUrl('removegooglefonts', 'out/src/css/d3_fonts.css')}]