Giter Site home page Giter Site logo

masonrymainpage's Introduction

MasonryMainPage

This extension enables the use of Masonry blocks in MediaWiki.

Masonry is developed by David DeSandro and information about that script can be found at http://masonry.desandro.com

DEPENDENCIES

USAGE

To enable this extension, append the following to LocalSettings.php

require_once "$IP/extensions/MasonryMainPage/MasonryMainPage.php";

To use this extension in a MediaWiki page, add the following elements to the contents of a wiki page:

<!--

   DIV for outer Masonry container

--><div id="mediawiki-masonry-main-page-container"><!--


   Begin Masonry Blocks

-->
{{#masonry-block: title =
 | width =
 | color =
 | body  =
 }}
{{#masonry-block: title =
 | body  =
 }}
<!--

   End DIV for outer Masonry container

-->
</div>

OPTIONS

  • title = Title of your block (optional, will not show a header if omitted).
  • width = 1 (or 2) (optional, default is 1).
  • color = white (optional, default is green, options include orange, yellow, blue, white, purple, green, and none).
  • body = This is the main content. Wiki code like links can be included; templates and wiki tables cannot.

TEMPLATES

Instead of clogging your main page with lots of content, you can also use templates.

For example, you could create Template:Pages That Need Help Block with the content below:

{{#masonry-block: title=Where to Help
 | color=orange
 | body =
[[Pages that need help]]
* [[Special:WantedPages|Pages that need to be created]]
* [[Articles requiring clarification|Pages needing clarification]]
* [[Articles to be expanded|Pages needing expansion]]
* [[Articles with unsourced statements|Pages with unsourced statements]]
}}

Then, on the main page, just place {{Pages That Need Help Block}} in the Masonry container div.

BACKGROUND INFO

The parser function #masonry-block essentially adds the following code and applies some CSS:

    <div class="item">
        <div class="item-content">This can be any content for a block.</div>
    </div>
    <div class="item w2">
        <div class="item-content">This can be any content for a block that is twice as wide.</div>
    </div>

If you run into issues using a complex template in a masonry-block, you might try using this method instead of the parser function.

masonrymainpage's People

Contributors

darenwelsh avatar jamesmontalvo3 avatar josefassad avatar kghbln avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

masonrymainpage's Issues

no media links

Hi, I just installed this extension. The blocks weren't being rendered with any styling, so I looked in the source and could see that the relative links to the extensions/MasonryMainPage/Masonry.css stylesheet wasn't being loaded. This is with MW 1.24.2.

Any pointers where I might look for what's wrong?

does not adjust for printing

Works great except when a user tries to print. Is there some CSS to add to Mediawiki:Print.css that would help?

[SOLVED] CSS not loading until forced purge

Masonry-blocks will not render until I purge the page's cache (?action=purge). I've checked on multiple browsers, and in all cases there are missing scripts until the page is purged on the user's end.

Block Functionality Issue from Version 0.3.0 -> 0.4.0

After updating to V 0.4.0, issues arose with the block behaviour. Specifically, the block rearrangement ceased to function properly and the overall loading of javascript elements on the page seemed to also malfunction (the sidebar collapsible items no longer could expand/collapse).

Below is inspect element output of errors on page.

ReferenceError: imagesLoaded is not defined ReferenceError: imagesLoaded is not defined at HTMLDocument.<anonymous> (load.php?debug=false&lang=en&modules=ext.masonrymainpage.base|ext.meetingminutes.template|ext.uls.iā€¦:1) at fire (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=MPzQrITF:45) at Object.add [as done] (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=MPzQrITF:45) at jQuery.fn.init.jQuery.fn.ready (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=MPzQrITF:49) at mw.loader.implement.css (load.php?debug=false&lang=en&modules=ext.masonrymainpage.base|ext.meetingminutes.template|ext.uls.iā€¦:1) at Object.<anonymous> (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=MPzQrITF:163) at fire (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=MPzQrITF:45) at Object.add [as done] (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=MPzQrITF:45) at Object.always (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=MPzQrITF:46) at runScript (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=MPzQrITF:162) log @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=MPzQrITF:178 handler @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=MPzQrITF:155 fire @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=MPzQrITF:45 fireWith @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=MPzQrITF:46 fire @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=MPzQrITF:46 track @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=MPzQrITF:155 runScript @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=MPzQrITF:163 checkCssHandles @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=MPzQrITF:163 (anonymous) @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=MPzQrITF:163 fire @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=MPzQrITF:45 fireWith @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=MPzQrITF:46 fire @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=MPzQrITF:46 fireCallbacks @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=MPzQrITF:157 addEmbeddedCSS @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=MPzQrITF:158 (anonymous) @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=MPzQrITF:157

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.