Skip to content

Commit 3aaa5d3

Browse files
committed
Update Language Switcher + optimizations
1 parent 5f37167 commit 3aaa5d3

File tree

8 files changed

+34
-11
lines changed

8 files changed

+34
-11
lines changed

assets/css/style.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* PHP Microsite Boilerplate
44
* +++++++++++++++++++++++++
55
*
6-
* Version: 2.0.1
6+
* Version: 2.0.2
77
* Creator: Jens Kuerschner (https://jenskuerschner.de)
88
* Project: https://github.com/jekuer/php-microsite-boilerplate
99
* License: GNU General Public License v3.0 (gpl-3.0)
@@ -308,8 +308,10 @@
308308
color: #666666;
309309
display: block;
310310
margin: 40px 0;
311-
padding: 10px 0 15px 0;
311+
padding: 10px 40px 15px;
312312
user-select: none;
313+
white-space: nowrap;
314+
overflow-x: hidden;
313315
}
314316

315317
a.lang_menu_item,

assets/css/style.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
// Current version of the website.
88
// Will be used to control css and js caching.
9-
$version_nr = '2.0.1';
9+
$version_nr = '2.0.2';
1010

1111
// Multilanguage
1212
$language['default'] = 'en'; // Use a key from the array below.

package-lock.json

Lines changed: 19 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "php-microsite-boilerplate",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"description": "An extremely simple and lightweight PHP framework/boilerplate to spin-up microsites at high speed. Optimized for Performance, Security, SEO, and Directus CMS.",
55
"keywords": [
66
"css",
@@ -52,8 +52,9 @@
5252
"grunt": "^1.4.1",
5353
"grunt-contrib-clean": "^2.0.0",
5454
"grunt-contrib-uglify": "^5.0.1",
55-
"postcss": "^8.4.5",
5655
"postcss-cli": "^9.1.0",
56+
"postcss-import": "^14.0.2",
57+
"postcss-nesting": "^10.1.1",
5758
"tailwindcss": "^3.0.7"
5859
},
5960
"browserslist": "last 3 years"

postcss.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@ const cssnano = require('cssnano')
33

44
module.exports = {
55
plugins: [
6+
require('postcss-import'),
7+
require('tailwindcss/nesting')(require('postcss-nesting')),
68
require('tailwindcss'),
79
require('autoprefixer'),
10+
require('postcss-nested'),
811
cssnano({
912
preset: 'default'
1013
}),
1114
purgecss({
12-
content: ['./templates/*.php', './pages/*.php', './lib/*.php', './assets/js/*.js'], // update, if you add other sources for CSS selectors
15+
content: ['./templates/*.php', './pages/*.php', './lib/*.php', './assets/js/*.js'], // update, if you add other sources for CSS selectors (and also add them at the tailwind.config.js)
1316
defaultExtractor: content => content.match(/[\w-/:]+(?<!:)/g) || []
1417
})
1518
]

tailwind.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
module.exports = {
10-
content: ['./templates/*.php', './pages/*.php', './lib/*.php', './assets/js/*.js'],
10+
content: ['./templates/*.php', './pages/*.php', './lib/*.php', './assets/js/*.js'], // update, if you add other sources for CSS selectors (and also add them at the postcss.config.js)
1111
darkMode: 'media', // or 'class'
1212
theme: {
1313
extend: { // within the extend block, you can add items to the default. Below, you would override the default.

templates/footer.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
<p class="text-gray-600">
66
<a class="p-4 font-normal no-underline" href="<?php echo $the_page_url_full . $pages[$language['active']]['legal-notice']['slug']; ?>/"><?php echo $pages[$language['active']]['legal-notice']['name']; ?></a>
77
<a class="p-4 font-normal no-underline" href="<?php echo $the_page_url_full . $pages[$language['active']]['privacy-policy']['slug']; ?>/"><?php echo $pages[$language['active']]['privacy-policy']['name']; ?></a>
8-
<?php echo create_language_switcher($the_page->id); ?>
98
<span class="block sm:inline-block py-4 sm:py-0 border-gray-600"><?php echo create_language_switcher($the_page->id); ?></span>
109
</p>
11-
<p class="p-8 text-gray-500">&copy; <?php echo date('Y'); ?></p>
10+
<p class="p-8 text-gray-500 select-none">&copy; <?php echo date('Y'); ?></p>
1211
</footer>
1312

1413
<!-- JavaScript -->

0 commit comments

Comments
 (0)