diff options
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/ja/core/home.html | 4 | ||||
| -rw-r--r-- | templates/shared/base.html | 19 | ||||
| -rw-r--r-- | templates/shared/header.html | 41 | ||||
| -rw-r--r-- | templates/shared/left_sidebar.html | 27 |
4 files changed, 76 insertions, 15 deletions
diff --git a/templates/ja/core/home.html b/templates/ja/core/home.html new file mode 100644 index 00000000..9eba501e --- /dev/null +++ b/templates/ja/core/home.html @@ -0,0 +1,4 @@ +{% extends 'shared/base.html' %} +{% block content %} + こんにちわ! +{% endblock %} diff --git a/templates/shared/base.html b/templates/shared/base.html index cb348109..8d04b64b 100644 --- a/templates/shared/base.html +++ b/templates/shared/base.html @@ -19,10 +19,27 @@ <link rel="icon" type="image/png" sizes="32x32" href="{% static 'images/favicons/favicon-32x32.png' %}" /> <link rel="icon" type="image/png" sizes="16x16" href="{% static 'images/favicons/favicon-16x16.png' %}" /> <link rel="manifest" href="{% static 'images/favicons/site.webmanifest' %}" /> - <link type="text/css" rel="stylesheet" href="{% static 'css/core.css' %}" /> + <link type="text/css" rel="stylesheet" href="{% static 'css/shared/core.css' %}" /> <link rel="preconnect" href="https://fonts.googleapis.com" /> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> + {% if request.LANGUAGE_CODE == 'ja' %} + <link href="https://fonts.googleapis.com/css2?family=Yuji+Boku&display=swap" rel="stylesheet"> + <style> + * { + font-family: "Yuji Boku", sans-serif; + font-size: 11px; + letter-spacing: 0cap; + } + </style> + {% else %} <link href="https://fonts.googleapis.com/css2?family=Mali:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;1,200;1,300;1,400;1,500;1,600;1,700&display=swap" rel="stylesheet" /> + <style> + * { + font-family: "Mali", sans-serif; + font-size: 11px; + } + </style> + {% endif %} {% block head %} {% endblock %} diff --git a/templates/shared/header.html b/templates/shared/header.html index 6c9381ce..361a7a70 100644 --- a/templates/shared/header.html +++ b/templates/shared/header.html @@ -1,22 +1,41 @@ {% load static %} <div style="position: relative; padding: 20px 0;"> - <img draggable="false" src="{% static 'images/core/shared/title_banner.png' %}" srcset=" - {% static 'images/core/shared/title_banner.png' %} 1x, - {% static 'images/core/shared/[email protected]' %} 2x, - {% static 'images/core/shared/[email protected]' %} 3x" alt="Shifoo Title Banner" class="title-banner" width="1000" height="333" loading="lazy" /> + {% if request.LANGUAGE_CODE == 'ja' %} + {% with banner_image='images/core/shared/title_banner_ja' %} + <img draggable="false" src="{% static banner_image|add:'@2x.png' %}" srcset=" + {% static banner_image|add:'@2x.png' %} 1x, + {% static banner_image|add:'@2x.png' %} 2x, + {% static banner_image|add:'@3x.png' %} 3x" + alt="Shifoo Title Banner" class="title-banner" width="1000" height="333" loading="lazy" /> + {% endwith %} + {% else %} + {% with banner_image='images/core/shared/title_banner' %} + <img draggable="false" src="{% static banner_image|add:'@2x.png' %}" srcset=" + {% static banner_image|add:'@2x.png' %} 1x, + {% static banner_image|add:'@2x.png' %} 2x, + {% static banner_image|add:'@3x.png' %} 3x" + alt="Shifoo Title Banner" class="title-banner" width="1000" height="333" loading="lazy" /> + {% endwith %} + {% endif %} + <img draggable="false" src="{% static 'images/core/shared/neko_sitting.png' %}" srcset=" {% static 'images/core/shared/neko_sitting.png' %} 1x, - {% static 'images/core/shared/[email protected]' %} 2x" alt="Picture of Neko Boy Sitting on the Divider Line" style="position: absolute; bottom: -41px; right: 0; width: 188px; height: 333px; z-index: 1;" /> - <button onClick="dontYouDare(event)" style="width: 50px;height: 12px;position: absolute;bottom: 46px;right: 366px;background-color: transparent;outline:none;border: 0;cursor: pointer; z-index: 2;"></button> - <button onClick="leaveWebsite()" style="width: 37px;height: 12px;position: absolute;bottom: 46px;right: 238px;background-color: transparent;outline:none;border: 0;cursor: pointer; z-index: 2;"></button> - <button onClick="leaveWebsite()" style="width: 7px;height: 6px;position: absolute;bottom: 106px;right: 233px;background-color: transparent;outline:none;border: 0;cursor: pointer;z-index: 2;"></button> + {% static 'images/core/shared/[email protected]' %} 2x" + alt="Picture of Neko Boy Sitting on the Divider Line" + style="position: absolute; bottom: -41px; right: {% if request.LANGUAGE_CODE == 'ja' %}-16px{% else %}0{% endif %}; width: 188px; height: 333px; z-index: 1;" /> + + <button onclick="dontYouDare(event)" style="width: {% if request.LANGUAGE_CODE == 'ja' %}56px{% else %}50px{% endif %};height: 12px;position: absolute;bottom: {% if request.LANGUAGE_CODE == 'ja' %}47px{% else %}46px{% endif %};right: {% if request.LANGUAGE_CODE == 'ja' %}360px{% else %}366px{% endif %};background-color: transparent;outline:none;border: 0;cursor: pointer;z-index: 2;"></button> + <button onclick="leaveWebsite()" style="width: 37px;height: 12px;position: absolute;bottom: {% if request.LANGUAGE_CODE == 'ja' %}47px{% else %}46px{% endif %};right: {% if request.LANGUAGE_CODE == 'ja' %}145px{% else %}238px{% endif %};background-color: transparent;outline:none;border: 0;cursor: pointer;z-index: 2;"></button> + <button onclick="leaveWebsite()" style="width: 7px;height: 6px;position: absolute;bottom: {% if request.LANGUAGE_CODE == 'ja' %}107px{% else %}106px{% endif %};right: {% if request.LANGUAGE_CODE == 'ja' %}141px{% else %}233px{% endif %};background-color: transparent;outline:none;border: 0;cursor: pointer;z-index: 2;"></button> + <div style="position: absolute;bottom: 60px;left: 584px;font-size: 7px;text-transform: uppercase;color: #560054;font-weight: bold; display: none;"> - Times Fucked Around: <span id="timesFA" style="font-size: 7px;"></span> + {% if request.LANGUAGE_CODE == 'ja' %}ぶらぶらした回数{% else %}Times Fucked Around{% endif %}: <span id="timesFA" style="font-size: 7px;"></span> </div> + <audio src="{% static 'audio/present-day-heh.mp3' %}" id="presentDayAudio" preload="auto"></audio> - <button onClick="stopAndPlayPresentDay(event)" style="width: 113px;height: 93px;position: absolute;top: 134px;left: 664px;background-color: transparent;outline:none;border: 0;z-index: 2;"></button> + <button onclick="stopAndPlayPresentDay(event)" style="width: 113px;height: 93px;position: absolute;top: 134px;left: 664px;background-color: transparent;outline:none;border: 0;z-index: 2;"></button> </div> {% block scripts %} <script src="{% static 'js/youdontdare.js' %}"></script> -{% endblock %} +{% endblock %}
\ No newline at end of file diff --git a/templates/shared/left_sidebar.html b/templates/shared/left_sidebar.html index c687ef34..ad049e1b 100644 --- a/templates/shared/left_sidebar.html +++ b/templates/shared/left_sidebar.html @@ -1,11 +1,16 @@ {% load static %} {% if not user.is_authenticated %} - <link rel="stylesheet" href="{% static 'css/login-area.css' %}" /> + <link rel="stylesheet" href="{% static 'css/shared/login-area.css' %}" /> + {% if request.LANGUAGE_CODE == 'ja' %} + <link rel="stylesheet" href="{% static 'css/ja/login-area.css' %}" /> + {% else %} + <link rel="stylesheet" href="{% static 'css/en/login-area.css' %}" /> + {% endif %} <div id="login-area"> <form method="post" action="#" id="login-form"> <input type="hidden" name="csrfmiddlewaretoken" value="{{ csrf_token }}" /> - <input type="text" id="username" name="username" placeholder="Username" autocomplete="off" value="{{ request.GET.username }}" /> - <input type="password" id="password" name="password" placeholder="Password" autocomplete="off" /> + <input type="text" id="username" name="username" placeholder="{% if request.LANGUAGE_CODE == 'ja' %}ユーザー名{% else %}Username{% endif %}" autocomplete="off" value="{{ request.GET.username }}" /> + <input type="password" id="password" name="password" placeholder="{% if request.LANGUAGE_CODE == 'ja' %}パスワード{% else %}Password{% endif %}" autocomplete="off" /> <input type="hidden" name="next" value="{{ request.path }}" /> <input type="submit" value="" /> </form> @@ -13,3 +18,19 @@ <a href="#" id="forgot-password-button"></a> </div> {% endif %} + +<div style="display: flex;"> + <img src="https://media2.giphy.com/media/v1.Y2lkPTc5MGI3NjExbjZscHIzaDFmbDNwc2xkaWwxMmNrNGJ5eDd4aGowbTZkb2F3dXF4MCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9cw/AqcfW6opza0r1eznPc/giphy.webp" + alt="language change animation" width="24px" height="24px" style="margin-right: 10px;" /> + <a href="" onclick="changeLanguage({% if request.LANGUAGE_CODE == 'ja' %}'en'{% else %}'ja'{% endif %})"> + {% if request.LANGUAGE_CODE == 'ja' %}English{% else %}日本語{% endif %} + </a> +</div> + +<script> + function changeLanguage(language) { + document.cookie = `site_language=${language};path=/`; + location.reload(); + } +</script> + |
