Project: init

This commit is contained in:
周中平 2022-11-17 16:41:56 +08:00
parent 0dda7d9f8c
commit 536fd9d79d
No known key found for this signature in database
GPG Key ID: B1DF9DD42D8E00DC
6 changed files with 41 additions and 81 deletions

View File

@ -1,24 +1,12 @@
{ {
"apps" : [ "apps" : [
{"name":"Bazarr","url":"subs.example.com","icon":"message-video", "target": "_blank"}, {"name":"博客","url":"blog.7wate.com","icon":"post"},
{"name":"CloudCMD","url":"files.example.com","icon":"folder-multiple-outline"}, {"name":"维基","url":"wiki.7wate.org","icon":"chart-line"},
{"name":"Cockpit","url":"cp.example.com","icon":"airplane"}, {"name":"网盘","url":"file.7wate.org","icon":"file-cabinet"},
{"name":"Feedbin","url":"rss.example.com","icon":"rss"}, {"name":"Github","url":"github.1qi777.com","icon":"github"},
{"name":"Filestash","url":"cloud.example.com","icon":"package"}, {"name":"谷歌学术","url":"so.hiqq.com.cn","icon":"text-box-search-outline"},
{"name":"Jackett","url":"jackett.example.com","icon":"tshirt-crew-outline"}, {"name":"维基百科","url":"zh.wikipedia.wmmirror.live/wiki/","icon":"wikipedia"},
{"name":"Lidarr","url":"music.example.com","icon":"music"}, {"name":"在线 IDE","url":"lightly.teamcode.com/login","icon":"microsoft-visual-studio-code"},
{"name":"Minio","url":"minio.example.com","icon":"server"}, {"name":"开发手册","url":"devdocs.io","icon":"dev-to"}
{"name":"Mylar","url":"comics.example.com","icon":"book-open-variant"},
{"name":"Nextcloud","url":"cloud.example.com","icon":"weather-cloudy"},
{"name":"Ombi","url":"request.example.com","icon":"file-find-outline"},
{"name":"Pi-hole","url":"pihole.example.com","icon":"do-not-disturb"},
{"name":"Plex","url":"play.example.com","icon":"plex"},
{"name":"Portainer","url":"port1.example.com","icon":"docker"},
{"name":"Radarr","url":"movies.example.com","icon":"filmstrip"},
{"name":"Sonarr","url":"tv.example.com","icon":"television-box"},
{"name":"Stackedit","url":"md.example.com","icon":"markdown"},
{"name":"Transmission","url":"dl.example.com","icon":"progress-download"},
{"name":"Ubooquity","url":"opds.example.com","icon":"library-shelves"},
{"name":"Youtube-DL","url":"yt.example.com","icon":"youtube"}
] ]
} }

View File

@ -10,14 +10,13 @@ body{
background-color: var(--color-background); background-color: var(--color-background);
color: var(--color-text-pri); color: var(--color-text-pri);
font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, Roboto, sans-serif; font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, Roboto, sans-serif;
font-size: 14px; font-size: 16px;
font-weight: 400; font-weight: 400;
height: auto; height: auto;
letter-spacing: -.012em; letter-spacing: -.012em;
margin: 0; margin: 0;
padding: 0; padding: 0;
webkit-font-smoothing: antialiased; webkit-font-smoothing: antialiased;
width: 100vw;
} }
*, *,
@ -76,9 +75,10 @@ a{
} }
a:hover{ a:hover{
text-decoration: underline; text-decoration: none;
webkit-text-decoration-color: var(--color-text-acc); webkit-text-decoration-color: var(--color-text-acc);
webkit-text-decoration-skip: true; webkit-text-decoration-skip: true;
opacity: 0.7;
} }
.icon{ .icon{
@ -93,8 +93,8 @@ input{
border: 0; border: 0;
border-bottom: thin solid var(--color-text-acc); border-bottom: thin solid var(--color-text-acc);
color: var(--color-text-pri); color: var(--color-text-pri);
font-size: 0.8em; font-size: 1.2em;
height: 3.5em; height: 2.4em;
transition: all 0.4s ease; transition: all 0.4s ease;
width: 100%; width: 100%;
} }
@ -182,8 +182,8 @@ table a{
justify-items: stretch; justify-items: stretch;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
margin-top: 5vh; margin-top: 12vh;
width: 60%; width: 67.8%;
} }
@ -230,6 +230,7 @@ table a{
justify-content: center; justify-content: center;
flex: 1; flex: 1;
overflow: hidden; overflow: hidden;
font-size: 1.25rem;
} }
.apps_text a{ .apps_text a{
@ -354,7 +355,7 @@ table a{
#modal_init a{ #modal_init a{
bottom: 1vh; bottom: 1vh;
color: var(--color-text-acc); color: var(--color-text-acc);
left: 1vw; right: 1vw;
position: fixed; position: fixed;
} }

View File

@ -1,6 +1,6 @@
var sindex = 0; var sindex = 0;
var cycle = false; var cycle = false;
var sengine = "https://www.google.com/?q="; // Default search engine var sengine = "https://www.google.com/search?q="; // Default search engine
function start() { function start() {
var query = getParameterByName('q'); var query = getParameterByName('q');
@ -57,38 +57,14 @@ function search(text) {
if (text[0] === '/') { if (text[0] === '/') {
if (text.indexOf(' ') > -1) { if (text.indexOf(' ') > -1) {
switch (option) { switch (option) {
case "am":
window.location = "https://www.allmusic.com/search/all/" + subtext;
break;
case "d": case "d":
window.location = "https://duckduckgo.com/?q=" + subtext; window.location = "https://duckduckgo.com/?q=" + subtext;
break; break;
case "di": case "b":
window.location = "https://www.discogs.com/search/?q=" + subtext; window.location = "https://www.baidu.com/s?wd=" + subtext;
break; break;
case "i": case "bk":
window.location = "https://www.imdb.com/find?q=" + subtext; window.location = "https://kaifa.baidu.com/searchPage?wd=" + subtext;
break;
case "m":
window.location = "https://www.themoviedb.org/search?query=" + subtext;
break;
case "r":
window.location = "https://www.reddit.com/search?q=" + subtext;
break;
case "q":
window.location = "https://www.qwant.com/?q=" + subtext;
break;
case "so":
window.location = "https://soundcloud.com/search?q=" + subtext;
break;
case "s":
window.location = "https://open.spotify.com/search/results/" + subtext;
break;
case "t":
window.location = "https://trakt.tv/search?query=" + subtext;
break;
case "tv":
window.location = "https://www.thetvdb.com/search?query=" + subtext;
break; break;
case "y": case "y":
window.location = "https://www.youtube.com/results?search_query=" + subtext; window.location = "https://www.youtube.com/results?search_query=" + subtext;
@ -96,6 +72,12 @@ function search(text) {
case "g": case "g":
window.location = "https://www.google.com/?q=" + subtext; window.location = "https://www.google.com/?q=" + subtext;
break; break;
case "gh":
window.location = "https://github.com/search?q=" + subtext;
break;
case "s":
window.location = "https://stackoverflow.com/search?q=" + subtext;
break;
} }
} else { } else {
var option = text.substr(1); var option = text.substr(1);
@ -106,12 +88,6 @@ function search(text) {
case "y": case "y":
window.location = "https://www.youtube.com"; window.location = "https://www.youtube.com";
break; break;
case "r":
window.location = "https://reddit.com";
break;
case "s":
window.location = "https://open.spotify.com";
break;
} }
} }
} else if (validURL(text)) { } else if (validURL(text)) {

BIN
favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

@ -78,18 +78,17 @@
<section id="apps"> <section id="apps">
<script type="text/handlebars-template" id="apps-template"> <script type="text/handlebars-template" id="apps-template">
<h3>Applications</h3> <h3>Apps</h3>
<div id="apps_loop"> <div id="apps_loop">
{{#apps}} {{#apps}}
<div class="apps_item"> <a class="apps_item" href="http://{{url}}" {{#if target}}target="{{target}}"{{/if}}>
<div class="apps_icon"> <div class="apps_icon">
<span class="iconify icon" data-icon="mdi-{{icon}}"></span> <span class="iconify icon" data-icon="mdi-{{icon}}"></span>
</div> </div>
<div class="apps_text"> <div class="apps_text">
<a href="http://{{url}}" {{#if target}}target="{{target}}"{{/if}} >{{name}}</a> {{name}}
<span id="app-address">{{url}}</span>
</div>
</div> </div>
</a>
{{/apps}} {{/apps}}
</div> </div>
</script> </script>
@ -97,7 +96,7 @@
<section id="links"> <section id="links">
<script type="text/handlebars-template" id="links-template"> <script type="text/handlebars-template" id="links-template">
<h3>Bookmarks</h3> <!-- <h3>Bookmarks</h3>
<div id="links_loop"> <div id="links_loop">
{{#bookmarks}} {{#bookmarks}}
<div id="links_item"> <div id="links_item">
@ -107,7 +106,7 @@
{{/links}} {{/links}}
</div> </div>
{{/bookmarks}} {{/bookmarks}}
</div> </div> -->
</script> </script>
</section> </section>
</main> </main>

View File

@ -1,15 +1,11 @@
{ {
"providers" : [ "providers" : [
{"name":"Allmusic","url":"https://www.allmusic.com/search/all/","prefix":"/a"}, {"name":"Duck Duck Go","url":"https://duckduckgo.com/","prefix":"/d"},
{"name":"Discogs","url":"https://www.discogs.com/search/?q=","prefix":"/di"}, {"name":"Baidu","url":"https://www.baidu.com/","prefix":"/b"},
{"name":"Duck Duck Go","url":"https://duckduckgo.com/?q=","prefix":"/d"}, {"name":"Baidu 开发者","url":"https://kaifa.baidu.com/","prefix":"/bk"},
{"name":"iMDB","url":"https://www.imdb.com/find?q=","prefix":"/i"}, {"name":"Youtube","url":"https://www.youtube.com/","prefix":"/y"},
{"name":"TheMovieDB","url":"https://www.themoviedb.org/search?query=","prefix":"/m"}, {"name":"Google","url":"https://www.google.com/","prefix":"/g"},
{"name":"Reddit","url":"https://www.reddit.com/search?q=","prefix":"/r"}, {"name":"Github","url":"https://github.com/","prefix":"/gh"},
{"name":"Qwant","url":"https://www.qwant.com/?q=","prefix":"/q"}, {"name":"StackOverflow","url":"https://stackoverflow.com/","prefix":"/s"}
{"name":"Soundcloud","url":"https://soundcloud.com/search?q=","prefix":"/so"},
{"name":"Spotify","url":"https://open.spotify.com/search/results/","prefix":"/s"},
{"name":"TheTVDB","url":"https://www.thetvdb.com/search?query=","prefix":"/tv"},
{"name":"Trakt","url":"https://trakt.tv/search?query=","prefix":"/t"}
] ]
} }