Skip to content

Commit

Permalink
Merge pull request #2 from raft-tech/feature/mui
Browse files Browse the repository at this point in the history
Adds MUI CSS
  • Loading branch information
dagan authored Jul 6, 2024
2 parents 84ba937 + dd26084 commit 3a94435
Show file tree
Hide file tree
Showing 10 changed files with 183 additions and 81 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
*.iml

/.idea
/node_modules
/public
/resources
1 change: 1 addition & 0 deletions assets/js/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import * as mui from "muicss/dist/js/mui"
13 changes: 13 additions & 0 deletions assets/sass/main.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@import "muicss/lib/sass/mui.scss";

.mui-appbar {
a {
color: mui-color('white')
}
}

.footer {
position: fixed;
bottom: 0;
width: 100%;
}
3 changes: 1 addition & 2 deletions content/_index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
+++
title = 'Konfirm'
title = '// A Kubernetes Testing Framework'
date = 2024-07-01T16:18:03-07:00
subtitle = ' // A Kubernetes Testing Framework'
+++
7 changes: 4 additions & 3 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
<meta charset="utf-i">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ .Site.Title }}</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
{{- block "head" . }}{{ end }}
{{- $css := resources.Get "sass/main.scss" | toCSS (dict "targetPath" "css/main.css" "includePaths" "node_modules") }}
<link rel="stylesheet" href="{{ $css.RelPermalink }}" />
</head>
<body>
{{- block "main" . }}{{ end -}}
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
{{- $js := resources.Get "js/main.js" | js.Build }}
<script type="text/javascript" src="{{ $js.RelPermalink }}" defer></script>
</body>
</html>
16 changes: 7 additions & 9 deletions layouts/_default/home.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
{{ define "head" }}
<link href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css" rel="stylesheet" crossorigin="anonymous">
{{ end }}
{{ define "head" }}{{ end }}
{{ define "main" }}
{{ partial "header.html" }}
<div class="container mt-5">
<div class="row">
<div class="col-12 title">
<h1 class="display-3">{{ .Title }}</h1>
<div class="mui-container">
<div class="mui-row">
<div class="mui-col-xs-12 title">
<h1>{{ .Title }}</h1>
{{- with .Params.subtitle }}<p class="display-5">{{ . }}</p>{{ end -}}
</div>
</div>
<div class="row">
<div class="col-12 content">
<div class="mui-row">
<div class="mui-col-xs-12 content">
{{ .Content }}
</div>
</div>
Expand Down
36 changes: 4 additions & 32 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,36 +1,8 @@
<div class="footer">
<div class="container">
<nav class="navbar navbar-light navbar-expand-md">
{{- if .Site.Menus.main }}
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#main-nav"
aria-controls="main-nav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
{{- end }}
<div class="collapse navbar-collapse" id="main-nav">
<ul class="navbar-nav ms-auto mb-2 mb-lg-0">
{{- range .Site.Menus.footer.ByWeight }}
{{- if not .HasChildren }}
<li class="nav-item">
<a class="nav-link" title="{{ .Title }}" href="{{ .URL }}">{{ .Name }}</a>
</li>
{{- else }}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="{{ .URL }}" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ .Name }}</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
{{- range .Children }}
<a class="dropdown-item" title="{{ .Title }}" href="{{ .URL }}">{{ .Pre }}<span>{{ .Name }}</span></a>
{{- end }}
</div>
</li>
{{- end }}
{{- end }}
</ul>
</div>
</nav>
<div class="row">
<div class="col-12 text-center">
<p class="lead">🫶, <a href="https://teamraft.com/">Raft</a>.</p>
<div class="mui-container">
<div class="mui-row">
<div class="mui-col-xs-12 mui--text-center">
<p class="mui--text-headline">🫶, <a href="https://teamraft.com/">Raft</a>.</p>
</div>
</div>
</div>
Expand Down
51 changes: 16 additions & 35 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
@@ -1,35 +1,16 @@
<div class="header">
<div class="container">
<nav class="navbar navbar-light navbar-expand-md">
{{- if .Site.Menus.main }}
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#main-nav"
aria-controls="main-nav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
{{- end }}
<div class="collapse navbar-collapse" id="main-nav">
<ul class="navbar-nav ms-auto mb-2 mb-lg-0">
{{- range .Site.Menus.main.ByWeight }}
{{- if not .HasChildren }}
<li class="nav-item">
<a class="nav-link" title="{{ .Title }}" href="{{ .URL }}">{{ .Name }}</a>
</li>
{{- else }}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="{{ .URL }}" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ .Name }}</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
{{- range .Children }}
<a class="dropdown-item" title="{{ .Title }}" href="{{ .URL }}">{{ .Pre }}<span>{{ .Name }}</span></a>
{{- end }}
</div>
</li>
{{- end }}
{{- end }}
<li class="nav-item social">
<a href="https://github.com/raft-tech/konfirm" rel="me" title="Konfirm Project" class="social-link"><i class="bi bi-github"></i></a>
</li>
</ul>
</div>
</nav>
</div>
</div>
<header class="mui-appbar mui--z1">
<div class="mui-container">
<table width="100%">
<tr class="mui--appbar-height">
<td class="mui--text-title">Konfirm</td>
<td class="mui--text-right">
<a href="https://github.com/raft-tech/konfirm" rel="me" title="Konfirm Project">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-github" viewBox="0 0 16 16">
<path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8"/>
</svg>
</a>
</td>
</tr>
</table>
</div>
</header>
116 changes: 116 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "konfirm-website",
"version": "0.1.0",
"description": "Konfirm website and documentation",
"main": "index.js",
"repository": {
"type": "git",
"url": "git+https://github.com/raft-tech/konfirm-webiste.git"
},
"author": "Konfirm Maintainers",
"bugs": {
"url": "https://github.com/raft-tech/konfirm-webiste/issues"
},
"homepage": "https://github.com/raft-tech/konfirm-webiste#readme",
"dependencies": {
"bootstrap-icons": "^1.11.3",
"muicss": "^0.10.3"
}
}

0 comments on commit 3a94435

Please sign in to comment.