Skip to content
This repository has been archived by the owner on Nov 7, 2022. It is now read-only.

Commit

Permalink
upgrade martor
Browse files Browse the repository at this point in the history
  • Loading branch information
agusmakmun committed Oct 29, 2020
1 parent 6cc1622 commit c70ef0f
Show file tree
Hide file tree
Showing 47 changed files with 5,562 additions and 29 deletions.
4 changes: 2 additions & 2 deletions .ext/pages/developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
### Introduction

**Python Learning API** helps to track posts, tags, and users metadata from new updates for web applications.
It is designed as a REST service. Please [register first](/accounts/signup/) to get new API.
It is designed as a REST service. Please [register first](/accounts/signup/?next=/developers/) to get new API.


### Authentication

All requests to Python Learning API require you to authenticate yourself to the service.
In order to do this you must login first to get a `Token` for all requests.

> If you using 3d party app for login authentication, you must [set a password](/accounts/password/set/) first.
> If you using 3d party app for login authentication, you must [set a password](/accounts/password/set/?next=/developers/) first.

### Getting Started
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ $ cd python.web.id
```
(env-python.web.id) $ pip install -r requirements.txt
(env-python.web.id) $ cp core/settings/local.py core/settings.py
(env-python.web.id) $ cp core/settings.py.example core/settings.py # then update it
(env-python.web.id) $ ./manage.py makemigrations && ./manage.py migrate
```

Expand Down
2 changes: 1 addition & 1 deletion requirements-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ idna==2.10
isort==5.6.1
lazy-object-proxy==1.4.3
Markdown==3.2.2
martor==1.5.6
martor==1.5.7
mccabe==0.6.1
oauthlib==3.1.0
psycopg2-binary==2.8.6
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ django-updown-ratings==1.0.1
django-rest-auth==0.9.5
djangorestframework==3.12.1
Markdown==3.2.2
martor==1.5.6
martor==1.5.7
psycopg2-binary==2.8.6
python-memcached==1.59
requests==2.24.0
Expand Down
4 changes: 2 additions & 2 deletions static/martor/css/martor-admin.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions static/martor/css/martor.bootstrap.css
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ div.martor-preview-stale {
position: absolute;
bottom: -8px;
right: 8px;
z-index: 100;
}
.no-border {
border: none!important;
Expand Down
6 changes: 3 additions & 3 deletions static/martor/css/martor.bootstrap.min.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions static/martor/css/martor.semantic.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 13 additions & 8 deletions static/martor/js/martor.bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Name : Martor v1.5.6
* Name : Martor v1.5.7
* Created by : Agus Makmun (Summon Agus)
* Release date : 16-Sep-2020
* Release date : 29-Oct-2020
* License : GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
* Repository : https://github.com/agusmakmun/django-markdown-editor
**/
Expand Down Expand Up @@ -145,7 +145,18 @@

// update the preview if this menu is clicked
var currentTab = $('.tab-pane#nav-preview-'+field_name);
var editorTabButton = $('.nav-link#nav-editor-tab-'+field_name);
var previewTabButton = $('.nav-link#nav-preview-tab-'+field_name);
var toolbarButtons = $(this).closest('.tab-martor-menu').find('.martor-toolbar')

editorTabButton.click(function(){
// show the `.martor-toolbar` for this current editor if under preview.
$(this).closest('.tab-martor-menu').find('.martor-toolbar').show();
});
previewTabButton.click(function() {
$(this).closest('.tab-martor-menu').find('.martor-toolbar').hide();
});

var refreshPreview = function() {
var value = textareaId.val();
var form = new FormData();
Expand Down Expand Up @@ -194,12 +205,6 @@
editor.on('change', refreshPreview);
}

var editorTabButton = $('.nav-link#nav-preview-tab-'+field_name);
editorTabButton.click(function(){
// show the `.martor-toolbar` for this current editor if under preview.
$(this).closest('.tab-martor-menu').find('.martor-toolbar').show();
});

if (editorConfig.spellcheck == 'true') {
try {
enable_spellcheck(editorId);
Expand Down
6 changes: 3 additions & 3 deletions static/martor/js/martor.bootstrap.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions static/martor/js/martor.semantic.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Name : Martor v1.5.6
* Name : Martor v1.5.7
* Created by : Agus Makmun (Summon Agus)
* Release date : 16-Sep-2020
* Release date : 29-Oct-2020
* License : GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
* Repository : https://github.com/agusmakmun/django-markdown-editor
**/
Expand Down
4 changes: 2 additions & 2 deletions static/martor/js/martor.semantic.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions static/rest_framework/css/bootstrap-theme.min.css

Large diffs are not rendered by default.

233 changes: 233 additions & 0 deletions static/rest_framework/css/bootstrap-tweaks.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
/*
This CSS file contains some tweaks specific to the included Bootstrap theme.
It's separate from `style.css` so that it can be easily overridden by replacing
a single block in the template.
*/

.form-actions {
background: transparent;
border-top-color: transparent;
padding-top: 0;
text-align: right;
}

#generic-content-form textarea {
font-family:Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New, monospace;
font-size: 80%;
}

.navbar-inverse .brand a {
color: #999999;
}
.navbar-inverse .brand:hover a {
color: white;
text-decoration: none;
}

/* custom navigation styles */
.navbar {
width: 100%;
position: fixed;
left: 0;
top: 0;
}

.navbar {
background: #2C2C2C;
color: white;
border: none;
border-top: 5px solid #A30000;
border-radius: 0px;
}

.navbar .nav li, .navbar .nav li a, .navbar .brand:hover {
color: white;
}

.nav-list > .active > a, .nav-list > .active > a:hover {
background: #2C2C2C;
}

.navbar .dropdown-menu li a, .navbar .dropdown-menu li {
color: #A30000;
}

.navbar .dropdown-menu li a:hover {
background: #EEEEEE;
color: #C20000;
}

ul.breadcrumb {
margin: 70px 0 0 0;
}

.breadcrumb li.active a {
color: #777;
}

.pagination>.disabled>a,
.pagination>.disabled>a:hover,
.pagination>.disabled>a:focus {
cursor: not-allowed;
pointer-events: none;
}

.pager>.disabled>a,
.pager>.disabled>a:hover,
.pager>.disabled>a:focus {
pointer-events: none;
}

.pager .next {
margin-left: 10px;
}

/*=== dabapps bootstrap styles ====*/

html {
width:100%;
background: none;
}

/*body, .navbar .container-fluid {
max-width: 1150px;
margin: 0 auto;
}*/

body {
background: url("../img/grid.png") repeat-x;
background-attachment: fixed;
}

#content {
margin: 0;
padding-bottom: 60px;
}

/* sticky footer and footer */
html, body {
height: 100%;
}

.wrapper {
position: relative;
top: 0;
left: 0;
padding-top: 60px;
margin: -60px 0;
min-height: 100%;
}

.form-switcher {
margin-bottom: 0;
}

.well {
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}

.well .form-actions {
padding-bottom: 0;
margin-bottom: 0;
}

.well form {
margin-bottom: 0;
}

.nav-tabs {
border: 0;
}

.nav-tabs > li {
float: right;
}

.nav-tabs li a {
margin-right: 0;
}

.nav-tabs > .active > a {
background: #F5F5F5;
}

.nav-tabs > .active > a:hover {
background: #F5F5F5;
}

.tabbable.first-tab-active .tab-content {
border-top-right-radius: 0;
}

footer {
position: absolute;
bottom: 0;
left: 0;
clear: both;
z-index: 10;
height: 60px;
width: 95%;
margin: 0 2.5%;
}

footer p {
text-align: center;
color: gray;
border-top: 1px solid #DDDDDD;
padding-top: 10px;
}

footer a {
color: gray !important;
font-weight: bold;
}

footer a:hover {
color: gray;
}

.page-header {
border-bottom: none;
padding-bottom: 0px;
margin: 0;
}

/* custom general page styles */
.hero-unit h1, .hero-unit h2 {
color: #A30000;
}

body a {
color: #A30000;
}

body a:hover {
color: #c20000;
}

.request-info {
clear:both;
}

.horizontal-checkbox label {
padding-top: 0;
}

.horizontal-checkbox label {
padding-top: 0 !important;
}

.horizontal-checkbox input {
float: left;
width: 20px;
margin-top: 3px;
}

.modal-footer form {
margin-left: 5px;
margin-right: 5px;
}
6 changes: 6 additions & 0 deletions static/rest_framework/css/bootstrap.min.css

Large diffs are not rendered by default.

Loading

0 comments on commit c70ef0f

Please sign in to comment.