-
Notifications
You must be signed in to change notification settings - Fork 429
Expand file tree
/
Copy pathindex.vue
More file actions
1353 lines (1275 loc) · 45.2 KB
/
index.vue
File metadata and controls
1353 lines (1275 loc) · 45.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<template>
<div
ref="scrollListener"
data-pyro
class="servers-hero relative isolate -mt-44 h-full min-h-screen pt-8"
>
<ModrinthServersPurchaseModal
v-if="customer"
:key="`purchase-modal-${customer.id}`"
ref="purchaseModal"
:publishable-key="config.public.stripePublishableKey"
:initiate-payment="
async (body) => await client.labrinth.billing_internal.initiatePayment(body)
"
:available-products="pyroProducts"
:on-error="handleError"
:customer="customer"
:payment-methods="paymentMethods"
:currency="selectedCurrency"
:return-url="`${config.public.siteUrl}/hosting/manage`"
:server-name="`${auth?.user?.username}'s server`"
:out-of-stock-url="outOfStockUrl"
:fetch-capacity-statuses="fetchCapacityStatuses"
:pings="regionPings"
:regions="regions"
:refresh-payment-methods="fetchPaymentData"
:fetch-stock="fetchStock"
:affiliate-code="affiliateCode"
/>
<section
class="mx-auto mt-32 flex min-h-[calc(80vh-0px)] max-w-7xl flex-col justify-center px-5 sm:mt-20 sm:min-h-[calc(100vh-0px)] sm:pl-10 lg:pl-3"
>
<div class="z-[5] flex w-full flex-col gap-8">
<div class="flex flex-col gap-4">
<div
class="relative h-fit w-fit rounded-full bg-highlight-green px-3 py-1 text-sm font-bold text-brand backdrop-blur-lg"
>
{{ formatMessage(commonMessages.betaRelease) }}
</div>
<h1 class="relative m-0 max-w-3xl text-3xl font-bold !leading-[110%] md:text-6xl">
{{ formatMessage(messages.hostWithModrinth) }}
</h1>
</div>
<h2
class="relative m-0 max-w-2xl text-base font-normal leading-[155%] text-secondary md:text-[1.2rem]"
>
{{ formatMessage(messages.hostingDescription) }}
</h2>
<div class="relative flex w-full flex-wrap items-center gap-8 align-middle sm:w-fit">
<div
class="flex w-full flex-col items-center gap-5 text-center align-middle sm:w-fit sm:flex-row"
>
<ButtonStyled color="brand" size="large">
<nuxt-link class="w-fit" to="#plan">
<GameIcon aria-hidden="true" />
{{
hasServers
? formatMessage(messages.startANewServer)
: formatMessage(messages.startYourServer)
}}
</nuxt-link>
</ButtonStyled>
<ButtonStyled v-if="hasServers" type="outlined" size="large">
<nuxt-link class="w-fit" to="/hosting/manage">
<BoxIcon aria-hidden="true" /> {{ formatMessage(messages.manageYourServers) }}
</nuxt-link>
</ButtonStyled>
</div>
</div>
</div>
<div
class="absolute left-[55%] top-56 z-[5] hidden h-full max-h-[calc(100vh-10rem)] w-full rotate-1 xl:block"
>
<img
src="https://cdn.modrinth.com/servers/panel-right-dark.webp"
alt=""
aria-hidden="true"
class="pointer-events-none h-full w-fit select-none"
/>
</div>
<div
class="top-26 pointer-events-none absolute left-0 z-[4] flex h-screen w-full flex-row items-end gap-24 sm:-right-1/4 sm:top-14"
>
<div
class="pointer-events-none absolute left-0 right-0 top-8 max-h-[90%] overflow-hidden sm:top-28 sm:mt-0"
style="mask-image: linear-gradient(black, transparent 80%)"
>
<img
src="https://cdn.modrinth.com/servers/bigrinth.webp"
alt=""
aria-hidden="true"
class="pointer-events-none w-full animate-spin select-none p-4 opacity-50"
style="
animation-duration: 172s !important;
animation-timing-function: linear;
animation-iteration-count: infinite;
"
/>
</div>
</div>
</section>
<section
class="relative flex flex-col bg-[radial-gradient(65%_50%_at_50%_-10%,var(--color-brand-highlight)_0%,var(--color-accent-contrast)_100%)] px-3 pt-24 md:pt-48"
>
<div class="faded-brand-line absolute left-0 top-0 h-[1px] w-full"></div>
<div class="relative mx-auto flex w-full max-w-7xl flex-col gap-8">
<div
class="relative w-fit rounded-full bg-highlight-green px-3 py-1 text-sm font-bold text-brand backdrop-blur-lg"
>
{{ formatMessage(messages.whyModrinthHosting) }}
</div>
<h1 class="relative m-0 max-w-2xl text-4xl leading-[120%] md:text-7xl">
{{ formatMessage(messages.whyHeading) }}
</h1>
<h2
class="relative m-0 max-w-2xl text-base font-normal leading-[155%] text-secondary md:text-[18px]"
>
{{ formatMessage(messages.whyDescription) }}
</h2>
<img
src="https://cdn.modrinth.com/servers/excitement.webp"
alt=""
class="absolute right-14 top-0 hidden max-w-[360px] lg:block"
/>
<div class="relative grid w-full grid-cols-1 gap-8 lg:grid-cols-2">
<div class="relative flex flex-col gap-4 rounded-2xl bg-bg p-6 text-left md:p-12">
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="size-8 text-brand"
>
<path
d="M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z"
/>
<rect x="3" y="14" width="7" height="7" rx="1" />
<circle cx="17.5" cy="17.5" r="3.5" />
</svg>
<h2 class="m-0 text-lg font-bold">{{ formatMessage(messages.whereModsAre) }}</h2>
<h3 class="m-0 text-base font-normal text-secondary">
{{ formatMessage(messages.whereModsAreDescription) }}
</h3>
</div>
<div class="relative flex flex-col gap-4 rounded-2xl bg-bg p-6 text-left md:p-12">
<LoaderIcon loader="fabric" class="size-8 text-brand" />
<h2 class="m-0 text-lg font-bold">{{ formatMessage(messages.yourFavoriteMods) }}</h2>
<h3 class="m-0 text-base font-normal text-secondary">
{{ formatMessage(messages.yourFavoriteModsDescription) }}
</h3>
</div>
</div>
<div class="relative">
<img
src="https://cdn.modrinth.com/servers/installation-dark.webp"
alt=""
class="hidden w-full rounded-2xl sm:block"
/>
</div>
<div class="grid w-full grid-cols-1 gap-8 lg:grid-cols-3">
<div class="flex flex-col gap-4 rounded-2xl bg-bg p-6 text-left md:p-12">
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="size-8 text-brand"
>
<rect width="20" height="16" x="2" y="4" rx="2" />
<path d="M6 8h.01" />
<path d="M10 8h.01" />
<path d="M14 8h.01" />
</svg>
<h2 class="m-0 text-lg font-bold">{{ formatMessage(messages.allOnModrinth) }}</h2>
<h3 class="m-0 text-base font-normal text-secondary">
{{ formatMessage(messages.allOnModrinthDescription) }}
</h3>
</div>
<div class="relative flex flex-col gap-4 rounded-2xl bg-bg p-6 text-left md:p-12">
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="size-8 text-brand"
>
<polygon points="13 19 22 12 13 5 13 19" />
<polygon points="2 19 11 12 2 5 2 19" />
</svg>
<h2 class="m-0 text-lg font-bold">
{{ formatMessage(messages.modernReliableHosting) }}
</h2>
<h3 class="m-0 text-base font-normal text-secondary">
<IntlFormatted :message-id="messages.modernReliableHostingDescription">
<template #contrast="{ children }">
<span class="text-contrast"><component :is="() => children" /></span>
</template>
</IntlFormatted>
</h3>
</div>
<div class="relative flex flex-col gap-4 rounded-2xl bg-bg p-6 text-left md:p-12">
<ServerIcon class="size-8 text-brand" />
<h2 class="m-0 text-lg font-bold">{{ formatMessage(messages.consistentlyFast) }}</h2>
<h3 class="m-0 text-base font-normal text-secondary">
{{ formatMessage(messages.consistentlyFastDescription) }}
</h3>
</div>
</div>
</div>
</section>
<section
class="relative mt-24 flex flex-col bg-[radial-gradient(65%_50%_at_50%_-10%,var(--color-brand-highlight)_0%,var(--color-accent-contrast)_100%)] px-3 pt-24 md:mt-48 md:pt-48"
>
<div class="faded-brand-line absolute left-0 top-0 h-[1px] w-full"></div>
<div class="relative mx-auto flex w-full max-w-7xl flex-col gap-8">
<div
class="relative w-fit rounded-full bg-highlight-green px-3 py-1 text-sm font-bold text-brand backdrop-blur-lg"
>
{{ formatMessage(messages.includedWithYourServer) }}
</div>
<h1 class="relative m-0 max-w-2xl text-4xl leading-[120%] md:text-7xl">
{{ formatMessage(messages.includedHeading) }}
</h1>
<h2
class="relative m-0 max-w-xl text-base font-normal leading-[155%] text-secondary md:text-[18px]"
>
{{ formatMessage(messages.includedDescription) }}
</h2>
<img
src="https://cdn.modrinth.com/servers/waving.webp"
alt=""
class="absolute right-8 top-40 hidden max-w-[480px] lg:block"
/>
<div class="grid grid-cols-1 gap-9 lg:grid-cols-2">
<div class="grid w-full grid-cols-1 gap-8">
<div class="relative flex flex-col gap-4 rounded-2xl bg-bg p-6 text-left md:p-12">
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="size-8 text-brand"
>
<circle cx="12" cy="12" r="10" />
<path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" />
<path d="M2 12h20" />
</svg>
<h2 class="m-0 text-lg font-bold">{{ formatMessage(messages.customUrl) }}</h2>
<h3 class="m-0 text-base font-normal text-secondary">
<IntlFormatted :message-id="messages.customUrlDescription">
<template #contrast="{ children }">
<span class="text-contrast"><component :is="() => children" /></span>
</template>
</IntlFormatted>
</h3>
<div
aria-hidden="true"
class="ooh-shiny absolute right-4 top-4 flex items-center justify-center rounded-full bg-bg-raised p-4"
>
<span class="font-bold text-contrast">{{ currentText }}</span
>.modrinth.gg
</div>
</div>
<div class="relative flex flex-col gap-4 rounded-2xl bg-bg p-6 text-left md:p-12">
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="size-8 text-brand"
>
<path d="M12 13v8" />
<path d="M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242" />
<path d="m8 17 4-4 4 4" />
</svg>
<h2 class="m-0 text-lg font-bold">{{ formatMessage(messages.backupsIncluded) }}</h2>
<h3 class="m-0 text-base font-normal text-secondary">
{{ formatMessage(messages.backupsIncludedDescription) }}
</h3>
</div>
</div>
<div
style="
background: radial-gradient(
86.12% 101.64% at 95.97% 94.07%,
rgba(27, 217, 106, 0.23) 0%,
rgba(14, 115, 56, 0.2) 100%
);
border: 1px solid rgba(12, 107, 52, 0.55);
box-shadow: 0px 12px 38.1px rgba(27, 217, 106, 0.13);
"
class="relative flex flex-col gap-4 overflow-hidden rounded-2xl p-6 text-left sm:backdrop-blur-xl md:p-12"
>
<h2 class="m-0 text-lg font-bold">{{ formatMessage(messages.fileManager) }}</h2>
<h3 class="m-0 text-base font-normal">
{{ formatMessage(messages.fileManagerDescription) }}
</h3>
<img
src="https://cdn.modrinth.com/servers/content-dark.webp"
alt=""
class="absolute -bottom-12 -right-[15%] hidden max-w-2xl rounded-2xl bg-brand p-4 lg:block"
/>
</div>
</div>
<div class="grid w-full grid-cols-1 gap-8 lg:grid-cols-2">
<div class="relative flex flex-col gap-4 rounded-2xl bg-bg p-6 text-left md:p-12">
<TerminalSquareIcon class="size-8 text-brand" />
<h2 class="m-0 text-lg font-bold">
{{ formatMessage(messages.powerfulConsole) }}
</h2>
<h3 class="m-0 text-base font-normal text-secondary">
{{ formatMessage(messages.powerfulConsoleDescription) }}
</h3>
</div>
<div class="relative flex flex-col gap-4 rounded-2xl bg-bg p-6 text-left md:p-12">
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="size-8 text-brand"
>
<path
d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z"
/>
<path
d="M12 5 9.04 7.96a2.17 2.17 0 0 0 0 3.08c.82.82 2.13.85 3 .07l2.07-1.9a2.82 2.82 0 0 1 3.79 0l2.96 2.66"
/>
<path d="m18 15-2-2" />
<path d="m15 18-2-2" />
</svg>
<h2 class="m-0 text-lg font-bold">{{ formatMessage(messages.help) }}</h2>
<h3 class="m-0 text-base font-normal text-secondary">
{{ formatMessage(messages.helpDescription) }}
</h3>
</div>
</div>
<div class="grid w-full grid-cols-1 gap-8 lg:grid-cols-2">
<div class="relative flex flex-col gap-4 rounded-2xl bg-bg p-6 text-left md:p-12">
<TransferIcon class="size-8 text-brand" />
<h2 class="m-0 text-lg font-bold">{{ formatMessage(messages.sftpAccess) }}</h2>
<h3 class="m-0 text-base font-normal text-secondary">
{{ formatMessage(messages.sftpAccessDescription) }}
</h3>
</div>
<div class="relative flex flex-col gap-4 rounded-2xl bg-bg p-6 text-left md:p-12">
<VersionIcon class="size-8 text-brand" />
<h2 class="m-0 text-lg font-bold">{{ formatMessage(messages.advancedNetworking) }}</h2>
<h3 class="m-0 text-base font-normal text-secondary">
{{ formatMessage(messages.advancedNetworkingDescription) }}
</h3>
</div>
</div>
<div class="relative flex flex-col gap-4 rounded-2xl bg-bg p-6 text-left md:p-12">
<h1 class="m-0 text-lg font-bold">{{ formatMessage(messages.faqHeading) }}</h1>
<div class="details-hide flex flex-col gap-1">
<details nav-hash="cpus" class="group" :open="$route.hash === '#cpus'">
<summary class="flex cursor-pointer items-center py-3 font-medium text-contrast">
<span class="mr-2 transition-transform duration-200 group-open:rotate-90">
<RightArrowIcon />
</span>
{{ formatMessage(messages.faqCpuKind) }}
</summary>
<p class="m-0 ml-6 leading-[160%]">
{{ formatMessage(messages.faqCpuKindAnswer) }}
</p>
</details>
<details nav-hash="cpu-burst" class="group" :open="$route.hash === '#cpu-burst'">
<summary class="flex cursor-pointer items-center py-3 font-medium text-contrast">
<span class="mr-2 transition-transform duration-200 group-open:rotate-90">
<RightArrowIcon />
</span>
{{ formatMessage(messages.faqBurstThreads) }}
</summary>
<p class="m-0 ml-6 leading-[160%]">
{{ formatMessage(messages.faqBurstThreadsAnswer) }}
</p>
</details>
<details nav-hash="ddos" class="group" :open="$route.hash === '#ddos'">
<summary class="flex cursor-pointer items-center py-3 font-medium text-contrast">
<span class="mr-2 transition-transform duration-200 group-open:rotate-90">
<RightArrowIcon />
</span>
{{ formatMessage(messages.faqDDOSProtection) }}
</summary>
<p class="m-0 ml-6 leading-[160%]">
{{ formatMessage(messages.faqDDOSProtectionAnswer) }}
</p>
</details>
<details nav-hash="region" class="group" :open="$route.hash === '#region'">
<summary class="flex cursor-pointer items-center py-3 font-medium text-contrast">
<span class="mr-2 transition-transform duration-200 group-open:rotate-90">
<RightArrowIcon />
</span>
{{ formatMessage(messages.faqLocation) }}
</summary>
<p class="m-0 ml-6 leading-[160%]">
{{ formatMessage(messages.faqLocationAnswer) }}
</p>
</details>
<details nav-hash="storage" class="group" :open="$route.hash === '#storage'">
<summary class="flex cursor-pointer items-center py-3 font-medium text-contrast">
<span class="mr-2 transition-transform duration-200 group-open:rotate-90">
<RightArrowIcon />
</span>
{{ formatMessage(messages.faqIncreaseStorage) }}
</summary>
<p class="m-0 ml-6 leading-[160%]">
{{ formatMessage(messages.faqIncreaseStorageAnswer) }}
</p>
</details>
<details nav-hash="performance" class="group" :open="$route.hash === '#performance'">
<summary class="flex cursor-pointer items-center py-3 font-medium text-contrast">
<span class="mr-2 transition-transform duration-200 group-open:rotate-90">
<RightArrowIcon />
</span>
{{ formatMessage(messages.faqHowFast) }}
</summary>
<p class="m-0 ml-6 leading-[160%]">
{{ formatMessage(messages.faqHowFastAnswer) }}
</p>
<p class="mb-0 ml-6 mt-3 leading-[160%]">
{{ formatMessage(messages.faqHowFastAnswerTwo) }}
</p>
</details>
<details nav-hash="prices" class="group" :open="$route.hash === '#prices'">
<summary class="flex cursor-pointer items-center py-3 font-medium text-contrast">
<span class="mr-2 transition-transform duration-200 group-open:rotate-90">
<RightArrowIcon />
</span>
{{ formatMessage(messages.faqCurrency) }}
</summary>
<p class="m-0 ml-6 leading-[160%]">
{{ formatMessage(messages.faqCurrencyAnswer) }}
</p>
</details>
<details nav-hash="versions" class="group" :open="$route.hash === '#versions'">
<summary class="flex cursor-pointer items-center py-3 font-medium text-contrast">
<span class="mr-2 transition-transform duration-200 group-open:rotate-90">
<RightArrowIcon />
</span>
{{ formatMessage(messages.faqVersionsLoaders) }}
</summary>
<p class="m-0 ml-6 leading-[160%]">
{{ formatMessage(messages.faqVersionsLoadersAnswer) }}
</p>
<p class="m-0 ml-6 mt-3 leading-[160%]">
{{ formatMessage(messages.faqVersionsLoadersAnswerTwo) }}
</p>
</details>
</div>
</div>
</div>
</section>
<section
class="relative mt-24 flex flex-col bg-[radial-gradient(65%_50%_at_50%_-10%,var(--color-brand-highlight)_0%,var(--color-accent-contrast)_100%)] px-3 pt-24 md:mt-48 md:pt-48"
>
<div class="faded-brand-line absolute left-0 top-0 h-[1px] w-full"></div>
<div
nav-hash="plan"
class="mx-auto flex w-full max-w-7xl flex-col items-center gap-8 text-center"
>
<h1 class="relative m-0 text-4xl leading-[120%] md:text-7xl">
{{ formatMessage(messages.serverForEveryone) }}
</h1>
<p class="m-0 flex items-center gap-1">
{{ formatMessage(messages.availableLocations) }}
</p>
<div class="grid grid-cols-[1fr_auto_1fr] items-center gap-3">
<span></span>
<OptionGroup v-slot="{ option }" v-model="billingPeriod" :options="billingPeriods">
<template v-if="option === 'monthly'">
{{ formatMessage(messages.payMonthly) }}
</template>
<span v-else-if="option === 'quarterly'">
{{ formatMessage(messages.payQuarterly) }}
</span>
<span v-else-if="option === 'yearly'"> {{ formatMessage(messages.payYearly) }} </span>
</OptionGroup>
<template v-if="billingPeriods.includes('quarterly')">
<button
v-if="billingPeriod !== 'quarterly'"
class="bg-transparent p-0 text-sm font-medium text-brand hover:underline active:scale-95"
@click="billingPeriod = 'quarterly'"
>
{{ formatMessage(messages.saveWithQuarterly) }}
</button>
<span v-else class="bg-transparent p-0 text-sm font-medium text-brand">
{{ formatMessage(messages.saveWithQuarterly) }}
</span>
</template>
<span v-else></span>
</div>
<MedalPlanPromotion v-if="flags.enableMedalPromotion" />
<ul class="m-0 flex w-full grid-cols-3 flex-col gap-8 p-0 lg:grid">
<ServerPlanSelector
:capacity="capacityStatuses?.small?.available"
plan="small"
:ram="plans.small.metadata.ram"
:storage="plans.small.metadata.storage"
:cpus="plans.small.metadata.cpu"
:price="
plans.small?.prices?.find((x) => x.currency_code === selectedCurrency)?.prices
?.intervals?.[billingPeriod]
"
:interval="billingPeriod"
:currency="selectedCurrency"
:is-usa="country.toLowerCase() === 'us'"
@select="selectProduct('small')"
@scroll-to-faq="scrollToFaq()"
/>
<ServerPlanSelector
:capacity="capacityStatuses?.medium?.available"
plan="medium"
:ram="plans.medium.metadata.ram"
:storage="plans.medium.metadata.storage"
:cpus="plans.medium.metadata.cpu"
:price="
plans.medium?.prices?.find((x) => x.currency_code === selectedCurrency)?.prices
?.intervals?.[billingPeriod]
"
:interval="billingPeriod"
:currency="selectedCurrency"
:is-usa="country.toLowerCase() === 'us'"
@select="selectProduct('medium')"
@scroll-to-faq="scrollToFaq()"
/>
<ServerPlanSelector
:capacity="capacityStatuses?.large?.available"
:ram="plans.large.metadata.ram"
:storage="plans.large.metadata.storage"
:cpus="plans.large.metadata.cpu"
:price="
plans.large?.prices?.find((x) => x.currency_code === selectedCurrency)?.prices
?.intervals?.[billingPeriod]
"
:currency="selectedCurrency"
:is-usa="country.toLowerCase() === 'us'"
plan="large"
:interval="billingPeriod"
@select="selectProduct('large')"
@scroll-to-faq="scrollToFaq()"
/>
</ul>
<div
class="mb-24 flex w-full flex-col items-start justify-between gap-4 rounded-2xl bg-bg p-8 text-left lg:flex-row lg:gap-0"
>
<div class="flex flex-col gap-4">
<h1 class="m-0">{{ formatMessage(messages.knowWhatYouNeed) }}</h1>
<h2 class="m-0 text-base font-normal text-primary">
{{ formatMessage(messages.pickCustomizedPlan) }}
</h2>
</div>
<div
class="experimental-styles-within flex w-full flex-col-reverse gap-2 md:w-auto md:flex-col md:items-center"
>
<ButtonStyled color="standard" size="large">
<button class="w-full md:w-fit" @click="selectProduct('custom')">
{{ formatMessage(messages.getStartedButton) }}
<RightArrowIcon class="shrink-0" />
</button>
</ButtonStyled>
<p v-if="lowestPrice" class="m-0 text-sm">
{{
formatMessage(messages.startingAtPrice, {
price: formatPrice(lowestPrice, selectedCurrency, true),
})
}}
</p>
</div>
</div>
</div>
</section>
</div>
</template>
<script setup>
import {
BoxIcon,
GameIcon,
RightArrowIcon,
ServerIcon,
TerminalSquareIcon,
TransferIcon,
VersionIcon,
} from '@modrinth/assets'
import {
ButtonStyled,
commonMessages,
defineMessages,
injectModrinthClient,
injectNotificationManager,
IntlFormatted,
LoaderIcon,
ModrinthServersPurchaseModal,
useFormatPrice,
useVIntl,
} from '@modrinth/ui'
import { monthsInInterval } from '@modrinth/ui/src/utils/billing.ts'
import { useQuery } from '@tanstack/vue-query'
import { computed } from 'vue'
import OptionGroup from '~/components/ui/OptionGroup.vue'
import MedalPlanPromotion from '~/components/ui/servers/marketing/MedalPlanPromotion.vue'
import ServerPlanSelector from '~/components/ui/servers/marketing/ServerPlanSelector.vue'
import { products } from '~/generated/state.json'
const route = useRoute()
const router = useRouter()
const client = injectModrinthClient()
const { setAffiliateCode, getAffiliateCode } = useAffiliates()
const affiliateCode = ref(route.query.afl ?? null)
if (affiliateCode.value) {
router.replace({
query: {
...route.query,
afl: undefined,
},
})
setAffiliateCode(affiliateCode.value)
} else {
affiliateCode.value = getAffiliateCode()
}
const { addNotification } = injectNotificationManager()
const { formatMessage } = useVIntl()
const formatPrice = useFormatPrice()
const flags = useFeatureFlags()
const messages = defineMessages({
hostWithModrinth: {
id: 'hosting-marketing.hero.host-with-modrinth',
defaultMessage: 'Host your next server with Modrinth Hosting',
},
hostingDescription: {
id: 'hosting-marketing.hero.hosting-description',
defaultMessage:
'Modrinth Hosting is the easiest way to host your own Minecraft: Java Edition server. Seamlessly install and play your favorite mods and modpacks, all within the Modrinth platform.',
},
startANewServer: {
id: 'hosting-marketing.hero.button.start-a-new-server',
defaultMessage: 'Start a new server',
},
startYourServer: {
id: 'hosting-marketing.hero.button.start-your-server',
defaultMessage: 'Start your server',
},
manageYourServers: {
id: 'hosting-marketing.hero.button.manage-your-servers',
defaultMessage: 'Manage your servers',
},
whyModrinthHosting: {
id: 'hosting-marketing.why.why-modrinth-hosting',
defaultMessage: 'Why Modrinth Hosting?',
},
whyHeading: {
id: 'hosting-marketing.why.heading',
defaultMessage: "Find a modpack. Now it's a server.",
},
whyDescription: {
id: 'hosting-marketing.why.description',
defaultMessage:
"Choose from the thousands of modpacks on Modrinth or create your own. Invite your friends when you're ready to play.",
},
whereModsAre: {
id: 'hosting-marketing.why.where-mods-are',
defaultMessage: 'Play where your mods are',
},
whereModsAreDescription: {
id: 'hosting-marketing.why.where-mods-are.description',
defaultMessage:
'Modrinth Hosting seamlessly integrates the mod and modpack installation process into your server.',
},
yourFavoriteMods: {
id: 'hosting-marketing.why.your-favorite-mods',
defaultMessage: 'All your favorite mods',
},
yourFavoriteModsDescription: {
id: 'hosting-marketing.why.your-favorite-mods.description',
defaultMessage:
"Choose between Vanilla, Fabric, Forge, Quilt and NeoForge. If it's on Modrinth, it can run on your server.",
},
allOnModrinth: {
id: 'hosting-marketing.why.all-on-modrinth',
defaultMessage: 'Manage it all on Modrinth',
},
allOnModrinthDescription: {
id: 'hosting-marketing.why.all-on-modrinth.description',
defaultMessage:
'Your server, mods, players, and more are all on Modrinth. No need to switch between platforms.',
},
modernReliableHosting: {
id: 'hosting-marketing.why.modern-reliable-hosting',
defaultMessage: 'Experience modern, reliable hosting',
},
modernReliableHostingDescription: {
id: 'hosting-marketing.why.modern-reliable-hosting.description',
defaultMessage:
'Modrinth Hosting servers are hosted on <contrast>high-performance AMD CPUs with DDR5 RAM</contrast>, running on custom-built software to ensure your server performs smoothly.',
},
consistentlyFast: {
id: 'hosting-marketing.why.consistently-fast',
defaultMessage: 'Consistently fast',
},
consistentlyFastDescription: {
id: 'hosting-marketing.why.consistently-fast.description',
defaultMessage:
'Our infrastructure is never overloaded, meaning each server hosted with Modrinth always runs at its full performance.',
},
includedWithYourServer: {
id: 'hosting-marketing.included.with-your-server',
defaultMessage: 'Included with your server',
},
includedHeading: {
id: 'hosting-marketing.included.heading',
defaultMessage: 'Comes with all the features you need.',
},
includedDescription: {
id: 'hosting-marketing.included.description',
defaultMessage:
'Included with every server is a suite of features designed to provide a hosting experience that only Modrinth can offer.',
},
customUrl: {
id: 'hosting-marketing.included.custom-url',
defaultMessage: 'Custom URL',
},
customUrlDescription: {
id: 'hosting-marketing.included.custom-url.description',
defaultMessage: 'Share your server with a custom <contrast>modrinth.gg</contrast> URL.',
},
backupsIncluded: {
id: 'hosting-marketing.included.backups-included',
defaultMessage: 'Backups included',
},
backupsIncludedDescription: {
id: 'hosting-marketing.included.backups-included.description',
defaultMessage: 'Every server comes with 15 backups stored securely off-site.',
},
fileManager: {
id: 'hosting-marketing.included.file-manager',
defaultMessage: 'Easy to use file manager',
},
fileManagerDescription: {
id: 'hosting-marketing.included.file-manager.description',
defaultMessage: 'Search, manage, edit, and upload files directly to your server with ease.',
},
powerfulConsole: {
id: 'hosting-marketing.included.powerful-console',
defaultMessage: 'A powerful console, server properties manager, and more',
},
powerfulConsoleDescription: {
id: 'hosting-marketing.included.powerful-console.description',
defaultMessage: 'Modrinth Hosting comes with powerful tools to manage your server.',
},
help: {
id: 'hosting-marketing.included.help',
defaultMessage: 'Help when you need it',
},
helpDescription: {
id: 'hosting-marketing.included.help.description',
defaultMessage: 'Reach out to the Modrinth team for help with your server at any time.',
},
sftpAccess: {
id: 'hosting-marketing.included.sftp-access',
defaultMessage: 'SFTP access',
},
sftpAccessDescription: {
id: 'hosting-marketing.included.sftp-access.description',
defaultMessage: "Access your server's files directly with SFTP built into Modrinth Hosting.",
},
advancedNetworking: {
id: 'hosting-marketing.included.advanced-networking',
defaultMessage: 'Advanced networking management',
},
advancedNetworkingDescription: {
id: 'hosting-marketing.included.advanced-networking.description',
defaultMessage:
'Add your own domain to your server, reserve up to 15 ports for mods that require them, and more.',
},
faqHeading: {
id: 'hosting-marketing.faq.heading',
defaultMessage: 'Frequently Asked Questions',
},
faqCpuKind: {
id: 'hosting-marketing.faq.cpu-kind',
defaultMessage: 'What kind of CPUs do Modrinth Hosting servers run on?',
},
faqCpuKindAnswer: {
id: 'hosting-marketing.faq.cpu-kind.answer',
defaultMessage:
'Modrinth Hosting servers are powered by AMD Ryzen 7900 and 7950X3D equivalent CPUs at 5+ GHz, paired with DDR5 memory.',
},
faqBurstThreads: {
id: 'hosting-marketing.faq.burst-threads',
defaultMessage: 'How do CPU burst threads work?',
},
faqBurstThreadsAnswer: {
id: 'hosting-marketing.faq.burst-threads.answer',
defaultMessage:
'When your server is under heavy load, we temporarily give it access to additional CPU threads to help mitigate lag spikes and instability. This helps prevent the TPS from going below 20, ensuring the smoothest experience possible. Since those extra CPU threads are only shortly available during high load periods, they might not show up in Spark reports or other profiling tools.',
},
faqDDOSProtection: {
id: 'hosting-marketing.faq.ddos-protection',
defaultMessage: 'Do Modrinth Hosting servers have DDoS protection?',
},
faqDDOSProtectionAnswer: {
id: 'hosting-marketing.faq.ddos-protection.answer',
defaultMessage:
'Yes. All Modrinth Hosting servers come with DDoS protection, with up to 17 Tbps capacity in some locations.',
},
faqLocation: {
id: 'hosting-marketing.faq.location',
defaultMessage: 'Where are Modrinth Hosting servers located? Can I choose a region?',
},
faqLocationAnswer: {
id: 'hosting-marketing.faq.location.answer',
defaultMessage:
"We have servers available in North America, Europe, and Southeast Asia at the moment that you can choose upon purchase. More regions to come in the future! If you'd like to switch your region, please contact support.",
},
faqIncreaseStorage: {
id: 'hosting-marketing.faq.increase-storage',
defaultMessage: 'Can I increase the storage on my server?',
},
faqIncreaseStorageAnswer: {
id: 'hosting-marketing.faq.increase-storage.answer',
defaultMessage:
'Yes, storage can be increased on your server at no additional cost. If you need more storage, reach out to Modrinth Support.',
},
faqHowFast: {
id: 'hosting-marketing.faq.how-fast',
defaultMessage: 'How fast are Modrinth Hosting servers?',
},
faqHowFastAnswer: {
id: 'hosting-marketing.faq.how-fast.answer.one',
defaultMessage:
"Modrinth Hosting servers are hosted on very modern high-performance hardware, but it's tough to say how exactly that will translate into how fast your server will run because there are so many factors that affect it, such as the mods, data packs, or plugins you're running on your server, and even user behavior.",
},
faqHowFastAnswerTwo: {
id: 'hosting-marketing.faq.how-fast.answer.two',
defaultMessage:
"Most performance issues that arise tend to be the fault of an unoptimized modpack, mod, data pack, or plugin that causes the server to lag. Since our servers are very high-end, you shouldn't run into much trouble as long as you pick an appropriate plan for the content you're running on the server.",
},
faqCurrency: {
id: 'hosting-marketing.faq.currency',
defaultMessage: 'What currency are the prices in?',
},
faqCurrencyAnswer: {
id: 'hosting-marketing.faq.currency.answer',
defaultMessage: 'All prices are listed in United States Dollars (USD).',
},
faqVersionsLoaders: {
id: 'hosting-marketing.faq.versions-loaders',
defaultMessage: 'What Minecraft versions and loaders can be used?',
},
faqVersionsLoadersAnswer: {
id: 'hosting-marketing.faq.versions-loaders.answer.one',
defaultMessage:
'Modrinth Hosting servers can run any version of Minecraft: Java Edition going all the way back to version 1.2.5, including snapshot versions.',
},
faqVersionsLoadersAnswerTwo: {
id: 'hosting-marketing.faq.versions-loaders.answer.two',
defaultMessage:
'We also support a wide range of mod and plugin loaders, including Fabric, Quilt, Forge, and NeoForge for mods, as well as Paper and Purpur for plugins. Availability depends on whether the mod or plugin loader supports the selected Minecraft version.',
},
serverForEveryone: {
id: 'hosting-marketing.server-for-everyone',
defaultMessage: "There's a server for everyone",
},
availableLocations: {
id: 'hosting-marketing.available-locations',
defaultMessage: 'Available in North America, Europe, and Southeast Asia for wide coverage.',
},
payMonthly: {
id: 'hosting-marketing.billing.monthly',
defaultMessage: 'Pay monthly',
},
payQuarterly: {
id: 'hosting-marketing.billing.quarterly',
defaultMessage: 'Pay quarterly',
},
payYearly: {
id: 'hosting-marketing.billing.yearly',
defaultMessage: 'Pay yearly',
},
saveWithQuarterly: {
id: 'hosting-marketing.billing.save-with-quarterly',
defaultMessage: 'Save 16% with quarterly billing!',
},
knowWhatYouNeed: {
id: 'hosting-marketing.know-what-you-need',
defaultMessage: 'Know exactly what you need?',
},
pickCustomizedPlan: {
id: 'hosting-marketing.pick-customized-plan',
defaultMessage: 'Pick a customized plan with just the specs you need.',
},
getStartedButton: {
id: 'hosting-marketing.get-started',
defaultMessage: 'Get started',
},
startingAtPrice: {
id: 'hosting-marketing.billing.starting-at',
defaultMessage: 'Starting at {price} / month',
},
})
const billingPeriods = ref(['monthly', 'quarterly'])
const billingPeriod = ref(billingPeriods.value.includes('quarterly') ? 'quarterly' : 'monthly')
const pyroProducts = products
.filter((p) => p.metadata.type === 'pyro')
.sort((a, b) => a.metadata.ram - b.metadata.ram)
const pyroPlanProducts = pyroProducts.filter(
(p) => p.metadata.ram === 4096 || p.metadata.ram === 6144 || p.metadata.ram === 8192,
)
const lowestPrice = computed(() => {
const amount = pyroProducts[0]?.prices?.find(
(price) => price.currency_code === selectedCurrency.value,
)?.prices?.intervals?.[billingPeriod.value]
return amount ? amount / monthsInInterval[billingPeriod.value] : undefined
})
const title = 'Modrinth Hosting'
const description =
'Start your own Minecraft server directly on Modrinth. Play your favorite mods, plugins, and datapacks — without the hassle of setup.'
useSeoMeta({
title,
description,
ogTitle: title,
ogDescription: description,
})
const auth = await useAuth()
const data = useNuxtApp()
const config = useRuntimeConfig()
const purchaseModal = ref(null)
const country = useUserCountry()
const customer = ref(null)
const paymentMethods = ref([])
const selectedProduct = ref(null)
const customServer = ref(false)
const showModal = ref(false)
const modalKey = ref(0)