Compare commits
2 Commits
7e7deef055
...
bc9822fd2f
| Author | SHA1 | Date | |
|---|---|---|---|
| bc9822fd2f | |||
| 6c14bd9e35 |
@@ -0,0 +1,4 @@
|
||||
node_modules/
|
||||
public/
|
||||
/package-lock.json
|
||||
resources/_gen/
|
||||
|
After Width: | Height: | Size: 19 MiB |
@@ -0,0 +1,30 @@
|
||||
---
|
||||
title: "Koh Samui & Koh Phangan"
|
||||
date: 2024-03-29T16:46:22+01:00
|
||||
draft: false
|
||||
---
|
||||
Nun sind wir in Thailand angekommen, seit etwa 2,5 Wochen. Halbzeit, da wir 5 Wochen geplant hatten. Wir haben von Frankfurt aus einen Direktflug nach Bangkok gewählt, da wir dachten ein Nachtflug ohne Unterbrechung wäre das Schlaueste mit den Kids.
|
||||
|
||||
## Koh Samui
|
||||
|
||||
Da bei Thai Airways nur in den vordersten Sitzreihen die Babykörbe eingehängt werden können, hatten wir quasi vollautomatisch einen Sitz mit Beinfreiheit. Theoretisch cool, praktisch bedeutete das auch, dass wir die Armlehnen in der Sitzreihe nicht hochklappen konnten. Dementsprechend war schon mal nix mit kuschelig auf dem Sitz schlafen. Schlaue Füchse die wir sind, haben wir uns dann einfach auf den Boden gelegt, dabei aber nicht die Rechnung mit der Stewardess gemacht, die uns vier mal geweckt und darauf hingewiesen hat, dass es nicht besonders sicher sei auf dem Boden zu schlafen. Da sie uns aber auch nicht rausschmeißen konnte, haben wir uns einfach immer wieder hingelegt. Irgendwann haben wir dann auch Nimue einfach unter Naels Körbchen versteckt, immerhin sie konnte dann verhältnismäßig ruhig schlafen.
|
||||
|
||||
Nach dieser Tortur hatten wir noch den verspäteten Anschluss nach Koh Samui genommen. Der Flug ging zum Glück schnell vorrüber. Dort angekommen war es vor allen Dingen erstmal warm und wir so fertig, dass Nimue noch am Gepäckband ein Nickerchen hingelegt hatte. Durch unseren verspäteten Flug musste leider auch der Taxifahrer lange unverrichteter Dinge am Flughafen warten, aber fuhr uns dann in unser Hotel.
|
||||
|
||||
Auf Koh Samui hatten wir das volle Programm für die Kinder ausgerollt, erstens aus der Angst heraus, sie ansonsten nicht beschäftigt zu bekommen, aber auch um den Jetlag in einfacherer Atmosphäre auszukurieren. Diese Entscheidung stellte sich auch als voller Erfolg heraus. Wir hatten neben dem obligatorischen Pool einen Indoor-Spielplatz, Outdoor-Spielplatz mit Trampolin und dementsprechend v.a. auch sehr viele andere Familien. Wie erwartet waren diese tlw. auch schon sehr weit gereist und konnten mit den heißesten Tipps zur Weiterreise aufwarten, wo es sich mit Kindern lohnt oder ggf. auch nicht lohnt.
|
||||
|
||||
Nimue hat dann mit Alex aus Berlin auch gleich eine gleichaltrige Freundin aufgegabelt mit der sie in der einen Woche, die wir dort verbrachten viele schöne Momente hatte. Sie waren viel im Pool, waren gemeinsam am Strand und etliche Stunden auf dem Indoor-Spielplatz. Wir Eltern konnten dabei immer mal wieder sogar einen Kaffee zusammen trinken. Alex hat ihr auch gleich den richtigen Umgang mit Schwimmringen und Schwimmflügeln beibringen können.
|
||||
|
||||
Von Koh Samui selbst haben wir nicht unendlich viel gesehen. Erstens machte uns natürlich die ersten Tage das Klime sowie der Jetlag zu schaffen, zweitens waren wir ohnehin nicht besonders mobil. Die Unterkunft war in laufbarer Entfernung zu einem Foodmarket und zum Fishermen's Village, wo wir dann unsere Versorgung sicherstellen konnten. Einen Tag wagten wir auch das Experiment mit zwei Rollern (Nael in der Trage, Nimue vorne zwischen den Beinen), allerdings empfand Täschi diese Form der Mobilität als nicht besonders sicher.
|
||||
|
||||
## Koh Phangan
|
||||
Nachdem die Woche herum war, wir die besten Empfehlungen der anderen Familien ausgewertet hatten und Abschiedsworte gesprochen waren, machten wir uns auf zu unserem zweiten Stop: Koh Phangan, die Nachbarinsel von Koh Samui.
|
||||
|
||||
Eine kurze Fährüber- und Taxifahrt später wurden wir mit Limonade und Wassermelone in unserer Unterkunft auf Koh Phangan begrüßt. Unser Zimmer war ein Bungalow im Palmenwald mit Poolblick aus der Hängematte von der Veranda aus. Nachdem wir zum Einen von Samui herzlich wenig gesehen hatten, und zum Anderen das was wir gesehen hatten eher nicht besonders ansprechend fanden, war Phangan eine schöne Abwechslung. Wir mieteten diesmal nur einen Roller, da wir das Experiment zu viert auf dem Gefährt wagen wollten und uns der Verkehr auf Phangan im Vergleich sehr viel entspannter vorkam. Da eine Familie auf dem Roller sich sehr schnell als genialer Einfall herausstellte, sollte dies für den weiteren Urlaub unsere Fortbewegungsart werden. Je nach geplanter Strecke war entweder Nael vorne in der Trage und Nimue zwischen uns eingequetscht oder (bei kürzeren Strecken) Nimue sogar vorne auf ihrem Lieblingsplatz mit Aussicht.
|
||||
|
||||
Alleine das auf der Insel herumcruisen bereitete schon Freude: wie geschrieben war der Verkehr entspannt, die Straßen klein und hügelig, sodass wir auch Fahrfreude durch den Palmenwald oder Dschungel verspürten. Ein Highlight auf Phangan waren der Besuch im Elephant Sanctuary, wo wir Elefanten mit Bananen und von uns selbst zubereiteten Reisball-Snacks beglücken durften. Ansonsten versuchten wir uns natürlich an den Geocaches, allerdings war die Ausbeute eher dürftig. Einmal trauten wir uns auch fast einen etwa 2 km langen Trail zu einem Strand, allerdings kamen wir leider genau in der Mittagshitze am Einstieg an, der schon so aussah als ob man ihn in unserer Verfassung mit Kind auf dem Rücken eher nicht gehen sollte. Stattdessen ließen wir es uns einfach direkt am nächsten Strand gutgehen.
|
||||
|
||||
Ansonsten waren die Tage geprägt von Pool & Spielplatz in der Anlage, und leider mussten wir viel zu schnell unsere Zelte wieder abbrechen, da wir nur 5 Tage später die Reise zum Indischen Ozean antreten wollten. Dort, auf Koh Lanta, waren wir verabredet uns mit Freunden zu treffen. Insgesamt war Phangan deutlich relaxter und schöner als Samui, trotzdem wir nur kurz bleiben konnten und damit deutlich mehr Pack- und Reisestress verbunden waren lohnte sich der kurze Abstecher. Zum Glück hatten wir uns gegen die Alternative, nämlich die Verlängerung auf Samui entschieden.
|
||||
|
||||

|
||||

|
||||
|
After Width: | Height: | Size: 7.8 MiB |
|
After Width: | Height: | Size: 1.7 MiB |
|
After Width: | Height: | Size: 2.6 MiB |
@@ -0,0 +1,43 @@
|
||||
---
|
||||
title: "Koh Lanta"
|
||||
date: 2024-04-01T17:19:10+02:00
|
||||
draft: false
|
||||
resources:
|
||||
- name: header
|
||||
src: fernweh.jpg
|
||||
---
|
||||
Von Koh Phangan nach Koh Lanta mussten wir einmal den Ozean wechseln, Koh Lanta liegt in der Andamanensee und damit am Indischen Ozean. Das erste Mal, dass ich dort meinen großen Zeh ins Wasser halten durfte. Auch der Indische Ozean ist zuallererst nass, danach salzig. Es gibt Wellen und Meeresgetier.
|
||||
|
||||
<!--more-->
|
||||
|
||||
## Insel wechsel dich
|
||||
Von Phangan aus hatten wir eine Fährüberfahrt und Van-Anschluss am Anleger gebucht. Da die meisten durchgängigen Verbindungen mit ca. 8 h Reisezeit angegeben waren, entschieden für uns für das Wohlergehen der Kinder einen Zwischenstopp einzulegen. Krabi bot sich als Ziel an, da es von dort nur ein Katzensprung nach Lanta ist, und die Reisezeit insgesamt nach Krabi mit 4,5 h überschaubar aussah. Leider machten wir die Rechnung ohne die Full Moon Party auf Phangan, die so manche Reiseplanung von uns durchkreuzte. Zum einen konnten wir ja wegen der Full Moon Party überhaupt nur so kurz auf Phangan bleiben, weil zum Vollmond jegliche Unterkunft bis auf das letzte Kellerloch ausgebucht war, zum anderen ging es sehr vielen Menschen wie uns, und die besten Verbindungen zur Flucht von der Insel waren bereits ausgebucht. Lange Rede, gar kein Sinn, die einzige Verbindung, die wir noch bekamen war also schon mit 5,5 h angesetzt. Not good, not terrible.
|
||||
|
||||
Die Fährüberfahrt aufs Festland war unspektakulär, der Vanfahrer holte uns ab, unser Gepäck fand seinen Platz und die Kinder waren erstaunlich wohlgesonnen. Nach erst so ca. 4 h sahen wir uns genötigt Nimue mit dem Tablet ruhigzustellen, was sich noch als Fehler erweisen sollte. Unseren Overlay hatten wir nicht direkt in Krabi gebucht, sondern in Ao Nang, der Tourifalle nebenan. Die Karte versprach uns eine direkte Fähre von dort nach Lanta. Ungelogen 45 Sekunden vor Ankunft in unserem Hotel entschied sich Nimue spontan nochmal das Auto mit der Wassermelone in ihrem Magen zu dekorieren. Scheinbar war der fehlende Kindersitz, die kurvigen Straßen und Peppa Wutz in Dauerschleife eine teuflische Mischung, die zu diesem Malheur führte. Nimue hat ihr erstes ernstzunehmendes Kotzen allerdings mit viel Würde getragen. Untergebracht waren wir im Kokotel. Schön war's nicht, eine Nacht haben wir überlebt. Immerhin gab es eine Rutsche vom zweiten in den ersten Stock, die Nimue natürlich sehr erfreute.
|
||||
|
||||
Das Abendessen nutzte ich wiederum, um Nimues eiskalten Orangensaft auf sie zu verschütten und damit die Nerven des übermüdeten Kindes und der besorgten Mutter gnadenlos überzustrapazien. Zur Ablenkung gab es immerhin eine Feuershow am Strand. Der Service im Restaurant und die Kleinkünstler dürfen allerdings gerne noch üben. Die Fähre nach Lanta erschien uns dann allerdings so teuer und der Transfer so unpraktisch, dass wir uns dazu entschieden direkt mit dem Privatvan nach Lanta zu cruisen. Hielt sich preislich erstaunlich im Rahmen, war natürlich ein Tacken länger als mit der Fähre, aber wir dachten uns "Wenn das Kind wieder kotzt, dann wenigstens nur auf uns". Die Angst war allerdings unbegründet.
|
||||
|
||||

|
||||
|
||||
## Lanta Sea House
|
||||
|
||||
Auf Koh Lanta waren wir im Lanta Sea House untergebracht. Dort hatten wir wieder einen netten Bungalow für uns. Das Hotel/Resort/Wie-auch-immer-man-das-nennen-möchte hatte einen direkten Strandzugang und auch das dazugehörige Restaurant war quasi direkt am Strand. Es gab zur Abwechslung Buffet zum Frühstuck. Dies hatte zwar eine begrenzte Auswahl, aber ich war relativ angetan davon, da die bisherigen Frühstücke zwar mal besser und mal schlechter waren, aber leider immer die geringe Menge gemeinsam hatten. Das Lanta Sea House war relativ weit im Norden von Lanta, und nachdem wir die Insel ein wenig erkundet hatten muss ich sagen, sollte es uns nochmal dorthin verschlagen würde ich eher eine Unterkunft ganz im Süden suchen. Was wir auf Phangan so schätzen gelernt hatten (enge, kurvige Straßen die Berge hinauf und hinab durch den Dschungel) gab es rund um unsere Unterkunft gar nicht: dort gibt es eine breite Hauptstraße, an der links und rechts eher charmlose Gebäude und Anlagen stehen, entlang dieser Route wirkte alles eher trostlos und die Dörfer wie schlechte Westernstädte. Vielleicht war es auch die Trockenheit, aber im Süden zeigte sich Lanta dann von seiner schnuckeligeren Seite. Wobei ich auch da sagen würde, dass es gegen Phangan nicht anstinken konnte.
|
||||
|
||||
Im Lanta Sea House haben wir Dierk und Johanna mit ihrerm Baby Frieda getroffen, außerdem war Laura, eine Freundin der beiden, auch vor Ort. Die ersten Tage mit ihnen waren aber eher kontaktarm, da sie gerade eine Covid-Infektion auskurierten. Auch danach war es nicht unbedingt ein happy gemeinsames Urlauben, da einfach die Tagesabläufe und notwenige Rücksichtnahme auf die diveresen Interessen der Kinder keine besonderen gemeinsamen Aktivitäten ermöglichten. Durch Nimue und unseren Entdeckerdrang sind wir ja gezwungen möglichst viel Entertainment Programm abzuspulen, während Dierk & Johanna mit Frieda eher der Tageshitze entweichen wollten und wieder versuchten nach der Infektion auf den Dampfer zu kommen. So haben wir uns hauptsächlich ein paar mal beim Essen und abends am Strand gesehen, Dierk hat zwei kleine Ausflüge mit uns unternommen und uns die Secret Shopping Meile in Lanta Old Town gezeigt.
|
||||
|
||||

|
||||
|
||||
|
||||
## Lanta Geocaching
|
||||
Wir haben viel im Meer gebadet und Nimue ist richtig auf den Geschmack gekommen, "Die Wellen machen Quatsch". Außerdem wurde viel im Sand gebuddelt. Manchmal sind wir auch woanders hingefahren und haben dort im Meer gebadet und im Sand gebuddelt. Ich bin erstaunt, dass wir es geschafft haben, dass Nael keinen Hitzschlag bekommen hat. Gut, vielleicht hatte er auch einen und wir Rabeneltern haben es nicht gemerkt, kann auch sein. Er musste ja bei allen Ausflügen immer in der Trage rumhängen, und wir schaffen es ja nur an den wenigsten Tagen nicht um Punkt 12 in der größten Hitze überhaupt erst aufzubrechen. Auf dem Programm standen besagter Shopping Ausflug nach Old Town, dort gab es ein Kleid für Nimue und kurze Hosen für mich. Die Route führte durchs Inland, das war eine nette Fahrt durch den Dschungel.
|
||||
|
||||
Vier Geocaches gab es auf Lanta. Einen in der Nähe unserer Unterkunft konnten wir finden, einen weiteren suchten wir sehr kurz, da der Ort nicht besonders einladend zum Suchen war (es war natürlich in der größten Mittagshitze und ein frischer Hundehaufen lag genau am GPS-Punkt). Diesen Cache fanden wir nicht. Einen weiteren, der ein kleines Stück weiter war sah ähnlich einladend zum Suchen aus, da haben wir es gar nicht erst versucht. Zwei Tage später sind wir dann an die Südspitze der Insel aufgebrochen, um den letzten Cache der Insel zu bergen. Dort war es wie geschrieben dann erstaunlich nett, den Cache haben wir erfolgreich geloggt, konnten vom Versteck aus eine schöne Aussicht genießen und kamen in einer sehr netten Strandbar zum, you guessed it, im Meer baden und im Sand buddeln unter. Nael hat sogar die Besitzer der Bar so verzückt, dass er von ihnen lange herumgetragen wurde.
|
||||
|
||||
Später machten wir noch einen Shopping Trip nach Old Town, da wir auf dem Markt in dem näheren nördlichen Fähranleger-Dorf nicht erfolgreich waren. Der war eher auf Touristen-Nepp ausgelegt, man wurde in jedem Laden von übereifrigen Verkäufern verfolgt und vollgeschnackt. Das finden wir ja eher unangenehm, in Old Town blieben wir davon verschont. Dort wurden dann nochmal kurze Hosen für mich aufgestackt, bis Nimues Laune wieder im Keller war. Da Täschi in ihrer Klamottenauswahl ja komplizierter ist als ich und Nimues Laune für Einkaufsbummel nicht lange bestehen bleibt, konnte Täschi leider keine schönen Kleider für sich als Beute mitnehmen. Die lange Rückfahrt versüßten wir uns mit einer neuen Route quer durchs Inland der Insel, vorbei an vielen urigen Häuschen und Kautschukplantagen.
|
||||
|
||||
Eine witzige, erwähnenswerte Episode war noch Nimues Mittagsschlaf vor der Bank an einem der heißen Tage: da wir neue Schwimmwindeln brauchten, suchten wir den "großen" Supermarkt in Ban Sala Dan auf. Auf dem Weg dorthin ist Nimue natürlich auf dem Roller eingeschlafen. Da sie erst kurz schlief legten wir sie auf unser Strandtuch in den Schatten vor der Bank neben dem Supermarkt. Zunächst schauten die Bediensteten und das Sicherheitspersonal durch die Glastür raus, und in bester Deutscher Manier befürchteten wir, dass sie uns natürlich vertreiben wollten, wie sieht denn das aus, wenn ein Kind da vor der Bank auf dem Boden liegt. Turns out, sie waren besorgt und haben uns insgesamt dreimal angeboten, dass wir Nimue auch in die Bank legen könnten, schließlich gibt es dort eine Klimaanlage. Wir lehnten allerdings ab, da wir uns nicht trauten Nimue zu bewegen ohne sie aufzuwecken. Ach, und Schwimmwindeln gab es tatsächlich in dem Supermarkt, immerhin lohnte sich die Fahrt also.
|
||||
|
||||

|
||||
|
||||
## Hinterländ
|
||||
Lange überlegten wir herum wohin es nach Koh Lanta gehen sollte. In die nähere Auswahl kamen Koh Lipe, Koh Libong und Koh Yao Noi. Schlussendlich wurde es Koh Libong, v.a. da es unmöglich war auf den anderen Inseln eine Unterkunft zu bekommen (Koh Yao Noi war eigentlich unser Favorit, aber was willste machen). All diese Inseln versprachen laut diverser Blogs eine eher ursprünglichere Erfahrung nach unseren klassischen Touristops Samui, Phangan und Lanta. Wobei wir später dann auch hörten, dass das zumindest auf Koh Lipe nicht unbedingt zutrifft. Wie dem auch sei, Libong it is und wir buchten uns ins beste Hotel am Platz, das Andalay Beach Resort. Den Transfer machte wieder ein Privatvan und ein Longtail Boat, anschließend ein wilder Ritt auf der Ladefläche eines Pickup.
|
||||
|
After Width: | Height: | Size: 18 MiB |
@@ -0,0 +1,24 @@
|
||||
---
|
||||
title: "Koh Libong"
|
||||
date: 2024-04-04T17:18:29+02:00
|
||||
draft: false
|
||||
---
|
||||
Nach Koh Lanta experimentierten wir mit dem Abenteuer. Wir wollten eine weniger touristische Insel aufsuchen und wägten zwischen verschiedenen Möglichkeiten ab. Noch vor Koh Lanta war Koh Phayam kurz im Rennen um uns dort mit Dierk, Johanna und Frieda zu treffen. Aber da wir alle mit unseren Babys unterwegs waren, schreckten uns einige Blogs dann doch ab, die berichteten, dass es dort nur selten Klimaanlagen und auch nicht immer Strom gibt. Das wirkte auf uns alle dann doch zu abenteuerlich. So wurde es für das Get Together also Lanta. Da wir dort im Norden untergekommen waren, und Täschi und mir zwar die Unterkunft, aber nicht das Ambiente der Umgebung gefielen, machten wir uns also auf die Suche nach dem Sweet Spot zwischen Realness und Tourismus, den wir auf Libong dann auch fanden.
|
||||
|
||||
<!--more-->
|
||||
|
||||
## Viele Inseln
|
||||
Auf der Suche nach Zielen wälzten wir also wieder einmal Reiseberichte. Fakt: es gibt viele Inseln in und um Thailand. In die engere Auswahl kamen Koh Yao Noi, Koh Libong und Koh Lipe. Eigentlich hatten wir uns schon auf Yao Noi eingeschossen, aber wir waren offensichtlich mal wieder zu spät, respektive zu speziell, mit unserer Buchung der Unterkunft. Es gab nämlich weder auf Yao Noi, noch auf Lipe überhaupt irgendwelche Treffer für unseren Reisezeitraum. Und egal wie wir es drehten und wendeten, egal ob frühere An- und Abreise oder gar eine ganze Woche später, es gab nichts für uns zu holen. Auch auf Libong gab es nur einen Treffer, das Andalay Beach Resort. Später haben wir dann rausgefunden, dass es v.a. damit zusammenhängt, dass die Suchmasken der meisten Anbieter (Agoda und Booking vornehmlich) mit unserer Anfrage für zwei Erwachsene, ein Baby und ein Kleinkind etwas überfordert sind: Man kann meistens nicht gut genug spezifizieren, welche Bettkonstellation man mit dieser Reisegruppe sucht, und wenn man es denn kann, ist man auch darauf angewiesen, dass die Hotels ihre Zimmer auf den Plattformen richtig eingepflegt haben. Dementsprechend fallen auch einfach sehr viele potentielle Treffer raus. Mit diesem Wissen hätte es vielleicht auch auf Yao Noi geklappt, aber so wurde uns wiederum die Entscheidung abgenommen und wir machten uns auf den Weg nach Libong.
|
||||
|
||||
## Eine Seefahrt
|
||||
Koh Libong ist schon mal so urig, dass es keine reguläre Fähre gibt, die einen übersetzen kann. Die Möglichkeiten beschränken sich auf Speedboats und eine Taxifahrt mit anschließedem Longtail Boat. Da die Reviews der Speedboatanbieter und Täschis Erfahrungen mit dem Komfort einer Speedboatreise beide eher durchwachsen waren entschieden wir uns für den zwar etwas längeren Trip mit dem Taxi, der aber wiederum auch deutlich günstiger war. Von Lanta dauerte der ganze Weg etwa vier Stunden. In Baan Chao Mai wurde die Reisegruppe dann auf besagtes Longtail Boot verladen. Das kam uns sehr entgegen, da Nimue ohnehin schon seit Tagen bei jedem Boot, das sie gesehen hatte verlangte, dass wir endlich einmal "Segelboot" fahren müssen (jedes Boot ist ein Segelboot). Sie genoss die Überfahrt dann auch sichtlich. Auf Libong wurden wir dann auf die Ladefläche eines Pickup verladen, der uns an das andere Ende der Insel brachte. Schon auf dieser kurzweiligen Fahrt begrüßte uns der urige Charakter der Insel. Es gibt diese eine Straße, ein Dorf in der Mitte der Insel und ansonsten noch 2 Hüttenansammlungen an jedem Ende der Insel. Das Inselleben wirkte gleich sehr echt auf uns, abgesehen von der Anlegestelle gab es keinen Tourineppladen zu sehen, es gibt keinen 7Eleven, es gibt keine Tankstelle, nur das echte Thai Benzin aus der Colaflasche. Ich glaube auch, dass es nur zwei Autos auf der Insel gibt, ansonsten besteht der Verkehr aus Rollern und Tuktuks.
|
||||
|
||||
## Im besten Hotel am Platz
|
||||
Tatsächlich gibt es auch nicht viele Unterkünfte auf Libong und das Andalay Beach Resort ist das einzige Hotel auf der Insel, das einen (bzw. genaugenommen zwei) Pools hat. Leider kam uns das gelegener als wir hofften, da bei unserer Ankunft das Meer leider v.a. quallig war. Das Resort ist mit seinen Hüttchen, den Pools, dem Restaurant am Strand und seiner Einrichtung mit viel Holz richtig schön anzusehen, die Instagramability ist enorm hoch. Dafür berappt man natürlich auch den einen oder anderen Rappen, preislich liegt das schon weit vorne. Und dafür bekommt man wiederum bis auf die Optik nicht so richtig hohe Qualität geboten, insbesondere beim (teuren) Essen ist das schon fast frech. Zum Glück schaffen da aber die Restaurants außerhalb (die man in genaugenommen 2 Minuten, na gut, lass es 10 mit den Kindern sein) zu Fuß erreicht, großartige Abhilfe. Wahnsinnig leckeres Essen für n Appel und ein Ei. Inklusive Abenteuer sind. auch immer mal wieder Stromausfälle und Internetausfälle, aber dafür ist man ja nach Libong gekommen. Stromausfall morgens beim Frühstück und man bekommt keinen Kaffee ist allerdings schon nah an Folter.
|
||||
|
||||
## Reisedepression durch Kinder
|
||||
Vielleicht durch die Entschleunigung und Reizunterflutung hatte ich nach ca. 3 Tagen auf Libong allerdings mit starkem Reiseblues zu kämpfen. Da es hier tatsächlich nicht viel zu tun gibt, hatten wir gefühlt nach einem Tag mit dem Roller die gesamte Insel abgegrast. Das Meer blieb uns ja auch zunächst verwehrt und es gibt nicht mal einen Geocache auf der Insel. Daher hatte ich einen Tag richtig miese Laune bzgl. der Tatsache, dass ich mich so gefangen fühlte. Irgendwie war das eigentlich wieder die Urlaubsart, auf die ich so richtig Bock hatte, andererseits nagte das Gefühl an mir, dass ich diesen Abenteuerwunsch aufgrund der Kinder hier nicht ausleben konnte. Ständig plärrt das Baby wegen irgendwas, wenn man dann aber bspw. abends mit dem Roller umherfährt, kann man auch nicht halten ohne von Mücken gefressen zu werden um ihm das Maul mit der Brust zu stopfen. Also eilt man sich mit dem strampelnden Baby in der Trage wieder in die Unterkunft. Nimue wiederum musste gefühlt rund um die Uhr mit Kleinkind-Theater beschäftigt werden, was auch nicht bedeutet mit der Machete wilde Dschungeltouren zu unternehmen. Tagsüber ist es in der Mittagszeit furchtbar heiß, am besten sitzt man diese Zeit also im klimatisierten Zimmer aus, dort tanzt Nimue dann aber auf dem Tisch wegen Unterbeschäftigung. Nael schläft in der Zeit. Wenn man dann irgendwann Nimue dann so runtergefahren hat, dass sie doch endlich zum Mittagsschlaf einschläft ist Babymann wieder wach und plärrt wegen irgendetwas. Wenn dann abends die Temperaturen zur Aktivität einladen, ist es (oh Wunder) dunkel. Da fährt man dann auch nicht mit der gesamten Familie auf dem Roller die Feldwege entlang und jagt alle über den wurzeligen Dschungelboden Das führte bei mir zum Meltdown, dass ich kurz davor war den Urlaub abzubrechen. Einzig, dass es von hier aus auch wiederum ein riesig großer Aufwand wäre nach Bangkok zu kommen hielt mich davon ab unmittelbar die Rückreise anzutreten.
|
||||
|
||||
Unverhofft, ohne dass ich danach gesucht hätte, kam aber Hilfe von unerwarteter Seite: im Rahmen der April Cools, haben einige Blogger die Tradition gestartet, über Themen zu schreiben, über die sie sonst nicht schrieben. Lange Kette glücklicher Umstände, am Ende stand ein schnell heruntergeladener Erziehungsratgeber namens "Hunt. Gather. Parent." Schon der Prolog sprach mich an, da ich meine Gefühle über das Elternsein 1:1 Beschreibungen der Autorin wiederfand (nicht nur auf den Urlaub bezogen). Ich bin zwar während ich dies schreibe erst bei einem guten Drittel des Buches angekommen, aber tatsächlich schöpfte ich aus ihren Ideen erstmal wieder Motivation und v.a. die Hoffnung, dass das Elterndasein echt nicht komplett ätzend sein muss. Die Quintessenz (die den langen Beschreibungen der im Buch enthaltenen Erziehungsideen natürlich überhaupt nicht gerecht wird) ist aber salopp: das Kind einfach auch mal komplett ignorieren. Wenn das Buch es dabei schafft, das man sich nicht komplett schlecht fühlt: why not? Jetzt ist meine Erfahrung mit diesem Erziehungsansatz erst einen Tag alt, aber jungejunge, hat es mental heute für mich einen Riesenunterschied gemcht oÔ. Heute gab es viel weniger Zinober und Diskussionen, krass!
|
||||
|
||||
## Ausflugstag
|
||||
@@ -1 +0,0 @@
|
||||
../prettier/bin-prettier.js
|
||||
@@ -1 +0,0 @@
|
||||
../ulid/bin/cli.js
|
||||
@@ -1,21 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2021 Niklas Portmann
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
@@ -1,197 +0,0 @@
|
||||
# prettier-plugin-go-template
|
||||
|
||||
[](https://www.npmjs.com/package/prettier-plugin-go-template) [](https://codecov.io/gh/NiklasPor/prettier-plugin-go-template) [](#contributors-)
|
||||
|
||||
Formatter plugin for go template files. The only peer dependency is [prettier](https://www.npmjs.com/package/prettier). Test you own code on the [**playground**](https://prettier-plugin-go-template-playground.niklaspor.dev/).
|
||||
|
||||
```bash
|
||||
npm install --save-dev prettier prettier-plugin-go-template
|
||||
```
|
||||
|
||||
The following file types are detected automatically:
|
||||
`.gohtml`, `.gotmpl`, `.go.tmpl`, `.tmpl`, `.tpl`, `.html.tmpl`
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Input</th>
|
||||
<th>Output</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
```html
|
||||
{{ if or .Prev .Next -}}
|
||||
{{ $p := where site.Pages }}
|
||||
<div class="my-navigation">
|
||||
{{ with $p.Next . -}}
|
||||
<a href="{{ .RelPermalink }}">
|
||||
<div class="row">
|
||||
<div class="cell py-2">
|
||||
{{ .Title }}
|
||||
</div> </div> </a>
|
||||
{{ end -}}
|
||||
</div>
|
||||
{{ end -}}
|
||||
```
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
```html
|
||||
{{ if or .Prev .Next -}}
|
||||
{{ $p := where site.Pages }}
|
||||
<div class="my-navigation">
|
||||
{{ with $p.Next . -}}
|
||||
<a href="{{ .RelPermalink }}">
|
||||
<div class="row">
|
||||
<div class="cell py-2">{{ .Title }}</div>
|
||||
</div>
|
||||
</a>
|
||||
{{ end -}}
|
||||
</div>
|
||||
{{ end -}}
|
||||
```
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## GoHugo / `.html`
|
||||
|
||||
To use it with GoHugo and basic `.html` files, you'll have to override the used parser inside your `.prettierrc` file:
|
||||
|
||||
```js
|
||||
{
|
||||
overrides: [
|
||||
{
|
||||
files: ["*.html"],
|
||||
options: {
|
||||
parser: "go-template",
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
```
|
||||
|
||||
## VSCode
|
||||
|
||||
Make sure to always have installed **both** dependencies:
|
||||
|
||||
- `prettier`
|
||||
- `prettier-plugin-go-template`
|
||||
|
||||
Also make sure that they are installed inside the same scope.
|
||||
Install both globally (`npm i -g`) or locally – otherwise prettier may not pick up the plugin.
|
||||
|
||||
> Note: The global setup additional requires setting your VSCode prettier path to your global prettier path. You can read in [this issue](https://github.com/NiklasPor/prettier-plugin-go-template/issues/58#issuecomment-1085060511) how to set it up – should be doable in less than a minute if you have npm & VSCode already running.
|
||||
|
||||
## Additional Options
|
||||
|
||||
```js
|
||||
// .prettierrc
|
||||
{
|
||||
/**
|
||||
* Enables & disables spacing between go statements.
|
||||
* E.g. {{ statement }} vs {{statement}}.
|
||||
* Default: true
|
||||
*/
|
||||
"goTemplateBracketSpacing": true
|
||||
}
|
||||
```
|
||||
|
||||
## Ignoring Code
|
||||
|
||||
#### Single Block
|
||||
|
||||
```html
|
||||
<div>
|
||||
<!-- prettier-ignore -->
|
||||
{{if }}
|
||||
{{end }}
|
||||
</div>
|
||||
```
|
||||
|
||||
#### Multiline
|
||||
|
||||
```html
|
||||
<html>
|
||||
{{/* prettier-ignore-start */}}
|
||||
<script>
|
||||
{{if }}
|
||||
Whatever.
|
||||
{{else }}
|
||||
Psych.
|
||||
{{end }}
|
||||
</script>
|
||||
{{/* prettier-ignore-end */}}
|
||||
</html>
|
||||
```
|
||||
|
||||
## Changelog
|
||||
|
||||
### v0.0.12
|
||||
|
||||
- Fix several formatting issues
|
||||
- Improve unformattable script & style detection
|
||||
- Huge thanks to @jasikpark for validating & cleaning up the issues 🎉
|
||||
|
||||
### v0.0.11
|
||||
|
||||
- AST rewrite
|
||||
- Fix inline actions
|
||||
- If / Else / Else-If support
|
||||
- Ignore formatting for blocks with `{{/* prettier-ignore */}}
|
||||
- Ignore large code sections with `{{/* prettier-ignore-start */}}...{{/* prettier-ignore-end */}}
|
||||
- Tweak general formatting
|
||||
- Support for multiline actions
|
||||
|
||||
### v0.0.10
|
||||
|
||||
- Resolve bug #19: Fix template comments.
|
||||
|
||||
### v0.0.9
|
||||
|
||||
- Resolve bug of single line if statements.
|
||||
|
||||
### v0.0.8
|
||||
|
||||
- Go block statements will now be indented accordingly. Except for `else`.
|
||||
- if, range, block, with, define, end
|
||||
|
||||
### v0.0.7
|
||||
|
||||
- Fix broken shortcodes. Thanks to @alqu for discovering & fixing the bug.
|
||||
|
||||
## Contributors ✨
|
||||
|
||||
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
||||
|
||||
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
||||
<!-- prettier-ignore-start -->
|
||||
<!-- markdownlint-disable -->
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center"><a href="https://github.com/alqu"><img src="https://avatars1.githubusercontent.com/u/12250845?v=4?s=100" width="100px;" alt=""/><br /><sub><b>alqu</b></sub></a><br /><a href="https://github.com/NiklasPor/prettier-plugin-go-template/issues?q=author%3Aalqu" title="Bug reports">🐛</a> <a href="https://github.com/NiklasPor/prettier-plugin-go-template/commits?author=alqu" title="Tests">⚠️</a> <a href="https://github.com/NiklasPor/prettier-plugin-go-template/commits?author=alqu" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://www.gabrielmaldi.com"><img src="https://avatars3.githubusercontent.com/u/3728897?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Gabriel Monteagudo</b></sub></a><br /><a href="https://github.com/NiklasPor/prettier-plugin-go-template/issues?q=author%3Agabrielmaldi" title="Bug reports">🐛</a></td>
|
||||
<td align="center"><a href="https://github.com/bgold0"><img src="https://avatars1.githubusercontent.com/u/4645400?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Bryan</b></sub></a><br /><a href="https://github.com/NiklasPor/prettier-plugin-go-template/issues?q=author%3Abgold0" title="Bug reports">🐛</a></td>
|
||||
<td align="center"><a href="http://richtera.org"><img src="https://avatars2.githubusercontent.com/u/708186?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Andreas Richter</b></sub></a><br /><a href="https://github.com/NiklasPor/prettier-plugin-go-template/issues?q=author%3Arichtera" title="Bug reports">🐛</a></td>
|
||||
<td align="center"><a href="https://noahbrenner.github.io/"><img src="https://avatars3.githubusercontent.com/u/24858379?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Noah Brenner</b></sub></a><br /><a href="https://github.com/NiklasPor/prettier-plugin-go-template/commits?author=noahbrenner" title="Code">💻</a> <a href="https://github.com/NiklasPor/prettier-plugin-go-template/commits?author=noahbrenner" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="https://silverwind.io"><img src="https://avatars1.githubusercontent.com/u/115237?v=4?s=100" width="100px;" alt=""/><br /><sub><b>silverwind</b></sub></a><br /><a href="#ideas-silverwind" title="Ideas, Planning, & Feedback">🤔</a></td>
|
||||
<td align="center"><a href="https://codeberg.org/cpence"><img src="https://avatars0.githubusercontent.com/u/297075?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Charles Pence</b></sub></a><br /><a href="https://github.com/NiklasPor/prettier-plugin-go-template/issues?q=author%3Acpence" title="Bug reports">🐛</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="http://jasik.xyz"><img src="https://avatars.githubusercontent.com/u/10626596?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Caleb Jasik</b></sub></a><br /><a href="https://github.com/NiklasPor/prettier-plugin-go-template/issues?q=author%3Ajasikpark" title="Bug reports">🐛</a> <a href="https://github.com/NiklasPor/prettier-plugin-go-template/commits?author=jasikpark" title="Documentation">📖</a> <a href="#example-jasikpark" title="Examples">💡</a> <a href="#ideas-jasikpark" title="Ideas, Planning, & Feedback">🤔</a> <a href="#maintenance-jasikpark" title="Maintenance">🚧</a> <a href="#question-jasikpark" title="Answering Questions">💬</a></td>
|
||||
<td align="center"><a href="http://DanGold.me"><img src="https://avatars.githubusercontent.com/u/8890238?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dan Gold</b></sub></a><br /><a href="https://github.com/NiklasPor/prettier-plugin-go-template/issues?q=author%3ALandGod" title="Bug reports">🐛</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- markdownlint-restore -->
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
||||
|
||||
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
|
||||
@@ -1 +0,0 @@
|
||||
export declare function createIdGenerator(): () => string;
|
||||
@@ -1,9 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.createIdGenerator = void 0;
|
||||
const ulid_1 = require("ulid");
|
||||
function createIdGenerator() {
|
||||
return () => (0, ulid_1.ulid)();
|
||||
}
|
||||
exports.createIdGenerator = createIdGenerator;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLWlkLWdlbmVyYXRvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9jcmVhdGUtaWQtZ2VuZXJhdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLCtCQUE0QjtBQUU1QixTQUFnQixpQkFBaUI7SUFDL0IsT0FBTyxHQUFHLEVBQUUsQ0FBQyxJQUFBLFdBQUksR0FBRSxDQUFDO0FBQ3RCLENBQUM7QUFGRCw4Q0FFQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHVsaWQgfSBmcm9tIFwidWxpZFwiO1xuXG5leHBvcnQgZnVuY3Rpb24gY3JlYXRlSWRHZW5lcmF0b3IoKTogKCkgPT4gc3RyaW5nIHtcbiAgcmV0dXJuICgpID0+IHVsaWQoKTtcbn1cbiJdfQ==
|
||||
@@ -1,15 +0,0 @@
|
||||
import { Parser, Printer, SupportLanguage } from "prettier";
|
||||
import { GoNode } from "./parse";
|
||||
export declare type PrettierPluginGoTemplateParserOptions = {
|
||||
goTemplateBracketSpacing: boolean;
|
||||
};
|
||||
export declare const options: {
|
||||
[K in keyof PrettierPluginGoTemplateParserOptions]: any;
|
||||
};
|
||||
export declare const languages: SupportLanguage[];
|
||||
export declare const parsers: {
|
||||
"go-template": Parser<GoNode>;
|
||||
};
|
||||
export declare const printers: {
|
||||
"go-template": Printer<GoNode>;
|
||||
};
|
||||
@@ -1,47 +0,0 @@
|
||||
import { Parser } from "prettier";
|
||||
export declare const parseGoTemplate: Parser<GoNode>["parse"];
|
||||
export declare type GoNode = GoRoot | GoBlock | GoInline | GoMultiBlock | GoUnformattable;
|
||||
export declare type GoBlockKeyword = "if" | "range" | "block" | "with" | "define" | "else" | "prettier-ignore-start" | "prettier-ignore-end" | "end";
|
||||
export declare type GoRoot = {
|
||||
type: "root";
|
||||
} & Omit<GoBlock, "type" | "keyword" | "parent" | "statement" | "id" | "startDelimiter" | "endDelimiter" | "start" | "end">;
|
||||
export interface GoBaseNode<Type extends string> {
|
||||
id: string;
|
||||
type: Type;
|
||||
index: number;
|
||||
length: number;
|
||||
parent: GoBlock | GoRoot | GoMultiBlock;
|
||||
}
|
||||
export interface GoBlock extends GoBaseNode<"block">, WithDelimiter {
|
||||
keyword: GoBlockKeyword;
|
||||
children: {
|
||||
[id: string]: GoNode;
|
||||
};
|
||||
start: GoInline;
|
||||
end: GoInline | null;
|
||||
content: string;
|
||||
aliasedContent: string;
|
||||
contentStart: number;
|
||||
}
|
||||
export interface GoMultiBlock extends GoBaseNode<"double-block"> {
|
||||
blocks: (GoBlock | GoMultiBlock)[];
|
||||
keyword: GoBlockKeyword;
|
||||
}
|
||||
export declare type GoSharedDelimiter = "%" | "-" | "";
|
||||
export declare type GoInlineStartDelimiter = "<" | "/*" | GoSharedDelimiter;
|
||||
export declare type GoInlineEndDelimiter = ">" | "*/" | GoSharedDelimiter;
|
||||
export interface GoUnformattable extends GoBaseNode<"unformattable"> {
|
||||
content: string;
|
||||
}
|
||||
export interface WithDelimiter {
|
||||
startDelimiter: GoInlineStartDelimiter;
|
||||
endDelimiter: GoInlineEndDelimiter;
|
||||
}
|
||||
export interface GoInline extends GoBaseNode<"inline">, WithDelimiter {
|
||||
statement: string;
|
||||
}
|
||||
export declare function isInline(node: GoNode): node is GoInline;
|
||||
export declare function isBlock(node: GoNode): node is GoBlock;
|
||||
export declare function isMultiBlock(node: GoNode): node is GoMultiBlock;
|
||||
export declare function isRoot(node: GoNode): node is GoRoot;
|
||||
export declare function isUnformattable(node: GoNode): node is GoRoot;
|
||||
@@ -1,113 +0,0 @@
|
||||
{
|
||||
"_from": "prettier-plugin-go-template",
|
||||
"_id": "prettier-plugin-go-template@0.0.13",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-gG/xT5kd+kCzoMaTchXvdfBdsunyRCV6G8cgdPGPd2V5JGGKXUG7SjzBKU7jaGh2RTeblcAdBb/E+S/duOAMsA==",
|
||||
"_location": "/prettier-plugin-go-template",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "tag",
|
||||
"registry": true,
|
||||
"raw": "prettier-plugin-go-template",
|
||||
"name": "prettier-plugin-go-template",
|
||||
"escapedName": "prettier-plugin-go-template",
|
||||
"rawSpec": "",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "latest"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#DEV:/",
|
||||
"#USER"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/prettier-plugin-go-template/-/prettier-plugin-go-template-0.0.13.tgz",
|
||||
"_shasum": "b4047bce76430bc89a8ee8f27fad1b1c14d942be",
|
||||
"_spec": "prettier-plugin-go-template",
|
||||
"_where": "/home/kossa/projects/knaeckeboot-tailwind",
|
||||
"author": {
|
||||
"name": "Niklas Portmann",
|
||||
"email": "niklaspor@gmail.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/NiklasPor/prettier-plugin-go-template/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"ulid": "^2.3.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Prettier plugin for formatting Go & GoHugo templates.",
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-commonjs": "^17.0.0",
|
||||
"@rollup/plugin-node-resolve": "^11.0.0",
|
||||
"@rollup/plugin-typescript": "^8.0.0",
|
||||
"@tsconfig/svelte": "^2.0.0",
|
||||
"@types/jest": "^26.0.15",
|
||||
"@types/node": "^14.14.2",
|
||||
"@types/prettier": "^2.2.3",
|
||||
"codecov": "^3.8.0",
|
||||
"jest": "^26.6.1",
|
||||
"prettier": "^2.3.0",
|
||||
"rollup": "^2.3.4",
|
||||
"rollup-plugin-css-only": "^3.1.0",
|
||||
"rollup-plugin-livereload": "^2.0.0",
|
||||
"rollup-plugin-svelte": "^7.0.0",
|
||||
"rollup-plugin-terser": "^7.0.0",
|
||||
"sirv-cli": "^2.0.0",
|
||||
"svelte": "^3.0.0",
|
||||
"svelte-check": "^2.0.0",
|
||||
"svelte-preprocess": "^4.0.0",
|
||||
"ts-jest": "^26.4.2",
|
||||
"ts-node": "^9.0.0",
|
||||
"tslib": "^2.0.0",
|
||||
"tslint": "^6.1.3",
|
||||
"tslint-config-prettier": "^1.18.0",
|
||||
"typescript": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
"homepage": "https://github.com/NiklasPor/prettier-plugin-go-template#readme",
|
||||
"jest": {
|
||||
"preset": "ts-jest"
|
||||
},
|
||||
"keywords": [
|
||||
"prettier",
|
||||
"plugin",
|
||||
"go",
|
||||
"hugo",
|
||||
"gohugo",
|
||||
"template",
|
||||
"html"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "lib/index",
|
||||
"name": "prettier-plugin-go-template",
|
||||
"peerDependencies": {
|
||||
"prettier": "^2.0.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/NiklasPor/prettier-plugin-go-template.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc --pretty",
|
||||
"check": "svelte-check --tsconfig ./tsconfig.json",
|
||||
"coverage": "jest --coverage --no-cache",
|
||||
"lint": "tslint --project .",
|
||||
"publish:coverage": "codecov -t $npm_config_prettier_plugin_go_html_codecov",
|
||||
"release:coverage": "npm run coverage && npm run publish:coverage",
|
||||
"release:plugin": "npm run build && npm run release:coverage && npm publish",
|
||||
"release:plugin:beta": "npm run build && npm run release:coverage && npm publish --tag beta",
|
||||
"test": "jest",
|
||||
"watch": "npm run build -- --watch",
|
||||
"watch:test": "jest --watch",
|
||||
"website:build": "rollup -c",
|
||||
"website:serve": "rollup -c -w",
|
||||
"website:start": "sirv website/public --no-clear"
|
||||
},
|
||||
"types": "lib/index",
|
||||
"version": "0.0.13"
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||

|
||||
|
||||
<h2 align="center">Opinionated Code Formatter</h2>
|
||||
|
||||
<p align="center">
|
||||
<em>
|
||||
JavaScript
|
||||
· TypeScript
|
||||
· Flow
|
||||
· JSX
|
||||
· JSON
|
||||
</em>
|
||||
<br />
|
||||
<em>
|
||||
CSS
|
||||
· SCSS
|
||||
· Less
|
||||
</em>
|
||||
<br />
|
||||
<em>
|
||||
HTML
|
||||
· Vue
|
||||
· Angular
|
||||
</em>
|
||||
<br />
|
||||
<em>
|
||||
GraphQL
|
||||
· Markdown
|
||||
· YAML
|
||||
</em>
|
||||
<br />
|
||||
<em>
|
||||
<a href="https://prettier.io/docs/en/plugins.html">
|
||||
Your favorite language?
|
||||
</a>
|
||||
</em>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/prettier/prettier/actions?query=workflow%3AProd+branch%3Amain">
|
||||
<img alt="Github Actions Build Status" src="https://img.shields.io/github/workflow/status/prettier/prettier/Prod?label=Prod&style=flat-square"></a>
|
||||
<a href="https://github.com/prettier/prettier/actions?query=workflow%3ADev+branch%3Amain">
|
||||
<img alt="Github Actions Build Status" src="https://img.shields.io/github/workflow/status/prettier/prettier/Dev?label=Dev&style=flat-square"></a>
|
||||
<a href="https://github.com/prettier/prettier/actions?query=workflow%3ALint+branch%3Amain">
|
||||
<img alt="Github Actions Build Status" src="https://img.shields.io/github/workflow/status/prettier/prettier/Lint?label=Lint&style=flat-square"></a>
|
||||
<a href="https://codecov.io/gh/prettier/prettier">
|
||||
<img alt="Codecov Coverage Status" src="https://img.shields.io/codecov/c/github/prettier/prettier.svg?style=flat-square"></a>
|
||||
<a href="https://twitter.com/acdlite/status/974390255393505280">
|
||||
<img alt="Blazing Fast" src="https://img.shields.io/badge/speed-blazing%20%F0%9F%94%A5-brightgreen.svg?style=flat-square"></a>
|
||||
<br/>
|
||||
<a href="https://www.npmjs.com/package/prettier">
|
||||
<img alt="npm version" src="https://img.shields.io/npm/v/prettier.svg?style=flat-square"></a>
|
||||
<a href="https://www.npmjs.com/package/prettier">
|
||||
<img alt="weekly downloads from npm" src="https://img.shields.io/npm/dw/prettier.svg?style=flat-square"></a>
|
||||
<a href="#badge">
|
||||
<img alt="code style: prettier" src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square"></a>
|
||||
<a href="https://twitter.com/PrettierCode">
|
||||
<img alt="Follow Prettier on Twitter" src="https://img.shields.io/twitter/follow/prettiercode.svg?label=follow+prettier&style=flat-square"></a>
|
||||
</p>
|
||||
|
||||
## Intro
|
||||
|
||||
Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary.
|
||||
|
||||
### Input
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```js
|
||||
foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne());
|
||||
```
|
||||
|
||||
### Output
|
||||
|
||||
```js
|
||||
foo(
|
||||
reallyLongArg(),
|
||||
omgSoManyParameters(),
|
||||
IShouldRefactorThis(),
|
||||
isThereSeriouslyAnotherOne()
|
||||
);
|
||||
```
|
||||
|
||||
Prettier can be run [in your editor](https://prettier.io/docs/en/editors.html) on-save, in a [pre-commit hook](https://prettier.io/docs/en/precommit.html), or in [CI environments](https://prettier.io/docs/en/cli.html#list-different) to ensure your codebase has a consistent style without devs ever having to post a nit-picky comment on a code review ever again!
|
||||
|
||||
---
|
||||
|
||||
**[Documentation](https://prettier.io/docs/en/)**
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
[Install](https://prettier.io/docs/en/install.html) ·
|
||||
[Options](https://prettier.io/docs/en/options.html) ·
|
||||
[CLI](https://prettier.io/docs/en/cli.html) ·
|
||||
[API](https://prettier.io/docs/en/api.html)
|
||||
|
||||
**[Playground](https://prettier.io/playground/)**
|
||||
|
||||
---
|
||||
|
||||
## Badge
|
||||
|
||||
Show the world you're using _Prettier_ → [](https://github.com/prettier/prettier)
|
||||
|
||||
```md
|
||||
[](https://github.com/prettier/prettier)
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
||||
@@ -1,62 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __commonJS = function(cb, mod) {
|
||||
return function __require() {
|
||||
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
||||
};
|
||||
};
|
||||
|
||||
// node_modules/semver-compare/index.js
|
||||
var require_semver_compare = __commonJS({
|
||||
"node_modules/semver-compare/index.js": function(exports2, module2) {
|
||||
module2.exports = function cmp(a, b) {
|
||||
var pa = a.split(".");
|
||||
var pb = b.split(".");
|
||||
for (var i = 0; i < 3; i++) {
|
||||
var na = Number(pa[i]);
|
||||
var nb = Number(pb[i]);
|
||||
if (na > nb)
|
||||
return 1;
|
||||
if (nb > na)
|
||||
return -1;
|
||||
if (!isNaN(na) && isNaN(nb))
|
||||
return 1;
|
||||
if (isNaN(na) && !isNaN(nb))
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/please-upgrade-node/index.js
|
||||
var require_please_upgrade_node = __commonJS({
|
||||
"node_modules/please-upgrade-node/index.js": function(exports2, module2) {
|
||||
var semverCompare = require_semver_compare();
|
||||
module2.exports = function pleaseUpgradeNode2(pkg, opts) {
|
||||
var opts = opts || {};
|
||||
var requiredVersion = pkg.engines.node.replace(">=", "");
|
||||
var currentVersion = process.version.replace("v", "");
|
||||
if (semverCompare(currentVersion, requiredVersion) === -1) {
|
||||
if (opts.message) {
|
||||
console.error(opts.message(requiredVersion));
|
||||
} else {
|
||||
console.error(pkg.name + " requires at least version " + requiredVersion + " of Node, please upgrade");
|
||||
}
|
||||
if (opts.hasOwnProperty("exitCode")) {
|
||||
process.exit(opts.exitCode);
|
||||
} else {
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// bin/prettier.js
|
||||
var pleaseUpgradeNode = require_please_upgrade_node();
|
||||
var packageJson = require("./package.json");
|
||||
pleaseUpgradeNode(packageJson);
|
||||
var cli = require("./cli.js");
|
||||
module.exports = cli.run(process.argv.slice(2));
|
||||
@@ -1,57 +0,0 @@
|
||||
{
|
||||
"_from": "prettier",
|
||||
"_id": "prettier@2.7.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==",
|
||||
"_location": "/prettier",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "tag",
|
||||
"registry": true,
|
||||
"raw": "prettier",
|
||||
"name": "prettier",
|
||||
"escapedName": "prettier",
|
||||
"rawSpec": "",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "latest"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#DEV:/",
|
||||
"#USER"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz",
|
||||
"_shasum": "e235806850d057f97bb08368a4f7d899f7760c64",
|
||||
"_spec": "prettier",
|
||||
"_where": "/home/kossa/projects/knaeckeboot-tailwind",
|
||||
"author": {
|
||||
"name": "James Long"
|
||||
},
|
||||
"bin": {
|
||||
"prettier": "bin-prettier.js"
|
||||
},
|
||||
"browser": "./standalone.js",
|
||||
"bugs": {
|
||||
"url": "https://github.com/prettier/prettier/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Prettier is an opinionated code formatter",
|
||||
"engines": {
|
||||
"node": ">=10.13.0"
|
||||
},
|
||||
"files": [
|
||||
"*.js",
|
||||
"esm/*.mjs"
|
||||
],
|
||||
"funding": "https://github.com/prettier/prettier?sponsor=1",
|
||||
"homepage": "https://prettier.io",
|
||||
"license": "MIT",
|
||||
"main": "./index.js",
|
||||
"name": "prettier",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/prettier/prettier.git"
|
||||
},
|
||||
"unpkg": "./standalone.js",
|
||||
"version": "2.7.1"
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 Alizain Feerasta
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -1,181 +0,0 @@
|
||||
<h1 align="center">
|
||||
<br>
|
||||
<br>
|
||||
<img width="360" src="logo.png" alt="ulid">
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
</h1>
|
||||
|
||||
[](https://travis-ci.org/ulid/javascript) [](https://codecov.io/gh/ulid/javascript)
|
||||
[](https://www.npmjs.com/package/ulid)
|
||||
|
||||
# Universally Unique Lexicographically Sortable Identifier
|
||||
|
||||
UUID can be suboptimal for many uses-cases because:
|
||||
|
||||
- It isn't the most character efficient way of encoding 128 bits of randomness
|
||||
- UUID v1/v2 is impractical in many environments, as it requires access to a unique, stable MAC address
|
||||
- UUID v3/v5 requires a unique seed and produces randomly distributed IDs, which can cause fragmentation in many data structures
|
||||
- UUID v4 provides no other information than randomness which can cause fragmentation in many data structures
|
||||
|
||||
Instead, herein is proposed ULID:
|
||||
|
||||
- 128-bit compatibility with UUID
|
||||
- 1.21e+24 unique ULIDs per millisecond
|
||||
- Lexicographically sortable!
|
||||
- Canonically encoded as a 26 character string, as opposed to the 36 character UUID
|
||||
- Uses Crockford's base32 for better efficiency and readability (5 bits per character)
|
||||
- Case insensitive
|
||||
- No special characters (URL safe)
|
||||
- Monotonic sort order (correctly detects and handles the same millisecond)
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
npm install --save ulid
|
||||
```
|
||||
|
||||
## Import
|
||||
|
||||
**TypeScript, ES6+, Babel, Webpack, Rollup, etc.. environments**
|
||||
```javascript
|
||||
import { ulid } from 'ulid'
|
||||
|
||||
ulid() // 01ARZ3NDEKTSV4RRFFQ69G5FAV
|
||||
```
|
||||
|
||||
**CommonJS environments**
|
||||
```javascript
|
||||
const ULID = require('ulid')
|
||||
|
||||
ULID.ulid()
|
||||
```
|
||||
|
||||
**AMD (RequireJS) environments**
|
||||
```javascript
|
||||
define(['ULID'] , function (ULID) {
|
||||
ULID.ulid()
|
||||
});
|
||||
```
|
||||
|
||||
**Browser**
|
||||
```html
|
||||
<script src="/path/to/ulid.js"></script>
|
||||
<script>
|
||||
ULID.ulid()
|
||||
</script>
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
To generate a ULID, simply run the function!
|
||||
|
||||
```javascript
|
||||
import { ulid } from 'ulid'
|
||||
|
||||
ulid() // 01ARZ3NDEKTSV4RRFFQ69G5FAV
|
||||
```
|
||||
|
||||
### Seed Time
|
||||
|
||||
You can also input a seed time which will consistently give you the same string for the time component. This is useful for migrating to ulid.
|
||||
|
||||
```javascript
|
||||
ulid(1469918176385) // 01ARYZ6S41TSV4RRFFQ69G5FAV
|
||||
```
|
||||
|
||||
### Monotonic ULIDs
|
||||
|
||||
To generate monotonically increasing ULIDs, create a monotonic counter.
|
||||
|
||||
*Note that the same seed time is being passed in for this example to demonstrate its behaviour when generating multiple ULIDs within the same millisecond*
|
||||
|
||||
```javascript
|
||||
import { monotonicFactory } from 'ulid'
|
||||
|
||||
const ulid = monotonicFactory()
|
||||
|
||||
// Strict ordering for the same timestamp, by incrementing the least-significant random bit by 1
|
||||
ulid(150000) // 000XAL6S41ACTAV9WEVGEMMVR8
|
||||
ulid(150000) // 000XAL6S41ACTAV9WEVGEMMVR9
|
||||
ulid(150000) // 000XAL6S41ACTAV9WEVGEMMVRA
|
||||
ulid(150000) // 000XAL6S41ACTAV9WEVGEMMVRB
|
||||
ulid(150000) // 000XAL6S41ACTAV9WEVGEMMVRC
|
||||
|
||||
// Even if a lower timestamp is passed (or generated), it will preserve sort order
|
||||
ulid(100000) // 000XAL6S41ACTAV9WEVGEMMVRD
|
||||
```
|
||||
|
||||
### Pseudo-Random Number Generators
|
||||
|
||||
`ulid` automatically detects a suitable (cryptographically-secure) PRNG. In the browser it will use `crypto.getRandomValues` and on node it will use `crypto.randomBytes`.
|
||||
|
||||
#### Allowing the insecure `Math.random`
|
||||
|
||||
By default, `ulid` will not use `Math.random`, because that is insecure. To allow the use of `Math.random`, you'll have to use `factory` and `detectPrng`.
|
||||
|
||||
```javascript
|
||||
import { factory, detectPrng } from 'ulid'
|
||||
|
||||
const prng = detectPrng(true) // pass `true` to allow insecure
|
||||
const ulid = factory(prng)
|
||||
|
||||
ulid() // 01BXAVRG61YJ5YSBRM51702F6M
|
||||
```
|
||||
|
||||
#### Use your own PRNG
|
||||
|
||||
To use your own pseudo-random number generator, import the factory, and pass it your generator function.
|
||||
|
||||
```javascript
|
||||
import { factory } from 'ulid'
|
||||
import prng from 'somewhere'
|
||||
|
||||
const ulid = factory(prng)
|
||||
|
||||
ulid() // 01BXAVRG61YJ5YSBRM51702F6M
|
||||
```
|
||||
|
||||
You can also pass in a `prng` to the `monotonicFactory` function.
|
||||
|
||||
```javascript
|
||||
import { monotonicFactory } from 'ulid'
|
||||
import prng from 'somewhere'
|
||||
|
||||
const ulid = monotonicFactory(prng)
|
||||
|
||||
ulid() // 01BXAVRG61YJ5YSBRM51702F6M
|
||||
```
|
||||
|
||||
## Implementations in other languages
|
||||
|
||||
Refer to [ulid/spec](https://github.com/ulid/spec)
|
||||
|
||||
## Specification
|
||||
|
||||
Refer to [ulid/spec](https://github.com/ulid/spec)
|
||||
|
||||
## Test Suite
|
||||
|
||||
```
|
||||
npm test
|
||||
```
|
||||
|
||||
## Performance
|
||||
|
||||
```
|
||||
npm run perf
|
||||
```
|
||||
|
||||
```
|
||||
ulid
|
||||
336,331,131 op/s » encodeTime
|
||||
102,041,736 op/s » encodeRandom
|
||||
17,408 op/s » generate
|
||||
|
||||
|
||||
Suites: 1
|
||||
Benches: 3
|
||||
Elapsed: 7,285.75 ms
|
||||
```
|
||||
@@ -1,4 +0,0 @@
|
||||
#! /usr/bin/env node
|
||||
|
||||
var ULID = require('../dist/index.umd.js')
|
||||
process.stdout.write(ULID.ulid())
|
||||
@@ -1,19 +0,0 @@
|
||||
export interface PRNG {
|
||||
(): number;
|
||||
}
|
||||
export interface ULID {
|
||||
(seedTime?: number): string;
|
||||
}
|
||||
export interface LibError extends Error {
|
||||
source: string;
|
||||
}
|
||||
export declare function replaceCharAt(str: string, index: number, char: string): string;
|
||||
export declare function incrementBase32(str: string): string;
|
||||
export declare function randomChar(prng: PRNG): string;
|
||||
export declare function encodeTime(now: number, len: number): string;
|
||||
export declare function encodeRandom(len: number, prng: PRNG): string;
|
||||
export declare function decodeTime(id: string): number;
|
||||
export declare function detectPrng(allowInsecure?: boolean, root?: any): PRNG;
|
||||
export declare function factory(currPrng?: PRNG): ULID;
|
||||
export declare function monotonicFactory(currPrng?: PRNG): ULID;
|
||||
export declare const ulid: ULID;
|
||||
@@ -1,158 +0,0 @@
|
||||
function createError(message) {
|
||||
var err = new Error(message);
|
||||
err.source = "ulid";
|
||||
return err;
|
||||
}
|
||||
// These values should NEVER change. If
|
||||
// they do, we're no longer making ulids!
|
||||
var ENCODING = "0123456789ABCDEFGHJKMNPQRSTVWXYZ"; // Crockford's Base32
|
||||
var ENCODING_LEN = ENCODING.length;
|
||||
var TIME_MAX = Math.pow(2, 48) - 1;
|
||||
var TIME_LEN = 10;
|
||||
var RANDOM_LEN = 16;
|
||||
function replaceCharAt(str, index, char) {
|
||||
if (index > str.length - 1) {
|
||||
return str;
|
||||
}
|
||||
return str.substr(0, index) + char + str.substr(index + 1);
|
||||
}
|
||||
function incrementBase32(str) {
|
||||
var done = undefined;
|
||||
var index = str.length;
|
||||
var char = void 0;
|
||||
var charIndex = void 0;
|
||||
var maxCharIndex = ENCODING_LEN - 1;
|
||||
while (!done && index-- >= 0) {
|
||||
char = str[index];
|
||||
charIndex = ENCODING.indexOf(char);
|
||||
if (charIndex === -1) {
|
||||
throw createError("incorrectly encoded string");
|
||||
}
|
||||
if (charIndex === maxCharIndex) {
|
||||
str = replaceCharAt(str, index, ENCODING[0]);
|
||||
continue;
|
||||
}
|
||||
done = replaceCharAt(str, index, ENCODING[charIndex + 1]);
|
||||
}
|
||||
if (typeof done === "string") {
|
||||
return done;
|
||||
}
|
||||
throw createError("cannot increment this string");
|
||||
}
|
||||
function randomChar(prng) {
|
||||
var rand = Math.floor(prng() * ENCODING_LEN);
|
||||
if (rand === ENCODING_LEN) {
|
||||
rand = ENCODING_LEN - 1;
|
||||
}
|
||||
return ENCODING.charAt(rand);
|
||||
}
|
||||
function encodeTime(now, len) {
|
||||
if (isNaN(now)) {
|
||||
throw new Error(now + " must be a number");
|
||||
}
|
||||
if (now > TIME_MAX) {
|
||||
throw createError("cannot encode time greater than " + TIME_MAX);
|
||||
}
|
||||
if (now < 0) {
|
||||
throw createError("time must be positive");
|
||||
}
|
||||
if (Number.isInteger(now) === false) {
|
||||
throw createError("time must be an integer");
|
||||
}
|
||||
var mod = void 0;
|
||||
var str = "";
|
||||
for (; len > 0; len--) {
|
||||
mod = now % ENCODING_LEN;
|
||||
str = ENCODING.charAt(mod) + str;
|
||||
now = (now - mod) / ENCODING_LEN;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
function encodeRandom(len, prng) {
|
||||
var str = "";
|
||||
for (; len > 0; len--) {
|
||||
str = randomChar(prng) + str;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
function decodeTime(id) {
|
||||
if (id.length !== TIME_LEN + RANDOM_LEN) {
|
||||
throw createError("malformed ulid");
|
||||
}
|
||||
var time = id.substr(0, TIME_LEN).split("").reverse().reduce(function (carry, char, index) {
|
||||
var encodingIndex = ENCODING.indexOf(char);
|
||||
if (encodingIndex === -1) {
|
||||
throw createError("invalid character found: " + char);
|
||||
}
|
||||
return carry += encodingIndex * Math.pow(ENCODING_LEN, index);
|
||||
}, 0);
|
||||
if (time > TIME_MAX) {
|
||||
throw createError("malformed ulid, timestamp too large");
|
||||
}
|
||||
return time;
|
||||
}
|
||||
function detectPrng() {
|
||||
var allowInsecure = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
||||
var root = arguments[1];
|
||||
|
||||
if (!root) {
|
||||
root = typeof window !== "undefined" ? window : null;
|
||||
}
|
||||
var browserCrypto = root && (root.crypto || root.msCrypto);
|
||||
if (browserCrypto) {
|
||||
return function () {
|
||||
var buffer = new Uint8Array(1);
|
||||
browserCrypto.getRandomValues(buffer);
|
||||
return buffer[0] / 0xff;
|
||||
};
|
||||
} else {
|
||||
try {
|
||||
var nodeCrypto = require("crypto");
|
||||
return function () {
|
||||
return nodeCrypto.randomBytes(1).readUInt8() / 0xff;
|
||||
};
|
||||
} catch (e) {}
|
||||
}
|
||||
if (allowInsecure) {
|
||||
try {
|
||||
console.error("secure crypto unusable, falling back to insecure Math.random()!");
|
||||
} catch (e) {}
|
||||
return function () {
|
||||
return Math.random();
|
||||
};
|
||||
}
|
||||
throw createError("secure crypto unusable, insecure Math.random not allowed");
|
||||
}
|
||||
function factory(currPrng) {
|
||||
if (!currPrng) {
|
||||
currPrng = detectPrng();
|
||||
}
|
||||
return function ulid(seedTime) {
|
||||
if (isNaN(seedTime)) {
|
||||
seedTime = Date.now();
|
||||
}
|
||||
return encodeTime(seedTime, TIME_LEN) + encodeRandom(RANDOM_LEN, currPrng);
|
||||
};
|
||||
}
|
||||
function monotonicFactory(currPrng) {
|
||||
if (!currPrng) {
|
||||
currPrng = detectPrng();
|
||||
}
|
||||
var lastTime = 0;
|
||||
var lastRandom = void 0;
|
||||
return function ulid(seedTime) {
|
||||
if (isNaN(seedTime)) {
|
||||
seedTime = Date.now();
|
||||
}
|
||||
if (seedTime <= lastTime) {
|
||||
var incrementedRandom = lastRandom = incrementBase32(lastRandom);
|
||||
return encodeTime(lastTime, TIME_LEN) + incrementedRandom;
|
||||
}
|
||||
lastTime = seedTime;
|
||||
var newRandom = lastRandom = encodeRandom(RANDOM_LEN, currPrng);
|
||||
return encodeTime(seedTime, TIME_LEN) + newRandom;
|
||||
};
|
||||
}
|
||||
var ulid = factory();
|
||||
|
||||
export { replaceCharAt, incrementBase32, randomChar, encodeTime, encodeRandom, decodeTime, detectPrng, factory, monotonicFactory, ulid };
|
||||
@@ -1,156 +0,0 @@
|
||||
function createError(message) {
|
||||
const err = new Error(message);
|
||||
err.source = "ulid";
|
||||
return err;
|
||||
}
|
||||
// These values should NEVER change. If
|
||||
// they do, we're no longer making ulids!
|
||||
const ENCODING = "0123456789ABCDEFGHJKMNPQRSTVWXYZ"; // Crockford's Base32
|
||||
const ENCODING_LEN = ENCODING.length;
|
||||
const TIME_MAX = Math.pow(2, 48) - 1;
|
||||
const TIME_LEN = 10;
|
||||
const RANDOM_LEN = 16;
|
||||
export function replaceCharAt(str, index, char) {
|
||||
if (index > str.length - 1) {
|
||||
return str;
|
||||
}
|
||||
return str.substr(0, index) + char + str.substr(index + 1);
|
||||
}
|
||||
export function incrementBase32(str) {
|
||||
let done = undefined;
|
||||
let index = str.length;
|
||||
let char;
|
||||
let charIndex;
|
||||
const maxCharIndex = ENCODING_LEN - 1;
|
||||
while (!done && index-- >= 0) {
|
||||
char = str[index];
|
||||
charIndex = ENCODING.indexOf(char);
|
||||
if (charIndex === -1) {
|
||||
throw createError("incorrectly encoded string");
|
||||
}
|
||||
if (charIndex === maxCharIndex) {
|
||||
str = replaceCharAt(str, index, ENCODING[0]);
|
||||
continue;
|
||||
}
|
||||
done = replaceCharAt(str, index, ENCODING[charIndex + 1]);
|
||||
}
|
||||
if (typeof done === "string") {
|
||||
return done;
|
||||
}
|
||||
throw createError("cannot increment this string");
|
||||
}
|
||||
export function randomChar(prng) {
|
||||
let rand = Math.floor(prng() * ENCODING_LEN);
|
||||
if (rand === ENCODING_LEN) {
|
||||
rand = ENCODING_LEN - 1;
|
||||
}
|
||||
return ENCODING.charAt(rand);
|
||||
}
|
||||
export function encodeTime(now, len) {
|
||||
if (isNaN(now)) {
|
||||
throw new Error(now + " must be a number");
|
||||
}
|
||||
if (now > TIME_MAX) {
|
||||
throw createError("cannot encode time greater than " + TIME_MAX);
|
||||
}
|
||||
if (now < 0) {
|
||||
throw createError("time must be positive");
|
||||
}
|
||||
if (Number.isInteger(now) === false) {
|
||||
throw createError("time must be an integer");
|
||||
}
|
||||
let mod;
|
||||
let str = "";
|
||||
for (; len > 0; len--) {
|
||||
mod = now % ENCODING_LEN;
|
||||
str = ENCODING.charAt(mod) + str;
|
||||
now = (now - mod) / ENCODING_LEN;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
export function encodeRandom(len, prng) {
|
||||
let str = "";
|
||||
for (; len > 0; len--) {
|
||||
str = randomChar(prng) + str;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
export function decodeTime(id) {
|
||||
if (id.length !== TIME_LEN + RANDOM_LEN) {
|
||||
throw createError("malformed ulid");
|
||||
}
|
||||
var time = id
|
||||
.substr(0, TIME_LEN)
|
||||
.split("")
|
||||
.reverse()
|
||||
.reduce((carry, char, index) => {
|
||||
const encodingIndex = ENCODING.indexOf(char);
|
||||
if (encodingIndex === -1) {
|
||||
throw createError("invalid character found: " + char);
|
||||
}
|
||||
return (carry += encodingIndex * Math.pow(ENCODING_LEN, index));
|
||||
}, 0);
|
||||
if (time > TIME_MAX) {
|
||||
throw createError("malformed ulid, timestamp too large");
|
||||
}
|
||||
return time;
|
||||
}
|
||||
export function detectPrng(allowInsecure = false, root) {
|
||||
if (!root) {
|
||||
root = typeof window !== "undefined" ? window : null;
|
||||
}
|
||||
const browserCrypto = root && (root.crypto || root.msCrypto);
|
||||
if (browserCrypto) {
|
||||
return () => {
|
||||
const buffer = new Uint8Array(1);
|
||||
browserCrypto.getRandomValues(buffer);
|
||||
return buffer[0] / 0xff;
|
||||
};
|
||||
}
|
||||
else {
|
||||
try {
|
||||
const nodeCrypto = require("crypto");
|
||||
return () => nodeCrypto.randomBytes(1).readUInt8() / 0xff;
|
||||
}
|
||||
catch (e) { }
|
||||
}
|
||||
if (allowInsecure) {
|
||||
try {
|
||||
console.error("secure crypto unusable, falling back to insecure Math.random()!");
|
||||
}
|
||||
catch (e) { }
|
||||
return () => Math.random();
|
||||
}
|
||||
throw createError("secure crypto unusable, insecure Math.random not allowed");
|
||||
}
|
||||
export function factory(currPrng) {
|
||||
if (!currPrng) {
|
||||
currPrng = detectPrng();
|
||||
}
|
||||
return function ulid(seedTime) {
|
||||
if (isNaN(seedTime)) {
|
||||
seedTime = Date.now();
|
||||
}
|
||||
return encodeTime(seedTime, TIME_LEN) + encodeRandom(RANDOM_LEN, currPrng);
|
||||
};
|
||||
}
|
||||
export function monotonicFactory(currPrng) {
|
||||
if (!currPrng) {
|
||||
currPrng = detectPrng();
|
||||
}
|
||||
let lastTime = 0;
|
||||
let lastRandom;
|
||||
return function ulid(seedTime) {
|
||||
if (isNaN(seedTime)) {
|
||||
seedTime = Date.now();
|
||||
}
|
||||
if (seedTime <= lastTime) {
|
||||
const incrementedRandom = (lastRandom = incrementBase32(lastRandom));
|
||||
return encodeTime(lastTime, TIME_LEN) + incrementedRandom;
|
||||
}
|
||||
lastTime = seedTime;
|
||||
const newRandom = (lastRandom = encodeRandom(RANDOM_LEN, currPrng));
|
||||
return encodeTime(seedTime, TIME_LEN) + newRandom;
|
||||
};
|
||||
}
|
||||
export const ulid = factory();
|
||||
@@ -1,177 +0,0 @@
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
||||
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
||||
(factory((global.ULID = {})));
|
||||
}(this, (function (exports) { 'use strict';
|
||||
|
||||
function createError(message) {
|
||||
var err = new Error(message);
|
||||
err.source = "ulid";
|
||||
return err;
|
||||
}
|
||||
// These values should NEVER change. If
|
||||
// they do, we're no longer making ulids!
|
||||
var ENCODING = "0123456789ABCDEFGHJKMNPQRSTVWXYZ"; // Crockford's Base32
|
||||
var ENCODING_LEN = ENCODING.length;
|
||||
var TIME_MAX = Math.pow(2, 48) - 1;
|
||||
var TIME_LEN = 10;
|
||||
var RANDOM_LEN = 16;
|
||||
function replaceCharAt(str, index, char) {
|
||||
if (index > str.length - 1) {
|
||||
return str;
|
||||
}
|
||||
return str.substr(0, index) + char + str.substr(index + 1);
|
||||
}
|
||||
function incrementBase32(str) {
|
||||
var done = undefined;
|
||||
var index = str.length;
|
||||
var char = void 0;
|
||||
var charIndex = void 0;
|
||||
var maxCharIndex = ENCODING_LEN - 1;
|
||||
while (!done && index-- >= 0) {
|
||||
char = str[index];
|
||||
charIndex = ENCODING.indexOf(char);
|
||||
if (charIndex === -1) {
|
||||
throw createError("incorrectly encoded string");
|
||||
}
|
||||
if (charIndex === maxCharIndex) {
|
||||
str = replaceCharAt(str, index, ENCODING[0]);
|
||||
continue;
|
||||
}
|
||||
done = replaceCharAt(str, index, ENCODING[charIndex + 1]);
|
||||
}
|
||||
if (typeof done === "string") {
|
||||
return done;
|
||||
}
|
||||
throw createError("cannot increment this string");
|
||||
}
|
||||
function randomChar(prng) {
|
||||
var rand = Math.floor(prng() * ENCODING_LEN);
|
||||
if (rand === ENCODING_LEN) {
|
||||
rand = ENCODING_LEN - 1;
|
||||
}
|
||||
return ENCODING.charAt(rand);
|
||||
}
|
||||
function encodeTime(now, len) {
|
||||
if (isNaN(now)) {
|
||||
throw new Error(now + " must be a number");
|
||||
}
|
||||
if (now > TIME_MAX) {
|
||||
throw createError("cannot encode time greater than " + TIME_MAX);
|
||||
}
|
||||
if (now < 0) {
|
||||
throw createError("time must be positive");
|
||||
}
|
||||
if (Number.isInteger(now) === false) {
|
||||
throw createError("time must be an integer");
|
||||
}
|
||||
var mod = void 0;
|
||||
var str = "";
|
||||
for (; len > 0; len--) {
|
||||
mod = now % ENCODING_LEN;
|
||||
str = ENCODING.charAt(mod) + str;
|
||||
now = (now - mod) / ENCODING_LEN;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
function encodeRandom(len, prng) {
|
||||
var str = "";
|
||||
for (; len > 0; len--) {
|
||||
str = randomChar(prng) + str;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
function decodeTime(id) {
|
||||
if (id.length !== TIME_LEN + RANDOM_LEN) {
|
||||
throw createError("malformed ulid");
|
||||
}
|
||||
var time = id.substr(0, TIME_LEN).split("").reverse().reduce(function (carry, char, index) {
|
||||
var encodingIndex = ENCODING.indexOf(char);
|
||||
if (encodingIndex === -1) {
|
||||
throw createError("invalid character found: " + char);
|
||||
}
|
||||
return carry += encodingIndex * Math.pow(ENCODING_LEN, index);
|
||||
}, 0);
|
||||
if (time > TIME_MAX) {
|
||||
throw createError("malformed ulid, timestamp too large");
|
||||
}
|
||||
return time;
|
||||
}
|
||||
function detectPrng() {
|
||||
var allowInsecure = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
||||
var root = arguments[1];
|
||||
|
||||
if (!root) {
|
||||
root = typeof window !== "undefined" ? window : null;
|
||||
}
|
||||
var browserCrypto = root && (root.crypto || root.msCrypto);
|
||||
if (browserCrypto) {
|
||||
return function () {
|
||||
var buffer = new Uint8Array(1);
|
||||
browserCrypto.getRandomValues(buffer);
|
||||
return buffer[0] / 0xff;
|
||||
};
|
||||
} else {
|
||||
try {
|
||||
var nodeCrypto = require("crypto");
|
||||
return function () {
|
||||
return nodeCrypto.randomBytes(1).readUInt8() / 0xff;
|
||||
};
|
||||
} catch (e) {}
|
||||
}
|
||||
if (allowInsecure) {
|
||||
try {
|
||||
console.error("secure crypto unusable, falling back to insecure Math.random()!");
|
||||
} catch (e) {}
|
||||
return function () {
|
||||
return Math.random();
|
||||
};
|
||||
}
|
||||
throw createError("secure crypto unusable, insecure Math.random not allowed");
|
||||
}
|
||||
function factory(currPrng) {
|
||||
if (!currPrng) {
|
||||
currPrng = detectPrng();
|
||||
}
|
||||
return function ulid(seedTime) {
|
||||
if (isNaN(seedTime)) {
|
||||
seedTime = Date.now();
|
||||
}
|
||||
return encodeTime(seedTime, TIME_LEN) + encodeRandom(RANDOM_LEN, currPrng);
|
||||
};
|
||||
}
|
||||
function monotonicFactory(currPrng) {
|
||||
if (!currPrng) {
|
||||
currPrng = detectPrng();
|
||||
}
|
||||
var lastTime = 0;
|
||||
var lastRandom = void 0;
|
||||
return function ulid(seedTime) {
|
||||
if (isNaN(seedTime)) {
|
||||
seedTime = Date.now();
|
||||
}
|
||||
if (seedTime <= lastTime) {
|
||||
var incrementedRandom = lastRandom = incrementBase32(lastRandom);
|
||||
return encodeTime(lastTime, TIME_LEN) + incrementedRandom;
|
||||
}
|
||||
lastTime = seedTime;
|
||||
var newRandom = lastRandom = encodeRandom(RANDOM_LEN, currPrng);
|
||||
return encodeTime(seedTime, TIME_LEN) + newRandom;
|
||||
};
|
||||
}
|
||||
var ulid = factory();
|
||||
|
||||
exports.replaceCharAt = replaceCharAt;
|
||||
exports.incrementBase32 = incrementBase32;
|
||||
exports.randomChar = randomChar;
|
||||
exports.encodeTime = encodeTime;
|
||||
exports.encodeRandom = encodeRandom;
|
||||
exports.decodeTime = decodeTime;
|
||||
exports.detectPrng = detectPrng;
|
||||
exports.factory = factory;
|
||||
exports.monotonicFactory = monotonicFactory;
|
||||
exports.ulid = ulid;
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
})));
|
||||
@@ -1,79 +0,0 @@
|
||||
{
|
||||
"_from": "ulid@^2.3.0",
|
||||
"_id": "ulid@2.3.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-keqHubrlpvT6G2wH0OEfSW4mquYRcbe/J8NMmveoQOjUqmo+hXtO+ORCpWhdbZ7k72UtY61BL7haGxW6enBnjw==",
|
||||
"_location": "/ulid",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "ulid@^2.3.0",
|
||||
"name": "ulid",
|
||||
"escapedName": "ulid",
|
||||
"rawSpec": "^2.3.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.3.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/prettier-plugin-go-template"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/ulid/-/ulid-2.3.0.tgz",
|
||||
"_shasum": "93063522771a9774121a84d126ecd3eb9804071f",
|
||||
"_spec": "ulid@^2.3.0",
|
||||
"_where": "/home/kossa/projects/knaeckeboot-tailwind/node_modules/prettier-plugin-go-template",
|
||||
"author": {
|
||||
"name": "Alizain Feerasta"
|
||||
},
|
||||
"bin": {
|
||||
"ulid": "bin/cli.js"
|
||||
},
|
||||
"browser": {
|
||||
"crypto": "./stubs/crypto.js"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/ulid/javascript/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "A universally-unique, lexicographically-sortable, identifier generator",
|
||||
"devDependencies": {
|
||||
"@types/node": "^8.0.47",
|
||||
"babel-core": "^6.26.0",
|
||||
"babel-plugin-external-helpers": "^6.22.0",
|
||||
"babel-preset-env": "^1.6.1",
|
||||
"istanbul": "^0.4.4",
|
||||
"lolex": "^2.1.3",
|
||||
"matcha": "^0.7.0",
|
||||
"mocha": "^2.5.3",
|
||||
"rollup": "^0.50.0",
|
||||
"rollup-plugin-babel": "^3.0.2",
|
||||
"rollup-plugin-typescript": "^0.8.1",
|
||||
"typedoc": "^0.9.0",
|
||||
"typescript": "^2.5.3"
|
||||
},
|
||||
"esnext": "./dist/index.js",
|
||||
"files": [
|
||||
"bin",
|
||||
"dist",
|
||||
"stubs"
|
||||
],
|
||||
"homepage": "https://github.com/ulid/javascript#readme",
|
||||
"license": "MIT",
|
||||
"main": "./dist/index.umd.js",
|
||||
"module": "./dist/index.esm.js",
|
||||
"name": "ulid",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ulid/javascript.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "npm run ts && npm run rollup",
|
||||
"perf": "matcha perf.js",
|
||||
"rollup": "rollup -c",
|
||||
"test": "istanbul cover node_modules/mocha/bin/_mocha -- -R spec",
|
||||
"ts": "tsc -p ."
|
||||
},
|
||||
"types": "./dist/index.d.ts",
|
||||
"version": "2.3.0"
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
{
|
||||
"name": "knaeckeboot-tailwind",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"prettier": {
|
||||
"version": "2.7.1",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz",
|
||||
"integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==",
|
||||
"dev": true
|
||||
},
|
||||
"prettier-plugin-go-template": {
|
||||
"version": "0.0.13",
|
||||
"resolved": "https://registry.npmjs.org/prettier-plugin-go-template/-/prettier-plugin-go-template-0.0.13.tgz",
|
||||
"integrity": "sha512-gG/xT5kd+kCzoMaTchXvdfBdsunyRCV6G8cgdPGPd2V5JGGKXUG7SjzBKU7jaGh2RTeblcAdBb/E+S/duOAMsA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ulid": "^2.3.0"
|
||||
}
|
||||
},
|
||||
"ulid": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ulid/-/ulid-2.3.0.tgz",
|
||||
"integrity": "sha512-keqHubrlpvT6G2wH0OEfSW4mquYRcbe/J8NMmveoQOjUqmo+hXtO+ORCpWhdbZ7k72UtY61BL7haGxW6enBnjw==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 116 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 30 KiB |
@@ -1402,6 +1402,10 @@ video {
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
.mt-12 {
|
||||
margin-top: 3rem;
|
||||
}
|
||||
|
||||
.mb-8 {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
@@ -1450,8 +1454,8 @@ video {
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
.mt-12 {
|
||||
margin-top: 3rem;
|
||||
.mt-2 {
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
.block {
|
||||
@@ -1484,6 +1488,14 @@ video {
|
||||
height: 2.5rem;
|
||||
}
|
||||
|
||||
.max-h-80 {
|
||||
max-height: 20rem;
|
||||
}
|
||||
|
||||
.max-h-96 {
|
||||
max-height: 24rem;
|
||||
}
|
||||
|
||||
.min-h-\[80vh\] {
|
||||
min-height: 80vh;
|
||||
}
|
||||
@@ -1589,6 +1601,10 @@ video {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.rounded-lg {
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
|
||||
.rounded-full {
|
||||
border-radius: 9999px;
|
||||
}
|
||||
@@ -1597,10 +1613,6 @@ video {
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
|
||||
.rounded-lg {
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
|
||||
.border-2 {
|
||||
border-width: 2px;
|
||||
}
|
||||
@@ -1640,6 +1652,11 @@ video {
|
||||
border-color: rgb(212 212 212 / var(--tw-border-opacity));
|
||||
}
|
||||
|
||||
.bg-secondary-600 {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(27 140 76 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-neutral-100 {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(245 245 245 / var(--tw-bg-opacity));
|
||||
@@ -1660,26 +1677,6 @@ video {
|
||||
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-secondary-400 {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(112 240 168 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-secondary-600 {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(27 140 76 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-primary-500 {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(69 113 194 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-secondary-500 {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(58 203 121 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.p-4 {
|
||||
padding: 1rem;
|
||||
}
|
||||
@@ -1712,6 +1709,11 @@ video {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.text-xl {
|
||||
font-size: 1.25rem;
|
||||
line-height: 1.75rem;
|
||||
}
|
||||
|
||||
.text-4xl {
|
||||
font-size: 2.25rem;
|
||||
line-height: 2.5rem;
|
||||
@@ -1727,9 +1729,14 @@ video {
|
||||
line-height: 1.75rem;
|
||||
}
|
||||
|
||||
.text-xl {
|
||||
font-size: 1.25rem;
|
||||
line-height: 1.75rem;
|
||||
.text-sm {
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.25rem;
|
||||
}
|
||||
|
||||
.text-xs {
|
||||
font-size: 0.75rem;
|
||||
line-height: 1rem;
|
||||
}
|
||||
|
||||
.font-bold {
|
||||
@@ -1775,6 +1782,16 @@ video {
|
||||
color: rgb(69 113 194 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.text-tertiary-400 {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(171 123 239 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.text-tertiary-600 {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(76 35 133 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.underline {
|
||||
-webkit-text-decoration-line: underline;
|
||||
text-decoration-line: underline;
|
||||
@@ -1800,9 +1817,8 @@ video {
|
||||
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
||||
}
|
||||
|
||||
.hover\:bg-primary-500:hover {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(69 113 194 / var(--tw-bg-opacity));
|
||||
.visited\:text-primary-400:visited {
|
||||
color: rgb(123 164 238 );
|
||||
}
|
||||
|
||||
.hover\:bg-secondary-500:hover {
|
||||
@@ -1810,14 +1826,9 @@ video {
|
||||
background-color: rgb(58 203 121 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.hover\:bg-primary-400:hover {
|
||||
.hover\:bg-primary-500:hover {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(123 164 238 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.hover\:bg-secondary-400:hover {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(112 240 168 / var(--tw-bg-opacity));
|
||||
background-color: rgb(69 113 194 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.hover\:text-primary-500:hover {
|
||||
@@ -1825,11 +1836,26 @@ video {
|
||||
color: rgb(69 113 194 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.hover\:text-tertiary-500:hover {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(122 69 197 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.hover\:underline:hover {
|
||||
-webkit-text-decoration-line: underline;
|
||||
text-decoration-line: underline;
|
||||
}
|
||||
|
||||
.prose-h2\:text-4xl :is(:where(h2):not(:where([class~="not-prose"] *))) {
|
||||
font-size: 2.25rem;
|
||||
line-height: 2.5rem;
|
||||
}
|
||||
|
||||
.prose-h2\:text-neutral-600 :is(:where(h2):not(:where([class~="not-prose"] *))) {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(82 82 82 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.md\:sticky {
|
||||
position: -webkit-sticky;
|
||||
@@ -1845,6 +1871,14 @@ video {
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
||||
.md\:mt-2 {
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
.md\:mt-6 {
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
.md\:flex {
|
||||
display: flex;
|
||||
}
|
||||
@@ -1875,6 +1909,11 @@ video {
|
||||
padding-left: 0px;
|
||||
padding-right: 0px;
|
||||
}
|
||||
|
||||
.md\:text-sm {
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.25rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1024px) {
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
{{- $image := .Page.Resources.GetMatch .Destination -}}
|
||||
{{- if $image -}}
|
||||
{{ $image_resize := $image.Resize "1024x webp q80" }}
|
||||
|
||||
<div class="flex justify-center">
|
||||
<a href="{{- $image.RelPermalink -}}">
|
||||
<img loading="lazy" src="{{ $image_resize.RelPermalink }}" alt="{{ .Text }}" class="max-h-96">
|
||||
</a>
|
||||
</div>
|
||||
{{- else -}}
|
||||
<img loading="lazy" class="img-fluid" src="{{ .Destination | safeURL }}" {{ with .Text}} alt="{{ . }}" {{ else }} alt="{{ .Page.Title }}" {{ end }} {{ with .Title}} title="{{ . }}"{{ end }} />
|
||||
<p>Fallback</p>
|
||||
{{- end -}}
|
||||
@@ -1,18 +1,19 @@
|
||||
{{ define "main"}}
|
||||
<article class="prose prose-lg mt-10">
|
||||
<article class="prose prose-lg prose-h2:text-neutral-600 prose-h2:text-4xl mt-10">
|
||||
<div class="text-xs md:text-sm mb-4">{{ .Date | time.Format ":date_long" }}</div>
|
||||
<h1 class="text-neutral-600">{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
</article>
|
||||
|
||||
<div class="flex flex-row justify-between">
|
||||
<div class="flex flex-row justify-between mt-8">
|
||||
<div>
|
||||
{{ if .PrevPage }}
|
||||
<a href="{{ .PrevPage.Permalink}}">{{ .PrevPage.Title }}</a>
|
||||
<a class="underline text-tertiary-600 hover:text-tertiary-500 visited:text-primary-400" href="{{ .PrevPage.Permalink}}">Vorheriger: {{ .PrevPage.Title }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div>
|
||||
{{ if .NextPage }}
|
||||
<a href="{{ .NextPage.Permalink}}">{{ .NextPage.Title }}</a>
|
||||
<a class="underline text-tertiary-600 hover:text-tertiary-500 visited:text-primary-400" href="{{ .NextPage.Permalink}}">Nächster: {{ .NextPage.Title }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="m-4">
|
||||
<div class="mt-6 mb-4">
|
||||
<div class="mb-4">
|
||||
<a class="text-3xl font-bold text-neutral-800" href="{{ .Permalink }}"
|
||||
<a class="text-3xl font-bold text-neutral-600" href="{{ .Permalink }}"
|
||||
>{{ .Title }}</a
|
||||
>
|
||||
</div>
|
||||
@@ -8,8 +8,8 @@
|
||||
<div class="flex flex-col justify-center h-fit mb-2">
|
||||
{{ $image := .Resources.GetMatch "header" }}
|
||||
{{ with $image }}
|
||||
{{ $image := $image.Crop "512x512 Center" }}
|
||||
<img class="" src="{{ $image.RelPermalink }}" />
|
||||
{{ $image := $image.Fill "512x512 Center webp" }}
|
||||
<img class="md:mt-2" src="{{ $image.RelPermalink }}" />
|
||||
{{ end }}
|
||||
<span class="mt-4 text-neutral-500">{{ .Param "author" }}</span>
|
||||
<span class="text-neutral-500"
|
||||
@@ -18,9 +18,9 @@
|
||||
</div>
|
||||
<div class="prose lg:col-span-2">
|
||||
{{ .Summary }}
|
||||
<div class="mt-6">
|
||||
<div class="mt-4 md:mt-6">
|
||||
<a
|
||||
class="underline text-primary-600 hover:text-primary-500"
|
||||
class="underline text-tertiary-600 hover:text-tertiary-500 visited:text-primary-400"
|
||||
href="{{ .Permalink }}"
|
||||
>Weiterlesen...</a
|
||||
>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{{ printf "%#v" . }}
|
||||
{{/* Step 1: A default image as fallback */}}
|
||||
{{ $image := "/images/placeholder.png" }}
|
||||
|
||||
{{/* Step 2: now check if passed image exists with same as title */}}
|
||||
{{ $image_url := .Resources.Match .ImageSrc }}
|
||||
{{ $img_param := .ImgParam }}
|
||||
{{ if $image_url }}
|
||||
{{/* Resize and convert the image */}}
|
||||
{{ $image_url = $image_url.Resize $img_param }}
|
||||
{{ $image = $image_url.RelPermalink }}
|
||||
{{end}}
|
||||
|
||||
{{return .ImageSrc}}
|
||||
@@ -3,32 +3,32 @@ const colors = require('tailwindcss/colors')
|
||||
module.exports = {
|
||||
content: ['content/**/*.md', 'layouts/**/*.html'],
|
||||
theme: {
|
||||
extend: {},
|
||||
colors: {
|
||||
gray: colors.gray,
|
||||
neutral: colors.neutral,
|
||||
'white': '#ffffff',
|
||||
'black': '#000000',
|
||||
'primary': {
|
||||
300: '#E9F1FF',
|
||||
400: '#7BA4EE',
|
||||
500: '#4571C2',
|
||||
600: '#234583',
|
||||
700: '#070C14',
|
||||
},
|
||||
'secondary': {
|
||||
300: '#E7FFF1',
|
||||
400: '#70F0A8',
|
||||
500: '#3ACB79',
|
||||
600: '#1B8C4C',
|
||||
700: '#07160D',
|
||||
},
|
||||
'tertiary': {
|
||||
300: '#F2E9FF',
|
||||
400: '#AB7BEF',
|
||||
500: '#7A45C5',
|
||||
600: '#4C2385',
|
||||
700: '#0D0715',
|
||||
extend: {
|
||||
colors: {
|
||||
neutral: colors.neutral,
|
||||
'white': '#ffffff',
|
||||
'black': '#000000',
|
||||
'primary': {
|
||||
300: '#E9F1FF',
|
||||
400: '#7BA4EE',
|
||||
500: '#4571C2',
|
||||
600: '#234583',
|
||||
700: '#070C14',
|
||||
},
|
||||
'secondary': {
|
||||
300: '#E7FFF1',
|
||||
400: '#70F0A8',
|
||||
500: '#3ACB79',
|
||||
600: '#1B8C4C',
|
||||
700: '#07160D',
|
||||
},
|
||||
'tertiary': {
|
||||
300: '#F2E9FF',
|
||||
400: '#AB7BEF',
|
||||
500: '#7A45C5',
|
||||
600: '#4C2385',
|
||||
700: '#0D0715',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||