+
Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
3b29f02
restrict how far node 14 can go
joewhitsitt Oct 12, 2022
590c7ad
update readme with crucial setup step
joewhitsitt Oct 12, 2022
0045789
ignore the lock file
joewhitsitt Oct 12, 2022
ba6731c
update with storybook info
joewhitsitt Oct 12, 2022
422adb9
media component barebones
joewhitsitt Oct 12, 2022
df50dc4
initial slot work
joewhitsitt Oct 12, 2022
34b7af5
pivot to use similar borderless setup for media
joewhitsitt Oct 13, 2022
9acf6d2
fill in additional style info
joewhitsitt Oct 13, 2022
287b218
Updating dependencies as allowed by package.json. Fixed a few things …
pyrello Oct 14, 2022
8e695b3
Added prettier config and made some fixes based on it.
pyrello Oct 14, 2022
b44b8bc
establish story for person teaser card
joewhitsitt Oct 14, 2022
1add705
Merge branch 'finish-card-component' of github.com:uiowa/uids into fi…
joewhitsitt Oct 14, 2022
54cc9bc
switch to local image
joewhitsitt Oct 14, 2022
a7c8955
add borderless as default
joewhitsitt Oct 14, 2022
979647e
start cleaning up card scss
joewhitsitt Oct 14, 2022
16c5a3e
keep like items together
joewhitsitt Oct 14, 2022
3cab869
padding should use REM
joewhitsitt Oct 14, 2022
6612d05
adjust comment
joewhitsitt Oct 14, 2022
1a6ed06
move include to end
joewhitsitt Oct 14, 2022
19c4c7f
adjust spacing of standard properties and nested selectors
joewhitsitt Oct 14, 2022
060898f
i think card__media is replaced by media
joewhitsitt Oct 14, 2022
646e254
Merge branch '4.x' into finish-card-component
pyrello Oct 14, 2022
233edac
Merge branch '4.x' into finish-card-component
pyrello Oct 14, 2022
c5aaf69
possible fix for borderless padding combo conflict
joewhitsitt Oct 14, 2022
ee0a66d
Merge branch 'finish-card-component' of github.com:uiowa/uids into fi…
joewhitsitt Oct 14, 2022
858f747
Merge branch '4.x' into finish-card-component
pyrello Oct 14, 2022
73b6859
A bit of linting cleanup.
pyrello Oct 14, 2022
ea8a6fa
wire up meta and subtitle as slots
joewhitsitt Oct 14, 2022
f8ac44d
Merge branch 'finish-card-component' of github.com:uiowa/uids into fi…
joewhitsitt Oct 14, 2022
aabfdcb
remove medium and widescreen defaults
joewhitsitt Oct 14, 2022
0223528
change details to wrapper
joewhitsitt Oct 14, 2022
c2fde84
remove cover option, add class if media padded is false
joewhitsitt Oct 14, 2022
be58ac0
Added card__meta back in
bspeare Oct 17, 2022
8ec2db1
Added longer text snippet
bspeare Oct 17, 2022
e074eba
Fixing media spacing
bspeare Oct 17, 2022
8f487db
Added adjustments for card media padding for left and right alignment
bspeare Oct 17, 2022
5906a24
Added card button classes
bspeare Oct 17, 2022
6645e41
Added card media centered option
bspeare Oct 17, 2022
681b615
Added max-width for small media size
bspeare Oct 17, 2022
2a7c1d5
Fixed some deprecation warnings. Refactor of card and shared assets b…
pyrello Oct 17, 2022
7476070
Adjusted class name to inner
bspeare Oct 18, 2022
18b01b0
Added banner story. Made some updates to banner component based on ca…
pyrello Oct 18, 2022
24816ef
Updated naming of new media__inner class and did a corresponding sear…
pyrello Oct 18, 2022
05f6cde
Removed media stuff from banner. Added styles to media to handle resp…
pyrello Oct 18, 2022
6962d4f
Added case for the card where the image is the only linkable element.…
pyrello Oct 18, 2022
36c33b9
i think i have videos working
GaryRidgway Oct 18, 2022
d3b259e
Some more small tweaks to card story args.
pyrello Oct 19, 2022
34d2bfa
pushing some adjustments
GaryRidgway Oct 19, 2022
bb057c6
card and healdine title adjustments
GaryRidgway Oct 19, 2022
d8d36d5
font size scope adjustment
GaryRidgway Oct 19, 2022
671fa25
adjust card control labels and groups
GaryRidgway Oct 19, 2022
413eed7
cleaned up some unused styles
bspeare Oct 19, 2022
bf20cc4
Merge branch 'finish-card-component' of github.com:uiowa/uids into fi…
bspeare Oct 19, 2022
0f5dff3
Added container queries for card images and alignment
bspeare Oct 19, 2022
174ebf7
added custom viewports, I`m the best coder in the world
GaryRidgway Oct 19, 2022
18c2ba9
Merge branch 'finish-card-component' of github.com:uiowa/uids into fi…
bspeare Oct 19, 2022
374ce20
Added at support rule on container query for caution
bspeare Oct 19, 2022
d56e688
Added comments to clarify targeted containers
bspeare Oct 19, 2022
0ef21ea
Adjusted container queries and worked on getting media--cover working
bspeare Oct 20, 2022
d165373
Adjusted card media
bspeare Oct 20, 2022
dcec4d9
Hide the parameters argType from the table.
pyrello Oct 20, 2022
ac851fb
Removed media--cover
bspeare Oct 20, 2022
75736b7
Merge branch 'finish-card-component' of github.com:uiowa/uids into fi…
bspeare Oct 20, 2022
5baee16
Commented out container queries
bspeare Oct 20, 2022
a92f528
Undoing scss that was making media--cover work
bspeare Oct 20, 2022
ed71ce9
Adjusted mobile margins on media for left/right padded
bspeare Oct 20, 2022
27e4e7c
Added circle button as fallback for no text.
pyrello Oct 20, 2022
036bc74
Added square to aspect ratio iframe setting
bspeare Oct 20, 2022
043ec3c
Merge branch 'finish-card-component' of github.com:uiowa/uids into fi…
bspeare Oct 20, 2022
1562b62
added button circle prop
GaryRidgway Oct 20, 2022
7ac8615
Merge branch 'finish-card-component' of github.com:uiowa/uids into fi…
GaryRidgway Oct 20, 2022
2e22bbb
Updated default story to be more robust.
pyrello Oct 20, 2022
d84e1ed
Removed unused code
bspeare Oct 20, 2022
a4c611d
Removed more unused code and updated icon story
bspeare Oct 20, 2022
371acef
Updated icon link
bspeare Oct 20, 2022
62b994d
Removed more unused code
bspeare Oct 20, 2022
97b55d7
Added media cover proof of concept
bspeare Oct 20, 2022
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ dist-ssr
coverage
*.local
storybook-static
package-lock.json

/cypress/videos/
/cypress/screenshots/
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14
14.15.1
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"semi": false,
"singleQuote": true,
"jsxSingleQuote": true,
"singleAttributePerLine": true
}
21 changes: 20 additions & 1 deletion .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ import '../src/assets/scss/headings.scss';
import '../src/assets/scss/paragraph.scss';
import '../src/assets/scss/lists.scss';

import { MINIMAL_VIEWPORTS } from '@storybook/addon-viewport';

const customViewports = {
horizontalCard: {
name: 'Horizontal card',
styles: {
width: '769px',
height: '260px',
},
},
};

export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
backgrounds: {
Expand Down Expand Up @@ -82,4 +94,11 @@ export const parameters = {
date: /Date$/,
},
},
}
// More on viewports https://storybook.js.org/docs/react/essentials/viewport.
viewport: {
viewports: {
...MINIMAL_VIEWPORTS,
...customViewports,
},
},
};
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,27 @@ The node-gyp package requires a C compiler. If you notice node-gyp errors after

### Install dependencies

```sh
npm install
```

```sh
npm ci
```

### Start the local server
### Start the local server OR start Storybook
Compile and hot-reload for development.

```sh
npm run dev
```

**OR**

```sh
yarn storybook
```

The command will output the server URL to visit in your browser, ex. http://localhost:3000.

### Type-Check, Compile and Minify for Production
Expand Down Expand Up @@ -69,7 +80,7 @@ npm run dist
The following is an example of the workflow and not meant to be copied and pasted verbatim. Please review the summary at https://semver.org/ to understand which type of release you should be creating. The version numbers you will use when you are actually going through this process will depend on the current version number and what type of release you are creating.

To see the full options for the command, run `npm version --help`.
1. `git checkout 3.x` - Make sure you are on the `3.x` branch.
1. `git checkout 4.x` - Make sure you are on the `4.x` branch.
2. `git pull` - Make sure you have the most recent updates.
4. `npm version patch -m "https://github.com/uiowa/uids/compare/v3.1.0...v3.1.1"`
5. `git push`
Expand Down
Binary file added src/assets/images/viewbook/sections/herky2.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions src/components/banner/Banner.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import UidsBanner from './Banner.vue'
import media_image from '../../assets/images/viewbook/sections/122.jpg'

export default {
title: 'Components/Banner',
component: UidsBanner,
argTypes: {
media: {
control: 'text',
},
},
}

const Template = (args) => ({
components: { UidsBanner },
setup() {
return { args }
},
template: `
<uids-banner
:title="args.title"
:image="args.image"
:url="args.url"
>
<template #media v-if="args.media"><span v-html="args.media" ></span></template>
<template #default><div v-html="args.default"></div></template>
</uids-banner>
`
})

export const Default = Template.bind({})

Default.args = {
media: '<img src="' + media_image + '" alt="Alt">',
title: 'Write Your Story',
url: 'https://uiowa.edu',
}
38 changes: 20 additions & 18 deletions src/components/banner/Banner.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<script setup lang="ts">
import UidsHeadline from '../headline/Headline.vue';
import UidsButton from '../button/Button.vue';
import { computed } from 'vue';
import Background from "../shared/background";
import { computed, useSlots } from 'vue'
import { className } from '../utlity'
import UidsHeadline from '../headline/Headline.vue'
import UidsButton from '../button/Button.vue'
import Background from '../shared/background'
import '../background/background.scss'

const name = 'uids-banner'

Expand All @@ -11,9 +13,6 @@ const props = defineProps({
image: { type: String },
url: { type: String },
text: { type: String },
headline_settings: {
type: Object,
},
button_text: {
type: String,
},
Expand All @@ -34,22 +33,25 @@ const props = defineProps({
// title_classes?: string
// button_link?: string
// button_text?: string
})
});

// Compose a string out of the classes passed to the component.
const classes = computed(() => {
let classes = ["banner"];
let classes = ['banner'];

['overlay_color', 'overlay_to', 'size', 'vertical_alignment', 'horizontal_alignment'].forEach((prop) => {
if (props[prop] === true) {
classes.push(`banner--${ className(prop) }`);
}
});

Background.addBackgroundClass(classes, props);

if (props.url) {
classes.push('click-container')
}
// @todo Add classes.
Array.prototype.forEach.call(['overlay_color', 'overlay_to', 'size', 'vertical_alignment', 'horizontal_alignment'], setting => {
// @todo Check if the setting is set and then add a class for it.
classes.push('banner--' + props[setting])
}
);
Background.addBackgroundClass(classes, props);
return classes.join(" ");

return classes;
})

const getHeadlineSettings = computed(() => {
Expand Down Expand Up @@ -83,7 +85,7 @@ const getHeadlineSettings = computed(() => {
<uids-headline
v-if="title"
:level="getHeadlineSettings.level"
:class="banner_title_classes"
:class="getHeadlineSettings.classes"
:href="url"
>{{ title }}</uids-headline>
</slot>
Expand Down
1 change: 0 additions & 1 deletion src/components/button/Button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ const classes = computed(() => {
classes.push(`bttn--${ className(props.size)}`);
}

console.log(slots.default);
if (!slots.default) {
classes.push(`bttn--no-text`);
}
Expand Down
28 changes: 28 additions & 0 deletions src/components/button/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,34 @@
}
}

.bttn--circle {
padding: .55rem .7em;
border-radius: 50%;
transform: none;
line-height: 1;

&:after {
left: 0;
top: 0;
height: 100%;
width: 100%;
border-radius: 50%;
background-color: transparent;
transition: border-color .3s ease-in-out;
transform: none;
position: absolute;
}

&:hover:after,
&:focus:after {
transform: none;
transition: none;
border: 3px solid;
border-color: inherit;
background-color: transparent;
}
}

.bttn--large {
padding: 1.5rem 2.5rem 1.5rem;
// @todo Change this to use css variables, calc the size.
Expand Down
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载