Code Monkey home page Code Monkey logo

homepage's Introduction

Homepage

This project is a simple, standalone, self-hosted PHP page that is meant to be your window to your server and the web.

It is your minimalist corner of the internet. The background will update with a gorgeous (and royalty free) image from Unsplash, or a custom source every 20 seconds. With it, a simple menu is available to you with your most frequented links.

All the assets needed are part of the repo so it can run offline (though it won't fetch pretty background images for you).

This project uses:

  • jQuery
  • Bootstrap CSS
  • Mousetrap.js
  • Font Awesome
  • Unsplash

Screenshots

Homepage w/o Menu: Homepage w/o Menu

Homepage with Menu Toggled: Homepage with Menu

To Use

Copy the config.sample.json file and rename to config.json. Be sure to update the fields as you see appropriate. You have the option to use the Unsplash API to fetch background images, or use a custom URL and JSON selector. If you choose to use Unsplash, will need to create a developer profile at Unsplash to use the background image functionality properly.

Configure Homepage

  • 'unlock_pattern' => Choose unlock pattern from Mousetrap
  • 'clock_format' => Choose pattern format from PHP's date function
  • 'idle_timer' => Set a number of milliseconds here if you'd like to automatically hide the menu after a certain time of inactivity. Leave this attribute out entirely if you don't want an idle timer.
  • 'items' => The menu will be in a grid of 3 icons per row on desktop. Insert any link you'd like, or {{cur}} for the current URL of the page. Choose icons from Font Awesome

Unsplash Background Images

  • 'unsplash_client_id' => Get Unsplash client ID from Unsplash

Custom Background Images

  • 'custom_url' => Input a custom URL that will return proper JSON
  • 'custom_url_headers' => Add any headers that may be needed to complete a cURL request to the aforementioned URL properly
  • 'custom_url_selector' => Input a proper PHP array selector to be used on the JSON received above. For example, if I were to fetch from Github's user API with a 'custom_url' of 'https://api.github.com/users/octocat', the 'custom_url_selector' would simply be "['avatar_url']". [{random}] can be replaced for a random index in an array.

homepage's People

Contributors

ericmoon avatar tomershvueli avatar

Watchers

 avatar

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.