Simple Static Start Page
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Jake Price bd0585080e Fix missing html style element 2 months ago
public/assets Fix height issues 3 months ago
.gitignore Initial commit 3 months ago
LICENSE.md Initial commit 3 months ago
README.md Add section on colour properties 3 months ago
build.py Fix missing html style element 2 months ago
config_template.py Add colour properties 3 months ago

README.md

Start Page

Summary

This is my simple static start page and I use it as a home page on Firefox and Bromite.

I don't bother with bookmarks, I use this page instead.

Usage

Make sure Python 3 is installed.

Although I serve the page using Caddy 2 on Docker, it's just HTML and CSS, so you can point your browser to it on your local filesystem and it will work just fine.

All dependencies (including fonts) are in the repository.

Configuration

The design is subject to change, but it does the job for now.

Rename the configuration template file config_template.py to config.py and add your own sections.

You'll need to remove some of the section blocks from build.py (as it's made for me) to bring it in to line with your own config.py.

Fill in the first two properties in config.py.

sp_title = "Start Page"
sp_home_path = "<path-to-repository>"

Colour Scheme

Then provide some hex code colours for the background, headings, and links themselves.

sp_background_colour = "#ffffff"
sp_heading_colour = "#448AFF"
sp_link_colour = "#111111"

Sections

Links are broken down into sections.

To add a section you need to add a section block to config.py and build.py. You can have as many sections as you want, but you must manually increment the number (e.g. section_1_, section_2_ etc).

config.py Section Block

section_1_title = "Section Title"
section_1_remix_icon = "ri-<remix-icon-id>"
section_1_links = { 
    "Link Title": "https://example.com",
    "Link Title": "https://example.com",
    # Add as many links as you want - this is just a dict.
}

build.py Section Block

index.write(
    f'<h2><i class="{config.section_1_remix_icon}"></i> {config.section_1_title}</h2>'
)
index.write(f"{open_ul}")
for key, value in config.section_1_links.items():
    index.write(f'<li><a href="{value}">{key}</a></li>')
index.write(f"{close_ul}")

Icons

The page uses an open source icon library called Remix Icon for section headers.

section_n_remix_icon in config.py takes the icon identifier as a value e.g. (ri-calendar-2-fill).

You can Pick an icon from Remix Icon.

Build

To build the page, just run the build.py script which will write to public/index.html.

python3 build.py