Skip to content

Commit

Permalink
20.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertJGabriel committed Sep 6, 2022
1 parent b7e1f82 commit 4143767
Show file tree
Hide file tree
Showing 11 changed files with 150 additions and 164 deletions.
2 changes: 1 addition & 1 deletion app/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"feature_specialized_font_options": {
"message": "Font options"
},
},
"options": {
"message": "Options"
},
Expand Down
48 changes: 48 additions & 0 deletions app/assets/css/app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
@font-face {
font-family: 'opendyslexic';
src: url('/assets/fonts/opendyslexic/OpenDyslexic-Regular.otf');
font-style: normal;
font-weight: normal;
}

@font-face {
font-family: 'opendyslexic';
src: url('/assets/fonts/opendyslexic/OpenDyslexic-Italic.otf');
font-style: italic;
font-weight: normal;
}

@font-face {
font-family: 'opendyslexic';
src: url('/assets/fonts/opendyslexic/OpenDyslexic-Bold.otf');
font-weight: bold;
font-style: normal;
}

@font-face {
font-family: 'opendyslexic';
src: url('/assets/fonts/opendyslexic/OpenDyslexic-BoldItalic.otf');
font-weight: bold;
font-style: italic;
}

@font-face {
font-family: 'opendyslexicmono';
src: url('/assets/fonts/opendyslexic/OpenDyslexicMono-Regular.otf');
font-weight: normal;
font-style: normal;
}

html,
body {
background-color: black;
color: #fff !important;
}

.viewport,
body {
width: 400px;
max-width: 100%;
max-height: 400px;
font-family: 'opendyslexic';
}
11 changes: 2 additions & 9 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,10 @@
content="width=device-width,initial-scale=1,minimal-ui"
name="viewport"
/>
<link rel="stylesheet" href="./assets/css/app.css" />
</head>

<style>
html,
body {
height: 400px;
background-color: black;
}
</style>

<body class="text-base-content h-full helperbird-control">
<body class="text-base-content h-full">
<div id="app"></div>
<script src="scripts/popup.js" type="text/javascript"></script>
</body>
Expand Down
220 changes: 80 additions & 140 deletions app/scripts/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,39 +24,6 @@
$helperbird_i18n('options')
}}</h2>

<div class="flex mb-8 mt-4">
<div class="flex-0 mr-4">
<h2 class="card-title font-normal">
<svg
xmlns="http://www.w3.org/2000/svg"
class="inline-block w-6 h-6 fill-current"
viewBox="0 0 24 24"
>
<path d="M0 0h24v24H0V0z" fill="none" />
<path
d="M9.93 13.5h4.14L12 7.98zM20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-4.05 16.5l-1.14-3H9.17l-1.12 3H5.96l5.11-13h1.86l5.11 13h-2.09z"
/>
</svg>
{{ $helperbird_i18n('options') }}
</h2>
</div>

<div class="flex-1">
<div>
<v-select
label="title"
:searchable="searchable"
:clearable="clearable"
v-bind:options="fonts"
append-to-body
@input="fontChanged"
v-model="selectedFont"
>
</v-select>
</div>
</div>
</div>

<div class="flex mb-8 mt-4">
<div class="flex-1">
<h2 class="card-title font-normal">
Expand All @@ -70,7 +37,11 @@
d="M9.93 13.5h4.14L12 7.98zM20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-4.05 16.5l-1.14-3H9.17l-1.12 3H5.96l5.11-13h1.86l5.11 13h-2.09z"
/>
</svg>
{{ $helperbird_i18n('fontColorLabel') }}
{{
enable === true
? $helperbird_i18n('on')
: $helperbird_i18n('off')
}}
</h2>
</div>

Expand All @@ -87,111 +58,85 @@
</div>
</label>
</div>
</div>
</div>
</main>

<footer>
<div
class="max-w-7xl mx-auto py-4 px-4 sm:px-6 md:flex md:items-center md:justify-between lg:px-8"
>
<div class="carousel w-full pointer-events-none">
<div id="slide1" class="carousel-item relative w-full">
<p class="text-base text-white mx-auto">
Support
<a
href="https://www.patreon.com/opendyslexic"
target="_blank"
class="text-white decoration-white no-underline hover:underline hover:text-white hover:decoration-wavy"
><b>OpenDyslexic</b></a
>
</p>
<div
class="absolute flex justify-between transform -translate-y-1/2 left-5 right-5 top-1/2"
>
<a href="#slide2" class="btn btn-circle">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-6 h-6"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M15.75 19.5L8.25 12l7.5-7.5"
/>
</svg>
</a>
<a href="#slide2" class="btn btn-circle">
<div class="flex mb-8 mt-4">
<div class="flex-0 mr-4">
<h2 class="card-title font-normal">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
class="inline-block w-6 h-6 fill-current"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-6 h-6"
>
<path d="M0 0h24v24H0V0z" fill="none" />
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M8.25 4.5l7.5 7.5-7.5 7.5"
d="M9.93 13.5h4.14L12 7.98zM20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-4.05 16.5l-1.14-3H9.17l-1.12 3H5.96l5.11-13h1.86l5.11 13h-2.09z"
/>
</svg>
</a>
{{ $helperbird_i18n('options') }}
</h2>
</div>
</div>
<div id="slide2" class="carousel-item relative w-full">
<p class="text-base text-white mx-auto">
Powered by
<a
target="_blank"
href="https://www.helperbird.com"
class="text-white decoration-white no-underline hover:underline hover:text-white hover:decoration-wavy"
><b>Helperbird</b></a
>
</p>
<div
class="absolute flex justify-between transform -translate-y-1/2 left-5 right-5 top-1/2"
>
<a href="#slide1" class="btn btn-circle">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-6 h-6"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M15.75 19.5L8.25 12l7.5-7.5"
/>
</svg>
</a>
<a href="#slide1" class="btn btn-circle">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-6 h-6"

<div class="flex-1">
<div>
<v-select
label="title"
:searchable="searchable"
:clearable="clearable"
v-bind:options="fonts"
append-to-body
@input="fontChanged"
v-model="selectedFont"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M8.25 4.5l7.5 7.5-7.5 7.5"
/>
</svg>
</a>
</v-select>
</div>
</div>
</div>
</div>
</div>
</main>

<footer>
<div class="max-auto text-center p-6">
<p
class="text-base text-white mx-auto"
v-bind:class="number === 1 ? 'block' : 'hidden'"
>
Support
<a
href="https://www.patreon.com/opendyslexic"
target="_blank"
class="text-white decoration-white no-underline hover:underline hover:text-white hover:decoration-wavy"
><b>OpenDyslexic</b></a
>
</p>

<p
class="text-base text-white mx-auto"
v-bind:class="
number === 2 || number === 4 ? 'block' : 'hidden'
"
>
Discover
<a
target="_blank"
href="https://www.helperbird.com"
class="text-white decoration-white no-underline hover:underline hover:text-white hover:decoration-wavy"
><b>Helperbird</b></a
>
</p>

<p
class="text-base text-white mx-auto"
v-bind:class="number === 3 ? 'block' : 'hidden'"
>
Review
<a
target="_blank"
href="https://www.helperbird.com"
class="text-white decoration-white no-underline hover:underline hover:text-white hover:decoration-wavy"
><b>this extension</b></a
>
</p>
</div>
</footer>
</div>
</template>
Expand All @@ -205,8 +150,8 @@
return {
paid: true,
enable: null,
font: 'lexend',
font: 'regular',
number: 1,
menuVisible: false,
currentFont: null,
searchable: false,
Expand Down Expand Up @@ -243,12 +188,18 @@
return this.enable;
});
this.number = this.randomIntFromInterval(1, 4);
},
methods: {
fontChanged: function () {
this.save('font', this.selectedFont.font);
},
randomIntFromInterval: function (min, max) {
// min and max included
return Math.floor(Math.random() * (max - min + 1) + min);
},
save(token, type) {
let setting = {};
setting[token] = type;
Expand All @@ -265,15 +216,4 @@
};
</script>

<style scoped>
.viewport,
body {
width: 400px;
max-width: 100%;
max-height: 400px;
}
.red {
color: #fff !important;
}
</style>
<style></style>
10 changes: 2 additions & 8 deletions app/scripts/background/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,10 @@ import { badge } from '../content/badge'; // Done is class
const BADGE = new badge();
// background.js
chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
executeCommand(message).then(sendResponse);
return true;
});

function executeCommand(message) {
console.log(message);
// Reload database.
if (message.app === 'badge') {
BADGE.change(message);
}

sendResponse({ response: 'OpenDyslexic' });
return true;
}
});
1 change: 1 addition & 0 deletions app/scripts/content/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export function sendToContentScriptChrome(object) {
});
}
);
return true; // Chrome bug
}

export function sendToContentScriptFirefox(objectMessage) {
Expand Down
Loading

0 comments on commit 4143767

Please sign in to comment.