Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Commit

Permalink
Merge branch 'fix/default-site-name' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
engineervix committed Mar 20, 2024
2 parents 5eb2865 + 6218c71 commit 9ac8397
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 16 deletions.
23 changes: 23 additions & 0 deletions tbx/core/migrations/0154_alter_socialmediasettings_site_name.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 4.2.8 on 2024-03-19 16:21

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("torchbox", "0153_change_minimum_number_for_key_points"),
]

operations = [
migrations.AlterField(
model_name="socialmediasettings",
name="site_name",
field=models.CharField(
blank=True,
default="Torchbox",
help_text="Site name, used by Open Graph.",
max_length=255,
),
),
]
2 changes: 1 addition & 1 deletion tbx/core/utils/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ class SocialMediaSettings(BaseSiteSetting):
site_name = models.CharField(
max_length=255,
blank=True,
default="{{ cookiecutter.project_name }}",
default="Torchbox",
help_text="Site name, used by Open Graph.",
)
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,29 @@

{% block body_class %}template-password-required{% endblock %}

{% block theme_class %}theme--light{% endblock %}

{% block content %}
<h1>Password required</h1>
<div class="password-required">
<h1 class="password-required__title">Password required</h1>

<p class="heading--2">Please enter the password to proceed.</p>
<p>Please enter the password to proceed.</p>

<form action="{{ action_url }}" method="post">
<div>
{% csrf_token %}
<form class="password-required__form" action="{{ action_url }}" method="post">
<div>
{% csrf_token %}

{{ form.non_field_errors }}
{{ form.non_field_errors }}

{{ form.password.errors }}
{{ form.password.label_tag }}
{{ form.password }}
{{ form.password.errors }}
{{ form.password.label_tag }}
{{ form.password }}

{% for field in form.hidden_fields %}
{{ field }}
{% endfor %}
<input type="submit" value="Continue" />
</div>
</form>
{% for field in form.hidden_fields %}
{{ field }}
{% endfor %}
</div>
<input class="button password-required__submit-button" type="submit" value="Continue" />
</form>
</div>
{% endblock %}
31 changes: 31 additions & 0 deletions tbx/static_src/sass/components/_password-required.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.password-required {
padding: $grid;
display: flex;
flex-direction: column;
align-items: center;
width: 100%;

&__title {
margin: 0 0 $grid 0;
}

&__form {
display: flex;
flex-direction: column;
align-items: center;
}

&__submit-button {
width: max-content;
margin-top: $grid;
margin-bottom: $grid * 4;
padding: 10px 16px;
border: none;
cursor: pointer;

@include media-query(large) {
margin-top: $grid * 2;
margin-bottom: $grid * 6;
}
}
}
1 change: 1 addition & 0 deletions tbx/static_src/sass/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
@import 'components/page';
@import 'components/paragraph-with-image';
@import 'components/paragraph-with-quote';
@import 'components/password-required';
@import 'components/post';
@import 'components/posts-grid';
@import 'components/primary-nav';
Expand Down

0 comments on commit 9ac8397

Please sign in to comment.