Skip to content

Commit

Permalink
feat: add Bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
roaldnefs committed Aug 17, 2024
1 parent aaf7f8f commit 07c4f42
Show file tree
Hide file tree
Showing 23 changed files with 172 additions and 25 deletions.
12 changes: 10 additions & 2 deletions config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
baseURL: "https://bsidesgrunn.org/"
languageCode: en-us
title: BSides Groningen
theme: default
params:
slogan: BSides Groningen is an Information Security conference organized by the community for the community.
mastodon: "https://infosec.exchange/@bsidesgrunn"
mastodon: "https://infosec.exchange/@bsidesgrunn"

menus:
main:
- name: Home
url: "/"
weight: 10
- name: About
url: "/about"
weight: 20
5 changes: 5 additions & 0 deletions content/about/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# What is BSides?
Each BSides is a community-driven framework for building events for and by information security community members. The goal is to expand the spectrum of conversation beyond the traditional confines of space and time. It creates opportunities for individuals to both present and participate in an intimate atmosphere that encourages collaboration. It is an intense event with discussions, demos, and interaction from participants. It is where conversations for the next-big-thing are happening.

## What is BSides Groningen?
BSides Groningen is an Information Security conference organized by the community for the community.
39 changes: 39 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
const gulp = require('gulp');
const prefix = require('gulp-autoprefixer');
const minify = require('gulp-clean-css');
const rename = require('gulp-rename');
const sass = require('gulp-sass')(require('sass'));

const paths = {
src: {
css: {
dir: './static/css'
},
scss: {
main: './scss/theme.scss'
},
js: {
dir: './static/js'
}
}
}

gulp.task('scss', function() {
return gulp
.src(paths.src.scss.main)
.pipe(sass().on('error', sass.logError))
.pipe(prefix())
.pipe(minify())
.pipe(rename({ suffix: '.min' }))
.pipe(gulp.dest(paths.src.css.dir));
});

gulp.task('js', function() {
return gulp.src([
'node_modules/bootstrap/dist/js/bootstrap.min.js'
])
.pipe(gulp.dest(paths.src.js.dir));
});


gulp.task('default', gulp.series('scss', 'js'));
12 changes: 12 additions & 0 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
{{- partial "site-head.html" . -}}
<body>
{{- partial "site-nav.html" . -}}
<main>
{{- block "main" . }}{{- end }}
</main>
{{- partial "site-footer.html" . -}}
{{- partial "site-scripts.html" . -}}
</body>
</html>
5 changes: 5 additions & 0 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{ define "main" }}
<div class="container">
{{ .Content }}
</div>
{{ end }}
5 changes: 5 additions & 0 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{ define "main" }}
<div class="container">
{{ .Content }}
</div>
{{ end }}
6 changes: 4 additions & 2 deletions layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{{ define "main" }}
<h1>{{ .Site.Title }}</h1>
<p>{{ .Site.Params.Slogan }}</p>
<div class="pricing-header p-3 pb-md-4 mx-auto text-center">
<h1>{{ .Site.Title }}</h1>
<p>{{ .Site.Params.Slogan }}</p>
</div>
{{ end }}
26 changes: 26 additions & 0 deletions layouts/partials/site-footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

<footer class="py-5 bg-light">
<div class="container">
<div class="row">
<div class="col-lg-3 mb-3">
<a class="d-inline-flex align-items-center mb-2 link-dark text-decoration-none" href="{{ .Site.BaseURL }}">
<span class="fs-5">{{ .Site.Title }}</span>
</a>
<ul class="list-unstyled small text-muted">
<li class="mb-2">{{ .Site.Params.slogan }}</li>
<li class="mb-2">&copy; 2024 {{ .Site.Title }}. All rights reserved.</li>
</ul>
</div>
{{ if .Site.Menus.main }}
<div class="col-6 col-lg-2 offset-lg-1 mb-3">
<h5>Links</h5>
<ul class="list-unstyled">
{{ range .Site.Menus.main }}
<li class="mb-2"><a href="{{ .URL | absURL }}" class="link-dark text-decoration-none">{{ .Name }}</a></li>
{{ end }}
</ul>
</div>
{{ end }}
</div>
</div>
</footer>
10 changes: 10 additions & 0 deletions layouts/partials/site-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<title>{{ .Site.Title }}</title>

<link rel="stylesheet" href="{{ "css/theme.min.css" | absURL }}">

{{ if .Site.Params.Mastodon }}<link rel="me" href="{{ .Site.Params.Mastodon }}" />{{ end }}
</head>
19 changes: 19 additions & 0 deletions layouts/partials/site-nav.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<div class="container py-3">
<header>
<div class="d-flex flex-column flex-md-row align-items-center pb-3 mb-4 border-bottom">
<a href="{{ .Site.BaseURL }}" class="d-flex align-items-center text-dark text-decoration-none">
<span class="fs-4">{{ .Site.Title }}</span>
</a>

{{ if .Site.Menus.main }}
{{ $menu := (.Site.Menus.main) }}
{{ $length := (len $menu) }}
<nav class="d-inline-flex mt-2 mt-md-0 ms-md-auto">
{{ range $index, $element := $menu }}
<a class="{{ if not (eq (add $index 1) $length) }}me-3 {{ end }}py-2 text-dark text-decoration-none" href="{{ .URL | absURL }}">{{ .Name }}</a>
{{ end }}
</nav>
{{ end }}
</div>
</header>
</div>
1 change: 1 addition & 0 deletions layouts/partials/site-scripts.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<script src="{{ "js/bootstrap.min.js" | absURL }}"></script>
13 changes: 13 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"dependencies": {
"bootstrap": "^5.3.3"
},
"devDependencies": {
"gulp": "^4.0.2",
"gulp-autoprefixer": "^8.0.0",
"gulp-clean-css": "^4.3.0",
"gulp-rename": "^2.0.0",
"gulp-sass": "^5.1.0",
"sass": "^1.69.6"
}
}
File renamed without changes.
11 changes: 11 additions & 0 deletions scss/theme.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Bootstrap functions
@import '../node_modules/bootstrap/scss/functions';

// Custom variables
@import 'variables';

// Bootstrap core
@import '../node_modules/bootstrap/scss/bootstrap';

// Custom core
@import 'custom';
Empty file added scss/variables.scss
Empty file.
5 changes: 5 additions & 0 deletions static/css/theme.min.css

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions static/js/bootstrap.min.js

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions themes/default/layouts/_default/baseof.html

This file was deleted.

2 changes: 0 additions & 2 deletions themes/default/layouts/_default/list.html

This file was deleted.

2 changes: 0 additions & 2 deletions themes/default/layouts/_default/single.html

This file was deleted.

2 changes: 0 additions & 2 deletions themes/default/layouts/partials/footer.html

This file was deleted.

3 changes: 0 additions & 3 deletions themes/default/layouts/partials/head.html

This file was deleted.

1 change: 0 additions & 1 deletion themes/default/theme.toml

This file was deleted.

0 comments on commit 07c4f42

Please sign in to comment.