mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-16 13:34:11 +02:00
Add a search bar to simplify looking for a bridge. (#494)
* Add a search bar to simplify looking for a bridge. * Fix phpcs line length. * Change the phpcs config.
This commit is contained in:
113
static/HtmlFormat.css
Normal file
113
static/HtmlFormat.css
Normal file
@@ -0,0 +1,113 @@
|
||||
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video {
|
||||
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
vertical-align: baseline;
|
||||
|
||||
}
|
||||
/* HTML5 display-role reset for older browsers */
|
||||
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
|
||||
|
||||
display: block;
|
||||
|
||||
}
|
||||
|
||||
/* Let's go for the actual style */
|
||||
|
||||
body {
|
||||
|
||||
background-color: #EEEEEE;
|
||||
font-family: 'Noto Sans';
|
||||
|
||||
}
|
||||
|
||||
section {
|
||||
|
||||
background-color: #FFFFFF;
|
||||
width: 90%;
|
||||
margin: 30px auto;
|
||||
padding: 10px 15px;
|
||||
|
||||
box-shadow: 0px 1px 2px rgba(0,0,0, 0.25);
|
||||
|
||||
}
|
||||
|
||||
section > h2 {
|
||||
|
||||
font-size: 200%;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
h1.pagetitle {
|
||||
|
||||
font-size: 300%;
|
||||
font-weight: bold;
|
||||
|
||||
text-align: center;
|
||||
color: #2196F3;
|
||||
|
||||
}
|
||||
|
||||
h1.pagetitle > a {
|
||||
color: #2196F3;
|
||||
}
|
||||
|
||||
a.backlink, a.backlink:link, a.backlink:visited, a.itemtitle, a.itemtitle:link, a.itemtitle:visited {
|
||||
|
||||
color: #2196F3;
|
||||
|
||||
}
|
||||
|
||||
.buttons {
|
||||
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
section > div.content, section > div.attachments {
|
||||
|
||||
padding: 10px;
|
||||
|
||||
}
|
||||
|
||||
section > div.attachments > li.enclosure {
|
||||
|
||||
list-style-type: circle;
|
||||
list-style-position: inside;
|
||||
|
||||
}
|
||||
|
||||
section > time, section > p.author {
|
||||
|
||||
color: #888;
|
||||
font-size: 80%;
|
||||
padding: 10px;
|
||||
|
||||
}
|
||||
|
||||
button.backbutton, button.rss-feed {
|
||||
|
||||
line-height: 1em;
|
||||
color: #FFF;
|
||||
font-weight: bold;
|
||||
vertical-align: middle;
|
||||
padding: 6px 12px;
|
||||
margin: 12px auto 0px;
|
||||
box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.3);
|
||||
border-radius: 2px;
|
||||
border: 1px solid transparent;
|
||||
width: 200px;
|
||||
background: #2196F3 none repeat scroll 0% 0%;
|
||||
cursor: pointer;
|
||||
|
||||
margin: 10px;
|
||||
|
||||
|
||||
}
|
||||
|
27
static/search.js
Normal file
27
static/search.js
Normal file
@@ -0,0 +1,27 @@
|
||||
function search() {
|
||||
|
||||
var searchTerm = document.getElementById('searchfield').value;
|
||||
var searchableElements = document.getElementsByTagName('section');
|
||||
|
||||
var regexMatch = new RegExp(searchTerm, "i");
|
||||
|
||||
for(var i = 0; i < searchableElements.length; i++) {
|
||||
|
||||
var textValue = searchableElements[i].getAttribute('data-ref');
|
||||
if(textValue != null) {
|
||||
|
||||
if(textValue.match(regexMatch) == null && searchableElements[i].style.display != "none") {
|
||||
|
||||
searchableElements[i].style.display = "none";
|
||||
|
||||
} else if(textValue.match(regexMatch) != null) {
|
||||
|
||||
searchableElements[i].style.display = "block";
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
246
static/style.css
Normal file
246
static/style.css
Normal file
@@ -0,0 +1,246 @@
|
||||
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video {
|
||||
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
vertical-align: baseline;
|
||||
|
||||
}
|
||||
/* HTML5 display-role reset for older browsers */
|
||||
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
|
||||
|
||||
display: block;
|
||||
|
||||
}
|
||||
|
||||
/* Let's go for the actual style */
|
||||
|
||||
body {
|
||||
|
||||
background-color: #EEEEEE;
|
||||
font-family: 'Noto Sans';
|
||||
|
||||
}
|
||||
|
||||
header {
|
||||
|
||||
text-shadow:0 5px 6px rgba(150,150,150,0.69);
|
||||
text-align: center;
|
||||
color: #1182DB;
|
||||
|
||||
}
|
||||
|
||||
header > h1 {
|
||||
|
||||
font-size: 300%;
|
||||
|
||||
}
|
||||
|
||||
header > h2 {
|
||||
|
||||
margin-left: 1em;
|
||||
font-size: 120%;
|
||||
|
||||
}
|
||||
|
||||
header > p.status {
|
||||
font-weight: bold;
|
||||
margin: 1em;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.searchbar {
|
||||
|
||||
width: 50%;
|
||||
margin: auto;
|
||||
|
||||
}
|
||||
|
||||
.searchbar input[type="text"] {
|
||||
|
||||
width: 100%;
|
||||
margin: auto;
|
||||
font-size: 1.4em;
|
||||
|
||||
}
|
||||
|
||||
.searchbar input[type="text"]::placeholder {
|
||||
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
.searchbar > h3 {
|
||||
|
||||
font-size: 150%;
|
||||
font-weight: bold;
|
||||
color: #1182DB;
|
||||
|
||||
}
|
||||
|
||||
section {
|
||||
|
||||
background-color: #FFFFFF;
|
||||
width: 80%;
|
||||
margin: 30px auto;
|
||||
padding: 10px 15px;
|
||||
text-align: center;
|
||||
|
||||
box-shadow: 0px 1px 2px rgba(0,0,0, 0.25);
|
||||
|
||||
}
|
||||
|
||||
|
||||
section.footer {
|
||||
|
||||
opacity: 0.5;
|
||||
|
||||
}
|
||||
|
||||
section.footer:hover {
|
||||
|
||||
opacity: 1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
section > h2 {
|
||||
|
||||
font-size: 200%;
|
||||
font-weight: bold;
|
||||
|
||||
}
|
||||
|
||||
a, a:link, a:visited {
|
||||
|
||||
color: #2196F3;
|
||||
|
||||
}
|
||||
|
||||
button {
|
||||
|
||||
line-height: 1.9em;
|
||||
color: #FFF;
|
||||
font-weight: bold;
|
||||
vertical-align: middle;
|
||||
padding: 6px 12px;
|
||||
margin: 12px auto 0px;
|
||||
box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.3);
|
||||
border-radius: 2px;
|
||||
border: 1px solid transparent;
|
||||
min-width: 140px;
|
||||
background: #2196F3 none repeat scroll 0% 0%;
|
||||
cursor: pointer;
|
||||
|
||||
width: calc(20% - 4px);
|
||||
|
||||
}
|
||||
|
||||
button.small {
|
||||
|
||||
width: auto;
|
||||
line-height: 1.2em;
|
||||
|
||||
}
|
||||
|
||||
.description {
|
||||
|
||||
margin: 10px;
|
||||
text-decoration: underline;
|
||||
|
||||
}
|
||||
|
||||
h5 {
|
||||
|
||||
margin: 20px;
|
||||
font-weight: bold;
|
||||
|
||||
}
|
||||
|
||||
form {
|
||||
|
||||
margin-bottom: 6px;
|
||||
|
||||
}
|
||||
|
||||
.maintainer {
|
||||
|
||||
font-size: 60%;
|
||||
text-align: right;
|
||||
|
||||
}
|
||||
|
||||
.secure-warning {
|
||||
|
||||
background-color: #ffc600;
|
||||
color: #5f5f5f;
|
||||
|
||||
box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.3);
|
||||
border-radius: 2px;
|
||||
border: 1px solid transparent;
|
||||
|
||||
width: 80%;
|
||||
margin: auto;
|
||||
margin-bottom: 6px;
|
||||
|
||||
}
|
||||
|
||||
input[type="text"] {
|
||||
|
||||
background-color: white;
|
||||
color: #404552;
|
||||
border: 0px;
|
||||
border-bottom: 2px solid #2196F3;
|
||||
font-size: 1.1em;
|
||||
margin-left: 8px;
|
||||
padding-left: 4px;
|
||||
|
||||
}
|
||||
|
||||
form {
|
||||
|
||||
display: none;
|
||||
|
||||
}
|
||||
|
||||
h5 {
|
||||
|
||||
display: none;
|
||||
|
||||
}
|
||||
|
||||
.showmore-box {
|
||||
|
||||
display: none;
|
||||
|
||||
}
|
||||
|
||||
.showmore, .showless {
|
||||
|
||||
color: #888888;
|
||||
cursor: pointer;
|
||||
|
||||
}
|
||||
|
||||
.showmore-box:checked ~ .showmore {
|
||||
|
||||
display: none;
|
||||
|
||||
}
|
||||
|
||||
.showmore-box:not(:checked) ~ .showless {
|
||||
|
||||
display: none;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.showmore-box:checked ~ form, .showmore-box:checked ~ h5 {
|
||||
|
||||
display: block;
|
||||
|
||||
}
|
Reference in New Issue
Block a user