├── .gitignore
├── License
├── README.md
├── categories.csv
├── content.csv
├── generate.py
├── home.html
├── screenshot.png
└── templates
├── blankTemplate.html
├── entryTemplate.css
├── entryTemplate.html
├── template.css
└── template.html
/.gitignore:
--------------------------------------------------------------------------------
1 | home.html
2 |
--------------------------------------------------------------------------------
/License:
--------------------------------------------------------------------------------
1 | This is free and unencumbered software released into the public domain.
2 |
3 | Anyone is free to copy, modify, publish, use, compile, sell, or
4 | distribute this software, either in source code form or as a compiled
5 | binary, for any purpose, commercial or non-commercial, and by any
6 | means.
7 |
8 | In jurisdictions that recognize copyright laws, the author or authors
9 | of this software dedicate any and all copyright interest in the
10 | software to the public domain. We make this dedication for the benefit
11 | of the public at large and to the detriment of our heirs and
12 | successors. We intend this dedication to be an overt act of
13 | relinquishment in perpetuity of all present and future rights to this
14 | software under copyright law.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 | OTHER DEALINGS IN THE SOFTWARE.
23 |
24 | For more information, please refer to
25 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # HomePage
2 |
3 | 
4 |
5 | This is my personal homepage and the generator for it.
6 | It's styled after a monochrome periodic table and has some simple fade-in animations.
7 |
8 | ## Generating the home page
9 |
10 | To generate the home page you will first need to edit the `content.csv` file.
11 | `content.csv` is a plain CSV file where each line corresponds to a cell in the periodic table.
12 |
13 | Each line has three values:
14 | * name
15 | * URL
16 | * category
17 |
18 | All the URLs will be prepended with `https://` before being inserted into the template.
19 | You can also use a blank entry with the name of `blank`, this will create a invisible chunk to act as spacing.
20 | Leave the category value empty for default white color.
21 |
22 | If you would like for your categories to have different colors then you can edit `categories.csv`
23 | where the first value is the name of the category and the second the hex color.
24 |
25 | After you edit `content.csv` and `categories.csv` you just need to run the python script which will generate `home.html`.
26 | Then you can just set the `home.html` file as your home page and you're good to go.
27 |
--------------------------------------------------------------------------------
/categories.csv:
--------------------------------------------------------------------------------
1 | dev, #98971a
2 | uni, #458588
3 | personal, #b16286
4 | social, #d79921
5 | entertainment, #cc241d
6 |
--------------------------------------------------------------------------------
/content.csv:
--------------------------------------------------------------------------------
1 | whatsapp, web.whatsapp.com, social
2 | discord, www.discord.com, social
3 | blank,,
4 | teams, teams.microsoft.com, uni
5 | doultremont, sgdelangstraat.sharepoint.com/sites/portaaldoultremontcollege, uni
6 |
7 | zermelo, example.com,
8 | magister, example.com,
9 | spotify, www.spotify.com/nl,
10 | gmail, mail.google.com, personal
11 | onedrive, onedrive.live.com, personal
12 |
13 | github, www.github.com, dev
14 | archlinux, wiki.archlinux.org, dev
15 | protondb, www.protondb.com, dev
16 | fish, fishshell.com, dev
17 | eww, elkowar.github.io/eww, dev
18 |
19 | hyprland, wiki.hyprland.org, dev
20 | reddit, www.reddit.com, entertainment
21 | youtube, www.youtube.com, entertainment
22 | netflix, www.netflix.com/nl-en, entertainment
23 | disney+, www.disneyplus.com/en-nl, entertainment
24 |
25 | steam, store.steampowered.com, entertainment
26 | gog, www.gog.com, entertainment
27 |
--------------------------------------------------------------------------------
/generate.py:
--------------------------------------------------------------------------------
1 | #! /bin/python3
2 |
3 | import csv
4 |
5 |
6 | # Reading the template files from the disk
7 | htmlTemplateFile = open('templates/template.html', 'r')
8 | cssTemplateFile = open('templates/template.css', 'r')
9 | entryTemplateFile = open('templates/entryTemplate.html', 'r')
10 | blankTemplateFile = open('templates/blankTemplate.html', 'r')
11 | categoryTemplateFile = open('templates/entryTemplate.css', 'r')
12 |
13 | htmlTemplate = htmlTemplateFile.read()
14 | cssTemplate = cssTemplateFile.read()
15 | entryTemplate = entryTemplateFile.read()
16 | blankTemplate = blankTemplateFile.read()
17 | categoryTemplate = categoryTemplateFile.read()
18 |
19 | htmlTemplateFile.close()
20 | cssTemplateFile.close()
21 | entryTemplateFile.close()
22 | blankTemplateFile.close()
23 | categoryTemplateFile.close()
24 |
25 | index = 1
26 | count = 1
27 |
28 |
29 | # Reading the content from the file on disk & inserting it into the template
30 | with open('content.csv', 'r') as file:
31 | content = csv.reader(file)
32 | for entry in content:
33 | if len(entry) == 0:
34 | continue
35 | elif entry[0] == 'blank':
36 | htmlTemplate = htmlTemplate.format(entry=blankTemplate, styles='{styles}')
37 | else:
38 | htmlTemplate = htmlTemplate.format(entry=entryTemplate.format(
39 | url = 'https://' + entry[1].lstrip(),
40 | category = entry[2].lstrip(),
41 | index = index,
42 | short = entry[0][0:2].title(),
43 | name = entry[0].title(),
44 | entry = '{entry}'
45 | )[:-1], styles = '{styles}')
46 | index += 1
47 | count += 1
48 |
49 | with open('categories.csv', 'r') as file:
50 | content = csv.reader(file)
51 | for entry in content:
52 | if len(entry) == 0:
53 | continue
54 | else:
55 | cssTemplate = cssTemplate.replace('$entry$', categoryTemplate.replace('$category$', entry[0]).replace('$color$', entry[1].lstrip()))
56 |
57 |
58 | # Setting the correct values in the css
59 | width = round(count / 5)
60 | formWidth = 152 * width + 19 * (width - 1)
61 |
62 | cssTemplate = cssTemplate.replace('$width$', ('auto ' * width)[:-1])
63 | cssTemplate = cssTemplate.replace('$formWidth$', str(formWidth) + 'px')
64 | cssTemplate = cssTemplate.replace('$inputWidth$', str(formWidth - 56) + 'px')
65 | cssTemplate = cssTemplate.replace('$entry$', '')
66 |
67 |
68 | # Cleaning the html template
69 | htmlTemplate = htmlTemplate.format(entry='', styles=cssTemplate)
70 |
71 | htmlFile = open('home.html', 'w')
72 | htmlFile.write(htmlTemplate)
73 | htmlFile.close()
74 |
--------------------------------------------------------------------------------
/home.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
152 | Home
153 |
154 |
155 |
156 |
157 |
158 |
162 |
163 |
274 |
275 |
276 |
277 |
278 |
--------------------------------------------------------------------------------
/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/smvd/HomePage/6307fc8baa42148e6eacb0e5775029d788af718e/screenshot.png
--------------------------------------------------------------------------------
/templates/blankTemplate.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {entry}
4 |
--------------------------------------------------------------------------------
/templates/entryTemplate.css:
--------------------------------------------------------------------------------
1 | .cell.$category$ {
2 | border: 3px solid $color$;
3 | }
4 | .cell.$category$:hover {
5 | background-color: $color$;
6 | }
7 |
8 | $entry$
9 |
--------------------------------------------------------------------------------
/templates/entryTemplate.html:
--------------------------------------------------------------------------------
1 |
2 | {index}
3 | {short}
4 | {name}
5 |
6 | {entry}
7 |
--------------------------------------------------------------------------------
/templates/template.css:
--------------------------------------------------------------------------------
1 |
2 | :root {
3 | --fg: #E4F5F5;
4 | --bg: #111516;
5 | }
6 |
7 | * {
8 | all: none;
9 | color: var(--fg);
10 | text-align: center;
11 | }
12 |
13 | body {
14 | background-color: var(--bg);
15 | }
16 |
17 | .external {
18 | display: table;
19 | position: absoulte;
20 | top: 0;
21 | left: 0;
22 | height: 100%;
23 | width: 100%;
24 | }
25 |
26 | .middle {
27 | display: table-cell;
28 | vertical-align: middle;
29 | }
30 |
31 | .content {
32 | margin-left: auto;
33 | margin-right: auto;
34 | display: grid;
35 | grid-template-columns: $width$;
36 | grid-gap: 15px;
37 | justify-content: center;
38 | }
39 |
40 | .cell {
41 | border: 3px solid var(--fg);
42 | padding: 20px;
43 | width: 110px;
44 | height: 110px;
45 | transition: 0.3s;
46 | text-decoration: none;
47 | }
48 | .cell:hover {
49 | background-color: var(--fg);
50 | }
51 |
52 | $entry$
53 |
54 | .cell:hover * {
55 | color: var(--bg);
56 | }
57 |
58 | .blank {
59 | width: 153px;
60 | height: 153px;
61 | }
62 |
63 | h1 {
64 | margin: 0px;
65 | font-size: 20px;
66 | }
67 |
68 | h2 {
69 | margin: 10px;
70 | font-size: 40px;
71 | }
72 |
73 | h3 {
74 | margin: 0px;
75 | font-size: 15px;
76 | }
77 |
78 | form {
79 | width: $formWidth$;
80 | border: 3px solid var(--fg);
81 | margin: auto;
82 | margin-bottom: 15px;
83 | display: grid;
84 | grid-template-columns: auto auto;
85 | grid-gap: 0px;
86 | justify-content: left;
87 | }
88 |
89 | input {
90 | all: unset;
91 | margin-left: 10px;
92 | text-align: left;
93 | font-size: 22px;
94 | width: $inputWidth$;
95 | }
96 |
97 | button {
98 | all: unset;
99 | margin-left: 5px;
100 | font-size: 30px;
101 | width: 30px;
102 | }
103 |
104 | h4 {
105 | font-size: 40px;
106 | }
107 |
--------------------------------------------------------------------------------
/templates/template.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 | Home
7 |
8 |
9 |
10 |
11 |
12 |
16 |
17 |
18 | {entry}
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------