GithubHelp home page GithubHelp logo

pages-themes / time-machine Goto Github PK

View Code? Open in Web Editor NEW
87.0 9.0 222.0 106 KB

Time machine is a Jekyll theme for GitHub Pages

Home Page: https://pages-themes.github.io/time-machine/

License: Creative Commons Zero v1.0 Universal

Ruby 8.10% HTML 20.43% JavaScript 8.07% Shell 6.41% SCSS 56.99%
jekyll jekyll-theme github-pages

time-machine's Introduction

The Time machine theme

.github/workflows/ci.yaml Gem Version

Time machine is a Jekyll theme for GitHub Pages. You can preview the theme to see what it looks like, or even use it today.

Thumbnail of Time machine

Usage

To use the Time machine theme:

  1. Add the following to your site's _config.yml:

    remote_theme: pages-themes/[email protected]
    plugins:
    - jekyll-remote-theme # add this line to the plugins list if you already have one
  2. Optionally, if you'd like to preview your site on your computer, add the following to your site's Gemfile:

    gem "github-pages", group: :jekyll_plugins

Customizing

Configuration variables

Time machine will respect the following variables, if set in your site's _config.yml:

title: [The title of your site]
description: [A short description of your site's purpose]

Additionally, you may choose to set the following optional variables:

show_downloads: ["true" or "false" (unquoted) to indicate whether to provide a download URL]
google_analytics: [Your Google Analytics tracking ID]

Stylesheet

If you'd like to add your own custom styles:

  1. Create a file called /assets/css/style.scss in your site
  2. Add the following content to the top of the file, exactly as shown:
    ---
    ---
    
    @import "{{ site.theme }}";
  3. Add any custom CSS (or Sass, including imports) you'd like immediately after the @import line

Note: If you'd like to change the theme's Sass variables, you must set new values before the @import line in your stylesheet.

Layouts

If you'd like to change the theme's HTML layout:

  1. For some changes such as a custom favicon, you can add custom files in your local _includes folder. The files provided with the theme provide a starting point and are included by the original layout template.
  2. For more extensive changes, copy the original template from the theme's repository
    (Pro-tip: click "raw" to make copying easier)
  3. Create a file called /_layouts/default.html in your site
  4. Paste the default layout content copied in the first step
  5. Customize the layout as you'd like

Customizing Google Analytics code

Google has released several iterations to their Google Analytics code over the years since this theme was first created. If you would like to take advantage of the latest code, paste it into _includes/head-custom-google-analytics.html in your Jekyll site.

Overriding GitHub-generated URLs

Templates often rely on URLs supplied by GitHub such as links to your repository or links to download your project. If you'd like to override one or more default URLs:

  1. Look at the template source to determine the name of the variable. It will be in the form of {{ site.github.zip_url }}.
  2. Specify the URL that you'd like the template to use in your site's _config.yml. For example, if the variable was site.github.url, you'd add the following:
    github:
      zip_url: http://example.com/download.zip
      another_url: another value
  3. When your site is built, Jekyll will use the URL you specified, rather than the default one provided by GitHub.

Note: You must remove the site. prefix, and each variable name (after the github.) should be indent with two space below github:.

For more information, see the Jekyll variables documentation.

Roadmap

See the open issues for a list of proposed features (and known issues).

Project philosophy

The Time machine theme is intended to make it quick and easy for GitHub Pages users to create their first (or 100th) website. The theme should meet the vast majority of users' needs out of the box, erring on the side of simplicity rather than flexibility, and provide users the opportunity to opt-in to additional complexity if they have specific needs or wish to further customize their experience (such as adding custom CSS or modifying the default layout). It should also look great, but that goes without saying.

Contributing

Interested in contributing to Time machine? We'd love your help. Time machine is an open source project, built one contribution at a time by users like you. See the CONTRIBUTING file for instructions on how to contribute.

Previewing the theme locally

If you'd like to preview the theme locally (for example, in the process of proposing a change):

  1. Clone down the theme's repository (git clone https://github.com/pages-themes/time-machine)
  2. cd into the theme's directory
  3. Run script/bootstrap to install the necessary dependencies
  4. Run bundle exec jekyll serve to start the preview server
  5. Visit localhost:4000 in your browser to preview the theme

Running tests

The theme contains a minimal test suite, to ensure a site with the theme would build successfully. To run the tests, simply run script/cibuild. You'll need to run script/bootstrap once before the test script will work.

time-machine's People

Contributors

advaith1 avatar benbalter avatar deargle avatar gebeto avatar parkr avatar tsusdere 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

time-machine's Issues

The scrolled download icon is displayed even if `show_downloads: false` is specified.

Use this theme by setting _config.yml to:

show_downloads: false

The header disappears the download icon as expected:
スクリーンショット 2020-12-06 14 59 29

But when scrolling down, the header still shows the download icon:
スクリーンショット 2020-12-06 14 59 34

I referred to the template and noticed it:
/_layouts/default.html:

  <div class="current-section">
    <a href="#top">Scroll to top</a>
    <a href="{{ site.github.tar_url }}" class="tar">tar</a><a href="{{ site.github.zip_url }}" class="zip">zip</a><a href="" class="code">source code</a>
    <p class="name"></p>
  </div>

There is no {% if site.show_downloads%} and {% endif%}.

Blank Line Numbers

The code blocks are rendering with additional lines that are not numbered.
This problem only occurs when code extends further than the 650px specified wrapper and a scroll bar is instantiated.

I have tried extending the wrapper size in the style.scss file but the problem is still occurring.

code-block

render-issue

Thanks

jekyll complains about \xE2 character in time-machine.scss

Setting my theme to time-machine on a fresh jekyll directory, I get:

  %bundle exec jekyll serve
 Configuration file: /corp/projects/pandora/minerva/www/_config.yml
        Source: /corp/projects/pandora/minerva/www
   Destination: /corp/projects/pandora/minerva/www/_site
Incremental build: disabled. Enable with --incremental
  Generating... 
Conversion error: Jekyll::Converters::Scss encountered an error while converting 'assets/css/style.scss':
                Invalid US-ASCII character "\xE2" on line 475

The error is not in that file, which just does an @import of sass/jekyll-theme-time-machine.scss.
I'm not sure wha encoding that file is supposed to be in. Looks like maybe Latin-1?

content: "‟";

Some kind of double-quote-ish symbol?
I replaced it with an actual double quote. Probably an &-escape character would be a better idea?

Request: mobile-friendliness

Nowadays, many people access websites from their phones. Other GitHub Pages themes support mobile-friendliness, but Time Machine doesn't. This could be done by just showing the full width of the page when on mobile and extending the bottom of the page to the bottom of the phone screen.

Accessibility errors found in your template

The user @carlsonsantana validate your site template "https://pages-themes.github.io/time-machine/" and found these accessibility errors:

  • Page https://pages-themes.github.io/time-machine/:
    • Issue a166b261-31e5-43a1-b2c1-3f915f265540:
      • Type: Error
      • Code: WCAG2AA.Principle2.Guideline2_4.2_4_1.G1,G123,G124.NoSuchID
      • Message: This link points to a named anchor "top" within the document, but no anchor exists with that name.
      • Selector: html > body > div:nth-child(2) > a:nth-child(1)
      • Context: <a href="#top">Scroll to top</a>
    • Issue 9a64f9d2-db74-46de-befe-8dd1a13b0167:
      • Type: Error
      • Code: WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail
      • Message: This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 1.98:1. Recommendation: change text colour to #2f6600.
      • Selector: html > body > div:nth-child(1) > footer > div:nth-child(2) > small > a:nth-child(3)
      • Context: <a href="https://twitter.com/jonrohan/">Jon Rohan</a>
    • Issue 7149b990-4b2f-439e-b273-755ae2244f47:
      • Type: Error
      • Code: WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail
      • Message: This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 1.98:1. Recommendation: change text colour to #2f6600.
      • Selector: html > body > div:nth-child(1) > footer > div:nth-child(2) > small > a:nth-child(1)
      • Context: <a href="https://pages.github.com/">GitHub Pages</a>
    • Issue 1dfd9681-b643-421c-b1fa-726e7772034c:
      • Type: Error
      • Code: WCAG2AA.Principle1.Guideline1_1.1_1_1.H2.EG4
      • Message: Img element inside a link has empty or missing alt text when a link beside it contains link text. Consider combining the links.
      • Selector: html > body > div:nth-child(1) > footer > div:nth-child(1) > p > a:nth-child(1) > img
      • Context: <img src="https://github.com/pages-themes.png" width="48" height="48">
    • Issue 2c48576e-24f2-4276-9ca8-035bb33c39ce:
      • Type: Error
      • Code: WCAG2AA.Principle1.Guideline1_1.1_1_1.H30.2
      • Message: Img element is the only content of the link, but is missing alt text. The alt text should describe the purpose of the link.
      • Selector: html > body > div:nth-child(1) > footer > div:nth-child(1) > p > a:nth-child(1)
      • Context: <a href="https://github.com/pages-themes" class="avatar"><img src="https://github.com/pa...</a>
    • Issue 72cef238-cd5a-43e6-a106-19b1c814ac52:
      • Type: Error
      • Code: WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail
      • Message: This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 3.07:1. Recommendation: change background to #1f1f1f.
      • Selector: #main > article > div:nth-child(11) > div > pre:nth-child(2) > code > span:nth-child(27)
      • Context: <span class="k">end</span>
    • Issue 3d5b5021-c420-4e4b-be58-484ea01f7dea:
      • Type: Error
      • Code: WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail
      • Message: This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 4.27:1. Recommendation: change background to #373737.
      • Selector: #main > article > div:nth-child(11) > div > pre:nth-child(2) > code > span:nth-child(25)
      • Context: <span class="s2">"</span>
    • Issue 8d78e4bb-d1eb-4d93-bc40-87444de91ca6:
      • Type: Error
      • Code: WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail
      • Message: This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 1.88:1. Recommendation: change text colour to #fffefe.
      • Selector: #main > article > div:nth-child(11) > div > pre:nth-child(2) > code > span:nth-child(24)
      • Context: <span class="si">}</span>
    • Issue b39bcd75-5b4c-4082-94a6-796414746bfe:
      • Type: Error
      • Code: WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail
      • Message: This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 1.88:1. Recommendation: change text colour to #fffefe.
      • Selector: #main > article > div:nth-child(11) > div > pre:nth-child(2) > code > span:nth-child(22)
      • Context: <span class="si">#{</span>
    • Issue 85b283c6-0ed1-4f06-9cf9-8f948908e7a0:
      • Type: Error
      • Code: WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail
      • Message: This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 4.27:1. Recommendation: change background to #373737.
      • Selector: #main > article > div:nth-child(11) > div > pre:nth-child(2) > code > span:nth-child(21)
      • Context: <span class="s2">"= </span>
    • Issue 15684b5e-32a9-466d-ace0-cd32cb59698d:
      • Type: Error
      • Code: WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail
      • Message: This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 3.07:1. Recommendation: change background to #1f1f1f.
      • Selector: #main > article > div:nth-child(11) > div > pre:nth-child(2) > code > span:nth-child(9)
      • Context: <span class="k">do</span>
    • Issue c6b4e644-a522-489e-9cda-829e0e118dad:
      • Type: Error
      • Code: WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail
      • Message: This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 3.16:1. Recommendation: change background to #212121.
      • Selector: #main > article > div:nth-child(11) > div > pre:nth-child(2) > code > span:nth-child(1)
      • Context: <span class="c1"># Ruby code with syntax highlig...</span>
    • Issue f51ba56f-87f4-415c-b9ac-73f6019214d1:
      • Type: Error
      • Code: WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail
      • Message: This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 3.8:1. Recommendation: change background to #2f2f2f.
      • Selector: #main > article > div:nth-child(10) > div > pre:nth-child(2) > code > span:nth-child(22)
      • Context: <span class="kc">true</span>
    • Issue 4e7cd6af-fa33-4fca-87b4-8d02ddf1becb:
      • Type: Error
      • Code: WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail
      • Message: This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 3.07:1. Recommendation: change background to #1f1f1f.
      • Selector: #main > article > div:nth-child(10) > div > pre:nth-child(2) > code > span:nth-child(21)
      • Context: <span class="k">return</span>
    • Issue fd9908a9-48f0-49e5-b5b0-b7ecd326d21b:
      • Type: Error
      • Code: WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail
      • Message: This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 4.27:1. Recommendation: change background to #373737.
      • Selector: #main > article > div:nth-child(10) > div > pre:nth-child(2) > code > span:nth-child(17)
      • Context: <span class="s1">'./lang/'</span>
    • Issue ea3746e6-a032-4bf7-b8b7-2daf6e1783da:
      • Type: Error
      • Code: WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail
      • Message: This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 3.8:1. Recommendation: change background to #2f2f2f.
      • Selector: #main > article > div:nth-child(10) > div > pre:nth-child(2) > code > span:nth-child(5)
      • Context: <span class="kd">function</span>
    • Issue e306e3b9-47a4-4e2d-85e9-68b63e8aa9ad:
      • Type: Error
      • Code: WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail
      • Message: This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 3.8:1. Recommendation: change background to #2f2f2f.
      • Selector: #main > article > div:nth-child(10) > div > pre:nth-child(2) > code > span:nth-child(2)
      • Context: <span class="kd">var</span>
    • Issue 3ab48ce5-28e8-48ee-80c6-d9d7ee6ffc7d:
      • Type: Error
      • Code: WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail
      • Message: This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 3.16:1. Recommendation: change background to #212121.
      • Selector: #main > article > div:nth-child(10) > div > pre:nth-child(2) > code > span:nth-child(1)
      • Context: <span class="c1">// Javascript code with syntax ...</span>
    • Issue 4b305344-ddfe-4a1c-a13f-7954420314a4:
      • Type: Error
      • Code: WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail
      • Message: This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 3.02:1. Recommendation: change text colour to #44860b.
      • Selector: #main > article > p:nth-child(2) > a
      • Context: <a href="./another-page.html">Link to another page</a>

You can check these accessibility errors using pa11y.
You can view the full validation results in our website.

Responsive

Would it be possible to make the website responsive?

Time Machine is not supported by GitHub Pages

When trying to build a vanilla Jekyll site through GitHub pages using the Time Machine theme, I get this error:

Page build warning

The page build completed successfully, but returned the following warning for the main branch:

You are attempting to use a Jekyll theme, "time-machine", which is not supported by GitHub Pages. Please visit https://pages.github.com/themes/ for a list of supported themes. If you are using the "theme" configuration variable for something other than a Jekyll theme, we recommend you rename this variable throughout your site. For more information, see https://docs.github.com/github/working-with-github-pages/adding-a-theme-to-your-github-pages-site-using-jekyll.

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.