Skip to content
This repository has been archived by the owner on Dec 20, 2021. It is now read-only.

Commit

Permalink
Merge pull request #101 from hello-smile6/testing
Browse files Browse the repository at this point in the history
Add part of the code to make homepage not show URL, merge URL bar auto-update into testing
  • Loading branch information
jdev082 authored Dec 16, 2021
2 parents 740411e + 4d7027d commit 4a52d4e
Show file tree
Hide file tree
Showing 10 changed files with 286 additions and 65 deletions.
4 changes: 2 additions & 2 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"trailingComma": "es5",
"trailingComma": "all",
"tabWidth": 2,
"semi": false,
"semi": true,
"singleQuote": false
}
27 changes: 2 additions & 25 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,26 +1,4 @@
<<<<<<< HEAD
MIT License

Copyright (c) 2021 JaydenDev

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
=======

GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Expand Down Expand Up @@ -694,5 +672,4 @@ into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
>>>>>>> parent of b97701c (Revert to release 1.0)
<https://www.gnu.org/licenses/why-not-lgpl.html>.
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,20 @@ git clone https://github.com/JaydenDev/freecat

<table>
<tr>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">

<a href=https://github.com/hello-smile6>
<img src=https://avatars.githubusercontent.com/u/73048226?v=4 width="100;" style="border-radius:50%;align-items:center;justify-content:center;overflow:hidden;padding-top:10px" alt=hello-smile6/>
<br />
<sub style="font-size:14px"><b>hello-smile6</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/JaydenDev>
<img src=https://avatars.githubusercontent.com/u/92550746?v=4 width="100;" style="border-radius:50%;align-items:center;justify-content:center;overflow:hidden;padding-top:10px" alt=JaydenDev/>
<br />
<sub style="font-size:14px"><b>JaydenDev</b></sub>

<a href=https://github.com/JaydenDev>
<img src=https://avatars.githubusercontent.com/u/92550746?v=4 width="100;" style="border-radius:50%;align-items:center;justify-content:center;overflow:hidden;padding-top:10px" alt=JaydenDev/>
<br />
Expand Down Expand Up @@ -82,15 +95,41 @@ git clone https://github.com/JaydenDev/freecat
<sub style="font-size:14px"><b>Scolder</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">

<a href=https://github.com/kccuber-scratch>
<img src=https://avatars.githubusercontent.com/u/92891642?v=4 width="100;" style="border-radius:50%;align-items:center;justify-content:center;overflow:hidden;padding-top:10px" alt=kccuber/>
<br />
<sub style="font-size:14px"><b>kccuber</b></sub>
</a>

</td>

</tr>
<tr>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/MystPi>
<img src=https://avatars.githubusercontent.com/u/86574651?v=4 width="100;" style="border-radius:50%;align-items:center;justify-content:center;overflow:hidden;padding-top:10px" alt=MystPi/>
<br />
<sub style="font-size:14px"><b>MystPi</b></sub>
<a href=https://github.com/MystPi>
<img src=https://avatars.githubusercontent.com/u/86574651?v=4 width="100;" style="border-radius:50%;align-items:center;justify-content:center;overflow:hidden;padding-top:10px" alt=MystPi/>
<br />
<sub style="font-size:14px"><b>MystPi</b></sub>
</a>
</td>

</tr>
<tr>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/kccuber-scratch>
<img src=https://avatars.githubusercontent.com/u/92891642?v=4 width="100;" style="border-radius:50%;align-items:center;justify-content:center;overflow:hidden;padding-top:10px" alt=kccuber/>
<br />
<sub style="font-size:14px"><b>kccuber</b></sub>

</a>
</td>

</tr>
</table>

Expand Down
171 changes: 171 additions & 0 deletions dream.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
@import url("https://fonts.googleapis.com/css2?family=Roboto&display=swap");

:root {
--font: "Roboto", sans-serif;

--transition-duration: 0.2s;

--body-max-width: 50em;

--text-color: #555;
--bold-color: #1d3557;
--back-color: #f1faee;

--header-left-text: "#";

--link-color-1: #e63946;
--link-color-2: #f0e2d9;

--mark-color-1: #f4f452;
--mark-color-2: #f9f99f;

--code-color-1: #e6e6e6;
--code-color-2: #1d3557;

--button-border: lightgray;
--button-hover-radius: 10px;
--button-padding: 0.5em;

--navbar-font-size: 1.2em;
--navbar-sep: " \0000a0•\0000a0";

--shadow-1-a: 0.2;
--shadow-2-a: 0.19;
--section-radius: 10px;

--footer-padding: 2em;
--footer-align: center;

--radius: 4px;
}

body {
font-family: var(--font);
margin: 0 auto;
max-width: var(--body-max-width);
line-height: 1.5;
padding: 4em 1em;
color: var(--text-color);
background-color: var(--back-color);
}

h2 {
margin-top: 1em;
padding-top: 1em;
}

h2::before {
content: var(--header-left-text);
}

h1,
h2,
h3,
h4,
h5,
h6,
strong {
color: var(--bold-color);
}

a {
text-decoration: none;
color: var(--text-color);
border-bottom: 4px solid var(--link-color-1);
-webkit-transition-property: background-color;
-o-transition-property: background-color;
transition-property: background-color;
-webkit-transition-duration: var(--transition-duration);
-o-transition-duration: var(--transition-duration);
transition-duration: var(--transition-duration);
}

a:hover {
background-color: var(--link-color-2);
}

mark {
background-color: var(--back-color);
color: var(--text-color);
border-bottom: 4px solid var(--mark-color-1);
-webkit-transition-property: background-color;
-o-transition-property: background-color;
transition-property: background-color;
-webkit-transition-duration: var(--transition-duration);
-o-transition-duration: var(--transition-duration);
transition-duration: var(--transition-duration);
}

mark:hover {
background-color: var(--mark-color-2);
}

pre,
code {
background-color: var(--code-color-1);
color: var(--code-color-2);
padding: 0.2em;
border-radius: var(--radius);
overflow: auto;
word-break: break-all;
}

button {
padding: var(--button-padding);
font-family: var(--font);
font-size: 1em;
color: var(--text-color);
background-color: var(--back-color);
border: 1px solid var(--button-border);
border-radius: var(--radius);
-webkit-transition-property: border-radius;
-o-transition-property: border-radius;
transition-property: border-radius;
-webkit-transition-duration: var(--transition-duration);
-o-transition-duration: var(--transition-duration);
transition-duration: var(--transition-duration);
}

button:hover {
border-radius: var(--button-hover-radius);
cursor: pointer;
}

nav ul {
margin: 0;
padding: 0;
}

nav ul li {
list-style-type: none;
display: inline;
}

nav ul li a {
color: var(--bold-color);
font-size: var(--navbar-font-size);
border: none;
}

nav ul li a:hover {
background-color: rgba(0, 0, 0, 0);
}

nav ul li:not(:last-child)::after {
content: var(--navbar-sep);
font-size: var(--navbar-font-size);
}

section {
padding: 0.5em 2em;
border-radius: var(--section-radius);
-webkit-box-shadow: 0 4px 8px 0 rgba(200, 200, 200, var(--shadow-1-a)),
0 6px 20px 0 rgba(200, 200, 200, var(--shadow-2-a));
box-shadow: 0 4px 8px 0 rgba(200, 200, 200, var(--shadow-1-a)),
0 6px 20px 0 rgba(200, 200, 200, var(--shadow-2-a));
}

footer {
text-align: var(--footer-align);
padding-top: var(--footer-padding);
}
39 changes: 27 additions & 12 deletions home.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,35 @@
<html>
<head>
<script src="js/searchbox.js"></script>
<link rel="stylesheet" href="config/userchrome.css" />
<!--<link rel="stylesheet" href="config/userchrome.css" /> -->
<link rel="stylesheet" href="dream.css" />
</head>
<body>
<nav>
<ul>
<li>
<a href="#customize">Customize</a>
</li>
<li>
<a href="#development">Development</a>
</li>
</ul>
</nav>
<h1>🐈 FreeCat!</h1>
<br />
<p>
Customize your home page by editing config/env.css and
config/userchrome.css
</p>
<br />
<p>FreeCat dev</p>
<p>
Entirely customizable and user configurable, under a free license. Feel
free to fork!
</p>
<section>
<h2 id="customize">Customize</h2>
<p>
Customize your home page by editing <code>config/env.css</code> and
<code>config/userchrome.css</code>
</p>
</section>
<section>
<h2 id="development">Development</h2>
<p>FreeCat dev</p>
<p>
Entirely customizable and user configurable, under a free license. Feel
free to fork!
</p>
</section>
</body>
</html>
13 changes: 11 additions & 2 deletions js/dynamic.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
window.homepageUrl=window.location.href.replace("index.html","home.html");
const loadPage = function () {
let wsite = document.getElementById("searchbox").value;
document.getElementById("view").src = wsite;
if(wsite=="freecat:homepage") {
document.getElementById("view").src=homepageUrl;
}
else {
document.getElementById("view").src = wsite;
}
};
document.getElementById("load").addEventListener("click", loadPage);
document.getElementById("searchbox").addEventListener("enter", loadPage);
let webview = document.getElementById("view");
let search = document.getElementById("searchbox");
webview.addEventListener("did-stop-loading", () => {
if (document.activeElement !== search) {
if (document.activeElement !== search && webview.src!==homepageUrl) {
search.value = webview.src;
}
if(webview.src==homepageUrl) {
search.value="freecat:homepage";
}
});
6 changes: 3 additions & 3 deletions js/searchbox.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* exported redirect */
function redirect() {
const wsite = document.getElementById("searchbox").value
window.location.href = wsite
const wsite = document.getElementById("searchbox").value;
window.location.href = wsite;
}

function gotoWebLoader() {
window.location.href = "webload.html"
window.location.href = "webload.html";
}
Loading

0 comments on commit 4a52d4e

Please sign in to comment.