Skip to content

Commit

Permalink
Merge pull request #78 from it-at-m/beta
Browse files Browse the repository at this point in the history
Release Merge
  • Loading branch information
FabianWilms authored May 14, 2024
2 parents 7332ed0 + 51cbb4e commit fc32c8a
Show file tree
Hide file tree
Showing 11 changed files with 113 additions and 63 deletions.
9 changes: 7 additions & 2 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ import { StorybookConfig } from "@storybook/vue3-vite";
const fs = require("fs");
const path = require("path");
const mucIconsSvg = fs.readFileSync(
path.resolve(__dirname, "../public/assets/temporary/muc-icons.svg"),
"utf8"
path.resolve(__dirname, "../public/assets/temporary/muc-icons.svg"),
"utf8"
);
const customIconsSvg = fs.readFileSync(
path.resolve(__dirname, "../public/assets/temporary/custom-icons.svg"),
"utf8"
);

const config: StorybookConfig = {
Expand All @@ -27,6 +31,7 @@ const config: StorybookConfig = {
previewBody: (body) => `
${body}
${mucIconsSvg}
${customIconsSvg}
`,
docs: {
autodocs: "tag",
Expand Down
1 change: 1 addition & 0 deletions .storybook/manager-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<link rel="shortcut icon" href="/favicon.ico">
12 changes: 6 additions & 6 deletions docs/GettingStarted.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,29 @@ export default defineConfig({
});
```

In your Webcomponents root you should import the MDE5-CSS and SVG-Sprite for MDE5-Icons:
In your Webcomponents root you should import the MDE5-CSS and SVG-Sprite for MDE5-Icons, as well as the optional custom-icons SVG-Sprite:

```html
<script
lang="ts"
setup
>
import sprites from "@muenchen/muc-patternlab-vue/dist/assets/temporary/muc-icons.svg?raw";
import mucIconsSprite from "@muenchen/muc-patternlab-vue/dist/assets/temporary/muc-icons.svg?raw";
import customIconsSprite from "@muenchen/muc-patternlab-vue/dist/assets/temporary/custom-icons.svg?raw";
</script>

<template>
<div>
<svg
style="display: none;"
v-html="sprites"
></svg>
<div v-html="mucIconsSprite"></div>
<div v-html="customIconsSprite"></div>
<...>
</div>
</template>

<style>
@import "@muenchen/muc-patternlab-vue/dist/assets/temporary/muenchende-style.css";
@import "@muenchen/muc-patternlab-vue/dist/assets/temporary/custom-style.css";
@import "@muenchen/muc-patternlab-vue/dist/style.css";
</style>
```

Expand Down
24 changes: 24 additions & 0 deletions docs/Iconography.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { Meta, IconGallery, IconItem } from '@storybook/blocks';

<Meta title="Iconography" />

# Iconography

This library already contains MDE5-Patternlabs iconset. The documentation to it can be found [here](https://patternlab.muenchen.space/?p=viewall-guidelines-icons).

Additionally, it adds some specialty icons from [Pictogrammers](https://pictogrammers.com/library/mdi) which can be accessed by embedding the SVG-Sprite `custom-icons.svg` as described in [the getting started guide](/docs/getting-started--docs#setup).

<IconGallery>
<IconItem name="pencil">
<svg fill="currentColor"><use href="#icon-pencil" /></svg>
</IconItem>
<IconItem name="dots-vertical">
<svg fill="currentColor"><use href="#icon-dots-vertical" /></svg>
</IconItem>
<IconItem name="circle-off-outline">
<svg fill="currentColor"><use href="#icon-circle-off-outline" /></svg>
</IconItem>
<IconItem name="account">
<svg fill="currentColor"><use href="#icon-account" /></svg>
</IconItem>
</IconGallery>
Binary file added docs/images/favicon.ico
Binary file not shown.
65 changes: 39 additions & 26 deletions package-lock.json

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

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@
"types": "./dist/types/index.d.ts",
"import": "./dist/muc-patternlab-vue.es.js"
},
"./dist/assets/temporary/muc-icons.svg": "./dist/assets/temporary/muc-icons.svg",
"./dist/style.css": "./dist/style.css",
"./dist/assets/temporary/custom-style.css": "./dist/assets/temporary/custom-style.css",
"./dist/assets/temporary/muenchende-style.css": "./dist/assets/temporary/muenchende-style.css",
"./dist/assets/temporary/muenchende-fontface.css": "./dist/assets/temporary/muenchende-fontface.css",
"./dist/assets/temporary/muenchende-style.css": "./dist/assets/temporary/muenchende-style.css"
"./dist/assets/temporary/muc-icons.svg": "./dist/assets/temporary/muc-icons.svg",
"./dist/assets/temporary/custom-icons.svg": "./dist/assets/temporary/custom-icons.svg"
},
"files": [
"src",
Expand Down
7 changes: 7 additions & 0 deletions public/assets/temporary/custom-icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/assets/temporary/muc-icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 23 additions & 24 deletions src/components/Intro/MucIntro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,40 +16,39 @@ defineProps<{
defineSlots<{
/**
* Text-content of the Intro.
* Body of the Intro.
*/
default(): any;
}>();
</script>

<template>
<div class="m-intro m-intro-vertical">
<div class="m-intro-vertical__body">
<div class="container">
<div class="m-intro-vertical__grid">
<div class="m-intro-vertical__grid-inner">
<span
<div class="m-intro m-intro-static-image" style="background-color: var(--color-neutrals-blue-xlight);">
<div
class="container"
>
<div style="width: 66.6%">
<div>
<p
v-if="tagline"
class="m-intro-vertical__tagline"
>
{{ tagline }}
</span>

<h1 class="m-intro-vertical__title">
{{ title }}
</h1>
>
{{ tagline }}
</p>
<h1 class="m-intro-vertical__title">
{{ title }}
</h1>
</div>

<div
v-if="divider"
class="muc-divider"
></div>
<div
v-if="divider"
class="muc-divider"
></div>

<div class="m-intro-vertical__content">
<p>
<slot></slot>
</p>
</div>
</div>
<div class="m-intro-vertical__content">
<p style="padding-bottom: 32px;">
<slot></slot>
</p>
</div>
</div>
</div>
Expand Down
2 changes: 0 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { type App } from "vue";

import * as components from "./components";

import "../public/assets/temporary/muenchende-style.css";

function install(app: App) {
for (const key in components) {
// @ts-expect-error
Expand Down

0 comments on commit fc32c8a

Please sign in to comment.