Add hacker style

This commit is contained in:
2019-03-31 21:06:52 +02:00
parent 991b699416
commit 6448b4d3db
5 changed files with 35 additions and 14 deletions

View File

@@ -64,8 +64,8 @@ var Toolbar = {
}else if(data.responseJSON.value === "virus_detected_captcha_required"){
popupTitle.innerText = "Malware warning!";
popupContent.innerText = "According to our scanning "+
"systems this file may contain a virus (type '"+
data.responseJSON.extra+"'). You can continue "+
"systems this file may contain a virus of type '"+
data.responseJSON.extra+"'. You can continue "+
"downloading this file at your own risk, but you will "+
"have to prove that you're a human first.";
}
@@ -153,7 +153,7 @@ function loadCaptcha(){
callback: function(token){
document.getElementById("download_frame").src = "/api/file/" + Viewer.currentFile +
"?download&recaptcha_response="+token;
setTimeout(function(){
var popupDiv = document.getElementById("captcha_popup");
popupDiv.style.opacity = "0";

View File

@@ -103,12 +103,13 @@ body{
font-family: "Lato Thin", sans-serif;
font-weight: bold;
font-size: 1.8em;
transition: box-shadow 0.5s;
transition: box-shadow 2s;
}
.navigation a:hover {
background: linear-gradient(var(--highlight_color), var(--highlight_color_dark));
box-shadow: var(--highlight_border), 2px 2px 8px var(--shadow_color);
color: var(--highlight_text_color);
transition: box-shadow 0.5s;
text-decoration: none;
}
.navigation .icon {

View File

@@ -190,7 +190,6 @@ body{
/* =====================
|| MISC COMPONENTS ||
===================== */
.full_popup{
position: fixed;
visibility: hidden;
@@ -214,18 +213,18 @@ body{
opacity: 0;
transition: visibility 1s, opacity 1s, left 1s;
background-color: var(--background_color);
border-color: var(--accent_color_dark_border);
border-color: var(--accent_color_dark_border);
height: auto;
width: 500px;
width: 450px;
max-width: 100%;
top: 50px;
top: 10%;
left: 50%;
margin-left: -200px;
transform: translate(-50%, -10%);
padding: 0 10px;
box-sizing: border-box;
text-align: left;
box-shadow: var(--shadow_color) 0px 0px 50px;
z-index: 100;
z-index: 101;
}
#captcha_popup_captcha > div {
display: inline-block;

View File

@@ -75,7 +75,7 @@
BasicAttentionToken: Donate BAT by clicking the BAT icon in
your address bar. If you don't have Brave browser yet you
can download it here:
<a class="button button_highlight" href="https://brave.com/pix009">Install Brave</a>.
<a class="button button_highlight" href="https://brave.com/pix009" target="_blank">Install Brave</a>.
Installing and using Brave with this referral link also
counts as a 5$ donation.
</li>
@@ -150,6 +150,7 @@
<input type="radio" id="style_default" name="style"><label for="style_default">Default Pixeldrain Style</label><br/>
<input type="radio" id="style_solarized_dark" name="style"><label for="style_solarized_dark">Solarized Dark Style</label><br/>
<input type="radio" id="style_maroon" name="style"><label for="style_maroon">Maroon Style</label><br/>
<input type="radio" id="style_hacker" name="style"><label for="style_hacker">Hacker Style</label><br/>
{{template "footer"}}
</div>

View File

@@ -15,15 +15,14 @@ func userStyle(r *http.Request) (style template.CSS) {
switch cookie.Value {
case "solarized_dark":
selectedStyle = solarizedDarkStyle
break
case "maroon":
selectedStyle = maroonStyle
break
case "hacker":
selectedStyle = hackerStyle
case "default":
fallthrough // use default case
default:
selectedStyle = defaultPixeldrainStyle
break
}
}
@@ -205,3 +204,24 @@ var maroonStyle = pixeldrainStyleSheet{
ShadowSpread: 50,
ShadowIntensity: 5,
}
var hackerStyle = pixeldrainStyleSheet{
TextColor: hsl{0, 0, 1},
InputColor: hsl{0, 0, .25},
InputTextColor: hsl{0, 0, 1},
HighlightColor: hsl{120, 1, .6},
HighlightTextColor: hsl{0, 0, 0},
DangerColor: hsl{0, .65, .31},
DangerColorDark: hsl{0, .64, .23},
FileBackgroundColor: hsl{120, .8, .06},
BackgroundColor: hsl{0, 0, 0},
BodyColor: hsl{0, 0, 0},
AccentColorDark: hsl{0, 0, .05},
AccentColorMedium: hsl{0, 0, .10},
AccentColorLight: hsl{0, 0, .15},
ShadowColor: hsl{120, 1, .1},
ShadowSpread: 50,
ShadowIntensity: 5,
}