Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Update Packages, Use Chrome to test, User Prettier to Format #25

Merged
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ before_install:
- nvm install node
- npm install

script: npm test
script:
- npm test
- npm run lint-js

cache:
directories:
Expand Down
16 changes: 8 additions & 8 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Widget Creator is a web application that allows you to quickly create and test
widgets. Widgets are used in
[uPortal-App-Frameworks applications](https://github.com/UW-Madison-DoIT/uw-frame)
and come complete with their own
[documentation](http://uw-madison-doit.github.io/uw-frame/widgets.html) on how
to configure and deploy. This application allows a sandbox for rapid
development. UW-Madison hosts a
[deployed instance](https://test.my.wisc.edu/widget-creator) for campus
widgets. Widgets are used in
[uPortal-App-Frameworks applications](https://github.com/UW-Madison-DoIT/uw-frame)
and come complete with their own
[documentation](http://uw-madison-doit.github.io/uw-frame/widgets.html) on how
to configure and deploy. This application allows a sandbox for rapid
development. UW-Madison hosts a
[deployed instance](https://test.my.wisc.edu/widget-creator) for campus
developers to use.

# How to run locally
Expand All @@ -19,4 +19,4 @@ Complete some exercises that will give you some experience with creating widgets

* [List of Links Widget Exercise](listOfLinksWidgetExercise.md)
* [RSS Widget Exercise](rssWidgetExercise.md)
* [Custom Widget Exercise](customWidgetExercise.md)
* [Custom Widget Exercise](customWidgetExercise.md)
1 change: 0 additions & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ gems:
- jekyll-titles-from-headings

theme: jekyll-theme-minimal

17 changes: 9 additions & 8 deletions docs/assets/css/style.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
---
---

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

.wrapper {
width: auto;
Expand All @@ -27,7 +24,7 @@ header {
}
}
a.button {
box-shadow: 0 2px 5px 0 rgba(0,0,0,.26);
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
background: #39c;
color: #fff;
display: inline-block;
Expand All @@ -51,8 +48,10 @@ header {
font-weight: 500;
text-decoration: none;
overflow: hidden;
-webkit-transition: box-shadow .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1);
transition: box-shadow .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1);
-webkit-transition: box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
background-color 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
transition: box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
background-color 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
&:hover {
background: #069;
}
Expand Down Expand Up @@ -120,7 +119,9 @@ footer {
body {
margin: 0;
padding: 40px 40px 40px 0;
header, section, footer {
header,
section,
footer {
padding-left: 40px;
}
}
Expand Down
18 changes: 9 additions & 9 deletions docs/customWidgetExercise.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The
[Widget Documentation](http://uw-madison-doit.github.io/uw-frame/widgets.html)
The
[Widget Documentation](http://uw-madison-doit.github.io/uw-frame/widgets.html)
has more information about configuration options and more technical details.

Choose `Custom Widget` from the starter templates.
Expand All @@ -18,31 +18,31 @@ Food Account Balance
Type as a description
```
Check your balance and get some money saving tips
```
```

Custom widgets are custom because you supply your own html markup. Angular is
available to use. Use this as an example.

```
```html
<div class='widget-body'>
<div ng-if="content && content.data && content.data.food" class='center'
<div ng-if="content && content.data && content.data.food" class='center'
style='padding:20px; font-size: 35px; '>
<i class="fa fa-credit-card-alt" style="color: #cbcbcb;"></i>
<span style='color:#b70101; padding-left:10px;'>
{{content.data.food.balance | currency:"$":2}}</span>
</div>
<div class='col-xs-6 v-center' style="text-align:center">
<circle-button data-href='https://en.wikipedia.org/wiki/Bank'
<circle-button data-href='https://en.wikipedia.org/wiki/Bank'
data-target='_blank' data-fa-icon='fa fa-dollar' data-title='Deposit money'>
</circle-button>
</div>
<div class='col-xs-6 v-center' style="text-align:center">
<circle-button data-href='https://en.wikipedia.org/wiki/Lost_and_found'
<circle-button data-href='https://en.wikipedia.org/wiki/Lost_and_found'
data-target='_blank' data-fa-icon='fa fa-exclamation-triangle' data-title='Report lost card'>
</circle-button>
</div>
</div>
<a class='btn btn-default launch-app-button' target='_blank'
<a class='btn btn-default launch-app-button' target='_blank'
href='https://twitter.com/campusfood'>Manage my food account
</a>
```
Expand All @@ -55,4 +55,4 @@ In widget URL JSON sample type this

Click update and see your widget in action.

Change the styling and the JSON to try different things.
Change the styling and the JSON to try different things.
152 changes: 78 additions & 74 deletions docs/listOfLinksWidgetExercise.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The
[Widget Documentation](http://uw-madison-doit.github.io/uw-frame/widgets.html)
The
[Widget Documentation](http://uw-madison-doit.github.io/uw-frame/widgets.html)
has more information about configuration options and more technical details.

In the starter template, select `List of Links` from the drop down.
Expand All @@ -18,24 +18,25 @@ Widget configuration - Notice that sample text has already been provided:
Let’s format that JSON so it’s easier to read
```json
{
"launchText":"Launch the Full App",
"additionalText":"Additional Text"
,"links":[
{
"title":"The Google",
"href":"http://www.google.com",
"icon":"fa-google",
"target":"_blank",
"rel":"noopener noreferrer"
},
{
"title":"Bing",
"href":"http://www.bing.com",
"icon":"fa-bed",
"target":"_blank",
"rel":"noopener noreferrer"
}
]}
"launchText": "Launch the Full App",
"additionalText": "Additional Text",
"links": [
{
"title": "The Google",
"href": "http://www.google.com",
"icon": "fa-google",
"target": "_blank",
"rel": "noopener noreferrer"
},
{
"title": "Bing",
"href": "http://www.bing.com",
"icon": "fa-bed",
"target": "_blank",
"rel": "noopener noreferrer"
}
]
}
```


Expand All @@ -51,22 +52,23 @@ For the widget config, copy and paste this:

```json
{
"launchText":"All Apereo Projects",
"links":[
{
"title":"uPortal",
"href":"https://www.apereo.org/projects/uportal",
"icon":"fa-google",
"target":"_blank",
"rel":"noopener noreferrer"
}
]}
"launchText": "All Apereo Projects",
"links": [
{
"title":"uPortal",
"href":"https://www.apereo.org/projects/uportal",
"icon":"fa-google",
"target":"_blank",
"rel":"noopener noreferrer"
}
]
}
```

Finally, type ‘https://www.apereo.org/content/projects-communities’ for Launch URL

Let’s break that widget configuration down into parts.
The first part is to notice that the launch text is configurable. Try updating the launch text to “See all Apereo projects”
The first part is to notice that the launch text is configurable. Try updating the launch text to “See all Apereo projects”
```
"launchText":"See all Apereo Projects",
```
Expand All @@ -77,56 +79,58 @@ Try adding more links. If you need help, here’s some sample widget configurat

```json
{
"launchText":"See All Apereo Projects",
"links":[
{
"title":"uPortal",
"href":"https://www.apereo.org/projects/uportal",
"icon":"fa-key",
"target":"_blank",
"rel":"noopener noreferrer"
},
{
"title":"Sakai Project",
"href":"https://www.apereo.org/projects/sakai-project",
"icon":"fa-folder-open",
"target":"_blank",
"rel":"noopener noreferrer"
}
]}
"launchText": "See All Apereo Projects",
"links": [
{
"title": "uPortal",
"href": "https://www.apereo.org/projects/uportal",
"icon": "fa-key",
"target": "_blank",
"rel": "noopener noreferrer"
},
{
"title": "Sakai Project",
"href": "https://www.apereo.org/projects/sakai-project",
"icon": "fa-folder-open",
"target": "_blank",
"rel": "noopener noreferrer"
}
]
}
```


You can keep adding more links and see that the widget auto formats the correct spacing and layout.

Try three links
Try three links

```javascript
{
"launchText":"See All Apereo Projects",
"links":[
{
"title":"uPortal",
"href":"https://www.apereo.org/projects/uportal",
"icon":"fa-key",
"target":"_blank",
"rel":"noopener noreferrer"
},
{
"title":"Sakai Project",
"href":"https://www.apereo.org/projects/sakai-project",
"icon":"fa-folder-open",
"target":"_blank",
"rel":"noopener noreferrer"
},
```json
{
"title":"Student Success Plan",
"href":"https://www.apereo.org/projects/student-success-plan",
"icon":"fa-graduation-cap",
"target":"_blank",
"rel":"noopener noreferrer"
}
]}
"launchText": "See All Apereo Projects",
"links": [
{
"title": "uPortal",
"href": "https://www.apereo.org/projects/uportal",
"icon": "fa-key",
"target": "_blank",
"rel": "noopener noreferrer"
},
{
"title": "Sakai Project",
"href": "https://www.apereo.org/projects/sakai-project",
"icon": "fa-folder-open",
"target": "_blank",
"rel": "noopener noreferrer"
},
{
"title": "Student Success Plan",
"href": "https://www.apereo.org/projects/student-success-plan",
"icon": "fa-graduation-cap",
"target": "_blank",
"rel": "noopener noreferrer"
}
]
}
```

See what happens the more you add!
12 changes: 6 additions & 6 deletions docs/rssWidgetExercise.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
The
[Widget Documentation](http://uw-madison-doit.github.io/uw-frame/widgets.html)
The
[Widget Documentation](http://uw-madison-doit.github.io/uw-frame/widgets.html)
has more information about configuration options and more technical details.

Choose `RSS widget` from the starter templates.

![Image of the template dropdown](img/selectorDropDown.png)

Give your RSS Widget the Title of
Give your RSS Widget the Title of
```
Apereo News
```

Give your RSS Widget a description of
Give your RSS Widget a description of
```
The latest and greatest news from Apereo
```

You can leave the widget configuration as it is.

For the widget url use
For the widget url use
```
https://api.rss2json.com/v1/api.json?rss_url=https%3A%2F%2Fwww.apereo.org%2Fnews%2Ffeed
```
This is JSONified rss feed of Apereo News.

Finally change the Launch URL to
Finally change the Launch URL to
```
https://www.apereo.org/news
```
Expand Down
Loading