Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| public:computers:dokuwiki_tweaks [08/03/25 11:39 GMT] – [Dokuwiki Template monospace font] john | public:computers:dokuwiki_tweaks [02/02/26 18:19 GMT] (current) – john | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| ====== DokuWiki Tweaks ====== | ====== DokuWiki Tweaks ====== | ||
| + | ===== Vector / Monobook tweaks ===== | ||
| + | I like the Vector and Monobook templates, very similar feel to Wikipedia | ||
| + | |||
| + | ==== Logout errors with later versions of Dokuwiki ==== | ||
| + | |||
| + | After upgrading Dokuwiki to //Igor// it became impossible to log out due to a warning | ||
| + | |||
| + | <note warning> | ||
| + | Security Token did not match. Possible CSRF attack. | ||
| + | </ | ||
| + | |||
| + | I initially ignored it but then downgraded back to // | ||
| + | |||
| + | I recently upgraded to the latest Dokuwiki (Jack Jackrum), and upgraded all plugins and templates where possible. However the problem with logout with Vector and Monobook re-appeared. | ||
| + | |||
| + | I found there was a fix described on the forum: | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | and the cure is to edit the appropriate line in '' | ||
| + | |||
| + | The FIXME does work, though... | ||
| + | |||
| + | For Vector edit ''/ | ||
| + | |||
| + | <code php> | ||
| + | | ||
| + | |||
| + | </ | ||
| + | |||
| + | and the same for '' | ||
| + | <code php> | ||
| + | | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | ==== Monospace font ==== | ||
| + | |||
| + | I found the style applied to '' | ||
| + | |||
| + | I found the place to change it: | ||
| + | |||
| + | '' | ||
| + | |||
| + | add the the following and adjust as needed: | ||
| + | |||
| + | <code css> | ||
| + | |||
| + | div#content .dokuwiki code { | ||
| + | font-size: 100%; | ||
| + | padding-left: | ||
| + | padding-right: | ||
| + | background-color: | ||
| + | color: #00f; | ||
| + | direction: ltr; | ||
| + | text-align: left; | ||
| + | } | ||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | ==== Footer Buttons ==== | ||
| + | |||
| + | Remove the default footer buttons by editing '' | ||
| + | |||
| + | <note tip> | ||
| + | For Monobook, change to < | ||
| + | </ | ||
| + | |||
| + | <code php> | ||
| + | |||
| + | //delete all (defaults) | ||
| + | $_vector_btns = array(); | ||
| + | </ | ||
| + | |||
| + | this suppresses the inclusion of footer buttons from '' | ||
| + | |||
| + | === Add just the Dokuwiki and Vector/ | ||
| + | |||
| + | Edit '' | ||
| + | |||
| + | <note tip> | ||
| + | Swap '' | ||
| + | </ | ||
| + | |||
| + | <code php> | ||
| + | |||
| + | <?php | ||
| + | |||
| + | //check if we are running within the DokuWiki environment | ||
| + | if (!defined(" | ||
| + | die(); | ||
| + | } | ||
| + | //delete all (defaults) | ||
| + | $_vector_btns = array(); | ||
| + | |||
| + | //note: The buttons will be rendered in the order they were defined. Means: | ||
| + | // first button will be rendered first, last button will be rendered at | ||
| + | // last. | ||
| + | //DokuWiki button | ||
| + | $_vector_btns[" | ||
| + | $_vector_btns[" | ||
| + | $_vector_btns[" | ||
| + | $_vector_btns[" | ||
| + | $_vector_btns[" | ||
| + | $_vector_btns[" | ||
| + | |||
| + | //" | ||
| + | $_vector_btns[" | ||
| + | $_vector_btns[" | ||
| + | $_vector_btns[" | ||
| + | $_vector_btns[" | ||
| + | $_vector_btns[" | ||
| + | $_vector_btns[" | ||
| + | |||
| + | </ | ||
| + | ==== Mobile Scaling ==== | ||
| + | |||
| + | The layout on a phone isn't too good, and can't be zoomed/ | ||
| + | |||
| + | I found this thread: | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | and applied the comment-out of the line : | ||
| + | |||
| + | <code php> | ||
| + | |||
| + | //echo "< | ||
| + | </ | ||
| + | |||
| + | in '' | ||
| + | |||
| + | the page now scales/ | ||
| + | |||
| + | ===== Monobook user/ | ||
| + | |||
| + | <code css> | ||
| + | /* Give sidebar more space. | ||
| + | |||
| + | | ||
| + | - 12.2em as left spacer for the content area. This example is using 14.2em | ||
| + | | ||
| + | - 11.6em as sidebar width. This example is using 13.6em instead. | ||
| + | - 10.9em as width for the search input field. This example is using 12.9em | ||
| + | | ||
| + | - 150px as left spacer for the Ajax searchbox. This example is using 180px. | ||
| + | */ | ||
| + | /* move content container more to the right */ | ||
| + | #content { | ||
| + | margin: 2.8em 0 0 14.2em; | ||
| + | } | ||
| + | # | ||
| + | margin: 0 0 .6em -14.2em; | ||
| + | } | ||
| + | # | ||
| + | margin-left: | ||
| + | } | ||
| + | /* redefine sidebar width + tab bar position */ | ||
| + | .portlet { | ||
| + | width: 13.6em; | ||
| + | } | ||
| + | #p-cactions { | ||
| + | left: 13.6em; /* tab bar */ | ||
| + | } | ||
| + | /* search input field */ | ||
| + | # | ||
| + | width: 11.5em; | ||
| + | } | ||
| + | /* ajax " | ||
| + | # | ||
| + | left: 180px | ||
| + | } | ||
| + | |||
| + | div.dokuwiki #dw__toc { | ||
| + | margin: 1.2em 0 0 2em; | ||
| + | float: right; | ||
| + | width: 200px; | ||
| + | font-size: 100%; | ||
| + | clear: both; | ||
| + | background-color: | ||
| + | } | ||
| + | |||
| + | div#content .dokuwiki code { | ||
| + | font-size: 1.1em; | ||
| + | padding-left: | ||
| + | padding-right: | ||
| + | background-color: | ||
| + | color: #22f; | ||
| + | border-radius: | ||
| + | direction: ltr; | ||
| + | text-align: left; | ||
| + | white-space: | ||
| + | } | ||
| + | |||
| + | div#content .dokuwiki pre { | ||
| + | border-radius: | ||
| + | background-color: | ||
| + | } | ||
| + | |||
| + | .pBody { | ||
| + | font-size: 1.1em; | ||
| + | padding-bottom: | ||
| + | } | ||
| + | |||
| + | # | ||
| + | font-size: 1.1em; | ||
| + | } | ||
| + | |||
| + | kbd.__keyboard { | ||
| + | color: #0000ff; | ||
| + | background-color: | ||
| + | text-align: center; | ||
| + | border-left: | ||
| + | border-top: 1px solid #cfcfcf; | ||
| + | border-right: | ||
| + | border-bottom: | ||
| + | -moz-border-radius: | ||
| + | border-radius: | ||
| + | padding-left: | ||
| + | padding-top: | ||
| + | padding-right: | ||
| + | padding-bottom: | ||
| + | margin-left: | ||
| + | margin-right: | ||
| + | vertical-align: | ||
| + | font-family: | ||
| + | white-space: | ||
| + | font-size: 1.1em !important; | ||
| + | } | ||
| + | |||
| + | div.qq-upload-button { | ||
| + | | ||
| + | } | ||
| + | |||
| + | </ | ||
| + | ===== Dokuwiki Template CSS ===== | ||
| + | |||
| + | Standard settings for font sizes etc. for different elements is here: | ||
| + | |||
| + | ''/ | ||
| + | |||
| + | * add any modified tweaks to the CSS to a '' | ||
| + | |||
| + | * '' | ||
| + | |||
| + | <code css> | ||
| + | pre { | ||
| + | border-radius: | ||
| + | background-color: | ||
| + | } | ||
| + | |||
| + | |||
| + | code { | ||
| + | color: #c72522; | ||
| + | font-size: 1.1em; | ||
| + | padding: 0.1em 0.3em; | ||
| + | border-radius: | ||
| + | } | ||
| + | |||
| + | |||
| + | .dokuwiki .aside { | ||
| + | font-size: 90%; | ||
| + | } | ||
| + | |||
| + | |||
| + | body { | ||
| + | font-size: 90%; | ||
| + | |||
| + | } | ||
| + | .dokuwiki div.breadcrumbs { | ||
| + | font-size: 90%; | ||
| + | } | ||
| + | |||
| + | </ | ||
| + | |||
| + | See also [[#Dokuwiki Template monospace font]] | ||
| + | ==== Dokuwiki Template Tagline ==== | ||
| + | |||
| + | < | ||
| + | <p style=" | ||
| + | </ | ||
| ===== Dokuwiki Timezone ===== | ===== Dokuwiki Timezone ===== | ||
| Line 60: | Line 343: | ||
| I find the underlining and " | I find the underlining and " | ||
| + | |||
| + | such as DNS and ACL | ||
| The process is described [[https:// | The process is described [[https:// | ||
| Line 188: | Line 473: | ||
| kbd.__keyboard { | kbd.__keyboard { | ||
| color: #0000ff; | color: #0000ff; | ||
| - | background-color: | + | background-color: |
| text-align: center; | text-align: center; | ||
| border-left: | border-left: | ||
| Line 212: | Line 497: | ||
| ===== Dokuwiki Template monospace font ===== | ===== Dokuwiki Template monospace font ===== | ||
| - | * 1< | + | |
| - | + | ||
| - | <code css> | + | |
| - | pre, | + | |
| - | code, | + | |
| - | samp, | + | |
| - | kbd { | + | |
| - | font-family: | + | |
| - | /* same font stack should be used for " | + | |
| - | font-size: 1em; | + | |
| - | direction: ltr; | + | |
| - | text-align: left; | + | |
| - | background-color: | + | |
| - | color: @ini_text; | + | |
| - | box-shadow: inset 0 0 .3em @ini_border; | + | |
| - | border-radius: | + | |
| - | } | + | |
| - | </ | + | |
| * the colour of the mono font is the same as general text and doesn' | * the colour of the mono font is the same as general text and doesn' | ||
| - | * edit ''/ | + | * edit ''/ |
| - | * reset the border radius | + | * but see below for a better place to do the configuraiton |
| + | |||
| <code css> | <code css> | ||
| code { | code { | ||
| Line 245: | Line 512: | ||
| </ | </ | ||
| - | | + | |
| * To prevent upgrades overwriting these changes - add them to ''/ | * To prevent upgrades overwriting these changes - add them to ''/ | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| <code css> | <code css> | ||
| pre { | pre { | ||
| border-radius: | border-radius: | ||
| + | | ||
| + | |||
| } | } | ||
| Line 340: | Line 612: | ||
| * it seems necessary to disable '' | * it seems necessary to disable '' | ||
| - | ===== Vector / Monobook tweaks ===== | ||
| - | |||
| - | I like the Vector and Monobook templates, very similar feel to Wikipedia | ||
| - | |||
| - | ==== Logout errors with later versions of Dokuwiki ==== | ||
| - | |||
| - | After upgrading Dokuwiki to //Igor// it became impossible to log out due to a warning | ||
| - | |||
| - | <note warning> | ||
| - | Security Token did not match. Possible CSRF attack. | ||
| - | </ | ||
| - | |||
| - | I initially ignored it but then downgraded back to // | ||
| - | |||
| - | I recently upgraded to the latest Dokuwiki (Jack Jackrum), and upgraded all plugins and templates where possible. However the problem with logout with Vector and Monobook re-appeared. | ||
| - | |||
| - | I found there was a fix described on the forum: | ||
| - | |||
| - | [[https:// | ||
| - | |||
| - | and the cure is to edit the appropriate line in '' | ||
| - | |||
| - | The FIXME does work, though... | ||
| - | |||
| - | For Vector edit ''/ | ||
| - | |||
| - | <code php> | ||
| - | | ||
| - | |||
| - | </ | ||
| - | |||
| - | and the same for '' | ||
| - | <code php> | ||
| - | | ||
| - | |||
| - | </ | ||
| - | |||
| - | |||
| - | ==== Monospace font ==== | ||
| - | |||
| - | I found the style applied to '' | ||
| - | |||
| - | I found the place to change it: | ||
| - | |||
| - | '' | ||
| - | |||
| - | add the the following and adjust as needed: | ||
| - | |||
| - | <code css> | ||
| - | |||
| - | div#content .dokuwiki code { | ||
| - | font-size: 100%; | ||
| - | padding-left: | ||
| - | padding-right: | ||
| - | background-color: | ||
| - | color: #00f; | ||
| - | direction: ltr; | ||
| - | text-align: left; | ||
| - | } | ||
| - | |||
| - | |||
| - | </ | ||
| - | |||
| - | ==== Footer Buttons ==== | ||
| - | |||
| - | Remove the default footer buttons by editing '' | ||
| - | |||
| - | <note tip> | ||
| - | For Monobook, change to < | ||
| - | </ | ||
| - | |||
| - | <code php> | ||
| - | |||
| - | //delete all (defaults) | ||
| - | $_vector_btns = array(); | ||
| - | </ | ||
| - | |||
| - | this suppresses the inclusion of footer buttons from '' | ||
| - | |||
| - | === Add just the Dokuwiki and Vector/ | ||
| - | |||
| - | Edit '' | ||
| - | |||
| - | <note tip> | ||
| - | Swap '' | ||
| - | </ | ||
| - | |||
| - | <code php> | ||
| - | |||
| - | <?php | ||
| - | |||
| - | //check if we are running within the DokuWiki environment | ||
| - | if (!defined(" | ||
| - | die(); | ||
| - | } | ||
| - | //delete all (defaults) | ||
| - | $_vector_btns = array(); | ||
| - | |||
| - | //note: The buttons will be rendered in the order they were defined. Means: | ||
| - | // first button will be rendered first, last button will be rendered at | ||
| - | // last. | ||
| - | //DokuWiki button | ||
| - | $_vector_btns[" | ||
| - | $_vector_btns[" | ||
| - | $_vector_btns[" | ||
| - | $_vector_btns[" | ||
| - | $_vector_btns[" | ||
| - | $_vector_btns[" | ||
| - | |||
| - | //" | ||
| - | $_vector_btns[" | ||
| - | $_vector_btns[" | ||
| - | $_vector_btns[" | ||
| - | $_vector_btns[" | ||
| - | $_vector_btns[" | ||
| - | $_vector_btns[" | ||
| - | |||
| - | </ | ||
| - | ==== Mobile Scaling ==== | ||
| - | |||
| - | The layout on a phone isn't too good, and can't be zoomed/ | ||
| - | |||
| - | I found this thread: | ||
| - | |||
| - | [[https:// | ||
| - | |||
| - | and applied the comment-out of the line : | ||
| - | |||
| - | <code php> | ||
| - | |||
| - | //echo "< | ||
| - | </ | ||
| - | |||
| - | in '' | ||
| - | |||
| - | the page now scales/ | ||
| ==== Alternative ==== | ==== Alternative ==== | ||