Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Bootstrap 4 #234

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
587 changes: 0 additions & 587 deletions core/static/bootstrap/css/bootstrap-theme.css

This file was deleted.

1 change: 0 additions & 1 deletion core/static/bootstrap/css/bootstrap-theme.css.map

This file was deleted.

5 changes: 0 additions & 5 deletions core/static/bootstrap/css/bootstrap-theme.min.css

This file was deleted.

14,602 changes: 8,920 additions & 5,682 deletions core/static/bootstrap/css/bootstrap.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/static/bootstrap/css/bootstrap.css.map

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions core/static/bootstrap/css/bootstrap.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions core/static/bootstrap/css/bootstrap.min.css.map

Large diffs are not rendered by default.

Binary file not shown.
288 changes: 0 additions & 288 deletions core/static/bootstrap/fonts/glyphicons-halflings-regular.svg

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
7,013 changes: 7,013 additions & 0 deletions core/static/bootstrap/js/bootstrap.bundle.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions core/static/bootstrap/js/bootstrap.bundle.js.map

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions core/static/bootstrap/js/bootstrap.bundle.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions core/static/bootstrap/js/bootstrap.bundle.min.js.map

Large diffs are not rendered by default.

5,650 changes: 3,861 additions & 1,789 deletions core/static/bootstrap/js/bootstrap.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions core/static/bootstrap/js/bootstrap.js.map

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions core/static/bootstrap/js/bootstrap.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions core/static/bootstrap/js/bootstrap.min.js.map

Large diffs are not rendered by default.

13 changes: 0 additions & 13 deletions core/static/bootstrap/js/npm.js

This file was deleted.

8 changes: 0 additions & 8 deletions core/static/css/_constants.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,9 @@ $background-headerbar: #37215D;
$background-footer: #000;
$background-dropdown: #fff;

$font-color-light: #fff;
$font-color-dark: #000;
$font-color-link: $piratepurple;
$font-color-link-hover: lighten($piratepurple, 20%);

$font-heading: "Montserrat";
$font-text: Arial, sans-serif;
$font-size: 14pt;

$color-btn-light: #eee;
$color-btn-primary: lighten($piratepurple, 20%);

$white: #fff;
$black: #000;
Expand Down
2 changes: 0 additions & 2 deletions core/static/css/_navbar.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
.navbar {
background-color: $background-menubar;
height: 70px;
padding-right: 50px;

.btn, button {
color: $font-color-light;
Expand Down
50 changes: 0 additions & 50 deletions core/static/css/_profile.scss
Original file line number Diff line number Diff line change
@@ -1,50 +0,0 @@


.profile {
width: 100%;
display: flex;
flex-direction: column;
flex-wrap: wrap;
align-items: stretch;
align-content: stretch;
}



@include tablet() {
.profile {
flex-direction: row;

div {
h1 {
font-size: 30px;
color: #000;
}
}

&-picture {
float: right;
width: 40%;
padding: 15px;
}

&-bio {
width: 50%;
text-align: justify;
}

&-thingsdone {
width: 50%;
padding-left: 20px;
}

&-candidacies {
width: 100%;
}

&-proposals {

}

}
}
19 changes: 1 addition & 18 deletions core/static/css/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,8 @@
border-top: 1px solid $background-lightgray;
}


.sidebar-nav .dropdown-menu {
width: $sidebar-width;
}

.sidebar-nav .dropdown-menu li {
text-indent: 0px;
border-bottom: 1px solid $background-lightgray;
}

.sidebar-nav .dropdown-menu li > a {
white-space: normal;
padding-left: 10px;
min-width: $sidebar-width;
}

.sidebar-nav li {
Expand Down Expand Up @@ -85,12 +74,6 @@
margin-left: 10px;
}

.navbar-toggle {
float: left;
margin-left: 12px;
margin-right: 6px;
}

@media(max-width:767px) {
#sidebar-wrapper {
box-shadow: 1px 0px 4px #ccc;
Expand Down
7 changes: 7 additions & 0 deletions core/static/css/_widgets.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@
font-family: $font-heading;
}

.btn-default:hover {
background-color: $color-btn-primary;
color: white;
cursor: pointer;
}

.btn-default {
border: 1px solid #ccc;
background: none;
background-image: none;
background-color: $color-btn-light;
Expand Down
69 changes: 14 additions & 55 deletions core/static/css/application.css

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

16 changes: 13 additions & 3 deletions core/static/css/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
@import "_constants.scss";

body {
margin-top: 70px;
padding-bottom: 40px;
font-size: $font-size;
}
Expand Down Expand Up @@ -75,8 +74,16 @@ footer {
.rejected { color: #a00; }
.abstained { color: grey; }

#ajax-status-messages { position: absolute; top: 55px; width: 100%; }
#ajax-status-messages div { max-width: 400px; margin: 0 auto 0 auto; }
#ajax-status-messages {
position: absolute;
top: 85px;
right: 10px;
z-index:1;
}
#ajax-status-messages div {
max-width: 50vw;
margin: 0 auto 0 auto;
}

/* Headers */
h1 {
Expand Down Expand Up @@ -127,6 +134,9 @@ div#submit-working { background: #bbb; }
#cancel-url { display: none; }

.dropdown-menu { cursor: pointer; }
.dropdown-item:hover{
color:white;
}

.nav-tabs>li.active>a {
border-left-width: 2px;
Expand Down
4 changes: 0 additions & 4 deletions core/static/js/jquery-3.2.1.min.js

This file was deleted.

2 changes: 2 additions & 0 deletions core/static/js/jquery-3.3.1.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cover.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
}
#index {
margin: 6em 0 0 3em;
}
}
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

# Django packages
Django==2.2.28
django-bootstrap-form==3.4
django-crispy-forms==1.8.1
django-dotenv==1.4.2
django-prosemirror==0.0.12
Expand Down
8 changes: 4 additions & 4 deletions wasa2il/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ def __init__(self, *args, **kwargs):

# Make form pretty
self.helper = FormHelper(self)
self.helper.form_class = 'form-horizontal'
self.helper.label_class = 'col-md-3'
self.helper.field_class = 'col-md-6'
self.helper.form_class = ''
self.helper.label_class = 'col-lg-3'
self.helper.field_class = 'col-lg-6'

# Add save/cancel buttons
self.helper.add_input(Submit('save', _('Save')))
Expand Down Expand Up @@ -60,4 +60,4 @@ def __init__(self, *args, **kwargs):
elif field_type is ModelMultipleChoiceField:
field.widget = forms.CheckboxSelectMultiple()
elif field_type is DateTimeField:
field.widget = DateTimeWidget(options=self.dateTimeOptions, bootstrap_version=3)
field.widget = DateTimeWidget(options=self.dateTimeOptions, bootstrap_version=4)
3 changes: 1 addition & 2 deletions wasa2il/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@
'django.contrib.admin',

'registration',
'bootstrapform',
'diff_match_patch',
'datetimewidget',
'crispy_forms',
Expand All @@ -319,7 +318,7 @@
except:
pass

CRISPY_TEMPLATE_PACK = 'bootstrap3'
CRISPY_TEMPLATE_PACK = 'bootstrap4'
CRISPY_FAIL_SILENTLY = not DEBUG

# Allow users to attempt log-ins using any of the following:
Expand Down
6 changes: 3 additions & 3 deletions wasa2il/templates/_comments_section.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<div id="{{ obj_key }}_comments">
</div>
{% if not closed %}
<form class="form-inline comment_form" role="form">
<form class="my-2" role="form">
{% csrf_token %}
<div class="form-group" style="width: 100%;">
<textarea id="id_comment"></textarea>
<textarea rows="4" id="id_comment" class="form-control"></textarea>
</div>
<div class="form-group">
<button type="button" class="btn btn-primary" onclick="commentSend('{{ obj_key }}', {{ obj_id }}, $('#id_comment'));">{{ btntext }}</button>
Expand All @@ -20,4 +20,4 @@
commentTimerStart('{{ obj_key }}', {{ obj_id }});
});
</script>
</div>
</div>
6 changes: 3 additions & 3 deletions wasa2il/templates/_sidenav_polity.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@
<li>
{% if user_is_member %}
{% if user in polity.officers.all %}
<span class="label label-success">{% trans 'You are an officer in this polity.' %}</span>
<span class="badge badge-success">{% trans 'You are an officer in this polity.' %}</span>
{% else %}
<span class="label label-primary">{% trans 'You are a member of this polity.' %}</span>
<span class="badge badge-primary">{% trans 'You are a member of this polity.' %}</span>
{% endif %}
{% elif user.is_authenticated %}
<span class="label label-warning">{% trans 'You are not a member of this polity.' %}</span>
<span class="badge badge-warning">{% trans 'You are not a member of this polity.' %}</span>
{% endif %}
</li>
Loading