Skip to content
This repository was archived by the owner on Apr 25, 2024. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
e6b6568
Add the new dependencies, paving the integration of Vocabulary
dhruvkb Aug 14, 2019
858193b
Add Vue i18n loader to parse <i18n> tags in SFC files
dhruvkb Aug 14, 2019
576d036
Update the version of Vocabulary
dhruvkb Aug 14, 2019
33cc29b
Integrate i18n into the application
dhruvkb Aug 14, 2019
a0d2e87
Replace manually written styles with Vocabulary defaults
dhruvkb Aug 14, 2019
5a23643
Get rid of globally install Foundation CSS
dhruvkb Aug 14, 2019
a7517d4
Replace the old header and footer with the new ones
dhruvkb Aug 14, 2019
abfd4cf
Revamp text only pages and add i18n
dhruvkb Aug 14, 2019
c7083d2
Clean up the LicenseIcons component to make use of LicenseIconography…
dhruvkb Aug 14, 2019
80e38ef
Refactor code and replace img asset with Font Awesome icon
dhruvkb Aug 14, 2019
b22bc29
Extend test-utils to mock i18n
dhruvkb Aug 14, 2019
efd46c1
Internationalise site title
dhruvkb Aug 14, 2019
244499d
Rebuild the copy button using the Button component from CC Vocabulary
dhruvkb Aug 14, 2019
b12a890
Rebuild the ReuseSurvey component
dhruvkb Aug 14, 2019
6017876
Rebuild the LegalDisclaimer component
dhruvkb Aug 14, 2019
8c704b2
Rebuild the Watermark component with complete i18n
dhruvkb Aug 14, 2019
d98e8c4
Rebuild image attribution and image information tabs with i18n
dhruvkb Aug 14, 2019
1f30196
Refactor code and enable i18n in the component
dhruvkb Aug 14, 2019
ccee758
Refactor code for quality
dhruvkb Aug 14, 2019
34a310a
Capitalise license name
dhruvkb Aug 14, 2019
ee8336a
Rebuild PhotoDetails using Tabbed and TabbedPane from CC Vocabulary a…
dhruvkb Aug 14, 2019
91db831
Redo tests to incorporate Vocabulary integrations
dhruvkb Aug 15, 2019
58aff7c
Add i18n to tests to provide the i18n component
dhruvkb Aug 15, 2019
c0911d6
Replace the indigenous actionable image view with the Vocabulary Imag…
dhruvkb Aug 16, 2019
54a3aa8
Make the showNavSearch prop a Boolean type
dhruvkb Aug 16, 2019
4dcc1a0
Rearrange DOM to left align Trail and confine the image to the parent…
dhruvkb Aug 19, 2019
2ea7526
Internationalise bottom links
dhruvkb Aug 20, 2019
45ab37b
Incorporate feedback from @brenoferreira
dhruvkb Aug 27, 2019
dc06089
Update test to match changes in the component
dhruvkb Aug 27, 2019
c5a58d5
Incorporate further feedback from @brenoferreira
dhruvkb Aug 27, 2019
47ea641
Remove the i18n from the site title as per review by @brenoferreira
dhruvkb Aug 27, 2019
6bf0545
Lowercase licenses before === check in order to match uppercase varia…
dhruvkb Aug 27, 2019
2a16542
Update Vocabulary version to import the latest bug fixes and improvem…
dhruvkb Aug 30, 2019
9fbaa59
Add a bottom margin on tags where tags span multiple lines
dhruvkb Aug 30, 2019
4df2c5f
Make the navigation responsive from big desktops all the way down to …
dhruvkb Aug 30, 2019
065791b
Replace manual JS based ellipsis with automatic CSS based ellipsis
dhruvkb Aug 30, 2019
420e5c8
Find a width that sets the number of columns to 1, 2, 3, 4 and 6 for …
dhruvkb Aug 30, 2019
feb90a8
Center navigation content on tablets
dhruvkb Aug 30, 2019
9a605ce
Container-ise contents, refactor code and remove redundant CSS
dhruvkb Aug 30, 2019
b80aec3
Remove Foundation and redundant CSS files
dhruvkb Aug 30, 2019
b1e1ad1
Replace homegrown components with Vocabulary components and consequen…
dhruvkb Aug 30, 2019
8462486
Replace components with their Vocabulary counterparts
dhruvkb Aug 30, 2019
da29295
Re-add the display for searchTerm, which shows the collection name wh…
dhruvkb Aug 30, 2019
bdc4ba9
Replace the hardcoded placeholder with the prop `searchBoxPlaceholder`
dhruvkb Aug 30, 2019
102fe6a
Clean up the browsing pages for both normal searches and collections
dhruvkb Aug 30, 2019
0ec2997
Fix broken redirection to source
dhruvkb Aug 30, 2019
fbfcdb9
Refactor PhotoDetailPage and remove its corresponding, now redundant,…
dhruvkb Aug 30, 2019
b0135aa
Prevent NavSection from changing height when the input field appears …
dhruvkb Aug 30, 2019
b54930d
Reengineer the filtering mechanism to address #480
dhruvkb Aug 31, 2019
a70e03d
Inherit bug fixes from Vocabulary upstream
dhruvkb Aug 31, 2019
db8edf8
Incorporate suggestions about the left alignment of license choices a…
dhruvkb Aug 31, 2019
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
13 changes: 9 additions & 4 deletions build/vue-loader.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@ const sourceMapEnabled = isProduction
: config.dev.cssSourceMap

module.exports = {
loaders: utils.cssLoaders({
sourceMap: sourceMapEnabled,
extract: isProduction
}),
loaders: Object.assign({},
utils.cssLoaders({
sourceMap: sourceMapEnabled,
extract: isProduction
}),
{
i18n: '@kazupon/vue-i18n-loader'
}
),
cssSourceMap: sourceMapEnabled,
cacheBusting: config.dev.cacheBusting,
transformToRequire: {
Expand Down
1 change: 0 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
<% } %>
<title>CC Search</title>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.4.3/css/foundation.min.css">
<link rel="icon" type="image/png" href="https://d15omoko64skxi.cloudfront.net/wp-content/uploads/2016/05/cc-site-icon-150x150.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://d15omoko64skxi.cloudfront.net/wp-content/uploads/2016/05/cc-site-icon-300x300.png" sizes="192x192">
<link rel="apple-touch-icon-precomposed" href="https://d15omoko64skxi.cloudfront.net/wp-content/uploads/2016/05/cc-site-icon-300x300.png">
Expand Down
86 changes: 83 additions & 3 deletions package-lock.json

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

6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
"build-server": "webpack -p --config build/webpack-server-conf.js --progress"
},
"dependencies": {
"@creativecommons/vocabulary": "0.0.0-alpha.21",
"@fortawesome/fontawesome-svg-core": "^1.2.21",
"@fortawesome/free-solid-svg-icons": "^5.10.1",
"@fortawesome/vue-fontawesome": "^0.1.6",
"@sentry/browser": "^5.6.0",
"@sentry/node": "^5.6.0",
"axios": "^0.18.0",
Expand All @@ -44,6 +48,7 @@
"vuex": "^3.0.1"
},
"devDependencies": {
"@kazupon/vue-i18n-loader": "^0.4.1",
"@vue/test-utils": "^1.0.0-beta.29",
"autoprefixer": "^7.1.2",
"babel-core": "^6.22.1",
Expand Down Expand Up @@ -97,6 +102,7 @@
"style-loader": "^0.21.0",
"uglifyjs-webpack-plugin": "^1.3.0",
"url-loader": "^0.5.8",
"vue-i18n": "^8.14.0",
"vue-jest": "^1.0.2",
"vue-loader": "^13.7.3",
"vue-style-loader": "^3.0.1",
Expand Down
18 changes: 3 additions & 15 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
</template>

<script>
import '@creativecommons/vocabulary/root.css';
import '@creativecommons/vocabulary/vocabulary.css';

import { FETCH_IMAGE_PROVIDERS } from '@/store/action-types';

export default {
Expand All @@ -24,18 +27,3 @@ export default {
},
};
</script>

<style lang="scss">
@import './styles/app';

body {
margin: 0;
}

#app {
font-family: source sans pro,sans-serif !important;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #2c3e50;
}
</style>
1 change: 0 additions & 1 deletion src/assets/help_icon.svg

This file was deleted.

105 changes: 66 additions & 39 deletions src/components/CollectionItem.vue
Original file line number Diff line number Diff line change
@@ -1,25 +1,35 @@
<template>
<div class="card provider-card cell small">
<div class="card-divider">
<span class="provider-name">{{ provider.display_name }}</span>
</div>
<div class="provider-logo">
<a :href="'/collections/'+provider.provider_name">
<img :alt="provider.display_name"
:src="getProviderLogo(provider.provider_name)">
</a>
</div>
<div class="card-section">
<span>Collection size: {{ getProviderImageCount(provider.image_count) }} images</span>
</div>
</div>
<Card class="individual"
:heading="provider.display_name"
is-decked
is-raised
@click.native="goToProvider(provider.provider_name)">
<template #feature>
<div class="featured-content">
<img class="provider-logo"
:alt="provider.display_name"
:src="getProviderLogo(provider.provider_name)">
</div>
</template>
<template #default>
<div class="body-content">&nbsp;</div>
</template>
<template #foot>
{{ $t('count') }}: {{ getProviderImageCount(provider.image_count) }} {{ $t('images') }}
</template>
</Card>
</template>

<script>
import { Card } from '@creativecommons/vocabulary';

import ImageProviderService from '@/api/ImageProviderService';

export default {
const CollectionItem = {
name: 'collection-item',
components: {
Card,
},
props: ['provider'],
methods: {
getProviderImageCount(imageCount) {
Expand All @@ -29,43 +39,60 @@ export default {
const provider = ImageProviderService.getProviderInfo(providerName);
if (provider) {
const logo = provider.logo;
const logoUrl = require(`@/assets/${logo}`); // eslint-disable-line global-require, import/no-dynamic-require

return logoUrl;
return require(`@/assets/${logo}`); // eslint-disable-line global-require, import/no-dynamic-require
}

return '';
},
goToProvider(url) {
window.location.href = `/collections/${url}`;
},
},
};

export default CollectionItem;
</script>

<style lang="scss" scoped>
.provider-card {
width: 18em;
background-color: #dedede;
margin: 0.5em;
}
@import "~@creativecommons/vocabulary/tokens";

.individual {
cursor: pointer;

.provider-name {
font-weight: 800;
--card-foot-background-color: var(--card-body-background-color);
}

.provider-logo {
height: 10em;
line-height: 10em;
white-space: nowrap;
position: relative;

a {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.featured-content {
display: flex;
align-items: center;
justify-content: center;

height: 6em;

img {
width: 100%;
padding: 1em;

.provider-logo {
max-width: 100%;
max-height: 6em;

a {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}

img {
max-width: 100%;
}
}
}

.body-content {
height: 0;
overflow: hidden;
}
</style>

<i18n src="../locales/components/CollectionItem.json">
</i18n>
6 changes: 0 additions & 6 deletions src/components/CopyAttributionButtons.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,3 @@ export default {
},
};
</script>

<style lang="scss" scoped>
@import '../styles/photodetails.scss';


</style>
Loading