From 1b70d2f3c1dbed43317c1da7ed8092daac27168d Mon Sep 17 00:00:00 2001
From: Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>
Date: Thu, 28 Nov 2019 11:08:37 +0100
Subject: Add ranking rules

---
 components/Ranking/RankingRules.vue | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 components/Ranking/RankingRules.vue

(limited to 'components/Ranking/RankingRules.vue')

diff --git a/components/Ranking/RankingRules.vue b/components/Ranking/RankingRules.vue
new file mode 100644
index 0000000..b6c57ef
--- /dev/null
+++ b/components/Ranking/RankingRules.vue
@@ -0,0 +1,31 @@
+<template>
+  <div>
+    <h2>Zasady punktacji</h2>
+    <div class="rules" v-html="rules"></div>
+  </div>
+</template>
+
+<script>
+import rules from '~/assets/zasady-punktacji.md'
+
+export default {
+  name: 'RankingRules',
+  data() {
+    return {
+      rules
+    }
+  }
+}
+</script>
+
+<style>
+.rules table {
+  border-collapse: collapse;
+  margin: 20px 10px;
+}
+
+.rules th,
+.rules td {
+  border: 1px solid #000;
+}
+</style>
-- 
cgit 1.4.1


From e1dd9adf16592e1a66c5d1e255b1085ab944ec58 Mon Sep 17 00:00:00 2001
From: Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>
Date: Thu, 28 Nov 2019 12:36:31 +0100
Subject: Fix markdown parsing

---
 components/Ranking/RankingFirstEntry.vue | 1 +
 components/Ranking/RankingRules.vue      | 5 ++++-
 nuxt.config.js                           | 8 +-------
 3 files changed, 6 insertions(+), 8 deletions(-)

(limited to 'components/Ranking/RankingRules.vue')

diff --git a/components/Ranking/RankingFirstEntry.vue b/components/Ranking/RankingFirstEntry.vue
index edb137d..d9f290b 100644
--- a/components/Ranking/RankingFirstEntry.vue
+++ b/components/Ranking/RankingFirstEntry.vue
@@ -33,6 +33,7 @@ export default {
   grid-template-columns: 15% 60% 25%;
   box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.25);
 
+  line-height: 50px;
   font-size: 26px;
   font-weight: 600;
 }
diff --git a/components/Ranking/RankingRules.vue b/components/Ranking/RankingRules.vue
index b6c57ef..5ae3c74 100644
--- a/components/Ranking/RankingRules.vue
+++ b/components/Ranking/RankingRules.vue
@@ -8,11 +8,13 @@
 <script>
 import rules from '~/assets/zasady-punktacji.md'
 
+const md = require('markdown-it')()
+
 export default {
   name: 'RankingRules',
   data() {
     return {
-      rules
+      rules: md.render(rules)
     }
   }
 }
@@ -26,6 +28,7 @@ export default {
 
 .rules th,
 .rules td {
+  padding: 5px 15px;
   border: 1px solid #000;
 }
 </style>
diff --git a/nuxt.config.js b/nuxt.config.js
index 4c07f72..104781c 100644
--- a/nuxt.config.js
+++ b/nuxt.config.js
@@ -69,8 +69,7 @@ export default {
   modules: [
     // Doc: https://axios.nuxtjs.org/usage
     '@nuxtjs/axios',
-    '@nuxtjs/pwa',
-    '@nuxtjs/markdownit'
+    '@nuxtjs/pwa'
   ],
   /*
    ** Axios module configuration
@@ -80,11 +79,6 @@ export default {
   /*
    ** Build configuration
    */
-  markdownit: {
-    preset: 'default',
-    linkify: true,
-    breaks: true
-  },
   build: {
     /*
      ** You can extend webpack config here
-- 
cgit 1.4.1

