Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into feature/47
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-brooke committed Feb 14, 2020
2 parents 37d850d + 10e5d15 commit ee46b0d
Show file tree
Hide file tree
Showing 9 changed files with 177 additions and 70 deletions.
2 changes: 2 additions & 0 deletions resources/i18n/en-GB.edn
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@
"Smeagol has been unable to find some of the resources on which it depends,
possibly because of misconfiguration or missing environment variables."
;; used in sanity check report
:sortable "You can sort this table by selecting column headers"
;; used for sortable tables
:user-lacks-field "User record in the passwd file lacks a field"
;; used in sanity check report
:username-prompt "Username" ;; text of the username widget prompt on edit user page
Expand Down
101 changes: 67 additions & 34 deletions resources/public/content/stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@
## html elements generally in alphabetic order
*/

a {
color: darkgray;
font-weight: bold;
}

a:hover {
color: darkgray;
background:rgba(200,200,200,0.8);
}

body {
margin: 0;
padding: 0;
Expand Down Expand Up @@ -52,14 +62,15 @@ dd {

/* footer of the page - not-editable, provided by Smeagol */
footer {
border-top: thin solid gray;
border-top: thin solid silver;
color: gray;
background:rgba(200,200,200,0.8);
clear: both;
font-size: smaller;
text-align: center;
color: gray;
background: rgba(224,224,224,0.95);
width: 100%;
margin: 0;
min-height: 4px;
padding: 0.25em 0;
bottom:0;
position:fixed;
Expand All @@ -71,9 +82,14 @@ footer {
}

footer div {
display: none;
padding: 0.1em;
}

footer:hover div {
display: block;
}

form {
border: thin solid silver;
}
Expand All @@ -83,8 +99,6 @@ header {
margin-top: 0;
width:100%;
max-width: 100%;
background-color: gray;
color: white;
}

header h1 {
Expand All @@ -93,7 +107,6 @@ header h1 {

header a {
font-weight: bold;
color: white;
}

header a:hover {
Expand Down Expand Up @@ -131,12 +144,12 @@ ins {
label {
width: 20%;
min-width: 20em;
border-right: thin solid gray;
border-right: thin solid silver;
display: inline-block;
}

table {
border: 2px solid black;
border: thin solid silver;
border-collapse: collapse;
}

Expand All @@ -148,7 +161,7 @@ th, td {
text-align: left;
vertical-align: top;
padding: 0.15em 1.5em;
border: 1px solid gray;
border: 1px solid silver;
}

th {
Expand All @@ -166,17 +179,18 @@ th {

/* left bar for all pages in the Wiki - editable, provided by users. Within main-container */
#side-bar {
display: none;
width: 17%;
height: 100%;
float: left;
}

/* cookies information box, fixed, in right margin, just above footer */
#cookies {
width: 30%;
width: 20%;
float: right;
position: fixed;
bottom: 3.5em;
bottom: 8px;
right: 0;
z-index: 175;
background: transparent;
Expand All @@ -190,18 +204,18 @@ th {
text-align: right;
padding: 0.25em 2em;
border-radius: 0.25em;
color: white;
background:rgba(40,40,40,0.8);
color: gray;
background:rgba(200,200,200,0.8);
}

/* more-about-cookies box, normally hidden */
#more-about-cookies {
display: none;
padding: 0.5em 2em;
border-radius: 0.5em;
color: white;
background:rgba(40,40,40,0.8);
border-bottom: thin solid white;
color: gray;
background:rgba(200,200,200,0.8);
border-bottom: thin solid gray;
}

/* but magically appears on mouseover */
Expand Down Expand Up @@ -242,8 +256,8 @@ th {
right: 0;
padding: 0.25em 2em;
border-radius: 0.25em;
color: white;
background:rgba(40,40,40,0.8);
color: gray;
background:rgba(200,200,200,0.8);
font-size: 66%;
}

Expand All @@ -254,7 +268,11 @@ th {
.minor-controls a {
float: right;
padding: 0.25em 2em;
color: white;
color: gray;
}

.minor-controls a:hover {
color: darkgray;
}

.pseudo-input {
Expand Down Expand Up @@ -303,25 +321,37 @@ th {
/* content of the current page in the Wiki - editable, provided by users. Within main-container */
#content {
border: thin solid silver;
width: 80%;
float: right;
width: 100%;
padding-bottom: 5em;
}

#phone-side-bar, #phone-credits {
display: none;
}

#header {
font-size: smaller;
}

/* top-of-page navigation, not editable, provided by Smeagol */
#nav{
margin: 0;
padding: 0;
top: 0;
width: 100%;
min-height: 4px;
_position: absolute;
_top: expression(document.documentElement.scrollTop);
z-index: 149;
background:rgba(40,40,40,0.8);
color: gray;
background:rgba(200,200,200,0.8);
}

#nav #nav-menu {
display: none;
}

#nav:hover #nav-menu {
display: block;
}

/* only needed for fly-out menu effect on tablet and phone stylesheets */
Expand All @@ -341,14 +371,14 @@ th {
}

#nav menu li a {
color: white;
color: gray;
text-decoration: none;
font-weight: bold;
padding: 0.1em 0.75em;
margin: 0;
}

#nav menu li.active a { background: gray;}
#nav menu li.active a { background: gray; color: white;}
li.nav-item a:hover { background: rgb( 240, 240, 240) }
li.nav-item a:active { background: gray; color: white; }

Expand Down Expand Up @@ -379,17 +409,15 @@ th {
padding: 0;
position: fixed;
z-index: 149;
color: silver;
background:rgba(40,40,40,0.9);
color: black;
background:rgba(200,200,200,0.9);
}

#nav a {
color: white;
text-decoration: none;
font-weight: bold;
}

#nav:hover #nav-menu {
#nav:hover #nav-menu, #nav:hover #phone-side-bar {
display: block;
list-style-type: none;
width: 100%;
Expand Down Expand Up @@ -455,18 +483,21 @@ th {
display: none;
}

#header {
display: none;
}

#nav{
margin: 0;
padding: 0;
position: fixed;
z-index: 149;
color: silver;
background:rgba(40,40,40,0.9);
color: black;
background:rgba(200,200,200,0.9);
}

#nav a {
color: white;
text-decoration: none;
color: black;
font-weight: bold;
}

Expand All @@ -491,6 +522,8 @@ th {
}

#nav menu li a {
color: black;
font-weight: bold;
}

#nav ul li.active a { background: silver;}
Expand Down
4 changes: 3 additions & 1 deletion resources/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@
</div>
</div>
<h1>{% i18n site-title %}: {{title}}</h1>
{{header|safe}}
<div id="header">
{{header|safe}}
</div>
{% if message %}
<div id="message">
<p class="message">{{message}}</p>
Expand Down
23 changes: 16 additions & 7 deletions resources/templates/edit-users.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
{% extends "templates/base.html" %}
{% block extra-headers %}
{% script "/vendor/node_modules/tablesort/dist/tablesort.min.js" %}
{% endblock %}

{% block content %}
<div id="content">
<table>
<tr>
<th/><th>{% i18n edit-col-hdr %}</th><th>{% i18n del-col-hdr %}</th>
<p>
{% i18n sortable %}
</p>
<table id="userstable">
<tr data-sort-method='none'>
<th>{% i18n user-title-prefix %}</th>
<th data-sort-method='none'>{% i18n edit-col-hdr %}</th>
<th data-sort-method='none'>{% i18n del-col-hdr %}</th>
</tr>
{% for user in users %}
<tr>
Expand All @@ -13,11 +21,12 @@
<td><a href="delete-user?target={{user}}">{% i18n del-col-hdr %} {{user}}</a></td>
</tr>
{% endfor %}
<tr>
<td><a href="edit-user">{% i18n add-user-label %}</a></td>
<td></td>
<td></td>
<tr data-sort-method='none'>
<td colspan="3"><a href="edit-user">{% i18n add-user-label %}</a></td>
</tr>
</table>
</div>
<script>
new Tablesort(document.getElementById('userstable'));
</script>
{% endblock %}
6 changes: 3 additions & 3 deletions resources/templates/edit.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{% extends "templates/base.html" %}
{% block extra-headers %}
{% ifequal js-from ":cloudflare" %}
{% ifequal js-from ":cdnjs" %}
<script src="https://cdnjs.cloudflare.com/ajax/libs/simplemde/1.11.2/simplemde.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/simplemde/1.11.2/simplemde.min.css" rel="stylesheet" type="text/css" />
{% else %}
{% style "/vendor/simplemde/dist/simplemde.min.css" %}
{% script "/vendor/simplemde/dist/simplemde.min.js" %}
{% style "vendor/simplemde/dist/simplemde.min.css" %}
{% script "vendor/simplemde/dist/simplemde.min.js" %}
{% endifequal %}
{% endblock %}

Expand Down
19 changes: 15 additions & 4 deletions resources/templates/list-uploads.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{% extends "templates/base.html" %}
{% block extra-headers %}
{% script "/vendor/node_modules/tablesort/dist/tablesort.min.js" %}
{% script "/vendor/node_modules/tablesort/dist/sorts/tablesort.number.min.js" %}
{% script "/vendor/node_modules/tablesort/dist/sorts/tablesort.date.min.js" %}
{% script "/vendor/node_modules/tablesort/dist/sorts/tablesort.monthname.min.js" %}
{% endblock %}

{% block content %}
<div id="content" class="list-uploads">
Expand All @@ -9,12 +15,15 @@
<input name="search" id="search" type="text" value="{{search}}" required/>
</p>
</form>
<table>
<tr>
<p>
{% i18n sortable %}
</p>
<table id="uploads">
<tr data-sort-method='none'>
<th>Name</th>
<th>Uploaded</th>
<th>Type this</th>
<th>To get this</th>
<th data-sort-method='none'>To get this</th>
</tr>
{% for entry in files %}
<tr>
Expand All @@ -26,9 +35,11 @@
<td>
{% if entry.is-image %} <img src="{{entry.resource}}" alt="{{entry.name|capitalize}}"/> {% else %} <a href="{{entry.resource}}">link</a> {% endif %}
</td>

</tr>
{% endfor %}
</table>
</div>
<script>
new Tablesort(document.getElementById('uploads'));
</script>
{% endblock %}
1 change: 1 addition & 0 deletions src/smeagol/formatting.clj
Original file line number Diff line number Diff line change
Expand Up @@ -235,3 +235,4 @@
(reintegrate-inclusions (process-text md-src)))



Loading

0 comments on commit ee46b0d

Please sign in to comment.