Compare commits
No commits in common. "1d09833c2a5f23cb107be94a93246362f446b6e5" and "75485525f0c0f479f74793f0036e635b0d9ce2d1" have entirely different histories.
1d09833c2a
...
75485525f0
3 changed files with 15 additions and 58 deletions
|
|
@ -45,7 +45,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.*/
|
|||
--focus-glow0-inset-top-alt: 2px 0px 2px var(--focus0) inset, -2px 0px 3px var(--focus0) inset, 2px -2px 3px var(--focus0) inset, -2px -2px 3px var(--focus0) inset;
|
||||
--focus-glow0-alt0: 2px 2px 3px var(--focus0-alt0), -2px 2px 3px var(--focus0-alt0), 2px -2px 3px var(--focus0-alt0), -2px -2px 3px var(--focus0-alt0);
|
||||
--focus-glow0-alt0-inset: 2px 2px 3px var(--focus0-alt0) inset, -2px 2px 3px var(--focus0-alt0) inset, 2px -2px 3px var(--focus0-alt0) inset, -2px -2px 3px var(--focus0-alt0) inset;
|
||||
--focus-glow0-alt0-inset-top: 2px 0px 2px var(--focus0-alt0) inset, -2px 0px 3px var(--focus0-alt0) inset, 2px -2px 3px var(--focus0-alt0) inset, -2px -2px 3px var(--focus0-alt0) inset;
|
||||
|
||||
--danger0: firebrick;
|
||||
--danger0-alt0: rgb(121, 11, 11);
|
||||
|
|
@ -360,10 +359,6 @@ p.channel-guide-entry-item{
|
|||
}
|
||||
|
||||
/* Movie Night didnt have a shadow here, but I wanted to add one like ol' ttn had. Lil' hacky to avoid editing hypertext but it works.*/
|
||||
.chat-panel-control{
|
||||
padding-bottom: 0.1em;
|
||||
}
|
||||
|
||||
#chat-panel-buffer-div:before{
|
||||
content: '';
|
||||
box-shadow: 0px .5em .5em var(--bg2);
|
||||
|
|
@ -402,12 +397,11 @@ p.channel-guide-entry-item{
|
|||
|
||||
#chat-panel-prompt{
|
||||
background-color: rgba(0,0,0,0);
|
||||
padding-bottom: 0.2em;
|
||||
}
|
||||
|
||||
#chat-panel-send-button{
|
||||
height: 100%;
|
||||
width: 3.2rem;
|
||||
width: 2.5rem;
|
||||
padding: 0;
|
||||
margin: 0 0;
|
||||
border-radius: 0;
|
||||
|
|
@ -417,14 +411,15 @@ p.channel-guide-entry-item{
|
|||
}
|
||||
|
||||
|
||||
#chat-panel-send-button:hover:not([disabled]){
|
||||
box-shadow: var(--focus-glow0-inset-top-alt);
|
||||
#chat-panel-send-button:active:not([disabled]){
|
||||
box-shadow: var(--focus-glow0-alt0-inset);
|
||||
}
|
||||
|
||||
#chat-panel-send-button:active:not([disabled]){
|
||||
box-shadow: var(--focus-glow0-alt0-inset-top);
|
||||
#chat-panel-send-button:hover:not([disabled]){
|
||||
box-shadow: var(--focus-glow0-inset);
|
||||
}
|
||||
|
||||
|
||||
.chat-entry:nth-child(even){
|
||||
background-color: var(--bg0);
|
||||
}
|
||||
|
|
@ -648,7 +643,7 @@ select.panel-head-element{
|
|||
#chat-panel-control-div:has(#chat-panel-prompt:focus):has(#chat-panel-send-button:not([style*="display: none"])):before{
|
||||
content: '';
|
||||
box-shadow: var(--focus-glow0-inset-top-alt);
|
||||
width: calc(100% - 3.2rem);
|
||||
width: calc(100% - 2.5rem);
|
||||
height: 2em;
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
|
|
@ -658,33 +653,12 @@ select.panel-head-element{
|
|||
/* There isn't a good way to make a box shadow emit in one direction, so we gotta fake it til' we make it XP */
|
||||
#chat-panel-control-div:has(#chat-panel-prompt:focus):has(#chat-panel-send-button:not([style*="display: none"])):after{
|
||||
content: '';
|
||||
position: absolute;
|
||||
background: linear-gradient(to top, var(--focus0), rgb(0,0,0,0));
|
||||
width: calc(100% - 3.2rem);
|
||||
width: calc(100% - 2.5rem);
|
||||
height: 3px;
|
||||
top: -3px;
|
||||
pointer-events: none;
|
||||
|
||||
}
|
||||
|
||||
#chat-panel-send-button:hover:not([disabled]):before,
|
||||
#chat-panel-send-button:active:not([disabled]):before{
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 3.2rem;
|
||||
height: 3px;
|
||||
top: -3px;
|
||||
right: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
|
||||
#chat-panel-send-button:hover:not([disabled]):before{
|
||||
background: linear-gradient(to top, var(--focus0), rgb(0,0,0,0));
|
||||
}
|
||||
|
||||
#chat-panel-send-button:active:not([disabled]):before{
|
||||
background: linear-gradient(to top, var(--focus0-alt0), rgb(0,0,0,0));
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* Use a basic box shadow if we dont have a send button */
|
||||
|
|
@ -353,7 +353,7 @@ class channel{
|
|||
["syncTolerance",1],
|
||||
["liveSyncTolerance", 10],
|
||||
["syncDelta", 6],
|
||||
["theme", "The Network (Classic)"],
|
||||
["theme", "The Network"],
|
||||
["chatWidthMin", 20],
|
||||
["disablePortrait", false],
|
||||
["disableSendButton", false],
|
||||
|
|
|
|||
|
|
@ -27,14 +27,14 @@ class themeManager{
|
|||
*/
|
||||
this.themes = new Map([
|
||||
["Movie Night", "/css/theme/movie-night.css"],
|
||||
["The Network (Classic)", "/css/theme/the-network-classic.css"]
|
||||
["The Network", "/css/theme/the-network.css"]
|
||||
]);
|
||||
|
||||
|
||||
/**
|
||||
* Sets default theme for new users
|
||||
*/
|
||||
this.defaultTheme = "The Network (Classic)";
|
||||
this.defaultTheme = "The Network";
|
||||
|
||||
/**
|
||||
* Define property to hold theme link DOM node
|
||||
|
|
@ -51,7 +51,7 @@ class themeManager{
|
|||
*/
|
||||
setTheme(theme = localStorage.getItem("theme")){
|
||||
//If we didnt get a theme to set
|
||||
if(theme == null || theme == ""){
|
||||
if(theme == null){
|
||||
//Use the first theme in the list
|
||||
theme = this.defaultTheme;
|
||||
}
|
||||
|
|
@ -65,14 +65,6 @@ class themeManager{
|
|||
//Create new link element and use it to set themeLink
|
||||
this.themeLink = this.genThemeLink(theme);
|
||||
|
||||
//If we got a bad link
|
||||
if(this.themeLink == null){
|
||||
//Reset the theme to the default theme
|
||||
this.setTheme(this.defaultTheme);
|
||||
//Do not pass go, do not collect $200
|
||||
return;
|
||||
}
|
||||
|
||||
//Append themeLink to header
|
||||
document.querySelector('head').appendChild(this.themeLink);
|
||||
|
||||
|
|
@ -81,15 +73,6 @@ class themeManager{
|
|||
}
|
||||
|
||||
genThemeLink(theme = localStorage.getItem("theme")){
|
||||
//Grab themePath by name
|
||||
let themePath = this.themes.get(theme)
|
||||
|
||||
//If we got dookie-dick for a theme
|
||||
if(themePath == null || themePath == ""){
|
||||
//GIMME A THEME WITH NUTHIN'! NUTHIN'?!?! NUTHIN'!! https://i.ytimg.com/vi/CccHBlGrOu8/hqdefault.jpg
|
||||
return;
|
||||
}
|
||||
|
||||
//Create new link element and use it to set themeLink
|
||||
const themeLink = document.createElement('link');
|
||||
|
||||
|
|
@ -98,7 +81,7 @@ class themeManager{
|
|||
themeLink.rel = "stylesheet";
|
||||
|
||||
//Set theme href to theme location
|
||||
themeLink.href = themePath;
|
||||
themeLink.href = this.themes.get(theme);
|
||||
|
||||
return themeLink;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue