From ba64160fcf53e93ee38c1a5cdbb3d901bcb7cb90 Mon Sep 17 00:00:00 2001 From: valkyrie_pilot Date: Sun, 24 Mar 2024 20:28:00 -0600 Subject: [PATCH] Fix prettier --- .prettierrc | 11 +++++++++++ package.json | 3 ++- src/index.hbs | 50 ++++++++++++++++++++++++++------------------------ 3 files changed, 39 insertions(+), 25 deletions(-) create mode 100644 .prettierrc diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..05dee64 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,11 @@ +{ + "plugins": ["prettier-plugin-jinja-template"], + "overrides": [ + { + "files": ["*.hbs"], + "options": { + "parser": "jinja-template" + } + } + ] +} diff --git a/package.json b/package.json index eb1c75f..5767bca 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "prettier-check": "prettier . --check" }, "devDependencies": { - "prettier": "^3.1.1" + "prettier": "^3.2.5", + "prettier-plugin-jinja-template": "^1.3.3" } } diff --git a/src/index.hbs b/src/index.hbs index 033bd17..538c268 100644 --- a/src/index.hbs +++ b/src/index.hbs @@ -1,4 +1,7 @@ -{% if https %} {% set scheme = "https" %} {% else %} {% set scheme = "http" %} +{% if https %} + {% set scheme = "https" %} +{% else %} + {% set scheme = "http" %} {% endif %} @@ -7,59 +10,58 @@ - + - + - + {% if ipv4 %} - Your public IP is {{ipv4}} + Your public IP is {{ ipv4 }} {% else %} - What's my IP? + What's my IP? {% endif %}
{% if ipv4 %} -
- Your public IPv4 is: {{ipv4}} -
+
+ Your public IPv4 is: {{ ipv4 }} +
{% else %} - - {% endif %} {% if ipv6 %} -
- Your public IPv6 is: {{ipv6}} -
+ + {% endif %} + {% if ipv6 %} +
+ Your public IPv6 is: {{ ipv6 }} +
{% else %} - + {% endif %}
- - + - - \ No newline at end of file +