+ added theme api
+ added switcher from dark and light theme - deleted profiles directory for now + added theme config option * added boilerplate to circle picker and useridenticons
This commit is contained in:
parent
578a238f2e
commit
7e9fe03235
18 changed files with 171 additions and 44 deletions
File diff suppressed because one or more lines are too long
57
static-data/www/shared/main/themes/styles-light.css
Normal file
57
static-data/www/shared/main/themes/styles-light.css
Normal file
|
@ -0,0 +1,57 @@
|
|||
|
||||
/* Config on homepage */
|
||||
#configContent{
|
||||
display:none;
|
||||
}
|
||||
#configContent.show{
|
||||
display:block; /* P.S: Use `!important` if missing `#content` (selector specificity). */
|
||||
}
|
||||
|
||||
.hiddenOverlay {
|
||||
visibility: hidden;
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
width:100%;
|
||||
height:100%;
|
||||
}
|
||||
|
||||
|
||||
/* https://stackoverflow.com/a/16778646/
|
||||
* Kept due to shutdown message on homepage
|
||||
*/
|
||||
.overlay {
|
||||
visibility: hidden;
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
width:100%;
|
||||
height:100%;
|
||||
text-align:left;
|
||||
z-index: 1000;
|
||||
background-color: #2c2b3f;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.closeOverlay{
|
||||
background-color: white;
|
||||
color: black;
|
||||
border: 1px solid red;
|
||||
border-radius: 5px;
|
||||
float: right;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
.closeOverlay:after{
|
||||
content: '❌';
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.navbarLogo{
|
||||
margin-right: 5px;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.aboutLogo{
|
||||
max-width: 25%;
|
||||
margin-bottom: 1em;
|
||||
}
|
|
@ -1,15 +1,33 @@
|
|||
/*
|
||||
Onionr - Private P2P Communication
|
||||
|
||||
Provides userIcon which generates SVG identicons from a Onionr user pubkey
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
function toHexString(byteArray) {
|
||||
// cc-by-sa-4 https://stackoverflow.com/a/44608819 by https://stackoverflow.com/users/1883624/grantpatterson
|
||||
var s = '0x';
|
||||
var s = '0x'
|
||||
byteArray.forEach(function(byte) {
|
||||
s += ('0' + (byte & 0xFF).toString(16)).slice(-2);
|
||||
});
|
||||
return s;
|
||||
s += ('0' + (byte & 0xFF).toString(16)).slice(-2)
|
||||
})
|
||||
return s
|
||||
}
|
||||
|
||||
async function sha256(str) {
|
||||
const buf = await crypto.subtle.digest("SHA-256", new TextEncoder("utf-8").encode(str));
|
||||
return Array.prototype.map.call(new Uint8Array(buf), x=>(('00'+x.toString(16)).slice(-2))).join('');
|
||||
const buf = await crypto.subtle.digest("SHA-256", new TextEncoder("utf-8").encode(str))
|
||||
return Array.prototype.map.call(new Uint8Array(buf), x=>(('00'+x.toString(16)).slice(-2))).join('')
|
||||
}
|
||||
|
||||
async function userIcon(pubkey, imgSize=64){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue