Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add osl theme to forked repo of Mainroad #344

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
346 changes: 304 additions & 42 deletions assets/css/style.css

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: "{{ replace .TranslationBaseName '-' ' ' | title }}"
description: ""
date: "{{ .Date }}"
thumbnail: ""
categories:
- ""
tags:
- ""
---
1 change: 1 addition & 0 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
{{ block "header" . }}{{ partial "header.html" . }}{{ end }}
<div class="wrapper flex">
<div class="primary">
{{ partial "menu.html" . }}
{{ block "main" . }}
{{ with .Content }}
<div class="content main__content clearfix">
Expand Down
21 changes: 1 addition & 20 deletions layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
{{ define "main" }}
<main class="main list" role="main">
{{- with .Content }}
<div class="content main__content clearfix">
{{ . }}
</div>
{{- end }}
{{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
{{- range $paginator.Pages }}
{{- .Render "summary" }}
{{- end }}
{{- if and (eq $paginator.TotalNumberOfElements 0) (not $.Content) }}
<div class="warning">
{{ partial "svg/files.svg" (dict "class" "warning__icon") }}
<h3 class="warning__headline">{{ T "noposts_warning_title" | safeHTML }}</h3>
<div class="warning__text">
<p class="warning__description">{{ T "noposts_warning_description" | safeHTML }}</p>
<p class="warning__tip">{{ T "noposts_warning_tip" | safeHTML }}</p>
</div>
</div>
{{ end }}
{{ .Content }}
</main>
{{ partial "pagination.html" . }}
{{ end }}
61 changes: 57 additions & 4 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,62 @@
<footer class="footer">
<div class="container footer__container flex">
{{ partial "footer_links.html" . }}
<div class="footer__copyright">
&copy; {{ now.Format "2006" }} {{ .Site.Params.copyright | default .Site.Title }}.
<span class="footer__copyright-credits">{{ T "footer_credits" | safeHTML }}</span>
<div class="footer_headers">
<div class="footer_contact_container">
<p class="footer_contact_header">Contact Info</p>
<div class="footer_contant_info_container">
<p>
OSU Open Source Lab<br>
224 Milne Computer Center<br>
1800 SW Campus Way<br>
Corvallis, OR 97331<br>
<a href="mailto:[email protected]" style="margin: 0px">[email protected]</a><br>
Phone: 541-737-9900<br>

<div class="footer_map_container">
<a href="https://www.google.com/maps/place/Milne+Computer+Center,+1800+SW+Campus+Way,+Corvallis,+OR+97331">
<img src="/images/milne_street.png">
</a>
</div>

<div>
<a href="https://oregonstate.edu/copyright">Copyright</a>
&copy;2023<br> Oregon State University<br />
<a href="https://oregonstate.edu/official-web-disclaimer">Disclaimer</a>
</div>
</p>
</div>
</div>

<div class="footer_menu_link_container"><a class="footer_links">HOME</a></div>
<div class="footer_menu_link_container">
<a href="/about" class="footer_links">ABOUT</a>
<div class="footer_link_container">
<a href="/about">About OSL</a>
<a href="/faq">FAQ</a>
<a href="/contact">Contact Us</a>
<a href="/people">Staff</a>
<a href="/logos">Logos</a>
<a href="/donate">Donate</a>
</div>
</div>
<div class="footer_menu_link_container">
<a href="/services" class="footer_links">SERVICES</a>
<div class="footer_link_container">
<a href="/services/hosting">Hosting</a>
<a href="/services/aarch64">AARCH64 Development Hosting</a>
<a href="/services/powerdev">POWERLinux/OpnePOWER Development Hosting</a>
<a href="/services/ibm-z">IBM Z Development Hosting</a>
</div>
</div>
<div class="footer_menu_link_container">
<a href="/students" class="footer_links">STUDENT EXPERIENCE</a>
<div class="footer_link_container">
<a href="/about/employement">Employement</a>
<a href="/about/education">Education</a>
<a href="/student-stories">Student Stories</a>
</div>
</div>
<div class="footer_menu_link_container"><a href="/blog" class="footer_links">BLOG</a></div>
</div>
</div>
</footer>
1 change: 0 additions & 1 deletion layouts/partials/header.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<header class="header">
<div class="container header__container">
{{ partial "logo.html" . }}
{{ partial "menu.html" . }}
</div>
</header>
14 changes: 6 additions & 8 deletions layouts/partials/logo.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,16 @@
{{- $logoMix := and $logoImage $logoTitle -}}

<div class="logo{{ with $logoMix }} logo--mixed{{ end }}">
<a class="logo__link" href="{{ "" | relLangURL }}"{{ with $logoTitle }} title="{{ . }}"{{ end }} rel="home">
<div class="logo__link" href="{{ "" | relLangURL }}"{{ with $logoTitle }} title="{{ . }}"{{ end }} rel="home">
{{ with $logoImage -}}
<div class="logo__item logo__imagebox">
<img class="logo__img" src="{{ . | relURL }}">
</div>
{{- end -}}
{{ with $logoTitle -}}
<div class="logo__item logo__text">
<div class="logo__title">{{ . }}</div>
{{ with $logoSubtitle }}<div class="logo__tagline">{{ . }}</div>{{ end }}
</div>
{{- end }}
</a>
</div>

</div>
<div class="logo_item logo_subtitle">
{{ with $logoSubtitle }}<div class="logo__title">{{ . }}</div>{{ end }}
</div>
{{- end }}
2 changes: 1 addition & 1 deletion layouts/partials/post_meta/author.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
{{ partial "svg/author.svg" (dict "class" "meta__icon") -}}
<span class="meta__text">{{ .Site.Author.name }}</span>
</div>
{{- end -}}
{{- end -}}
18 changes: 18 additions & 0 deletions layouts/partials/post_meta/blog_header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{- if .Param "authors" }}
by
{{ range .Param "authors" }}
{{ . }}
{{ end }}
on
{{- if not .Date.IsZero }}
<time datetime="{{ .Date.Format " 2006-01-02T15:04:05Z07:00" }}">
{{- .Date.Format (.Site.Params.dateformat | default "January 02, 2006") -}}
</time>
{{- if ne .Date .Lastmod }}
<time datetime="{{ .Lastmod.Format " 2006-01-02T15:04:05Z07:00" }}">(
{{- T "meta_lastmod" }}: {{ .Lastmod.Format (.Site.Params.dateformat | default "January 02, 2006") -}}
)</time>
{{- end -}}
{{- end }}
</span>
{{- end }}
6 changes: 3 additions & 3 deletions layouts/partials/post_meta/date.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{{- if not .Date.IsZero }}
<div class="meta__item-datetime meta__item">
{{ partial "svg/time.svg" (dict "class" "meta__icon") -}}
<!-- {{ partial "svg/time.svg" (dict "class" "meta__icon") -}} -->
<time class="meta__text" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
{{- .Date | dateFormat (.Site.Params.dateformat | default "January 02, 2006") -}}
{{- .Date.Format (.Site.Params.dateformat | default "January 02, 2006") -}}
</time>
{{- if ne .Date .Lastmod }}
<time class="meta__text" datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}">(
{{- T "meta_lastmod" }}: {{ .Lastmod | dateFormat (.Site.Params.dateformat | default "January 02, 2006") -}}
{{- T "meta_lastmod" }}: {{ .Lastmod.Format (.Site.Params.dateformat | default "January 02, 2006") -}}
)</time>
{{- end -}}
</div>
Expand Down
12 changes: 2 additions & 10 deletions layouts/partials/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,8 @@
{{- $root := . }}
{{- with (default .Site.Params.sidebar.widgets .Params.widgets) -}}
{{- range $widget := . }}
{{- $widgetPath := printf "widgets/%s.html" $widget }}
{{- $widgetCached := false }}
{{- if isset $.Site.Params "widgets" }}
{{- $widgetCached = (index $.Site.Params.widgets $widget).cached }}
{{- end }}
{{- if eq $widgetCached true }}
{{- partialCached $widgetPath $root }}
{{- else }}
{{- partial $widgetPath $root }}
{{- end }}
{{- $p := printf "widgets/%s.html" $widget }}
{{- partial $p $root }}
{{- end }}
{{- else }}
<p class="sidebar__warning"><strong>{{ T "sidebar_warning" }}:</strong><br>{{ T "sidebar_recommendation" }}</p>
Expand Down
28 changes: 28 additions & 0 deletions static/js/formsender-error.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Get error number and message from query string
function getQueryVariable(variable) {

Check failure on line 2 in static/js/formsender-error.js

View workflow job for this annotation

GitHub Actions / lint (14.x)

Use the global form of 'use strict'
var query = window.location.search.substring(1);

Check failure on line 3 in static/js/formsender-error.js

View workflow job for this annotation

GitHub Actions / lint (14.x)

Expected indentation of 1 tab but found 4 spaces
var vars = query.split("&");

Check failure on line 4 in static/js/formsender-error.js

View workflow job for this annotation

GitHub Actions / lint (14.x)

Expected indentation of 1 tab but found 4 spaces

Check failure on line 4 in static/js/formsender-error.js

View workflow job for this annotation

GitHub Actions / lint (14.x)

Strings must use singlequote
for (var i = 0; i < vars.length; i++) {

Check failure on line 5 in static/js/formsender-error.js

View workflow job for this annotation

GitHub Actions / lint (14.x)

Expected indentation of 1 tab but found 4 spaces

Check failure on line 5 in static/js/formsender-error.js

View workflow job for this annotation

GitHub Actions / lint (14.x)

All 'var' declarations must be at the top of the function scope

Check failure on line 5 in static/js/formsender-error.js

View workflow job for this annotation

GitHub Actions / lint (14.x)

Unary operator '++' used
var pair = vars[i].split("=");

Check failure on line 6 in static/js/formsender-error.js

View workflow job for this annotation

GitHub Actions / lint (14.x)

Expected indentation of 2 tabs but found 8 spaces

Check failure on line 6 in static/js/formsender-error.js

View workflow job for this annotation

GitHub Actions / lint (14.x)

All 'var' declarations must be at the top of the function scope

Check failure on line 6 in static/js/formsender-error.js

View workflow job for this annotation

GitHub Actions / lint (14.x)

Strings must use singlequote
if (pair[0] == variable) {
return pair[1];
}
}
return (false);
}

var errorNumber = getQueryVariable("error");
var errorMessage = getQueryVariable("message");

// errorMessage will only be a string if a query string is present.
// If a query string is present, there was an error. Format the message.
if (typeof errorMessage == "string") {
errorMessage = errorMessage.replace("+", " ").replace("/", "");
}

// If both these exist, there was an error with the submission, write to page
if (errorNumber && errorMessage) {
document.write("<h3 style='color:red'>An error occurred with your form submission</h3>",
"<p style='color:red'>Error number: ", errorNumber, "</p>",
"<p style='color:red'>Error message: ", errorMessage, "</p>");
}