Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
skyzyx committed Dec 12, 2024
1 parent a28398d commit 5db3fbf
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 22 deletions.
20 changes: 14 additions & 6 deletions assets/css/_tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,18 @@
@apply m-0 mt-6 first:mt-0 py-1
}

#tmpl-single #content h2 {
@apply m-0 mt-6 first:mt-0 py-2 my-2 block border-solid border-b-2 border-gray-200 dark:border-gray-700
}

#tmpl-single h3 {
@apply m-0 mt-4 mb-1 py-1
}

#tmpl-single #content h3 {
@apply underline underline-offset-2
}

#tmpl-single ol,
#tmpl-single ul {
@apply my-1
Expand Down Expand Up @@ -71,27 +79,27 @@
}

.ui-badge-success-wrap {
@apply inline-flex items-baseline rounded-full pl-2 pr-2.5 py-1 text-sm font-medium bg-green-100 text-green-700 md:mt-2 lg:mt-0 ring-1 ring-inset ring-green-200 mr-1;
@apply inline-flex items-baseline rounded-full pl-2 pr-2.5 py-1 text-sm font-medium bg-green-100 dark:bg-green-600 text-green-700 dark:text-green-100 md:mt-2 lg:mt-0 ring-1 ring-inset ring-green-200 dark:ring-green-700 mr-1;
}

.ui-badge-success-svg {
@apply -ml-1 mr-0.5 h-5 w-5 flex-shrink-0 self-center text-green-600 inline;
@apply -ml-1 mr-0.5 h-5 w-5 flex-shrink-0 self-center text-green-600 dark:text-green-100 inline;
}

.ui-badge-alert-wrap {
@apply inline-flex items-baseline rounded-full pl-2 pr-2.5 py-1 text-sm font-medium bg-orange-100 text-orange-600 md:mt-2 lg:mt-0 ring-1 ring-inset ring-orange-200 mr-1;
@apply inline-flex items-baseline rounded-full pl-2 pr-2.5 py-1 text-sm font-medium bg-orange-100 dark:bg-orange-500 text-orange-600 dark:text-orange-100 md:mt-2 lg:mt-0 ring-1 ring-inset ring-orange-200 dark:ring-orange-700 mr-1;
}

.ui-badge-alert-svg {
@apply -ml-1 mr-0.5 h-5 w-5 flex-shrink-0 self-center text-orange-400 inline;
@apply -ml-1 mr-0.5 h-5 w-5 flex-shrink-0 self-center text-orange-400 dark:text-orange-100 inline;
}

.ui-badge-error-wrap {
@apply inline-flex items-baseline rounded-full pl-2 pr-2.5 py-1 text-sm font-medium bg-red-100 text-red-600 md:mt-2 lg:mt-0 ring-1 ring-inset ring-red-200 mr-1;
@apply inline-flex items-baseline rounded-full pl-2 pr-2.5 py-1 text-sm font-medium bg-red-100 dark:bg-red-600 text-red-600 dark:text-red-100 md:mt-2 lg:mt-0 ring-1 ring-inset ring-red-200 dark:ring-red-700 mr-1;
}

.ui-badge-error-svg {
@apply -ml-1 mr-0.5 h-5 w-5 flex-shrink-0 self-center text-red-600 inline;
@apply -ml-1 mr-0.5 h-5 w-5 flex-shrink-0 self-center text-red-600 dark:text-red-100 inline;
}

.ui-badge-tip-wrap {
Expand Down
4 changes: 2 additions & 2 deletions layouts/_default/class.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<div class="lg:col-span-3 md:col-span-1 bg-white dark:bg-[#171e21] shadow ring-1 ring-gray-900/5 sm:rounded-xl">
<div class="px-4 py-5 sm:p-6 mt-0 flow-root">
<div class="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="inline-block min-w-full py-2 align-middle px-4 sm:px-6 lg:px-8">
<div class="inline-block min-w-full py-2 align-middle px-4 sm:px-6 lg:px-8" id="content">

{{- .Content -}}

Expand Down Expand Up @@ -73,7 +73,7 @@ <h2 id="vulnerabilities-of-this-type">Vulnerabilities of this type</h2>
<div class="col-span-1 bg-white dark:bg-[#171e21] shadow ring-1 ring-gray-900/5 sm:rounded-xl">
<div class="px-4 py-5 sm:p-6 mt-0 flow-root">
<div class="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="inline-block min-w-full py-2 align-middle px-4 sm:px-6 lg:px-8">
<div class="inline-block min-w-full py-2 align-middle px-4 sm:px-6 lg:px-8" id="sidebar">

{{ partial "body/children-of.html" (dict
"context" .
Expand Down
4 changes: 2 additions & 2 deletions layouts/_default/learn-single.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<div class="lg:col-span-3 md:col-span-1 bg-white dark:bg-[#171e21] shadow ring-1 ring-gray-900/5 sm:rounded-xl">
<div class="px-4 py-5 sm:p-6 mt-0 flow-root">
<div class="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="inline-block min-w-full py-2 align-middle px-4 sm:px-6 lg:px-8">
<div class="inline-block min-w-full py-2 align-middle px-4 sm:px-6 lg:px-8" id="content">

{{- .Content -}}

Expand All @@ -55,7 +55,7 @@
<div class="col-span-1 bg-white dark:bg-[#171e21] shadow ring-1 ring-gray-900/5 sm:rounded-xl">
<div class="px-4 py-5 sm:p-6 mt-0 flow-root">
<div class="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="inline-block min-w-full py-2 align-middle px-4 sm:px-6 lg:px-8">
<div class="inline-block min-w-full py-2 align-middle px-4 sm:px-6 lg:px-8" id="sidebar">

{{ partial "body/children-of.html" (dict
"context" .
Expand Down
51 changes: 41 additions & 10 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@
{{ end }}

{{ define "main" }}
{{ $data := .Data }}

{{ if eq .IsHome true }}
Load homepage.
{{ else }}
{{ $taxonomy := .Section }}
{{ if eq $taxonomy "" }}
{{ $taxonomy = substr .Path 1 }}
{{ end }}

{{ $dirFile := path.Split .Path }}
{{ $leaf := $dirFile.File }}
{{/* PAGE HEADER */}}

{{- partial "body/_page_header.html" (dict
Expand All @@ -27,12 +30,13 @@
{{/* TABLE HEADER */}}

<div id="tmpl-single">
<div class="bg-white dark:bg-[#171e21] shadow ring-1 ring-gray-900/5 sm:rounded-xl md:col-span-2 mx-auto max-w-7xl">
<div class="px-4 py-5 sm:p-6">

<div class="mt-0 flow-root">
<div class="grid lg:grid-cols-4 md:grid-cols-1 gap-4 mx-auto max-w-7xl">
{{/* CONTENT */}}
<div class="lg:col-span-3 md:col-span-1 bg-white dark:bg-[#171e21] shadow ring-1 ring-gray-900/5 sm:rounded-xl">
<div class="px-4 py-5 sm:p-6 mt-0 flow-root">
<div class="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="inline-block min-w-full py-2 align-middle px-4 sm:px-6 lg:px-8">
<div class="inline-block min-w-full py-2 align-middle px-4 sm:px-6 lg:px-8" id="content">

{{- .Content -}}

Expand All @@ -43,9 +47,38 @@
</div>
</div>
</div>
</div>

{{/* SIDEBAR */}}
<div class="col-span-1 bg-white dark:bg-[#171e21] shadow ring-1 ring-gray-900/5 sm:rounded-xl">
<div class="px-4 py-5 sm:p-6 mt-0 flow-root">
<div class="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="inline-block min-w-full py-2 align-middle px-4 sm:px-6 lg:px-8" id="sidebar">

{{ partial "body/children-of.html" (dict
"context" .
"heading" "Cipher algorithms"
"childrenOf" "/learning/tls"
)}}

{{ partial "body/children-of.html" (dict
"context" .
"heading" "Vulnerabilites"
"childrenOf" "/learning/vulns"
)}}

{{ partial "body/children-of.html" (dict
"context" .
"heading" "Classes of vulns"
"childrenOf" "/learning/classes"
)}}

</div>
</div>
</div>
</div>
</div>

</div>

{{/* DOCUMENTATION GRID */}}
Expand All @@ -54,8 +87,6 @@

{{ end }}

{{ end }}

{{ define "footer" }}
{{ partial "body/_footer.html" . }}
{{ end }}
4 changes: 2 additions & 2 deletions layouts/_default/vuln.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<div class="lg:col-span-3 md:col-span-1 bg-white dark:bg-[#171e21] shadow ring-1 ring-gray-900/5 sm:rounded-xl">
<div class="px-4 py-5 sm:p-6 mt-0 flow-root">
<div class="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="inline-block min-w-full py-2 align-middle px-4 sm:px-6 lg:px-8">
<div class="inline-block min-w-full py-2 align-middle px-4 sm:px-6 lg:px-8" id="content">

{{- .Content -}}

Expand Down Expand Up @@ -73,7 +73,7 @@ <h2 id="affected-cipher-suite-classes">Affected cipher suite classes</h2>
<div class="col-span-1 bg-white dark:bg-[#171e21] shadow ring-1 ring-gray-900/5 sm:rounded-xl">
<div class="px-4 py-5 sm:p-6 mt-0 flow-root">
<div class="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="inline-block min-w-full py-2 align-middle px-4 sm:px-6 lg:px-8">
<div class="inline-block min-w-full py-2 align-middle px-4 sm:px-6 lg:px-8" id="sidebar">

{{ partial "body/children-of.html" (dict
"context" .
Expand Down
1 change: 1 addition & 0 deletions layouts/shortcodes/svg-alert.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- partial "heroicons/solid/exclamation-triangle.svg" (dict "class" "ui-badge-alert-svg") -}}
1 change: 1 addition & 0 deletions layouts/shortcodes/svg-check.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- partial "heroicons/solid/check-circle.svg" (dict "class" "ui-badge-success-svg") -}}
1 change: 1 addition & 0 deletions layouts/shortcodes/svg-x.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- partial "heroicons/solid/x-circle.svg" (dict "class" "ui-badge-error-svg") -}}
3 changes: 3 additions & 0 deletions layouts/shortcodes/svg.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{- $path := .Get 0 -}}
{{- $class := .Get 1 -}}
{{- partial $path (dict "class" $class) -}}

0 comments on commit 5db3fbf

Please sign in to comment.