aboutsummaryrefslogtreecommitdiff
path: root/weblog/static
diff options
context:
space:
mode:
Diffstat (limited to 'weblog/static')
-rwxr-xr-xweblog/static/weblog/css/weblog.css20
-rwxr-xr-xweblog/static/weblog/js/weblog.js14
2 files changed, 26 insertions, 8 deletions
diff --git a/weblog/static/weblog/css/weblog.css b/weblog/static/weblog/css/weblog.css
index cb1facc..0127eaa 100755
--- a/weblog/static/weblog/css/weblog.css
+++ b/weblog/static/weblog/css/weblog.css
@@ -1,7 +1,25 @@
+body,
+html{
+ position: relative;
+ width: 100%;
+ min-height: 100vh;
+ min-width: 100%;
+ margin: 0;
+ padding: 0;
+}
+
+*{
+ box-sizing: border-box;
+}
+
.archive-list{
list-style-type: none;
}
.archive-child-list{
display: none;
-} \ No newline at end of file
+}
+
+.archive-child-list.show{
+ display: block;
+}
diff --git a/weblog/static/weblog/js/weblog.js b/weblog/static/weblog/js/weblog.js
index 164cc3b..af9b9ea 100755
--- a/weblog/static/weblog/js/weblog.js
+++ b/weblog/static/weblog/js/weblog.js
@@ -1,13 +1,13 @@
function toggleNode(caller){
- state = $(caller).attr('node-state');
- target = $(caller).attr('node-target');
+ state = caller.getAttribute('node-state');
+ target = document.getElementById(caller.getAttribute('node-target'));
if(state=='closed'){
- $(caller).html('—');
- $(caller).attr('node-state', 'open');
+ caller.innerHTML = '—';
+ caller.setAttribute('node-state', 'open');
}
else{
- $(caller).html('+');
- $(caller).attr('node-state', 'closed');
+ caller.innerHTML = '+';
+ caller.setAttribute('node-state', 'closed');
}
- $('#'+target).toggle();
+ target.classList.toggle('show');
}