GithubHelp home page GithubHelp logo

bits-and-pieces-theme-for-pico's Introduction

Bits and Pieces theme for Pico

Preview of theme

I have long searched for a way to store useful bits and pieces for reference; snippets of Javascript, odd CSS selectors, how to exit vim etc. General purpose bins like Evernote where you're supposed to throw everything into it has never really worked for me. It always ends up looking like my desk – messy and disorganized.

For the last couple of years I have stored my reference files as markdown files with front-ends to render them. For a while I have used Pico CMS as my front-end together with this minimalistic theme I have made.

The theme is really simple and barebone and can easily be customized and extended to suit your needs.

Getting started

My setup

My prefered way is to simply run the site locally on my machine. That way it's super fast and I don't have to worry about securing the site, restricting access and such.

Installation

Download the repository and put the bitsandpieces folder in the themes folder in Pico and update the config.php with the following settings:

$config['theme'] = 'bitsandpieces';

Editing content

I personally edit my references files using texteditors and doesn't use any admin backend or page admin plugin. I have set up an Alfred workflow to do a keyworded file search inside my content directory so when I want to edit a page a simply hit cmd-space and type ref ter which opens the file terminal.md located in the contents folder in my prefered text editor, which at the moment is Typora.

I also keep my reference files as a private git repository on github so I can access and edit them anywhere on any device where I have an internet connection. Much easier than having to fiddle with a webserver to dropbox setup.

Theme specific guidelines

Navigation

The theme has currently no sub navigation. Regardles of the folder structure in your content directory all pages will be rendered in a flat list

Keyboard shortcuts

Assign keyboard shortcuts to quickly switch between pages. Add the metadata Shortcut: <key> in the YAML header to assign the key to the page. Use + to make key combos. Look at mousetrap documentation to see what you can do

---
Title: Bits and Pieces theme for Pico
Shortcut: alt+1
---

The above example will open the Bits and Pieces page when the keys alt and 1 keys are pressed simultaneously

Titles

Do include a level 1 header in your content # this is a H1. The title you specify in the front matter is used only for the navigation and does not render with the content.

Headings

The theme only provide styles for the first three levels of headers and style the remaining headers as bold text. It's my opinion that if you need more than three levels of hierarchy you'd better split the content into different files

Code snippets

Code highligt are rendered using highlight.js. Put the language right after the three backticks to get proper language highlighting. To see what language prefix to use see highlight.js documentation.

​```html
<h1>Hello world!</h1>
​```

Load external css files

Add the following setting inconfig.php to load external css files.

$config['external_css'] = array(
  'url/to/external/css-file-1.css',
  'url/to/path-to/file-2.css',
);

Browser compability

Since this theme is not intended for a public facing website I have taken the freedom to support only web browsers I use in my daily life which is Safari and Chrome for Mac and iOS. The theme also uses some bleeding edge css like native css variables and position sticky (which is unfortunately not available on chrome yet). So don't expect the theme to run on Internet Explorer. Maybe Edge. But I haven't tested and I probably won't either until Apple stops making macs.

scroll-preview

Sticky headers on safari

bits-and-pieces-theme-for-pico's People

Contributors

agfline avatar lostkeys 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bits-and-pieces-theme-for-pico's Issues

A unexpected error occured while performing this action

I was trying to install the theme on my nextcloud. After adding the theme to the theme directory I got the message when I tried to select the theme inside the admin dashboard in NC:

A unexpected error occured while performing this action. Please check Nextcloud's logs.

I also installed a couple a different themes and they were all working fine. Does anyone have any suggestions what I should check and what could be the reason for the error?

Thank you!

Sticky & Chrome: code blocks cover the h2

In Chrome latest stable,
the sticky h2 gets covered up by .code-block-container.
This is attributed to main.css:293:
position: relative;

Removing that line seems to not have any effect other than fixing the issue.

Blockquotes

I want to modify how block quotes are presented with this theme. Just a grey vertical bar, and maybe the same background color as the code blocks. When I add this to the main.css file, nothing changes:

blockquote {
    font-style: italic;
    margin-left: 1em;
    padding-left: 1em;
    border-left: 0.5em solid #f5f5f5;
}

What am I missing?

There is no config.php file.

The following makes no sense:

Installation

Download the repository and put the bitsandpieces folder in the themes folder in Pico and update the config.php with the following settings:

$config['theme'] = 'bitsandpieces';

The left nav-menu is not mobile resposive.

When browsing the site from a mobile with portrait view. This is what happens...
image
It would be better if this nav bar would be somewhat like the default theme while on mobile.

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.