buttons
This commit is contained in:
parent
a1055b0c43
commit
82b25946a0
@ -14,7 +14,7 @@ $button_color: color.adjust($accent_color, $hue: 90);
|
|||||||
|
|
||||||
%button-base {
|
%button-base {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
// color: black;
|
color: black;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
@ -51,6 +51,8 @@ body {
|
|||||||
|
|
||||||
#topnav {
|
#topnav {
|
||||||
@include navbar($accent_color);
|
@include navbar($accent_color);
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#bottomnav {
|
#bottomnav {
|
||||||
@ -63,6 +65,11 @@ body {
|
|||||||
background-color: $dark_bg;
|
background-color: $dark_bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.site-title {
|
||||||
|
display: inline;
|
||||||
|
padding-right: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
.thread-title {
|
.thread-title {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
@ -138,6 +145,15 @@ button, input[type="submit"], .linkbutton {
|
|||||||
color: white;
|
color: white;
|
||||||
@include button(red);
|
@include button(red);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.warn {
|
||||||
|
@include button(#fbfb8d);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// not sure why this one has to be separate, but if it's included in the rule above everything breaks
|
||||||
|
input[type="file"]::file-selector-button {
|
||||||
|
@include button($button_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.pagebutton {
|
.pagebutton {
|
||||||
@ -158,3 +174,7 @@ button, input[type="submit"], .linkbutton {
|
|||||||
min-width: 20px;
|
min-width: 20px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.modform {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/* src: */
|
/* src: */
|
||||||
.currentpage, .pagebutton, button.critical, input[type=submit].critical, .linkbutton.critical, button, input[type=submit], .linkbutton {
|
.currentpage, .pagebutton, input[type=file]::file-selector-button, button.warn, input[type=submit].warn, .linkbutton.warn, button.critical, input[type=submit].critical, .linkbutton.critical, button, input[type=submit], .linkbutton {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
|
color: black;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
@ -20,6 +21,8 @@ body {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: end;
|
justify-content: end;
|
||||||
background-color: #c1ceb1;
|
background-color: #c1ceb1;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#bottomnav {
|
#bottomnav {
|
||||||
@ -35,6 +38,11 @@ body {
|
|||||||
background-color: rgb(143.7039271654, 144.3879625984, 142.8620374016);
|
background-color: rgb(143.7039271654, 144.3879625984, 142.8620374016);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.site-title {
|
||||||
|
display: inline;
|
||||||
|
padding-right: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
.thread-title {
|
.thread-title {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
@ -119,6 +127,25 @@ button.critical:hover, input[type=submit].critical:hover, .linkbutton.critical:h
|
|||||||
button.critical:active, input[type=submit].critical:active, .linkbutton.critical:active {
|
button.critical:active, input[type=submit].critical:active, .linkbutton.critical:active {
|
||||||
background-color: rgb(149.175, 80.325, 80.325);
|
background-color: rgb(149.175, 80.325, 80.325);
|
||||||
}
|
}
|
||||||
|
button.warn, input[type=submit].warn, .linkbutton.warn {
|
||||||
|
background-color: #fbfb8d;
|
||||||
|
}
|
||||||
|
button.warn:hover, input[type=submit].warn:hover, .linkbutton.warn:hover {
|
||||||
|
background-color: rgb(251.8, 251.8, 163.8);
|
||||||
|
}
|
||||||
|
button.warn:active, input[type=submit].warn:active, .linkbutton.warn:active {
|
||||||
|
background-color: rgb(198.3813559322, 198.3813559322, 154.4186440678);
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=file]::file-selector-button {
|
||||||
|
background-color: rgb(177, 206, 204.5);
|
||||||
|
}
|
||||||
|
input[type=file]::file-selector-button:hover {
|
||||||
|
background-color: rgb(192.6, 215.8, 214.6);
|
||||||
|
}
|
||||||
|
input[type=file]::file-selector-button:active {
|
||||||
|
background-color: rgb(166.6881496063, 178.0118503937, 177.4261417323);
|
||||||
|
}
|
||||||
|
|
||||||
.pagebutton {
|
.pagebutton {
|
||||||
background-color: rgb(177, 206, 204.5);
|
background-color: rgb(177, 206, 204.5);
|
||||||
@ -143,3 +170,7 @@ button.critical:active, input[type=submit].critical:active, .linkbutton.critical
|
|||||||
min-width: 20px;
|
min-width: 20px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.modform {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
<% else %>
|
<% else %>
|
||||||
<title>Porom</title>
|
<title>Porom</title>
|
||||||
<% end %>
|
<% end %>
|
||||||
<link rel="stylesheet" href="/static/style.css">
|
<% math.randomseed(os.time()) %>
|
||||||
|
<link rel="stylesheet" href="<%= "/static/style.css?" .. math.random(1, 100) %>">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<% content_for("inner") %>
|
<% content_for("inner") %>
|
||||||
|
@ -8,5 +8,5 @@
|
|||||||
|
|
||||||
<form method="post" action="<%= url_for("user_delete", {username = user.username}) %>">
|
<form method="post" action="<%= url_for("user_delete", {username = user.username}) %>">
|
||||||
<input type="password" name="password" id="password" autocomplete="current-password" placeholder="Password" required><br>
|
<input type="password" name="password" id="password" autocomplete="current-password" placeholder="Password" required><br>
|
||||||
<input type="submit" value="Delete my account (NO UNDO)">
|
<input class="critical" type="submit" value="Delete my account (NO UNDO)">
|
||||||
</form>
|
</form>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<form method="post" action="<%= url_for("user_set_avatar", {username = user.username}) %>" enctype="multipart/form-data">
|
<form method="post" action="<%= url_for("user_set_avatar", {username = user.username}) %>" enctype="multipart/form-data">
|
||||||
<img src="<%= avatar_url(user) %>"><br>
|
<img src="<%= avatar_url(user) %>"><br>
|
||||||
<input type="file" name="avatar" accept="image/*"><br>
|
<input id="file" type="file" name="avatar" accept="image/*">
|
||||||
<input type="submit" value="Update avatar">
|
<input type="submit" value="Update avatar">
|
||||||
<% if not user:is_default_avatar() then %>
|
<% if not user:is_default_avatar() then %>
|
||||||
<input type="submit" value="Clear avatar" formaction="<%= url_for("user_clear_avatar", {username = user.username}) %>">
|
<input type="submit" value="Clear avatar" formaction="<%= url_for("user_clear_avatar", {username = user.username}) %>">
|
||||||
@ -14,7 +14,7 @@
|
|||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
<label for="status">Status</label>
|
<label for="status">Status</label>
|
||||||
<input type="text" id="status" name="status" value="<%= user.status %>" maxlength="30"><br>
|
<input type="text" id="status" name="status" value="<%= user.status %>" maxlength="30"><br>
|
||||||
<input type="submit" value="Save">
|
<input type="submit" value="Save status">
|
||||||
</form>
|
</form>
|
||||||
<br>
|
<br>
|
||||||
<a href="<%= url_for("user_delete_confirm", {username = user.username}) %>">Delete account</a>
|
<a class="linkbutton critical" href="<%= url_for("user_delete_confirm", {username = user.username}) %>">Delete account</a>
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
<h2>You are a guest. An Moderator needs to approve your account before you will be able to post.</h2>
|
<h2>You are a guest. An Moderator needs to approve your account before you will be able to post.</h2>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if user_is_me then %>
|
<% if user_is_me then %>
|
||||||
<a href="<%= url_for("user_settings", {username = user.username}) %>">Settings</a>
|
<a class="linkbutton" href="<%= url_for("user_settings", {username = user.username}) %>">Settings</a>
|
||||||
<form method="post" action="<%= url_for("user_logout", {user_id = me.id}) %>">
|
<form method="post" action="<%= url_for("user_logout", {user_id = me.id}) %>">
|
||||||
<input type="submit" value="Log out">
|
<input class="warn" type="submit" value="Log out">
|
||||||
</form>
|
</form>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
@ -18,23 +18,23 @@
|
|||||||
<h1>Moderator controls</h2>
|
<h1>Moderator controls</h2>
|
||||||
<% if user:is_guest() then %>
|
<% if user:is_guest() then %>
|
||||||
<p>This user is a guest. They signed up on <%= os.date("%c", user.created_at) %>.</p>
|
<p>This user is a guest. They signed up on <%= os.date("%c", user.created_at) %>.</p>
|
||||||
<form method="post" action="<%= url_for("confirm_user", {user_id = user.id}) %>">
|
<form class="modform" method="post" action="<%= url_for("confirm_user", {user_id = user.id}) %>">
|
||||||
<input type="submit" value="Confirm user">
|
<input type="submit" value="Confirm user">
|
||||||
</form>
|
</form>
|
||||||
<% else %> <% --[[ user is not guest ]] %>
|
<% else %> <% --[[ user is not guest ]] %>
|
||||||
<p>This user signed up on <%= os.date("%c", user.created_at) %> and was confirmed on <%= os.date("%c", user.confirmed_on) %>.</p>
|
<p>This user signed up on <%= os.date("%c", user.created_at) %> and was confirmed on <%= os.date("%c", user.confirmed_on) %>.</p>
|
||||||
<% if user.permission < me.permission then %>
|
<% if user.permission < me.permission then %>
|
||||||
<form method="post" action="<%= url_for("guest_user", {user_id = user.id}) %>">
|
<form class="modform" method="post" action="<%= url_for("guest_user", {user_id = user.id}) %>">
|
||||||
<input type="submit" value="Demote user to guest (soft ban)">
|
<input class="warn" type="submit" value="Demote user to guest (soft ban)">
|
||||||
</form>
|
</form>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if me:is_admin() and not user:is_mod() then %>
|
<% if me:is_admin() and not user:is_mod() then %>
|
||||||
<form method="post" action="<%= url_for("mod_user", {user_id = user.id}) %>">
|
<form class="modform" method="post" action="<%= url_for("mod_user", {user_id = user.id}) %>">
|
||||||
<input type="submit" value="Promote user to moderator">
|
<input class="warn" type="submit" value="Promote user to moderator">
|
||||||
</form>
|
</form>
|
||||||
<% elseif user.permission < me.permission then %>
|
<% elseif user:is_mod() and user.permission < me.permission then %>
|
||||||
<form method="post" action="<%= url_for("demod_user", {user_id = user.id}) %>">
|
<form class="modform" method="post" action="<%= url_for("demod_user", {user_id = user.id}) %>">
|
||||||
<input type="submit" value="Demote user to regular user">
|
<input class="critical" type="submit" value="Demote user to regular user">
|
||||||
</form>
|
</form>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
Loading…
Reference in New Issue
Block a user