aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaroslav de la Peña Smirnov <contact@yaroslavps.com>2018-10-06 03:21:39 +0300
committerYaroslav de la Peña Smirnov <contact@yaroslavps.com>2018-10-06 03:21:39 +0300
commit55a4d5d6f9b4604c232871f152dda76b954a95b0 (patch)
tree154bdf91b01b6aed5506a7ca329725be98de24d3
parent53c5303578ff6741e259949f4ecec295fa54a172 (diff)
downloadw3blog-55a4d5d6f9b4604c232871f152dda76b954a95b0.tar.gz
w3blog-55a4d5d6f9b4604c232871f152dda76b954a95b0.zip
no jquery, js updated, no bootstrap
-rwxr-xr-xsetup.py2
-rwxr-xr-xweblog/static/weblog/css/weblog.css20
-rwxr-xr-xweblog/static/weblog/js/weblog.js14
-rwxr-xr-xweblog/templates/weblog_base.html10
4 files changed, 30 insertions, 16 deletions
diff --git a/setup.py b/setup.py
index d0372bc..c9527f0 100755
--- a/setup.py
+++ b/setup.py
@@ -10,7 +10,7 @@ os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='w3blog',
- version='0.4.4',
+ version='0.5-nobs.2',
packages=find_packages(),
include_package_data=True,
license='BSD License',
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');
}
diff --git a/weblog/templates/weblog_base.html b/weblog/templates/weblog_base.html
index acf652c..89d24f6 100755
--- a/weblog/templates/weblog_base.html
+++ b/weblog/templates/weblog_base.html
@@ -6,21 +6,17 @@
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1" name="viewport">
<title>{{ blog_title }} - {% block title_block %} Home {% endblock %}</title>
- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
<link rel="stylesheet" href="{% static '/weblog/css/weblog.css' %}">
- <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js" integrity="sha384-cs/chFZiN24E4KMATLdqdvsezGxaGsi4hLGOzlXwp5UZB1LY//20VyM2taTB4QvJ" crossorigin="anonymous"></script>
- <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js" integrity="sha384-uefMccjFJAIv6A+rW+L4AHf99KvxDjWSu1z9VI8SKNVmz4sk7buKt/6v9KI65qnm" crossorigin="anonymous"></script>
<script src="{% static '/weblog/js/weblog.js' %}" defer></script>
</head>
<body>
- <nav class="navbar navbar-expand-sm bg-dark navbar-dark">
- <div class="container nav-container">
+ <nav class="navbar">
+ <div class="nav-container">
<a class="navbar-brand" href="{% url 'weblog:Index' %}">{{ blog_title }}</a>
</div>
</nav>
- <div class="container">
+ <div class="blog-container">
{% block content_block %}
{% block blog_block %}
{% endblock %}