Talk:Site development: Difference between revisions
No edit summary |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 58: | Line 58: | ||
Choose the method that best fits your MediaWiki configuration and your level of access to the site's backend. | Choose the method that best fits your MediaWiki configuration and your level of access to the site's backend. | ||
</pre> | |||
== PRE Tag extends text off right margin on Browser read mode == | |||
5/24: no solution yet | |||
== Blog roll shows Blog: before every article - to remove == | |||
https://rejoiceinfaith.org/index.php/Category:Blog | |||
== responsive columns code ("flex-wrap") == | |||
<pre> | |||
<div style="display: flex; flex-wrap: wrap;"><div style="flex: 1; min-width: 20em; padding: 1em; margin: 15px; max-width:50%;"> | |||
<div style="flex: 1; min-width: 20em; margin: 15px; padding: 1em;"> | |||
</div> | |||
</div> | |||
</pre> | |||
== Clear div code == | |||
<pre> | |||
<div style="clear:both;"></div> | |||
</pre> | </pre> |
Latest revision as of 09:52, 21 November 2024
FIXED Blog pages max width and font size
resolved via Common.css < see notes there issue was mobile was not liking the center and margin 0 auto and pushed text to the left FIX: make the css rule only for screns ove 850 << see common.css
Common header for Blog namespace
ChatGTP suggests:
To include a template at the top of every page in a specific namespace in MediaWiki, you can use the `MediaWiki:Common.js` or `MediaWiki:Common.css` to add JavaScript or CSS that injects the template. Alternatively, you can use the `MediaWiki:CommonHeader` page if it’s supported in your MediaWiki installation. Here’s a method using JavaScript: 1. **Edit `MediaWiki:Common.js`**: - Go to the page `MediaWiki:Common.js` on your wiki. - Add the following script: ```javascript // Add template to the top of every page in a specific namespace $(document).ready(function() { // Replace '3000' with your namespace number if (mw.config.get('wgNamespaceNumber') === 3000) { // Replace 'Template:YourTemplateName' with the template you want to include var template = '{{YourTemplateName}}'; // Create a new div to hold the template var templateDiv = $('<div></div>').html(template); // Prepend the template to the content $('#content').prepend(templateDiv); } }); ``` 2. **Edit `MediaWiki:Common.css`** (Optional): - Go to the page `MediaWiki:Common.css` on your wiki. - Add any additional CSS to style the injected template if necessary. Here’s a method using the `MediaWiki:CommonHeader` page (if supported): 1. **Create `MediaWiki:CommonHeader` for the specific namespace**: - Go to the page `MediaWiki:CommonHeader/Namespace_3000`. - Add the template you want to include at the top of every page: ```plaintext {{YourTemplateName}} ``` This method might require your MediaWiki to have the necessary extensions or configurations to support namespace-specific headers. ### Explanation: - **JavaScript Method**: This script checks if the current namespace matches the specified number (`3000` in this case). If it does, it injects the specified template at the top of the content area. - **CommonHeader Method**: This approach uses MediaWiki’s built-in capabilities (if available) to add a common header to all pages in a namespace by creating a `MediaWiki:CommonHeader/Namespace_X` page. Choose the method that best fits your MediaWiki configuration and your level of access to the site's backend.
PRE Tag extends text off right margin on Browser read mode
5/24: no solution yet
Blog roll shows Blog: before every article - to remove
https://rejoiceinfaith.org/index.php/Category:Blog
responsive columns code ("flex-wrap")
<div style="display: flex; flex-wrap: wrap;"><div style="flex: 1; min-width: 20em; padding: 1em; margin: 15px; max-width:50%;"> <div style="flex: 1; min-width: 20em; margin: 15px; padding: 1em;"> </div> </div>
Clear div code
<div style="clear:both;"></div>