Giter Club home page Giter Club logo

material-dokuwiki's Introduction

Material Design Template for DokuWiki

This Material template is very easy to install and use, whilst offering a multitude of customization options.

You can begin by choosing between several color themes in the style.ini file. From there on, you can fully customize the sidebar, making use of the entire material icon pack.

Visit the template page on the DokuWiki forums

It is based off Material Design Lite with some minor changes and adjustements.

Design

Screenshot of the template on two devices

Beautiful themes

There are 8 unique themes to choose from

Elegant Editor

Screenshot of editor

The material template now sports an elegant looking editor. You can further improve it by replacing the toolbar icons found in DOKUWIKI_ROOT/lib/images/toolbar with those found in the copy these icons to the toolbar folder. Alternatively, you can choose your own, for example from the Material Icons page.

The toolbar can then looking like the following:

Image of toolbar with material icons

Installation

Use the following URL to download this template:

Refer to this guide on how to install and use templates in DokuWiki.

Upgrading

Regularly visit the installed templates via the configuration manager in order to update this template to the latest version.

WARNING: updating overrides all changed files. That means if you edited the main.php or sidebar.php you will need to backup these or any others before upgrading.

Configuration

  1. install the template
  2. navigate to the DOKUWIKI ROOT/lib/tpl/material folder
  3. open the style.ini file and scroll to the "replacements" section
  4. follow the instructions there to change the colors
  5. if you wish you can now open the sidebar.php file and change its contents to your liking
  6. and you're set!

The template also comes with several configuration options, which you can set via the Configuration Manager.

Key Description Default
dokuwikiSidebar use the sidebar page within the wiki instead of the sidebar.php file false
feedbackForm add a button that allows users to give feedback true
technicalFeedbackForm technical information is included in the feedback email true
feedbackEmail the recipient Email address for the feedback [email protected]
feedbackSubjectLine subject line of the Email Feedback for Website
feedbackBody body of the Email Thank you so much for taking the time to write feedback. We really appreciate it :) \n\n [your message] \n\n\n You can ignore all the technical information below. It only helps us track down what the problem might be.
hiddenActions DokuWiki actions that are hidden backlink,top
protrudingDrawer if the drawer should stick out on the left true
subtlePagename if the title of the page should not be the focus false

Feedback

If you encounter any problems or would like to see functionality added, please head over to the issue page on GitHub and submit your bug/request.

material-dokuwiki's People

Contributors

leonstaufer avatar mkrtchian avatar spencerdub avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

material-dokuwiki's Issues

Smartphone Search

Search field is too wide on mobile devices - Portrait mode. Works in landscape mode.

toolbar dropdown

Hi,
the dropdown of the editor-toolbar is not working. E.g. if I click on the button for headers or smileys or WRAP-Plugin there is no dropdown.
If I switch to the standard dokuwiki template it is working, so it's not a plugin causing this error.
I also reinstalled the material template, to overwrite my changes... it's still not working.

I found a passage in .../css/fixes.less
.mdl-layout__content { background: @background_white; display: flex; flex-direction: column; }
If I remove those lines, obviously some things don't look right anymore. But strangely now the dropdown of toolbar buttons works. However the dropdown is in the background behind the wiki page and only sticking out to the right, and clicking on the buttons in the dropdown has no effect.

Do you have any idea what the problem could be? I am an html beginner, so it's hard for me to understand the template code.

I am using 2018-04-22a "Greebo".

Hiding redundant h1 in div.content-card__text

Hi Leon,

I see you have designed a div.content-card__title which looks nice. Also as you mentioned in Line 129~135 that

                <div class="content-card__text">
                    <?php
                    if ($conf['useheading'] == 1){
                        //TODO: find out what to with the title
                    }
                    tpl_content(); ?>
                </div>

, while the title maybe trimmed with future implementations, right now I'm using a line in my userall.css to hide that h1 in div.content-card__text:

div#dokuwiki__top.tpl_material:not(.notFound) div.content-card__title + div.content-card__text h1:first-of-type {display: none;}
  • I think that on pages with 404 status, the heading should be kept since div.content-card__title only contains the page ID;
  • On special tools like Media Manager or Recent Changes, there is not div.content-card__title, therefore the h1 in div.content-card__text should is the only h1 on page and should not be hidden in this case.

Above is just for your reference before you further development the way avoid redundant page heading :) Thanks again for this beautiful design.

Cheers,
Robert

Page content not displayed as cards

Using a clean install of DokuWiki Greebo and latest Material template (2019-29-01) with no customisations, on latest Firefox and latest Edge, it appears that the card layout styles are not correctly being applied. Notice there is no margin or borders on page-content. The default image also extends beyond the sidebar. The action buttons to edit and show history do not float to the right.

I can't test in Chrome because I don't have it installed on my machine unfortunately.

dokuwiki-material

php Warning in main.php

line 105 in main.php gives a warning:
Use of undefined constant php - assumed 'php' (this will throw an Error in a future version of PHP) in
/var/web/public_html/dokuwiki/lib/tpl/material/main.php on line 105

the reason is the comment marker "//" - so the closing "?>" php-bracket will be ignored.

After theme was set every wiki page became blank

I've installed the theme using the Extension Manager and when I enabled the theme my wiki refreshed and now every single page looks like this:
screen shot 2018-09-10 at 18 01 37
I can't even revert the changes since I can see the settings page.

Footer not at bottom

When the content does not fill the entire viewport, the footer is above the bottom

De-emphasize canonical page names

I really adore this theme. Thanks for your great work on it.

One minor issue I've found is that the theme strongly emphasizes page names by rendering them as top-level headers at the top of the page. This is less than ideal in cases when the limitations of DokuWiki page naming conventions (all lowercase, spaces converted to underscores, etc.) conflict with the intended title of a page. For instance, I have a page whose name is supposed to be "Server Setup Log", but whose canonical DokuWiki pagename is "Server_setup_log". The latter is displayed prominently at the top of the page in a large <h1> header.

The default DokuWiki theme deals with this by de-emphasizing (but still displaying) the page's actual name--for example, see the pagename page. Users can then set a preferred title in the page editor simply by using the appropriate Markdown tags.

I'd like to suggest that the Material theme follow this convention and de-emphasize the canonical page name, allowing for users to define top-level page titles in the content of a page.

configure of style.ini not applied

After uncommenting the color preset in “replacements” section in style.ini,
I refreshed the page in the browser and failed to find the page theme changed.

; Blue - Pink
 __primary__         = "#3F61b5"             ; @ini_primary
 __primary_dark__    = "#303f9f"             ; @ini_primary_dark
 __accent_           = "#ff4081"             ; @ini_accent

Am I not doing this rightly?

Sidebar configuration

First thing first - thank you for a great looking template!

We have installed the template from the extension manager and made sure to install the latest version (6/2/18).

As the sidebar is a very important part of the navigation and UX, I am now trying to edit the default sidebar, but cannot find the way to do so. In the GitHub project page I can see the file sidebar.php, but it does not exist in the downloaded template. I have tried to upload it next to the main.php, but that did not help as well.

I did notice that the files here in GitHub are newer than the apparently latest stable release of 6/2. it seems that at least main.php is different as well between here and the downloaded version.

Thanks

Problem loading external script

Hello, I am trying to use this https://github.com/PlaidWeb/webmention.js/ seems to work in all the other dokuwiki themes I try but I can't seem to load the script at all

here is an example: https://longthoughts.jgregorymcverry.com/doku.php?id=namespace:test_post#enter_doku_wiki

I tried adding the javascript to the existing file and making a new file:, links from my head:

<script src="https://longthoughts.jgregorymcverry.com/lib/tpl/material/js/webmention.js" async></script>

Do I need to do anything to authorize external scripts?

[feature] Missing links are not in a different color

This functionality exists in the official dokuwiki template but is not in this one. I think it could be a good idea to include it.

When we change __missing__ and __existing__ values, they are not used, and the a tags are only assigned the color color: #3986dd;

Support translations plugin?

The translations plugin seems to be more or less a core feature of Dokuwiki, but currently the top side button to switch languages is not supported by this theme I think. Would be great if that could also be added.

Thanks!

Issue Media manager

Hello, i got an issue with the media manager, its looking pretty wierd. The media list dont stay in the page container and keeps going in the footer of the page.

[bug] small wiki pages occupy smaller height before occupying viewport height

When a wiki page has not enough content, the main content starts as smaller than the normal height, and occupies the normal height after some time. That time is linked to the use of defer on material script here.

If we want to keep the defer we may add some CSS to force the main content having the correct height from the beginning.

Here is a gif showing the visual bug :

height_defer_bug

Log out option?

Seems like there is no option for a user to log out? Or is it very hidden?

I guess the user button should give a drop-down like other themes do it?

Action unknown: menuitem

Hi Leon,

I just gave your "Material" theme a try and in fact I loved it right from the beginning. Sadly there is a problem with the "Move Plugin" which I find is very useful, too.

Whenever I click the "Move" option on whatever page I get the "Action unknown: menuitem" and the menu item vanishes until the page is reloaded.

Do you have an idea how to fix that?

Regards,

Thomas.

PDF Export Integration

I have noticed that this template lacks the automatic support for dw2pdf. Could you please add it?

Search box redirects to hard coded /dokuwiki/doku.php

Hi there,

This template is elegant and yet feature rich, I love it! Thank you so much for releasing!

Here is what I have seen using the search box (after typing the keyword and hitting Enter):

Not Found

The requested URL /dokuwiki/doku.php was not found on this server.

I had renamed my DokuWiki folder to simply "/dw" since I started to use DokuWiki, so I guess this is why the template does not find doku.php in /dokuwiki.

Respect Dokuwiki sidebar setting

In Dokuwiki under basic settings there is the option to switch or disable the sidebar:
Sidebar page name (if template supports it), empty field disables the sidebar

I tried disabling the sidebar through it, but it doesn't seem to have an effect.

Somewhat related: is it possible to easily have different sidebars for different wiki animals (farmer plugin)?

Change indentation of links

Issue added thanks to feedback from Tin.

Currently, the indentation of the links in the navigation bar are hardcoded and this width might not fit for all use cases. It would be good if it could be edited in the configuration settings.

Until then you can change it by adding the following in basic.less to .mdl-navigation:

.mdl-navigation {
  margin-top: 16px;
  /* ... */
  .level1{
    ul {
      padding-left: 15px;
    }
  }
}

You can replace 15px with any width of your liking.

This only applies if you are using the "use DokuWiki sidebar option".

Cannot change page/sidebar width

I tried to modify the value of __site_width__ and __sidebar_width__.
However, neither modification through DokuWiki administration panel nor local style.ini works.
Is this a bug? Or can I change the layout by editing the .less directly? Sorry about the bothering, I am new to website design.

How to add additional right side buttons?

First off: very nice theme, thanks for creating!

I would like to use plugins like the comments, the .odt export and the .pdf export plugins with this theme that are usually accessible through these floating buttons on the right side. However this theme only provides the edit and revisions button.

Any way to add new buttons for plugins or include some additional buttons for popular Dokuwiki plugins out of the box?

I guess they are not enabled by default because the buttons are so big? Maybe there could be a big (...) button to pop up additional options for the above plugins? But comments could probably have their own big button :)

No new page button for searched articles

When you try to directly add a new article that doesn't exist (/wiki/blabla), the template offers the option to add the article (the plus button with /wiki/blablabla?do=edit to the right).
If you search for an article (page /wiki/doku.php?do=search&id=Blabla) however, no button control to the right is present.
It would be nice to be able to add a new article without having to edit the url directly.

Compatibility to PHP 8+ and newer DokuWiki versions

Hi,

will there be a new version of this really nice template to be compatible to PHP 8+ and newer DokuWiki versions. I really like this template but after upgrading to PHP 8+ and a newer DokuWiki version I get warning messages on the sidebar:

Warning
: Undefined array key "REDIRECT_STATUS" in
C:\xampp-dev\htdocs\dokuwiki\lib\tpl\material\sidebar.php
on line
32

Warning
: Undefined array key "HTTP_X_REAL_IP" in
C:\xampp-dev\htdocs\dokuwiki\lib\tpl\material\sidebar.php
on line
34

Warning
: Undefined array key "HTTP_X_REAL_IP" in
C:\xampp-dev\htdocs\dokuwiki\lib\tpl\material\sidebar.php
on line
39

It would be great if I can use this template with the new versions of PHP and DokuWiki. Yes, I can hide the warning messages but I thnink this isn't the right way. If there are errors they should be solved.

Kind Regards

Dokuwiki table rows' alignement doesn't work

Dokuwiki has a feature to align rows horizontally with a syntax like this :

^           Table with alignment           ^^^
|         right|    center    |left          |
|left          |         right|    center    |
| xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |

This adds a class leftalign, centralign or rightalign to the aligned td element to align it.
Currently it has no effect on material-dokuwiki.

Modify mdl-btn

Hello,

I wish to add an link and an icon to the

capture

i wish to know of its possible with your template and what do i need to change in the code for it

Errors with the W3C validator : <button> inside <a> tags

When I try the code of a wiki page in the W3C HTML validator, it shows some errors about buttons in <a> tags :

The element button must not appear as a descendant of the a element.

For buttons like here.

We can probably remove the <button> tags to let only the wrapping <a> tags but I guess they add some styling from material CSS, so some changes should be also done about that to keep the current styling. I haven't tried to change this yet.

logo.png not defaulting like it should

For some reason the template defaults to logo.svg instead of logo.png and I am unable to use the media manager by default to change the logo as I would in the default template since logo.svg does not exist there. If this is not a bug, then can it be a feature request?

doesn't work with draw.io plugin

The material-theme is very cool and a straight forward layout. I used it for a while.
Now, I installed the draw.io plugin, but it doesn't open the draw.io editor. When I change to another theme, the draw.io plugin works as expected.

Indexmenu support

Sajid found out that the template currently does not support the indexmenu plugin.

As a future request, support for this plugin could be added.

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.