6 Commits

Author SHA1 Message Date
527a1a8712 added gen_css skeleton 2020-08-24 14:52:50 -07:00
d2b80fd1eb updated readme 2020-08-24 14:34:34 -07:00
c1f8bde5e9 removed example folder 2020-08-24 14:14:13 -07:00
e543ce7b9d Merge remote-tracking branch 'origin/initscript' into master
merge initscript to master
2020-08-24 14:11:24 -07:00
2b90acc3ac updated README 2020-08-24 14:11:05 -07:00
40ba3abed4 functional install.py completed 2020-08-24 14:10:37 -07:00
6 changed files with 47 additions and 206 deletions

View File

@ -9,10 +9,15 @@ A terminal-style home page replicating the tree command.
- [x] Add screenshot to README.md
- [x] add install script
- [ ] Should allow selection of search engine
- [ ] Should allow for multiple columns
- [ ] User makes a 'config.yaml' file that is parsed and translated into the HTML
- [x] Should allow for multiple columns
- [x] User makes a 'config.yaml' file that is parsed and translated into the HTML
- [ ] Allow setting the font size in the config
- [ ] Install the update script into a `$PATH` directory
```yaml
font_size: 15
theme: void
Tree_1:
General:
Google: "https://www.google.com/"
@ -21,3 +26,9 @@ Tree_1:
Homepage: "https://www.reddit.com/"
Unixporn: "https://www.reddit.com/r/unixporn/"
```
# Themes
A variety of themes can be found in the `themes` directory.
If one wishes to dynamically theme from `pywal`, they may select `pywal` as their chosen theme in `config.yaml`.

View File

@ -1,70 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="./styles/style.css">
<title>Home</title>
</head>
<body>
<div class="container">
<div class="prompt">~<span> λ</span> tree</div>
<div class="row">
<div class="column">
<div class="tree">
<h1>.</h1>
<ul>
<li>
<h1>general</h1>
<ul>
<li><a href="https://cloud.paulhouser.xyz">nextcloud</a></li>
<li><a href="https://github.com/Paul-Houser">github</a></li>
<li><a href="https://gitlab.cs.wwu.edu">wwu-gitlab</a></li>
<li><a href="https://mail.google.com">gmail</a></li>
</ul>
</li>
<li>
<h1>reddit</h1>
<ul>
<li><a href="https://reddit.com">front page</a></li>
<li><a href="https://reddit.com/u/P_swizzles">profile</a></li>
<li><a href="https://reddit.com/r/unixporn">unixporn</a></li>
<li><a href="https://reddit.com/r/archlinux">archlinux</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="column">
<div class="tree">
<h1>.</h1>
<ul>
<li>
<h1>school</h1>
<ul>
<li><a href="https://wwu.instructure.com/">canvas</a></li>
<li><a href="https://dw.wwu.edu/Dashboard/dashboard">degreeworks</a></li>
<li><a href="https://outlook.office.com">outlook</a></li>
<li><a href="https://admin.wwu.edu/pls/wwis/twbkwbis.P_GenMenu?name=bmenu.P_MainMnu">web4u</a></li>
</ul>
</li>
<li>
<h1>other</h1>
<ul>
<li><a href="https://archlinux.org">arch wiki</a></li>
<li><a href="https://hulu.com">hulu</a></li>
<li><a href="https://www.netflix.com">netflix</a></li>
<li><a href="https://youtube.com">youtube</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<div class="prompt">~<span> λ</span> ddg</div>
<form action="https://duckduckgo.com/" method="GET">
<h1>search: </h1>
<input type="text" name="q" autofocus="autofocus">
</form>
</div>
</body>
</html>

Binary file not shown.

View File

@ -1,133 +0,0 @@
@import url('/home/paul/.cache/wal/colors.css');
@font-face {
font-family: "Roboto Mono";
src: url("./Hack.ttf");
}
:root {
--font: "Roboto Mono";
/* --background: var(--background) !important; */
/* --foreground: #fffffe; */
/* --pink: #e53170; */
/* --red: #f25f4c; */
/* --orange: #ff8906; */
/* --branch: 1px solid #a7a9be; */
--branch: 1px solid var(--color12);
}
html {
font-size: 22px;
}
body {
background: var(--background);
}
.container {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.prompt {
font-family: var(--font);
color: var(--color5);
}
.prompt~.prompt {
padding: 1.5rem 0 0.3125rem;
}
span {
color: var(--color10);
}
h1 {
display: inline;
font-family: var(--font);
font-size: 1rem;
font-weight: normal;
color: var(--color9);
}
.tree > ul {
margin: 0;
padding-left: 1rem;
padding-right: 1rem;
}
ul {
list-style: none;
padding-left: 2.5rem;
}
li {
position: relative;
}
li::before, li::after {
content: "";
position: absolute;
left: -0.75rem;
}
li::before {
border-top: var(--branch);
top: 0.75rem;
width: 0.5rem;
}
li::after {
border-left: var(--branch);
height: 100%;
top: 0.25rem;
}
li:last-child::after {
height: 0.5rem;
}
a {
font-family: var(--font);
font-size: 1rem;
color: var(--color6);
text-decoration: none;
outline: none;
}
a:hover {
color: var(--color12);
background: var(--background);
}
form h1 {
padding-left: 0.125rem;
}
input {
font-family: var(--font);
font-size: 1rem;
color: var(--color6);
background-color: var(--background);
border-width: 1px;
border-color: var(--color12);
border-style: solid;
padding-top: 4px;
padding-bottom: 4px;
}
.column {
flex: 50%;
padding: 5px;
}
.row {
display: flex;
}
.row:after {
content: "";
display: table;
clear: both;
}

View File

@ -35,7 +35,12 @@ def print_keys(dictionary):
def gen_list_indices(html_file, file_dict):
for key in file_dict:
print()
value = file_dict[key]
print(key + "->" + str(value))
if not isinstance(value, list):
html_file.write("<li><a href=\"" + value + "\">" + key + "</a></li>")
else:
html_file.write("<li><a href=\"" + value[0] + "\">" + value[1] + "</a></li>")
def gen_col_headers(html_file, file_dict):
for key in file_dict:
@ -93,9 +98,13 @@ def gen_html(file_dict):
print("Done!")
def gen_css(file_dict):
def main():
file_dict = parse_yaml()
gen_html(file_dict)
gen_css(file_dict)
if __name__ == '__main__':
main()

24
themes/void.css Normal file
View File

@ -0,0 +1,24 @@
:root {
/* Special */
--background: #06070A;
--foreground: #79c4c6;
--cursor: #79c4c6;
/* Colors */
--color0: #06070A;
--color1: #175564;
--color2: #066C71;
--color3: #414255;
--color4: #0E7587;
--color5: #64468F;
--color6: #8D419F;
--color7: #79c4c6;
--color8: #54898a;
--color9: #175564;
--color10: #066C71;
--color11: #414255;
--color12: #0E7587;
--color13: #64468F;
--color14: #8D419F;
--color15: #79c4c6;
}