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

Use lux 5 to provide the design #34

Merged
merged 1 commit into from
Apr 15, 2024
Merged
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
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ruby 2.7.4
60 changes: 22 additions & 38 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,31 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>{{ site.title | default: site.github.repository_name }} by {{ site.github.owner_name }}</title>
<link href='https://fonts.googleapis.com/css?family=Arvo:400,700,400italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://unpkg.com/lux-design-system@5.0.2/dist/style.css">
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
<script src="{{ '/assets/js/scale.fix.js' | relative_url }}"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script src="{{ '/assets/js/node-environment-for-vuex.js?v=' | append: site.github.build_revision | relative_url }}"></script>
<script type="importmap">
{
"imports": {
"vue": "https://unpkg.com/vue@3.2.47/dist/vue.esm-browser.prod.js",
"lux-design-system": "https://unpkg.com/lux-design-system@5.0.2/dist/lux-styleguidist.mjs"
}
}
</script>
<script type="module" src="{{ '/assets/js/main.js?v=' | append: site.github.build_revision | relative_url }}"></script>
</head>
<body>
<div class="wrapper">
<header>
<h1 class="header"><a href="/">{{ site.title | default: site.github.repository_name }}</a></h1>
{% if site.description %}
<p class="header">{{ site.description }}</p>
{% endif %}
<ul>
{% if site.show_downloads %}
<li class="download"><a class="buttons" href="{{ site.github.zip_url }}">Download ZIP</a></li>
<li class="download"><a class="buttons" href="{{ site.github.tar_url }}">Download TAR</a></li>
{% endif %}
{% if site.website_link %}
<li><a class="buttons website" href="{{ site.website_link }}">PUL</a></li>
{% endif %}
<body id="app">
<lux-library-header app-name="{{ site.title | default: site.github.repository_name }}" abbr-name="PUL Systems" app-url="/" theme="dark">
<lux-menu-bar type="main-menu" :menu-items="[
{name: 'PUL on Github', component: 'PUL on Github', href: '{{ site.github.owner_url }}'},
]"
></lux-menu-bar>
</lux-library-header>

<li><a class="buttons github" href="{{ site.github.owner_url }}">PUL on GitHub</a></li>
</ul>
</header>

<section>
<lux-wrapper type="main">
{{ content }}
</section>
</div>
<!--[if !IE]><script>fixScale(document);</script><![endif]-->
{% if site.google_analytics %}
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}
</lux-wrapper>

<lux-library-footer></lux-library-footer>
</body>
</html>
49 changes: 17 additions & 32 deletions assets/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,27 @@

@import "{{ site.theme }}";

header li {
background: #E87722;
background: -moz-linear-gradient(top, #E87722 0%, #C35F14 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f8f8f8), color-stop(100%,#dddddd));
background: -webkit-linear-gradient(top, #E87722 0%,#C35F14 100%);
background: -o-linear-gradient(top, #E87722 0%,#C35F14 100%);
background: -ms-linear-gradient(top, #E87722 0%,#C35F14 100%);
background: linear-gradient(top, #E87722 0%,#C35F14 100%);
border: 0;
box-shadow: none;
ul.post-list {
list-style: none;
}

&:hover {
background: #C35F14;
background: -moz-linear-gradient(top, #C35F14 0%, #95480f 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f8f8f8), color-stop(100%,#dddddd));
background: -webkit-linear-gradient(top, #C35F14 0%,#95480f 100%);
background: -o-linear-gradient(top, #C35F14 0%,#95480f 100%);
background: -ms-linear-gradient(top, #C35F14 0%,#95480f 100%);
background: linear-gradient(top, #C35F14 0%,#95480f 100%);
border: 0;
box-shadow: none;
}
img {
max-width: 100%;
}

a.website {
background: none;
body {
font-family: var(--font-family-text);
}

// p.post-meta {
// margin: 0;
// }
main ul,
main li,
main ol,
main table,
main dl,
main p {
margin: 11px 0 16px;
}

section ul.post-list {
list-style: none;
li h2, li p {
margin-top: 0;
margin-bottom: 0;
}
p {
line-height: var(--line-height-base);
}
6 changes: 6 additions & 0 deletions assets/js/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { createApp } from 'vue';
import lux from 'lux-design-system';

const app = createApp({});
app.use(lux)
.mount('#app');
7 changes: 7 additions & 0 deletions assets/js/node-environment-for-vuex.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// The vuex packaged with lux 5 assumes that it
// is in a node environment, rather than a browser
window.process = {
env: {
NODE_ENV: 'production'
}
};
13 changes: 8 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@
layout: default
---

<h3>Princeton University Library IT</h3>
<lux-heading level="h1" hidden="true">Recent posts</lux-heading>

<ul class="post-list">
{% for post in site.posts %}
<li>
<p class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</p>
{{ post.excerpt }}
<p class="post-meta"><a class="post-link" href="{{ post.url | prepend: site.baseurl }}">More...</a></p>
<br/>
<lux-card size="full-width">
<lux-card-content>
<p class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</p>
{{ post.excerpt }}
<p class="post-meta"><lux-hyperlink href="{{ post.url | prepend: site.baseurl }}" variation="button solid">More about {{post.title}}...</lux-hyperlink></p>
</lux-card-content>
</lux-card>
</li>
{% endfor %}
</ul>