Giter Club home page Giter Club logo

dactl's Introduction

dactl

dactl is a fast, modern and configurable Jekyll theme with some tricks up it's sleeve. It has a live theme switcher and it's main blog layout display prominent hero images for posts with colored overlays and nice animations.

light theme dark theme

Features

Though minimalistic-looking by nature, dactl is easily configurable and includes quite a lot of niceties:

Main features:

  • Customizable blog layout - choose how your posts will be displayed
  • Light/Dark live theme switcher
  • Inline footnotes using Barefoot
  • IcoMoon custom icon set (~4kb)
  • Typography and components size set in rem and em which makes them easily scalable
  • Responsive design

Jekyll-specific features:

  • Pagination (default: 5 posts per page)
  • Fully compatible with Jekyll 3.x and GitHub Pages
  • SEO optimized
  • Google Analytics support
  • Disqus comments support
  • Syntax highlighter using Rouge with numbered code lines

Other features:

  • Archive page
  • About page
  • Tags functionality and tags pages
  • Link posts functionality

Some of the features listed above can be easily configured or disabled by you.

Information about dactl

At it's core, dactl is a forked version of daktilo but it has been almost entirely rewritten from scratch.
I have just started my journey in the world of web development, learning new things on the way.
Looking for a way to put my newly acquired skills to test I found Jekyll and I quickly realized that it's going to be a good learning experience since I don't like building 'dummy' projects.
I've built this theme as a way to develop my skills further.

You can find credits at the bottom of this Readme file.
All feedback is welcome, both positive and negative.

Installation

Running locally

Assuming you've got Jekyll installed, clone or download this repo, cd to wherever you've put dactl folder and run jekyll -s'

Hosting on GitHub

Fork this repo and rename it to yourusername.github.io... and that's it!
Your new dactl-themed Jekyll blog should be up and running at yourusername.github.io.

Usage

Slight warning

dactl relies heavily on modern CSS properties such as mix-blend-mode, -webkit-filter and css variables so it may not work properly on older browsers.
It was tested with and works fully on webkit-powered browsers - Safari, Chrome, Vivaldi.

Layout configurations

By default dactl uses blog layout which you can see below or check for yourself in the live version.

Main blog layout displays 5 posts. Each post has a heading contained in a medium-sized tile - with an color overlay over the background image. You need to set the image and color of the overlay in post's YAML front matter.

If you don't want to use images for post headings you can easily configure the layout to you needs by changing settings located in configure.yml file, both post and blog layout will adapt accordingly.

Options include:

  • Use or don't use post heading images (Blog & Post)
  • Show full post content or post excerpts (Blog)
  • Show post titles only (Blog)

Additional information about some features

Hero images and blog layout

Liquid 'script' which is used to append correct hero image and overlay color as set in post YAML Front matter was written by me and while it's really basic it functions properly.
You can read more about it and see the code in include/utils/hero.html.

Theme switcher

Theme switcher is made in vanilla Javascript and works using CSS Variables. Values (colors) specified for each variable are injected into :root on every page load.
User theme choice is saved in browser's Local Storage and is persistent through sessions.

You can edit the colors of both Light and Dark themes in themeswitcher.js file found in _assets/js/.

Inline Barefoot footnotes

dactl uses Barefoot plugin to create nice looking inline footnotes from those generated by kramdown, daktl's markdown processor.

Barefoot description (from project's page):

Barefoot is a lightweight Bigfoot.js alternative written in vanilla Javascript to create beautiful inline footnotes.
Barefoot grabs the common markup used for footnotes on the web, mostly generated by Markdown processors, and transform it into beautiful and meaningful footnotes.

CSS

CSS is built by via Jekyll's SASS compiler. Source partial SASS files are located in _sass folder, included into main.scss, and compile to main.css.

Additional pages

Archive page

Archive page displays all of your posts grouped by month. Under this page's title you'll find a Searchbox which is hooked up to DuckDuckGo's :site search and will open the results in a new tab.
You need to provide your blog's web address in search_path field found in _config.yml for it to work.

About page

About page displays your photo under the title (set in config.yml) and the content of about.md.

Tags & Tags Pages

Tags and tag pages are supported by using Jekyll's native collections functionality.

Even more info

Rems, font-size and scaling

dactl is built almost entirely with rems (instead of pixels). rems are like ems, but instead of building on the immediate parent's font-size, they build on the root element, <html>.

By default, dactl uses the following:

html {
  font-size: 20px;
  line-height: 1.6;
}
@media (max-width: 48rem) {
  html {
    font-size: 18px;
  }
}

To easily scale your site's typography and components, simply customize the base font-sizes found in _sass/variables.scss file.

(Lifted from here)

Credits

Resources used

Inspiration and thoughtful code-jacking

Inspiration and bits of things listed below are present inside dactl's code:

  • Daktilo - dactl is based on Daktilo and inherits it's one-column layout.
  • Hydejack - I've learned a lot about Jekyll when I took apart @qwtel's excellent fork of Hyde theme. I embraced his more partials = everything is easier to edit policy. Hydejack theme gave me an idea on how to create hero images liquid scripting, loading google fonts and using rem's/em's and more.
  • Minimal Mistakes - This guy makes awesome themes and writes a lot about Jekyll and it's more obscure use cases on his blog, Made Mistakes. Looking through his theme's code - Minimal Mistakes in particular - gave me lot of information about how to build a robust theme and how to make it configurable within _config.yml
  • Trophy - Link border slide animation SASS mixin which I slightly modified to be able to easily change the direction of the animation.
  • Various blog posts about Jekyll and Stackoverflow posts with useful Liquid snippets.

License

All parts of dactl Jekyll theme are free to use and abuse under the open-source MIT license.

TO DO

  • Inline critical .css in <head> for faster load times
  • Fix theme-switcher - sometimes it does not inject all of the colors properly on first page load and a refresh, fixes itself after switching the theme back and forth.

dactl's People

Contributors

andcov avatar indiandennis avatar luki avatar melangue avatar tribut 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  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  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dactl's Issues

no gemfile

There's no gemfile and that makes it hard to figure out which version of jekyll the demo uses. This omission is particularly inconveniencing because the gem rouge keeps erroring out on github pages.

excerpts not working

I tried to publish a post with the theme but all the post displays on the main page. Does anyone have solutions ?

Disqus not working

What can I do to Disqus work? I put the Disqus shortname into the _config.yml, but it didn't show the area for comments into posts. How can I make them appear?

Issues editing theme.js

I am having trouble adjusting the css for the theme. I have changed the --text-color and --link-color to lime in theme.js and both are still appearing as black whenever I load the website. I have tried restarting the server and clearing the cache. Do you have any suggestions?

const LightTheme = {
  '--bg-color': '#eee',
  '--text-color': '#8BC34A',
  '--text-color-light': '#828282',
  '--link-color': '#8BC34A',
  '--metadata-color': '#999',
  '--post-title': '#313131',
  '--code-bg-color': '#fff',
  '--code-border': '#f5f5f5',
  '--table-border-color': '#e5e5e5',
  '--table-header-color': '#fefefe',
  '--shadow-color': 'rgba(0, 0, 0, 0.1)',
  '--invert-logo-color': 'invert(0)',
  themeName: 'LightTheme'
}

I believe I followed the instructions according to the README

Theme switcher
Theme switcher is made in vanilla Javascript and works using CSS Variables. Values (colors) specified for each variable are injected into :root on every page load.
User theme choice is saved in browser's Local Storage and is persistent through sessions.

You can edit the colors of both Light and Dark themes in theme.js file found in _assets/js/.

Date Formatting

How can I go about editing the way dates format to the American system Month/Day/Year?

Appears the Gemfile is missing some plugins defined in the _config.yml

I was building my site on Netlify even though it will be deployed to GitHub pages and I ran into a lot of missing gems in the Gemfile.

config.yml

plugins:
  - jekyll-paginate
  - jekyll-sitemap
  - jekyll-github-metadata
  - jekyll-mentions
  - jekyll-redirect-from
  - jemoji

The plugins snippet from my fixed but maybe overkill Gemfile

group :jekyll_plugins do
  gem "jekyll-feed"
  gem "jekyll-paginate"
  gem "jekyll-sitemap"
  gem "jekyll-mentions"
  gem "jekyll-github-metadata"
  gem "jekyll-redirect-from"
  gem "jemoji"
end

This allowed me to build and preview on Netlify.

Hero overlay colors

Struggling to find where these values are set. I'd like to be able to define additional colors than just red, green, etc. Any pointers?

Code snippet issue.

Code snippets don't work correctly. It has "class="highlight">" above the code, and everything that goes under the code snippet looks like part of it.
Screenshot 2019-10-03 at 17 50 19

open source license?

There doesn't appear to be any kind of license attached to this work, which could create legal troubles for site creators who build their sites off of your source code. If you just want this to be available to everybody, consider using the CC0 license to make it totally free for everybody to use; otherwise, you could use the MIT license if you want to make people attribute the code.

Thanks!

Cant solve some issues about theme

Hi,
I installed on your theme into my site, its running normally, I want suggest to add some extra features like,

  1. Custom logo (can't modified) not supported to( jpg & png)
  2. To add new menu
  3. How to place post custom images.
  4. How to place hero images. normally when I place unsplash collection images, it won't reflect on post.
  5. Can't implement new social icons on head section.

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.