=== TRIS Theme === Contributors: Tim Reeves Author URI: https://timreeves.de/ Theme URI: https://timreeves.de/ Tags: minimalistic, translation-ready Copyright: 2021 Tim Reeves Requires at least: 5.0 Tested up to: 5.7.2 Stable tag: 1.18 == Description == TRIS Theme is an *extremely* minimalistic theme, which supports customization only via PHP and CSS. Its layout is: Header, Navi bar, Content + right sidebar, Footer. Navi bar becomes fixed on scroll. Custom HTML can be injected into the header. The menu, searchbox and sidebar can all be turned off. The standard footer content (Copyright, one menu intended for disclaimer, data privacy etc.) can be replaced with custom content (e.g. widget area) via a PHP file. The theme has a fully responsive design for mobile devices (<=768px). On mobiles, the main menu mutates to a dropdown menu actioned by a hamburger icon; and the sidebar is offscreen right, and slides in when the Plus icon is tapped. WordPress commenting is fully supported using standard WordPress functions. The commenters IP addresses are stored anonymized (last parts masked to 0). Commenters avatars will be shown if that feature is enabled in WordPress settings. The theme only uses one very short JavaScript file (native JS, no jQuery). Pre-minified JS and CSS files are not provided, on the assumption a caching plugin will do that. Caching: HTML pages can always be minified including stripping of comment. Remember not to cache HTML pages if you have content which may change (e.g. latest posts). The sidebar, if not deselected, shows a dynamic_sidebar('Primary Sidebar'). The Navi bar displays a main menu called 'TRIS Menu', which must be present. The default footer display a (small) menu 'TRIS Footer', which can contain e.g. Disclaimer, Data Privacy. Depending on viewport width, when the sidebar is hidden, the width of the main content area is often larger than when the sidebar is shown. This cannot be easily accounted for in CSS media width queries, which only work on viewport width, not the width of a particular container. To allow you to design CSS for the width of the main content area, the themes JS sets classes on #content on DOMReady and resize events as follows: o if (contentWidth >= 700) { content.classList.add('ge700'); } else { content.classList.add('lt700'); } o if (contentWidth >= 650) { content.classList.add('ge650'); } else { content.classList.add('lt650'); } o if (contentWidth >= 600) { content.classList.add('ge600'); } else { content.classList.add('lt600'); } o if (contentWidth >= 550) { content.classList.add('ge550'); } else { content.classList.add('lt550'); } o if (contentWidth >= 500) { content.classList.add('ge500'); } else { content.classList.add('lt500'); } o if (contentWidth >= 450) { content.classList.add('ge450'); } else { content.classList.add('lt450'); } o if (contentWidth >= 400) { content.classList.add('ge400'); } else { content.classList.add('lt400'); } TRIS Theme includes some CSS to style the WP Featherlight lightbox plugin, and also to allow adding caption text which is hidden onpage but displayed in the lightbox - search style.css for "featherlight". TRIS Theme currently does not support 'Featured Images' for pages and posts. Can be added if needed. The theme uses a mix of highly efficient icons: - The hamburger (menu) and plus (sidebar) icons are pure CSS with transformations. - All triangles (open submenu, prev/next post links etc.) are also pure CSS constructions. - Other icons (tags, categories, magnifier etc.) are in a css sprite image (icons/css_sprites.png). - The icons used in the comments section are in a custom font of 20 icons created with fontello.com (*) (*) The font is not loaded in the theme's style.css, since not needed if comments are not allowed. Unless you like other icons in it... To see which icons it contains, doubleclick icons/fontdemo.html. If you use them, add the credits in icons/LICENSE.txt to your website's disclaimer page. The example file help/tris-custom.css contains the CSS for the icons. Remove unneeded icon fonts (genericons / favicons / fontawesome / dashicons) from the frontend via Clearfy plugin. The standard theme configuration is modified by uploading up to 4 files to /wp-content/uploads: - tris-theme-config.php Various options re header, navigation bar, sidebar... + root css vars - tris-custom.css Any css you need to adjust. Put any media queries with width tests here - tris-header.html The content of this file will be added at the end of (inside)
(which is position relative) - tris-footer.php Replaces the minimal standard content with whatever you programm (e.g. a widget area) If you select the "Remove Gutenberg" option in tris-theme-config.php then you do not need the "Classic Editor" plugin. Further options allow you to: - add the 'Formats' dropdown to TinyMCE - remove standard WordPress Gallery CSS from the frontend - have auto-emails from WP about plugin and theme updates suppressed (unless errors; default on) - send a comment moderation email only to the author (and NOT to site admin) TRIS Theme supports the 'editor-styles' feature of WordPress for its themes: A file 'editor-style.css' is supplied with the theme and registered to be applied to TinyMCE. To allow use of the CSS :root variables in that file, TRIS Theme writes a copy of their configured values, configured in {tris-}theme-config.php, to a file 'tris-root.css' in the uploads directory. It loads both files to TinyMCE, so that not only the theme's CSS, but also the editor stylesheets of the "TinyMCE Custom Styles" plugin can use them. The theme adds a [menu] shortcode to WordPress, Use: [menu name='menuname']. It also adds shortcode capability to the "Custom HTML" widget, for menus in widget areas. The theme provides two shortcodes to output tags on a pages: o [alltags] (sorted by name) o [alltagsbygroup tg='1'] (sorted by slug, for use with "Tag Groups" plugin) The tag name (linked to tag usage page) is output as

, description in a
It also adds tags, categories and excerpts to pages, and can optionally remove Gutenberg. To save using extra plugins, it provides 2 shortcodes for protecting text / emails from harvester via JS ROT13: [tris_encode do_shortcode="no" protection_text=""] ... [/tris_encode] If do_shortcode="yes" is supplied, then other shortcodes within the text to be encoded will be executed If protection_text is not passed or is empty, then a standard protection text will be used for